@sisense/sdk-ui-vue 2.34.0 → 2.36.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/index.cjs +1 -1
- package/dist/index.js +76 -49
- package/dist/src/components/charts/area-chart.d.ts +12 -20
- package/dist/src/components/charts/area-range-chart.d.ts +39 -28
- package/dist/src/components/charts/areamap-chart.d.ts +23 -25
- package/dist/src/components/charts/bar-chart.d.ts +16 -25
- package/dist/src/components/charts/boxplot-chart.d.ts +22 -26
- package/dist/src/components/charts/calendar-heatmap-chart.d.ts +16 -22
- package/dist/src/components/charts/chart.d.ts +14 -43
- package/dist/src/components/charts/column-chart.d.ts +16 -25
- package/dist/src/components/charts/funnel-chart.d.ts +23 -26
- package/dist/src/components/charts/indicator-chart.d.ts +90 -20
- package/dist/src/components/charts/kpi-chart.d.ts +16 -18
- package/dist/src/components/charts/line-chart.d.ts +17 -25
- package/dist/src/components/charts/pie-chart.d.ts +20 -23
- package/dist/src/components/charts/pivot-table.d.ts +251 -18
- package/dist/src/components/charts/polar-chart.d.ts +16 -24
- package/dist/src/components/charts/sankey-chart.d.ts +13 -14
- package/dist/src/components/charts/scatter-chart.d.ts +23 -23
- package/dist/src/components/charts/scattermap-chart.d.ts +19 -23
- package/dist/src/components/charts/streamgraph-chart.d.ts +51 -17
- package/dist/src/components/charts/sunburst-chart.d.ts +15 -23
- package/dist/src/components/charts/table.d.ts +27 -24
- package/dist/src/components/charts/treemap-chart.d.ts +15 -23
- package/dist/src/components/dashboard/dashboard-model.d.ts +14 -0
- package/dist/src/components/dashboard/index.d.ts +1 -0
- package/dist/src/components/filters/criteria-filter-tile.d.ts +8 -0
- package/dist/src/components/filters/date-range-filter-tile.d.ts +8 -0
- package/dist/src/components/filters/filter-tile.d.ts +12 -1
- package/dist/src/components/filters/index.d.ts +2 -2
- package/dist/src/components/filters/member-filter-tile.d.ts +8 -0
- package/dist/src/components/widgets/chart-widget.d.ts +44 -46
- package/dist/src/components/widgets/index.d.ts +5 -2
- package/dist/src/components/widgets/widget-by-id.d.ts +20 -1
- package/dist/src/components/widgets/widget-config.d.ts +57 -0
- package/dist/src/components/widgets/widget-header-config.d.ts +6 -0
- package/dist/src/components/widgets/widget-model.d.ts +14 -0
- package/dist/src/components/widgets/widget.d.ts +46 -10
- package/dist/src/composables/use-get-widget-model.d.ts +2 -1
- package/dist/src/sdk-ui-core-exports.d.ts +1 -1
- package/dist/src/utilities/dashboard-model-translator.d.ts +1 -1
- package/dist/src/utilities/widget-model-translator.d.ts +5 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var H=Object.defineProperty;var B=(e,n,r)=>n in e?H(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var j=(e,n,r)=>(B(e,typeof n!="symbol"?n+"":n,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@sisense/sdk-ui-preact"),o=require("vue"),t=require("./use-tracking-bc372dcd.cjs"),x=require("@sisense/sdk-data"),q=o.defineComponent({props:{clearDrilldownSelections:{type:Function,required:!0},currentDimension:{type:Object,required:!0},sliceDrilldownSelections:{type:Function,required:!0},filtersDisplayValues:{type:Array,required:!0}},setup:(e,{slots:n})=>t.setupHelperWithChildren(i.DrilldownBreadcrumbs,e,n,[])}),E=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.AreaChart,e)}),Q=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.BarChart,e)}),I=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.CalendarHeatmapChart,e)}),G=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.ColumnChart,e)}),L=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.FunnelChart,e)}),_=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.LineChart,e)}),V=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.PieChart,e)}),U=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.ScatterChart,e)}),N=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],refreshCounter:Number,styleOptions:Object,onDataReady:Function},setup:e=>t.setupHelper(i.Table,e)}),J=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,refreshCounter:Number,styleOptions:Object,onDataPointClick:Function,onDataPointContextMenu:Function},setup:e=>t.setupHelper(i.PivotTable,e)}),K=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.TreemapChart,e)}),$=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.SunburstChart,e)}),z=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.PolarChart,e)}),X=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function},setup:e=>t.setupHelper(i.IndicatorChart,e)}),Y=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function},setup:e=>t.setupHelper(i.KpiChart,e)}),Z=o.defineComponent({props:{chartType:{type:String,required:!0},dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object,refreshCounter:Number},setup:e=>t.setupHelper(i.Chart,e)}),ee=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.BoxplotChart,e)}),te=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onDataReady:Function,onDataPointClick:Function},setup:e=>t.setupHelper(i.AreamapChart,e)}),ne=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onDataReady:Function,onDataPointClick:Object},setup:e=>t.setupHelper(i.ScattermapChart,e)}),oe=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.StreamgraphChart,e)}),re=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.AreaRangeChart,e)}),ie=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.SankeyChart,e)}),se=o.defineComponent({props:{attribute:{type:Object,required:!0},datasource:[String,Object],earliestDate:Object,filter:{type:Object,required:!0},lastDate:Object,onChange:{type:Function,required:!0},parentFilters:Object,title:{type:String,required:!0},tiled:Boolean,onDelete:Function,onEdit:Function},setup:e=>t.setupHelper(i.DateRangeFilterTile,e)}),ae=o.defineComponent({props:{attribute:{type:Object,required:!0},dataSource:[String,Object],filter:{type:[Object,null],required:!0},onChange:{type:Function,required:!0},parentFilters:Object,title:{type:String,required:!0},onDelete:Function,onEdit:Function},setup:e=>t.setupHelper(i.MemberFilterTile,e)}),ue=o.defineComponent({props:{arrangement:String,filter:{type:Object,required:!0},measures:Array,onUpdate:{type:Function,required:!0},title:{type:String,required:!0},onDelete:Function,onEdit:Function},setup:e=>t.setupHelper(i.CriteriaFilterTile,e)}),ce=o.defineComponent({props:{title:{type:String,required:!0},filter:{type:Object,required:!0},arrangement:String,onUpdate:{type:Function,required:!0},limit:Object,tileDesignOptions:Object,onDelete:Function,onEdit:Function},setup:e=>t.setupHelper(i.RelativeDateFilterTile,e)}),le=o.defineComponent({props:{filter:{type:Object,required:!0},defaultDataSource:[String,Object],onChange:{type:Function,required:!0},onDelete:Function,onEdit:Function},setup:e=>t.setupHelper(i.FilterTile,e)}),de=o.defineComponent({props:{filters:{type:[Array,Object],required:!0},defaultDataSource:[String,Object],dataSources:Array,config:Object,onFiltersChange:{type:Function,required:!0}},setup:e=>t.setupHelper(i.FiltersPanel,e)}),pe=e=>{const[n,r]=t.useReducer(i.queryStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext();t.useTracking("useExecuteQuery");const a=o.ref(void 0),u=async c=>{try{const{dataSource:d,dimensions:l,measures:p,filters:h,highlights:g,count:b,offset:y,ungroup:C,includeRowCount:O,onBeforeQuery:m}=t.toPlainObject(e),{filters:R,relations:v}=x.getFilterListAndRelationsJaql(h);r({type:"loading"});const f={dataSource:d,dimensions:l,measures:p,filters:R,filterRelations:v,highlights:g,count:b,offset:y,ungroup:C},P={onBeforeQuery:t.toPlainValue(m)};if(O){const S=await i.executeQueryWithRowCount(f,c,P);a.value=S.rowCount,r({type:"success",data:S.data})}else{a.value=void 0;const S=await i.executeQuery(f,c,P);r({type:"success",data:S})}}catch(d){r({type:"error",error:d})}};return o.watch([...t.collectRefs(e),s],()=>{const{app:c}=s.value,{enabled:d}=t.toPlainObject(e);!c||!(d===void 0||d===!0)||u(c)},{immediate:!0}),{...o.toRefs(n.value),rowCount:a}},be=e=>{const n=o.ref(void 0),r=o.ref(void 0),s=o.ref(void 0);t.useTracking("useExecuteQueryByWidgetId");const[a,u]=t.useReducer(i.queryStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),c=t.getSisenseContext(),d=async l=>{try{u({type:"loading"});const{filters:p,...h}=t.toPlainObject(e),{filters:g}=x.getFilterListAndRelationsJaql(t.toPlainValue(p)),{data:b,query:y,pivotQuery:C,rowCount:O}=await i.executeQueryByWidgetId({...h,filters:g,app:l});u({type:"success",data:b}),n.value=y,r.value=C,s.value=O}catch(p){u({type:"error",error:p})}};return o.watch([...t.collectRefs(e),c],()=>{const{app:l}=c.value,{enabled:p}=t.toPlainObject(e);!l||!(p===void 0||p===!0)||d(l)},{immediate:!0}),{...o.toRefs(a.value),query:n,pivotQuery:r,rowCount:s}},ge=e=>{t.useTracking("useExecuteCsvQuery");const n=new i.HookAdapter(i.useExecuteCsvQueryInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},fe=e=>{t.useTracking("useExecutePivotQuery");const n=new i.HookAdapter(i.useExecutePivotQueryInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},he=e=>{t.useTracking("useExecuteCustomWidgetQuery");const n=new i.HookAdapter(i.useExecuteCustomWidgetQueryInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({data:void 0,isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},ye=e=>{t.useTracking("useGetFilterMembers");const{filter:n,parentFilters:r=[]}=t.toPlainObject(e),s={selectedMembers:[],allMembers:[],...x.isMembersFilter(n)?{excludeMembers:n.config.excludeMembers,enableMultiSelection:n.config.enableMultiSelection,hasBackgroundFilter:!!n.config.backgroundFilter&&r.length===0}:{excludeMembers:!1,enableMultiSelection:!1,hasBackgroundFilter:!1}},a=new i.HookAdapter(i.useGetFilterMembers,[t.createSisenseContextConnector()]),[u,c]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:s,isAllItemsLoaded:!1});return a.subscribe(d=>{c(d)}),a.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{a.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{a.destroy()}),o.toRefs(u.value)},Ce=e=>{t.useTracking("useGetDataSourceDimensions");const n=new i.HookAdapter(i.useGetDataSourceDimensionsInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,dimensions:void 0,error:void 0,status:"loading"});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},Oe=e=>{t.useTracking("useGetDashboardModel");const[n,r]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext(),a=t.getThemeContext(),u=async d=>{try{r({type:"loading"});const{dashboardOid:l,includeWidgets:p,includeFilters:h}=t.toPlainObject(e),g=await i.getDashboardModel(d.httpClient,l,{includeWidgets:p,includeFilters:h},a.value,d.settings);r({type:"success",data:g})}catch(l){r({type:"error",error:l})}};o.watch([...t.collectRefs(e),s,a],()=>{const{app:d}=s.value,{enabled:l}=t.toPlainObject(e);!d||!(l===void 0||l===!0)||u(d)},{immediate:!0});const c=o.toRefs(n.value);return o.toRefs(i.translateToDashboardResponse(c))},me=e=>{t.useTracking("useGetDashboardModels");const[n,r]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext(),a=t.getThemeContext(),u=async d=>{try{r({type:"loading"});const l=t.toPlainObject(e),p=await i.getDashboardModels(d.httpClient,l,a.value,d.settings);r({type:"success",data:p})}catch(l){r({type:"error",error:l})}};o.watch([...t.collectRefs(e),s,a],()=>{const{app:d}=s.value,{enabled:l}=t.toPlainObject(e);!d||!(l===void 0||l===!0)||u(d)},{immediate:!0});const c=o.toRefs(n.value);return o.toRefs(i.translateToDashboardsResponse(c))},Se=e=>{t.useTracking("useGetSharedFormula");const n=new i.HookAdapter(i.useGetSharedFormulaInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,formula:null});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},De=e=>{t.useTracking("useGetWidgetModel");const[n,r]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext(),a=async u=>{try{r({type:"loading"});const{dashboardOid:c,widgetOid:d}=t.toPlainObject(e),l=await i.getWidgetModel(u.httpClient,c,d);r({type:"success",data:l})}catch(c){r({type:"error",error:c})}};return o.watch([...t.collectRefs(e),s],()=>{const{app:u}=s.value,{enabled:c}=t.toPlainObject(e);!u||!(c===void 0||c===!0)||a(u)},{immediate:!0}),o.toRefs(n.value)},Fe=e=>{t.useTracking("useGetHierarchyModels");const[n,r]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext(),a=async u=>{try{r({type:"loading"});const c=await i.getHierarchyModels(u.httpClient,t.toPlainObject(e));r({type:"success",data:c})}catch(c){r({type:"error",error:c})}};return o.watch([...t.collectRefs(e),s],()=>{const{app:u}=s.value,{enabled:c}=t.toPlainObject(e);!u||!(c===void 0||c===!0)||a(u)},{immediate:!0}),o.toRefs(n.value)},Pe=(e,n,r)=>{const[s,a]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),u=t.getSisenseContext(),c=async d=>{try{a({type:"loading"});const l=t.toPlainValue(e),p=n?t.toPlainObject(n):{},h=r?t.toPlainObject(r):{},g={requestConfig:h.requestConfig?t.toPlainObject(h.requestConfig):{},skipTrackingParam:!0},b=await d.call(d.url+l,p,g);a({type:"success",data:b})}catch(l){a({type:"error",error:l})}};return o.watch([...t.collectRefs(e,n,r),u],()=>{const{app:d}=u.value,l=t.toPlainObject(r||{}).enabled;!d||!(l===void 0||l===!0)||c(d.httpClient)},{immediate:!0}),o.toRefs(s.value)};class je{constructor(n,r){j(this,"app",null);j(this,"container",null);j(this,"isDestroyed",!1);j(this,"propsRef",null);this.componentClass=n,this.contexts=r}mount(n,r){if(this.app||this.isDestroyed)return;this.container=n,this.propsRef=o.ref(r);const s={setup:()=>()=>o.h(this.componentClass,this.propsRef.value)};this.app=o.createApp(s),this.app.provide(t.sisenseContextKey,this.contexts.sisenseContext),this.app.provide(t.themeContextConfigKey,this.contexts.themeContext),this.app.provide(t.customWidgetsContextKey,this.contexts.customWidgetsContext),this.app.mount(n)}update(n){!this.propsRef||this.isDestroyed||(this.propsRef.value=n)}destroy(){this.isDestroyed||(this.isDestroyed=!0,this.app&&(this.app.unmount(),this.app=null),this.container=null,this.propsRef=null)}isActive(){return this.app!==null&&!this.isDestroyed}}function ve(e,n){return r=>{const s={adapterFactory:()=>new je(e,n),componentProps:r};return i.createElement(i.ExternalComponentAdapterElement,s)}}function xe(e){return o.defineComponent({name:"PreactComponent",inheritAttrs:!1,setup:(n,{attrs:r})=>{const s=o.ref(null),a=new i.ComponentAdapter(e,t.createDefaultContextConnectors());return o.onBeforeUnmount(()=>{a.destroy()}),()=>(s.value&&a.render(s.value,t.toDeepRaw({...r})),o.h("div",{ref:s,style:"width: 100%; height: 100%"}))}})}function w(e){const n=new WeakMap,r=new WeakMap,s=(a,u)=>{n.set(a,u),r.set(u,a)};return{toPreactComponent:a=>{const u=n.get(a);if(u)return u;const c=ve(a,e);return s(a,c),c},fromPreactComponent:a=>{const u=r.get(a);if(u)return u;const c=xe(a);return s(c,a),c}}}const Re=()=>{const e=t.getCustomWidgetsContext(),n=w({sisenseContext:t.getSisenseContext(),themeContext:t.getThemeContext(),customWidgetsContext:e});return{registerCustomWidget:(r,s)=>{e.value.customWidgetsMap.has(r)||(e.value.customWidgetsMap.set(r,n.toPreactComponent(s)),e.value={customWidgetsMap:new Map(e.value.customWidgetsMap)})},unregisterCustomWidget:r=>{e.value.customWidgetsMap.delete(r)&&(e.value={customWidgetsMap:new Map(e.value.customWidgetsMap)})},hasCustomWidget:r=>e.value.customWidgetsMap.has(r)}},we=(e,n={})=>{t.useTracking("useComposedDashboard");const r=l=>t.toPlainObject(l),s=new i.HookAdapter(i.useComposedDashboardInternal,[t.createSisenseContextConnector()]),[a,u]=t.useRefState(t.toPlainObject(e));s.subscribe(({dashboard:l})=>{u(l)}),s.run(r(e),n),o.watch([...t.collectRefs(e)],()=>{s.run(r(e),n)}),o.onBeforeUnmount(()=>{s.destroy()});const c=i.createHookApiFacade(s,"setFilters"),d=i.createHookApiFacade(s,"setWidgetsLayout");return{dashboard:a,setFilters:c,setWidgetsLayout:d}},Me=(e,n)=>{t.useTracking("useJtdWidget");const r=new i.HookAdapter(i.useJtdWidget,[t.createSisenseContextConnector(),t.createThemeContextConnector()]),s=o.ref(null);r.subscribe(u=>{s.value=u});const a=()=>{const u=o.toValue(e),c=t.toPlainObject(n);r.run(u,c)};return a(),o.watch([...t.collectRefs(e),...t.collectRefs(n)],()=>{a()}),o.onBeforeUnmount(()=>{r.destroy()}),s},W=o.defineComponent({props:{closeContextMenu:{type:Function,required:!0},itemSections:Array,position:Object},setup:(e,{slots:n})=>t.setupHelperWithChildren(i.ContextMenu,e,n,[])}),Ae=({drilldownPaths:e,initialDimension:n})=>{if(!n)throw new Error("Initial dimension has to be specified to use drilldown with custom components");const r=o.ref([]),s=o.ref(),a=o.ref([]),u=o.ref([]),c=o.computed(()=>[i.translateColumnToAttribute(n),...r.value.map(({nextDimension:b})=>b)]),d=o.computed(()=>e.value.filter(b=>{if(x.MetadataTypes.isAttribute(b)){const O=b;return c.value.every(m=>!i.isSameAttribute(m,O))}const C=b;return c.value.every((O,m)=>i.isSameAttribute(O,C.levels[m]))})),l=(b,y,C)=>{r.value=i.updateDrilldownSelections(r.value,b,y,C),g()},p=b=>{r.value=r.value.slice(0,b),g()},h=()=>{r.value=[],g()},g=()=>{const b=C=>C==="drilldown.breadcrumbsAllSuffix"?"All":C,y=i.processDrilldownSelections(r.value,n,b);s.value=y.drilldownDimension,a.value=y.drilldownFilters,u.value=y.drilldownFiltersDisplayValues};return g(),{drilldownSelections:r,availableDrilldownPaths:d,drilldownDimension:s,drilldownFilters:a,drilldownFiltersDisplayValues:u,selectDrilldown:l,sliceDrilldownSelections:p,clearDrilldownSelections:h}},Te=o.defineComponent({props:{config:{type:Object,required:!1,default:()=>({})},drilldownPaths:{type:Array,required:!1,default:()=>[]},initialDimension:{type:Object,required:!0,default:()=>({})}},setup:()=>{}}),qe={style:{display:"flex","flex-direction":"column",height:"100%"}},We={style:{"flex-grow":"1","min-wdith":"0","min-height":"0"}},ke=o.defineComponent({__name:"drilldown-widget",props:Te.props,setup(e){const n=e,{drilldownPaths:r,initialDimension:s,config:a}=o.toRefs(n),u=o.ref(null),c=o.ref([]),{drilldownFilters:d,drilldownDimension:l,drilldownFiltersDisplayValues:p,availableDrilldownPaths:h,selectDrilldown:g,sliceDrilldownSelections:b,clearDrilldownSelections:y}=Ae({drilldownPaths:r,initialDimension:s.value}),C=f=>{g(c.value,f)},O=o.computed(()=>{const f=T=>T==="drilldown.drillMenuItem"?"Drill":T,P=i.getSelectionTitleMenuItem(c.value,l.value),S=i.getDrilldownMenuItems(h.value,l.value,C,f);return S?[P,S]:[P]}),m=f=>{u.value=f},R=f=>{c.value=f},v=()=>{u.value=null};return(f,P)=>(o.openBlock(),o.createElementBlock("div",qe,[o.renderSlot(f.$slots,"contextMenu",{contextMenuProps:{position:u.value,itemSections:O.value,closeContextMenu:v}},()=>[o.createVNode(o.unref(W),{position:u.value,itemSections:O.value,closeContextMenu:v},null,8,["position","itemSections"])]),o.renderSlot(f.$slots,"breadcrumbs",{drilldownBreadcrumbsProps:{clearDrilldownSelections:o.unref(y),sliceDrilldownSelections:o.unref(b),drilldownFiltersDisplayValues:o.unref(p),drilldownDimension:o.unref(l)}},()=>[o.createVNode(o.unref(q),{"clear-drilldown-selections":o.unref(y),"slice-drilldown-selections":o.unref(b),"filters-display-values":o.unref(p),"current-dimension":o.unref(l)},null,8,["clear-drilldown-selections","slice-drilldown-selections","filters-display-values","current-dimension"])]),o.createElementVNode("div",We,[o.renderSlot(f.$slots,"chart",{drilldownFilters:o.unref(d),drilldownDimension:o.unref(l),onDataPointsSelected:R,onContextMenu:m})])]))}}),He=o.defineComponent({props:{bottomSlot:Object,chartType:{type:String,required:!0},dataOptions:{type:Object,required:!0},dataSource:[String,Object],description:String,drilldownOptions:Object,filters:[Array,Object],highlightSelectionDisabled:Boolean,highlights:Array,onBeforeRender:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object,config:Object,id:String,title:String,topSlot:Object,widgetStyleOptions:Object,onDataReady:Function},setup:e=>t.setupHelper(i.ChartWidget,e)}),Be=o.defineComponent({props:{bottomSlot:Object,dashboardOid:{type:String,required:!0},description:String,drilldownOptions:Object,filters:[Array,Object],filtersMergeStrategy:Object,highlightSelectionDisabled:Boolean,highlights:Array,includeDashboardFilters:Boolean,onBeforeRender:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object,title:String,topSlot:Object,widgetOid:{type:String,required:!0},widgetStyleOptions:Object,onDataReady:Function},setup:e=>t.setupHelper(i.WidgetById,e)}),Ee=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSource:[String,Object],description:String,filters:[Object,Array],styleOptions:Object,config:Object,id:String,drilldownOptions:Object,title:String,topSlot:Object,bottomSlot:Object,highlights:Array,onDataPointClick:Function,onDataPointContextMenu:Function,onDataCellFormat:Function,onHeaderCellFormat:Function},setup:e=>t.setupHelper(i.PivotTableWidget,e)}),Qe=o.defineComponent({props:{id:{type:String,required:!0},widgetType:{type:String,required:!0},chartType:String,customWidgetType:String,dataSource:Object,dataOptions:Object,filters:Array,highlights:Array,styleOptions:Object,config:Object,customOptions:Object,drilldownOptions:Object,title:String,description:String,highlightSelectionDisabled:Boolean,onBeforeRender:Function,onDataReady:Function,onBeforeMenuOpen:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.Widget,e)});function M(e,n){return n?e.map(r=>({...r,component:n.toPreactComponent(r.component)})):e}function A(e,n){return n?e.map(r=>({...r,component:n.fromPreactComponent(r.component)})):e}function Ie(e,n){return r=>M(e(A(r,n)),n)}function Ge(e,n){return r=>A(e(M(r,n)),n)}function Le(e,n){const{items:r,onBeforeRender:s,...a}=e;return{...a,...r&&{items:M(r,n)},...s&&{onBeforeRender:Ie(s,n)}}}function _e(e,n){const{items:r,onBeforeRender:s,...a}=e;return{...a,...r&&{items:A(r,n)},...s&&{onBeforeRender:Ge(s,n)}}}function k(e,n){const{header:r,...s}=e;return{...s,...r&&{header:Le(r,n)}}}function Ve(e,n){const{header:r,...s}=e;return{...s,...r&&{header:_e(r,n)}}}function D(e,n){const{config:r,...s}=e;return{...s,...r&&{config:k(r,n)}}}function F(e,n){const{config:r,...s}=e;return{...s,...r&&{config:Ve(r,n)}}}function Ue(e,n){const{config:r,...s}=e;return{...s,...r&&{config:k(r,n)}}}const Ne=o.defineComponent({props:{dashboardOid:{type:String,required:!0},config:Object},setup:e=>{const n=w({sisenseContext:t.getSisenseContext(),themeContext:t.getThemeContext(),customWidgetsContext:t.getCustomWidgetsContext()});return t.setupHelper(i.DashboardById,()=>Ue(t.toDeepRaw(e),n))}}),Je=o.defineComponent({props:{title:String,layoutOptions:Object,config:Object,widgets:{type:Object,required:!0},filters:[Object,Array],defaultDataSource:[String,Object],widgetsOptions:Object,styleOptions:Object},setup:e=>{const n=w({sisenseContext:t.getSisenseContext(),themeContext:t.getThemeContext(),customWidgetsContext:t.getCustomWidgetsContext()});return t.setupHelper(i.Dashboard,()=>D(t.toDeepRaw(e),n))}});function Ke(e){return F(i.dashboardModelTranslator.toDashboardProps(e))}const $e=Object.freeze(Object.defineProperty({__proto__:null,toDashboardProps:Ke},Symbol.toStringTag,{value:"Module"})),ze=(e,n)=>F(i.dashboardHelpers.replaceFilters(D(e),n)),Xe=(e,n)=>F(i.dashboardHelpers.addFilter(D(e),n)),Ye=(e,n)=>F(i.dashboardHelpers.addFilters(D(e),n)),Ze=(e,n,r)=>F(i.dashboardHelpers.replaceFilter(D(e),n,r)),et=(e,n)=>F(i.dashboardHelpers.removeFilter(D(e),n)),tt=(e,n)=>F(i.dashboardHelpers.removeFilters(D(e),n)),nt=Object.freeze(Object.defineProperty({__proto__:null,addFilter:Xe,addFilters:Ye,removeFilter:et,removeFilters:tt,replaceFilter:Ze,replaceFilters:ze},Symbol.toStringTag,{value:"Module"})),ot=e=>i.widgetModelTranslator.toExecuteQueryParams(e),rt=e=>i.widgetModelTranslator.toExecutePivotQueryParams(e);function it(e){return i.widgetModelTranslator.toChartProps(e)}function st(e){return i.widgetModelTranslator.toTableProps(e)}function at(e){return i.widgetModelTranslator.toPivotTableProps(e)}function ut(e){return i.widgetModelTranslator.toChartWidgetProps(e)}function ct(e){return i.widgetModelTranslator.toPivotTableWidgetProps(e)}function lt(e){return i.widgetModelTranslator.toTextWidgetProps(e)}function dt(e){return i.widgetModelTranslator.toWidgetProps(e)}const pt=Object.freeze(Object.defineProperty({__proto__:null,toChartProps:it,toChartWidgetProps:ut,toExecutePivotQueryParams:rt,toExecuteQueryParams:ot,toPivotTableProps:at,toPivotTableWidgetProps:ct,toTableProps:st,toTextWidgetProps:lt,toWidgetProps:dt},Symbol.toStringTag,{value:"Module"}));Object.defineProperty(exports,"DashboardHeaderTargets",{enumerable:!0,get:()=>i.DashboardHeaderTargets});Object.defineProperty(exports,"WidgetHeaderMenuTargets",{enumerable:!0,get:()=>i.WidgetHeaderMenuTargets});Object.defineProperty(exports,"boxWhiskerProcessResult",{enumerable:!0,get:()=>i.boxWhiskerProcessResult});Object.defineProperty(exports,"extractDimensionsAndMeasures",{enumerable:!0,get:()=>i.extractDimensionsAndMeasures});Object.defineProperty(exports,"formatDataSet",{enumerable:!0,get:()=>i.formatDataSet});Object.defineProperty(exports,"formatDate",{enumerable:!0,get:()=>i.formatDate});Object.defineProperty(exports,"formatNumber",{enumerable:!0,get:()=>i.formatNumber});Object.defineProperty(exports,"getDefaultDateFormat",{enumerable:!0,get:()=>i.getDefaultDateFormat});exports.CustomWidgetsProvider=t.CustomWidgetsProvider;exports.SisenseContextProvider=t.SisenseContextProvider;exports.ThemeProvider=t.ThemeProvider;exports.AreaChart=E;exports.AreaRangeChart=re;exports.AreamapChart=te;exports.BarChart=Q;exports.BoxplotChart=ee;exports.CalendarHeatmapChart=I;exports.Chart=Z;exports.ChartWidget=He;exports.ColumnChart=G;exports.ContextMenu=W;exports.CriteriaFilterTile=ue;exports.Dashboard=Je;exports.DashboardById=Ne;exports.DateRangeFilterTile=se;exports.DrilldownBreadcrumbs=q;exports.DrilldownWidget=ke;exports.FilterTile=le;exports.FiltersPanel=de;exports.FunnelChart=L;exports.IndicatorChart=X;exports.KpiChart=Y;exports.LineChart=_;exports.MemberFilterTile=ae;exports.PieChart=V;exports.PivotTable=J;exports.PivotTableWidget=Ee;exports.PolarChart=z;exports.RelativeDateFilterTile=ce;exports.SankeyChart=ie;exports.ScatterChart=U;exports.ScattermapChart=ne;exports.StreamgraphChart=oe;exports.SunburstChart=$;exports.Table=N;exports.TreemapChart=K;exports.Widget=Qe;exports.WidgetById=Be;exports.dashboardHelpers=nt;exports.dashboardModelTranslator=$e;exports.useComposedDashboard=we;exports.useCustomWidgets=Re;exports.useExecuteCsvQuery=ge;exports.useExecuteCustomWidgetQuery=he;exports.useExecutePivotQuery=fe;exports.useExecuteQuery=pe;exports.useExecuteQueryByWidgetId=be;exports.useFetch=Pe;exports.useGetDashboardModel=Oe;exports.useGetDashboardModels=me;exports.useGetDataSourceDimensions=Ce;exports.useGetFilterMembers=ye;exports.useGetHierarchyModels=Fe;exports.useGetSharedFormula=Se;exports.useGetWidgetModel=De;exports.useJtdWidget=Me;exports.widgetModelTranslator=pt;
|
|
1
|
+
"use strict";var H=Object.defineProperty;var B=(e,n,r)=>n in e?H(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var P=(e,n,r)=>(B(e,typeof n!="symbol"?n+"":n,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@sisense/sdk-ui-preact"),o=require("vue"),t=require("./use-tracking-bc372dcd.cjs"),x=require("@sisense/sdk-data"),q=o.defineComponent({props:{clearDrilldownSelections:{type:Function,required:!0},currentDimension:{type:Object,required:!0},sliceDrilldownSelections:{type:Function,required:!0},filtersDisplayValues:{type:Array,required:!0}},setup:(e,{slots:n})=>t.setupHelperWithChildren(i.DrilldownBreadcrumbs,e,n,[])}),E=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.AreaChart,e)}),Q=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.BarChart,e)}),I=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.CalendarHeatmapChart,e)}),G=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.ColumnChart,e)}),L=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.FunnelChart,e)}),_=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.LineChart,e)}),V=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.PieChart,e)}),U=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.ScatterChart,e)}),N=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],refreshCounter:Number,styleOptions:Object,onDataReady:Function},setup:e=>t.setupHelper(i.Table,e)}),J=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,refreshCounter:Number,styleOptions:Object,onDataPointClick:Function,onDataPointContextMenu:Function},setup:e=>t.setupHelper(i.PivotTable,e)}),K=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.TreemapChart,e)}),$=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.SunburstChart,e)}),z=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.PolarChart,e)}),X=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function},setup:e=>t.setupHelper(i.IndicatorChart,e)}),Y=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function},setup:e=>t.setupHelper(i.KpiChart,e)}),Z=o.defineComponent({props:{chartType:{type:String,required:!0},dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object,refreshCounter:Number},setup:e=>t.setupHelper(i.Chart,e)}),ee=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.BoxplotChart,e)}),te=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onDataReady:Function,onDataPointClick:Function},setup:e=>t.setupHelper(i.AreamapChart,e)}),ne=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onDataReady:Function,onDataPointClick:Object},setup:e=>t.setupHelper(i.ScattermapChart,e)}),oe=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.StreamgraphChart,e)}),re=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object},setup:e=>t.setupHelper(i.AreaRangeChart,e)}),ie=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSet:[String,Object],filters:[Object,Array],highlights:Array,styleOptions:Object,onBeforeRender:Function,onDataReady:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.SankeyChart,e)}),se=o.defineComponent({props:{attribute:{type:Object,required:!0},datasource:[String,Object],earliestDate:Object,filter:{type:Object,required:!0},lastDate:Object,onChange:{type:Function,required:!0},parentFilters:Object,title:{type:String,required:!0},tiled:Boolean,onDelete:Function,onEdit:Function,config:Object},setup:e=>t.setupHelper(i.DateRangeFilterTile,e)}),ae=o.defineComponent({props:{attribute:{type:Object,required:!0},dataSource:[String,Object],filter:{type:[Object,null],required:!0},onChange:{type:Function,required:!0},parentFilters:Object,title:{type:String,required:!0},onDelete:Function,onEdit:Function,config:Object},setup:e=>t.setupHelper(i.MemberFilterTile,e)}),ce=o.defineComponent({props:{arrangement:String,filter:{type:Object,required:!0},measures:Array,onUpdate:{type:Function,required:!0},title:{type:String,required:!0},onDelete:Function,onEdit:Function,config:Object},setup:e=>t.setupHelper(i.CriteriaFilterTile,e)}),ue=o.defineComponent({props:{title:{type:String,required:!0},filter:{type:Object,required:!0},arrangement:String,onUpdate:{type:Function,required:!0},limit:Object,tileDesignOptions:Object,onDelete:Function,onEdit:Function,config:Object},setup:e=>t.setupHelper(i.RelativeDateFilterTile,e)}),le=o.defineComponent({props:{filter:{type:Object,required:!0},defaultDataSource:[String,Object],onChange:{type:Function,required:!0},onDelete:Function,onEdit:Function,config:Object},setup:e=>t.setupHelper(i.FilterTile,e)}),de=o.defineComponent({props:{filters:{type:[Array,Object],required:!0},defaultDataSource:[String,Object],dataSources:Array,config:Object,onFiltersChange:{type:Function,required:!0}},setup:e=>t.setupHelper(i.FiltersPanel,e)}),pe=e=>{const[n,r]=t.useReducer(i.queryStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext();t.useTracking("useExecuteQuery");const a=o.ref(void 0),c=async u=>{try{const{dataSource:d,dimensions:l,measures:p,filters:h,highlights:g,count:b,offset:y,ungroup:C,includeRowCount:O,onBeforeQuery:m}=t.toPlainObject(e),{filters:R,relations:v}=x.getFilterListAndRelationsJaql(h);r({type:"loading"});const f={dataSource:d,dimensions:l,measures:p,filters:R,filterRelations:v,highlights:g,count:b,offset:y,ungroup:C},j={onBeforeQuery:t.toPlainValue(m)};if(O){const S=await i.executeQueryWithRowCount(f,u,j);a.value=S.rowCount,r({type:"success",data:S.data})}else{a.value=void 0;const S=await i.executeQuery(f,u,j);r({type:"success",data:S})}}catch(d){r({type:"error",error:d})}};return o.watch([...t.collectRefs(e),s],()=>{const{app:u}=s.value,{enabled:d}=t.toPlainObject(e);!u||!(d===void 0||d===!0)||c(u)},{immediate:!0}),{...o.toRefs(n.value),rowCount:a}},be=e=>{const n=o.ref(void 0),r=o.ref(void 0),s=o.ref(void 0);t.useTracking("useExecuteQueryByWidgetId");const[a,c]=t.useReducer(i.queryStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),u=t.getSisenseContext(),d=async l=>{try{c({type:"loading"});const{filters:p,...h}=t.toPlainObject(e),{filters:g}=x.getFilterListAndRelationsJaql(t.toPlainValue(p)),{data:b,query:y,pivotQuery:C,rowCount:O}=await i.executeQueryByWidgetId({...h,filters:g,app:l});c({type:"success",data:b}),n.value=y,r.value=C,s.value=O}catch(p){c({type:"error",error:p})}};return o.watch([...t.collectRefs(e),u],()=>{const{app:l}=u.value,{enabled:p}=t.toPlainObject(e);!l||!(p===void 0||p===!0)||d(l)},{immediate:!0}),{...o.toRefs(a.value),query:n,pivotQuery:r,rowCount:s}},ge=e=>{t.useTracking("useExecuteCsvQuery");const n=new i.HookAdapter(i.useExecuteCsvQueryInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},fe=e=>{t.useTracking("useExecutePivotQuery");const n=new i.HookAdapter(i.useExecutePivotQueryInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},he=e=>{t.useTracking("useExecuteCustomWidgetQuery");const n=new i.HookAdapter(i.useExecuteCustomWidgetQueryInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({data:void 0,isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},ye=e=>{t.useTracking("useGetFilterMembers");const{filter:n,parentFilters:r=[]}=t.toPlainObject(e),s={selectedMembers:[],allMembers:[],...x.isMembersFilter(n)?{excludeMembers:n.config.excludeMembers,enableMultiSelection:n.config.enableMultiSelection,hasBackgroundFilter:!!n.config.backgroundFilter&&r.length===0}:{excludeMembers:!1,enableMultiSelection:!1,hasBackgroundFilter:!1}},a=new i.HookAdapter(i.useGetFilterMembers,[t.createSisenseContextConnector()]),[c,u]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:s,isAllItemsLoaded:!1});return a.subscribe(d=>{u(d)}),a.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{a.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{a.destroy()}),o.toRefs(c.value)},Ce=e=>{t.useTracking("useGetDataSourceDimensions");const n=new i.HookAdapter(i.useGetDataSourceDimensionsInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,dimensions:void 0,error:void 0,status:"loading"});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},Oe=e=>{t.useTracking("useGetDashboardModel");const[n,r]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext(),a=t.getThemeContext(),c=async d=>{try{r({type:"loading"});const{dashboardOid:l,includeWidgets:p,includeFilters:h}=t.toPlainObject(e),g=await i.getDashboardModel(d.httpClient,l,{includeWidgets:p,includeFilters:h},a.value,d.settings);r({type:"success",data:g})}catch(l){r({type:"error",error:l})}};o.watch([...t.collectRefs(e),s,a],()=>{const{app:d}=s.value,{enabled:l}=t.toPlainObject(e);!d||!(l===void 0||l===!0)||c(d)},{immediate:!0});const u=o.toRefs(n.value);return o.toRefs(i.translateToDashboardResponse(u))},me=e=>{t.useTracking("useGetDashboardModels");const[n,r]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext(),a=t.getThemeContext(),c=async d=>{try{r({type:"loading"});const l=t.toPlainObject(e),p=await i.getDashboardModels(d.httpClient,l,a.value,d.settings);r({type:"success",data:p})}catch(l){r({type:"error",error:l})}};o.watch([...t.collectRefs(e),s,a],()=>{const{app:d}=s.value,{enabled:l}=t.toPlainObject(e);!d||!(l===void 0||l===!0)||c(d)},{immediate:!0});const u=o.toRefs(n.value);return o.toRefs(i.translateToDashboardsResponse(u))},Se=e=>{t.useTracking("useGetSharedFormula");const n=new i.HookAdapter(i.useGetSharedFormulaInternal,[t.createSisenseContextConnector()]),[r,s]=t.useRefState({isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,formula:null});return n.subscribe(a=>{s(a)}),n.run(t.toPlainObject(e)),o.watch([...t.collectRefs(e)],()=>{n.run(t.toPlainObject(e))}),o.onBeforeUnmount(()=>{n.destroy()}),o.toRefs(r.value)},De=e=>{t.useTracking("useGetWidgetModel");const[n,r]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext(),a=async c=>{try{r({type:"loading"});const{dashboardOid:u,widgetOid:d}=t.toPlainObject(e),l=await i.getWidgetModel(c.httpClient,u,d);r({type:"success",data:l})}catch(u){r({type:"error",error:u})}};return o.watch([...t.collectRefs(e),s],()=>{const{app:c}=s.value,{enabled:u}=t.toPlainObject(e);!c||!(u===void 0||u===!0)||a(c)},{immediate:!0}),o.toRefs(n.value)},Fe=e=>{t.useTracking("useGetHierarchyModels");const[n,r]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),s=t.getSisenseContext(),a=async c=>{try{r({type:"loading"});const u=await i.getHierarchyModels(c.httpClient,t.toPlainObject(e));r({type:"success",data:u})}catch(u){r({type:"error",error:u})}};return o.watch([...t.collectRefs(e),s],()=>{const{app:c}=s.value,{enabled:u}=t.toPlainObject(e);!c||!(u===void 0||u===!0)||a(c)},{immediate:!0}),o.toRefs(n.value)},je=(e,n,r)=>{const[s,a]=t.useReducer(i.dataLoadStateReducer,{isLoading:!0,isError:!1,isSuccess:!1,status:"loading",error:void 0,data:void 0}),c=t.getSisenseContext(),u=async d=>{try{a({type:"loading"});const l=t.toPlainValue(e),p=n?t.toPlainObject(n):{},h=r?t.toPlainObject(r):{},g={requestConfig:h.requestConfig?t.toPlainObject(h.requestConfig):{},skipTrackingParam:!0},b=await d.call(d.url+l,p,g);a({type:"success",data:b})}catch(l){a({type:"error",error:l})}};return o.watch([...t.collectRefs(e,n,r),c],()=>{const{app:d}=c.value,l=t.toPlainObject(r||{}).enabled;!d||!(l===void 0||l===!0)||u(d.httpClient)},{immediate:!0}),o.toRefs(s.value)};class Pe{constructor(n,r){P(this,"app",null);P(this,"container",null);P(this,"isDestroyed",!1);P(this,"propsRef",null);this.componentClass=n,this.contexts=r}mount(n,r){if(this.app||this.isDestroyed)return;this.container=n,this.propsRef=o.ref(r);const s={setup:()=>()=>o.h(this.componentClass,this.propsRef.value)};this.app=o.createApp(s),this.app.provide(t.sisenseContextKey,this.contexts.sisenseContext),this.app.provide(t.themeContextConfigKey,this.contexts.themeContext),this.app.provide(t.customWidgetsContextKey,this.contexts.customWidgetsContext),this.app.mount(n)}update(n){!this.propsRef||this.isDestroyed||(this.propsRef.value=n)}destroy(){this.isDestroyed||(this.isDestroyed=!0,this.app&&(this.app.unmount(),this.app=null),this.container=null,this.propsRef=null)}isActive(){return this.app!==null&&!this.isDestroyed}}function ve(e,n){return r=>{const s={adapterFactory:()=>new Pe(e,n),componentProps:r};return i.createElement(i.ExternalComponentAdapterElement,s)}}function xe(e){return o.defineComponent({name:"PreactComponent",inheritAttrs:!1,setup:(n,{attrs:r})=>{const s=o.ref(null),a=new i.ComponentAdapter(e,t.createDefaultContextConnectors());return o.onBeforeUnmount(()=>{a.destroy()}),()=>(s.value&&a.render(s.value,t.toDeepRaw({...r})),o.h("div",{ref:s,style:"width: 100%; height: 100%"}))}})}function w(e){const n=new WeakMap,r=new WeakMap,s=(a,c)=>{n.set(a,c),r.set(c,a)};return{toPreactComponent:a=>{const c=n.get(a);if(c)return c;const u=ve(a,e);return s(a,u),u},fromPreactComponent:a=>{const c=r.get(a);if(c)return c;const u=xe(a);return s(u,a),u}}}const Re=()=>{const e=t.getCustomWidgetsContext(),n=w({sisenseContext:t.getSisenseContext(),themeContext:t.getThemeContext(),customWidgetsContext:e});return{registerCustomWidget:(r,s)=>{e.value.customWidgetsMap.has(r)||(e.value.customWidgetsMap.set(r,n.toPreactComponent(s)),e.value={customWidgetsMap:new Map(e.value.customWidgetsMap)})},unregisterCustomWidget:r=>{e.value.customWidgetsMap.delete(r)&&(e.value={customWidgetsMap:new Map(e.value.customWidgetsMap)})},hasCustomWidget:r=>e.value.customWidgetsMap.has(r)}},we=(e,n={})=>{t.useTracking("useComposedDashboard");const r=l=>t.toPlainObject(l),s=new i.HookAdapter(i.useComposedDashboardInternal,[t.createSisenseContextConnector()]),[a,c]=t.useRefState(t.toPlainObject(e));s.subscribe(({dashboard:l})=>{c(l)}),s.run(r(e),n),o.watch([...t.collectRefs(e)],()=>{s.run(r(e),n)}),o.onBeforeUnmount(()=>{s.destroy()});const u=i.createHookApiFacade(s,"setFilters"),d=i.createHookApiFacade(s,"setWidgetsLayout");return{dashboard:a,setFilters:u,setWidgetsLayout:d}},Me=(e,n)=>{t.useTracking("useJtdWidget");const r=new i.HookAdapter(i.useJtdWidget,[t.createSisenseContextConnector(),t.createThemeContextConnector()]),s=o.ref(null);r.subscribe(c=>{s.value=c});const a=()=>{const c=o.toValue(e),u=t.toPlainObject(n);r.run(c,u)};return a(),o.watch([...t.collectRefs(e),...t.collectRefs(n)],()=>{a()}),o.onBeforeUnmount(()=>{r.destroy()}),s},W=o.defineComponent({props:{closeContextMenu:{type:Function,required:!0},itemSections:Array,position:Object},setup:(e,{slots:n})=>t.setupHelperWithChildren(i.ContextMenu,e,n,[])}),Ae=({drilldownPaths:e,initialDimension:n})=>{if(!n)throw new Error("Initial dimension has to be specified to use drilldown with custom components");const r=o.ref([]),s=o.ref(),a=o.ref([]),c=o.ref([]),u=o.computed(()=>[i.translateColumnToAttribute(n),...r.value.map(({nextDimension:b})=>b)]),d=o.computed(()=>e.value.filter(b=>{if(x.MetadataTypes.isAttribute(b)){const O=b;return u.value.every(m=>!i.isSameAttribute(m,O))}const C=b;return u.value.every((O,m)=>i.isSameAttribute(O,C.levels[m]))})),l=(b,y,C)=>{r.value=i.updateDrilldownSelections(r.value,b,y,C),g()},p=b=>{r.value=r.value.slice(0,b),g()},h=()=>{r.value=[],g()},g=()=>{const b=C=>C==="drilldown.breadcrumbsAllSuffix"?"All":C,y=i.processDrilldownSelections(r.value,n,b);s.value=y.drilldownDimension,a.value=y.drilldownFilters,c.value=y.drilldownFiltersDisplayValues};return g(),{drilldownSelections:r,availableDrilldownPaths:d,drilldownDimension:s,drilldownFilters:a,drilldownFiltersDisplayValues:c,selectDrilldown:l,sliceDrilldownSelections:p,clearDrilldownSelections:h}},Te=o.defineComponent({props:{config:{type:Object,required:!1,default:()=>({})},drilldownPaths:{type:Array,required:!1,default:()=>[]},initialDimension:{type:Object,required:!0,default:()=>({})}},setup:()=>{}}),qe={style:{display:"flex","flex-direction":"column",height:"100%"}},We={style:{"flex-grow":"1","min-wdith":"0","min-height":"0"}},ke=o.defineComponent({__name:"drilldown-widget",props:Te.props,setup(e){const n=e,{drilldownPaths:r,initialDimension:s,config:a}=o.toRefs(n),c=o.ref(null),u=o.ref([]),{drilldownFilters:d,drilldownDimension:l,drilldownFiltersDisplayValues:p,availableDrilldownPaths:h,selectDrilldown:g,sliceDrilldownSelections:b,clearDrilldownSelections:y}=Ae({drilldownPaths:r,initialDimension:s.value}),C=f=>{g(u.value,f)},O=o.computed(()=>{const f=T=>T==="drilldown.drillMenuItem"?"Drill":T,j=i.getSelectionTitleMenuItem(u.value,l.value),S=i.getDrilldownMenuItems(h.value,l.value,C,f);return S?[j,S]:[j]}),m=f=>{c.value=f},R=f=>{u.value=f},v=()=>{c.value=null};return(f,j)=>(o.openBlock(),o.createElementBlock("div",qe,[o.renderSlot(f.$slots,"contextMenu",{contextMenuProps:{position:c.value,itemSections:O.value,closeContextMenu:v}},()=>[o.createVNode(o.unref(W),{position:c.value,itemSections:O.value,closeContextMenu:v},null,8,["position","itemSections"])]),o.renderSlot(f.$slots,"breadcrumbs",{drilldownBreadcrumbsProps:{clearDrilldownSelections:o.unref(y),sliceDrilldownSelections:o.unref(b),drilldownFiltersDisplayValues:o.unref(p),drilldownDimension:o.unref(l)}},()=>[o.createVNode(o.unref(q),{"clear-drilldown-selections":o.unref(y),"slice-drilldown-selections":o.unref(b),"filters-display-values":o.unref(p),"current-dimension":o.unref(l)},null,8,["clear-drilldown-selections","slice-drilldown-selections","filters-display-values","current-dimension"])]),o.createElementVNode("div",We,[o.renderSlot(f.$slots,"chart",{drilldownFilters:o.unref(d),drilldownDimension:o.unref(l),onDataPointsSelected:R,onContextMenu:m})])]))}}),He=o.defineComponent({props:{bottomSlot:Object,chartType:{type:String,required:!0},dataOptions:{type:Object,required:!0},dataSource:[String,Object],description:String,drilldownOptions:Object,filters:[Array,Object],highlightSelectionDisabled:Boolean,highlights:Array,onBeforeRender:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object,config:Object,id:String,title:String,topSlot:Object,widgetStyleOptions:Object,onDataReady:Function},setup:e=>t.setupHelper(i.ChartWidget,e)}),Be=o.defineComponent({props:{bottomSlot:Object,dashboardOid:{type:String,required:!0},description:String,drilldownOptions:Object,filters:[Array,Object],filtersMergeStrategy:Object,highlightSelectionDisabled:Boolean,highlights:Array,includeDashboardFilters:Boolean,onBeforeRender:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function,styleOptions:Object,config:Object,title:String,topSlot:Object,widgetOid:{type:String,required:!0},widgetStyleOptions:Object,onDataReady:Function},setup:e=>t.setupHelper(i.WidgetById,e)}),Ee=o.defineComponent({props:{dataOptions:{type:Object,required:!0},dataSource:[String,Object],description:String,filters:[Object,Array],styleOptions:Object,config:Object,id:String,drilldownOptions:Object,title:String,topSlot:Object,bottomSlot:Object,highlights:Array,onDataPointClick:Function,onDataPointContextMenu:Function,onDataCellFormat:Function,onHeaderCellFormat:Function},setup:e=>t.setupHelper(i.PivotTableWidget,e)}),Qe=o.defineComponent({props:{id:{type:String,required:!0},widgetType:{type:String,required:!0},chartType:String,customWidgetType:String,dataSource:Object,dataOptions:Object,filters:Array,highlights:Array,styleOptions:Object,config:Object,customOptions:Object,drilldownOptions:Object,title:String,description:String,highlightSelectionDisabled:Boolean,onBeforeRender:Function,onDataReady:Function,onBeforeMenuOpen:Function,onDataPointClick:Function,onDataPointContextMenu:Function,onDataPointsSelected:Function},setup:e=>t.setupHelper(i.Widget,e)});function M(e,n){return n?e.map(r=>({...r,component:n.toPreactComponent(r.component)})):e}function A(e,n){return n?e.map(r=>({...r,component:n.fromPreactComponent(r.component)})):e}function Ie(e,n){return r=>M(e(A(r,n)),n)}function Ge(e,n){return r=>A(e(M(r,n)),n)}function Le(e,n){const{items:r,onBeforeRender:s,...a}=e;return{...a,...r&&{items:M(r,n)},...s&&{onBeforeRender:Ie(s,n)}}}function _e(e,n){const{items:r,onBeforeRender:s,...a}=e;return{...a,...r&&{items:A(r,n)},...s&&{onBeforeRender:Ge(s,n)}}}function k(e,n){const{header:r,...s}=e;return{...s,...r&&{header:Le(r,n)}}}function Ve(e,n){const{header:r,...s}=e;return{...s,...r&&{header:_e(r,n)}}}function D(e,n){const{config:r,...s}=e;return{...s,...r&&{config:k(r,n)}}}function F(e,n){const{config:r,...s}=e;return{...s,...r&&{config:Ve(r,n)}}}function Ue(e,n){const{config:r,...s}=e;return{...s,...r&&{config:k(r,n)}}}const Ne=o.defineComponent({props:{dashboardOid:{type:String,required:!0},config:Object},setup:e=>{const n=w({sisenseContext:t.getSisenseContext(),themeContext:t.getThemeContext(),customWidgetsContext:t.getCustomWidgetsContext()});return t.setupHelper(i.DashboardById,()=>Ue(t.toDeepRaw(e),n))}}),Je=o.defineComponent({props:{title:String,layoutOptions:Object,config:Object,widgets:{type:Object,required:!0},filters:[Object,Array],defaultDataSource:[String,Object],widgetsOptions:Object,styleOptions:Object},setup:e=>{const n=w({sisenseContext:t.getSisenseContext(),themeContext:t.getThemeContext(),customWidgetsContext:t.getCustomWidgetsContext()});return t.setupHelper(i.Dashboard,()=>D(t.toDeepRaw(e),n))}});function Ke(e){return F(i.dashboardModelTranslator.toDashboardProps(e))}const $e=Object.freeze(Object.defineProperty({__proto__:null,toDashboardProps:Ke},Symbol.toStringTag,{value:"Module"})),ze=(e,n)=>F(i.dashboardHelpers.replaceFilters(D(e),n)),Xe=(e,n)=>F(i.dashboardHelpers.addFilter(D(e),n)),Ye=(e,n)=>F(i.dashboardHelpers.addFilters(D(e),n)),Ze=(e,n,r)=>F(i.dashboardHelpers.replaceFilter(D(e),n,r)),et=(e,n)=>F(i.dashboardHelpers.removeFilter(D(e),n)),tt=(e,n)=>F(i.dashboardHelpers.removeFilters(D(e),n)),nt=Object.freeze(Object.defineProperty({__proto__:null,addFilter:Xe,addFilters:Ye,removeFilter:et,removeFilters:tt,replaceFilter:Ze,replaceFilters:ze},Symbol.toStringTag,{value:"Module"})),ot=e=>i.widgetModelTranslator.toExecuteQueryParams(e),rt=e=>i.widgetModelTranslator.toExecutePivotQueryParams(e);function it(e){return i.widgetModelTranslator.toChartProps(e)}function st(e){return i.widgetModelTranslator.toTableProps(e)}function at(e){return i.widgetModelTranslator.toPivotTableProps(e)}function ct(e){return i.widgetModelTranslator.toChartWidgetProps(e)}function ut(e){return i.widgetModelTranslator.toPivotTableWidgetProps(e)}function lt(e){return i.widgetModelTranslator.toTextWidgetProps(e)}function dt(e){return i.widgetModelTranslator.toWidgetProps(e)}const pt=Object.freeze(Object.defineProperty({__proto__:null,toChartProps:it,toChartWidgetProps:ct,toExecutePivotQueryParams:rt,toExecuteQueryParams:ot,toPivotTableProps:at,toPivotTableWidgetProps:ut,toTableProps:st,toTextWidgetProps:lt,toWidgetProps:dt},Symbol.toStringTag,{value:"Module"}));Object.defineProperty(exports,"DashboardHeaderTargets",{enumerable:!0,get:()=>i.DashboardHeaderTargets});Object.defineProperty(exports,"FilterTileMenuTargets",{enumerable:!0,get:()=>i.FilterTileMenuTargets});Object.defineProperty(exports,"WidgetHeaderMenuTargets",{enumerable:!0,get:()=>i.WidgetHeaderMenuTargets});Object.defineProperty(exports,"boxWhiskerProcessResult",{enumerable:!0,get:()=>i.boxWhiskerProcessResult});Object.defineProperty(exports,"extractDimensionsAndMeasures",{enumerable:!0,get:()=>i.extractDimensionsAndMeasures});Object.defineProperty(exports,"formatDataSet",{enumerable:!0,get:()=>i.formatDataSet});Object.defineProperty(exports,"formatDate",{enumerable:!0,get:()=>i.formatDate});Object.defineProperty(exports,"formatNumber",{enumerable:!0,get:()=>i.formatNumber});Object.defineProperty(exports,"getDefaultDateFormat",{enumerable:!0,get:()=>i.getDefaultDateFormat});exports.CustomWidgetsProvider=t.CustomWidgetsProvider;exports.SisenseContextProvider=t.SisenseContextProvider;exports.ThemeProvider=t.ThemeProvider;exports.AreaChart=E;exports.AreaRangeChart=re;exports.AreamapChart=te;exports.BarChart=Q;exports.BoxplotChart=ee;exports.CalendarHeatmapChart=I;exports.Chart=Z;exports.ChartWidget=He;exports.ColumnChart=G;exports.ContextMenu=W;exports.CriteriaFilterTile=ce;exports.Dashboard=Je;exports.DashboardById=Ne;exports.DateRangeFilterTile=se;exports.DrilldownBreadcrumbs=q;exports.DrilldownWidget=ke;exports.FilterTile=le;exports.FiltersPanel=de;exports.FunnelChart=L;exports.IndicatorChart=X;exports.KpiChart=Y;exports.LineChart=_;exports.MemberFilterTile=ae;exports.PieChart=V;exports.PivotTable=J;exports.PivotTableWidget=Ee;exports.PolarChart=z;exports.RelativeDateFilterTile=ue;exports.SankeyChart=ie;exports.ScatterChart=U;exports.ScattermapChart=ne;exports.StreamgraphChart=oe;exports.SunburstChart=$;exports.Table=N;exports.TreemapChart=K;exports.Widget=Qe;exports.WidgetById=Be;exports.dashboardHelpers=nt;exports.dashboardModelTranslator=$e;exports.useComposedDashboard=we;exports.useCustomWidgets=Re;exports.useExecuteCsvQuery=ge;exports.useExecuteCustomWidgetQuery=he;exports.useExecutePivotQuery=fe;exports.useExecuteQuery=pe;exports.useExecuteQueryByWidgetId=be;exports.useFetch=je;exports.useGetDashboardModel=Oe;exports.useGetDashboardModels=me;exports.useGetDataSourceDimensions=Ce;exports.useGetFilterMembers=ye;exports.useGetHierarchyModels=Fe;exports.useGetSharedFormula=Se;exports.useGetWidgetModel=De;exports.useJtdWidget=Me;exports.widgetModelTranslator=pt;
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var at = Object.defineProperty;
|
|
2
2
|
var ct = (t, e, n) => e in t ? at(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var I = (t, e, n) => (ct(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
|
-
import { DrilldownBreadcrumbs as ut, AreaChart as lt, BarChart as dt, CalendarHeatmapChart as pt, ColumnChart as ht, FunnelChart as yt, LineChart as
|
|
5
|
-
import { DashboardHeaderTargets as yr, WidgetHeaderMenuTargets as br, boxWhiskerProcessResult as
|
|
6
|
-
import { defineComponent as c, ref as D, watch as
|
|
7
|
-
import { d as ot, s as l, a as W, g as v, u as C, b, t as d, e as K, f as M, h as T, i as H, j as De, k as me, l as je, c as Pe, m as N, n as J, o as ve } from "./use-tracking-39f8225d.js";
|
|
8
|
-
import { C as
|
|
4
|
+
import { DrilldownBreadcrumbs as ut, AreaChart as lt, BarChart as dt, CalendarHeatmapChart as pt, ColumnChart as ht, FunnelChart as yt, LineChart as gt, PieChart as bt, ScatterChart as ft, Table as Ot, PivotTable as Ct, TreemapChart as St, SunburstChart as Ft, PolarChart as Dt, IndicatorChart as mt, KpiChart as jt, Chart as Pt, BoxplotChart as vt, AreamapChart as xt, ScattermapChart as wt, StreamgraphChart as At, AreaRangeChart as Mt, SankeyChart as Rt, DateRangeFilterTile as qt, MemberFilterTile as Wt, CriteriaFilterTile as Tt, RelativeDateFilterTile as Bt, FilterTile as Et, FiltersPanel as kt, queryStateReducer as nt, executeQueryWithRowCount as $t, executeQuery as It, executeQueryByWidgetId as Qt, HookAdapter as A, useExecuteCsvQueryInternal as Ht, useExecutePivotQueryInternal as Lt, useExecuteCustomWidgetQueryInternal as Gt, useGetFilterMembers as _t, useGetDataSourceDimensionsInternal as Vt, translateToDashboardResponse as Kt, dataLoadStateReducer as Q, getDashboardModel as Nt, translateToDashboardsResponse as Jt, getDashboardModels as zt, useGetSharedFormulaInternal as Ut, getWidgetModel as Xt, getHierarchyModels as Yt, ComponentAdapter as Zt, createElement as te, ExternalComponentAdapterElement as ee, useComposedDashboardInternal as ne, createHookApiFacade as Z, useJtdWidget as re, ContextMenu as oe, translateColumnToAttribute as ie, isSameAttribute as tt, updateDrilldownSelections as se, processDrilldownSelections as ae, getSelectionTitleMenuItem as ce, getDrilldownMenuItems as ue, ChartWidget as le, WidgetById as de, PivotTableWidget as pe, Widget as he, DashboardById as ye, Dashboard as ge, dashboardModelTranslator as be, dashboardHelpers as $, widgetModelTranslator as x } from "@sisense/sdk-ui-preact";
|
|
5
|
+
import { DashboardHeaderTargets as yr, FilterTileMenuTargets as gr, WidgetHeaderMenuTargets as br, boxWhiskerProcessResult as fr, extractDimensionsAndMeasures as Or, formatDataSet as Cr, formatDate as Sr, formatNumber as Fr, getDefaultDateFormat as Dr } from "@sisense/sdk-ui-preact";
|
|
6
|
+
import { defineComponent as c, ref as D, watch as b, toRefs as y, onBeforeUnmount as w, createApp as fe, h as rt, toValue as Oe, computed as V, openBlock as Ce, createElementBlock as Se, renderSlot as _, createVNode as et, unref as j, createElementVNode as Fe } from "vue";
|
|
7
|
+
import { d as ot, s as l, a as W, g as v, u as C, b as g, t as d, e as K, f as M, h as T, i as H, j as De, k as me, l as je, c as Pe, m as N, n as J, o as ve } from "./use-tracking-39f8225d.js";
|
|
8
|
+
import { C as jr, S as Pr, T as vr } from "./use-tracking-39f8225d.js";
|
|
9
9
|
import { getFilterListAndRelationsJaql as it, isMembersFilter as xe, MetadataTypes as we } from "@sisense/sdk-data";
|
|
10
10
|
const Ae = c({
|
|
11
11
|
props: {
|
|
@@ -248,7 +248,7 @@ const Ae = c({
|
|
|
248
248
|
onDataPointsSelected: Function
|
|
249
249
|
},
|
|
250
250
|
setup: (t) => l(pt, t)
|
|
251
|
-
}),
|
|
251
|
+
}), gn = c({
|
|
252
252
|
props: {
|
|
253
253
|
/**
|
|
254
254
|
* {@inheritDoc @sisense/sdk-ui!ColumnChartProps.dataOptions}
|
|
@@ -315,7 +315,7 @@ const Ae = c({
|
|
|
315
315
|
styleOptions: Object
|
|
316
316
|
},
|
|
317
317
|
setup: (t) => l(ht, t)
|
|
318
|
-
}),
|
|
318
|
+
}), bn = c({
|
|
319
319
|
props: {
|
|
320
320
|
/**
|
|
321
321
|
* {@inheritDoc @sisense/sdk-ui!FunnelChartProps.dataOptions}
|
|
@@ -448,7 +448,7 @@ const Ae = c({
|
|
|
448
448
|
*/
|
|
449
449
|
styleOptions: Object
|
|
450
450
|
},
|
|
451
|
-
setup: (t) => l(
|
|
451
|
+
setup: (t) => l(gt, t)
|
|
452
452
|
}), On = c({
|
|
453
453
|
props: {
|
|
454
454
|
/**
|
|
@@ -515,7 +515,7 @@ const Ae = c({
|
|
|
515
515
|
*/
|
|
516
516
|
styleOptions: Object
|
|
517
517
|
},
|
|
518
|
-
setup: (t) => l(
|
|
518
|
+
setup: (t) => l(bt, t)
|
|
519
519
|
}), Cn = c({
|
|
520
520
|
props: {
|
|
521
521
|
/**
|
|
@@ -1488,7 +1488,11 @@ const Ae = c({
|
|
|
1488
1488
|
/**
|
|
1489
1489
|
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.onEdit}
|
|
1490
1490
|
*/
|
|
1491
|
-
onEdit: Function
|
|
1491
|
+
onEdit: Function,
|
|
1492
|
+
/**
|
|
1493
|
+
* {@inheritDoc @sisense/sdk-ui!DateRangeFilterTileProps.config}
|
|
1494
|
+
*/
|
|
1495
|
+
config: Object
|
|
1492
1496
|
},
|
|
1493
1497
|
setup: (t) => l(qt, t)
|
|
1494
1498
|
}), Bn = c({
|
|
@@ -1536,7 +1540,11 @@ const Ae = c({
|
|
|
1536
1540
|
/**
|
|
1537
1541
|
* {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.onEdit}
|
|
1538
1542
|
*/
|
|
1539
|
-
onEdit: Function
|
|
1543
|
+
onEdit: Function,
|
|
1544
|
+
/**
|
|
1545
|
+
* {@inheritDoc @sisense/sdk-ui!MemberFilterTileProps.config}
|
|
1546
|
+
*/
|
|
1547
|
+
config: Object
|
|
1540
1548
|
},
|
|
1541
1549
|
setup: (t) => l(Wt, t)
|
|
1542
1550
|
}), En = c({
|
|
@@ -1577,7 +1585,11 @@ const Ae = c({
|
|
|
1577
1585
|
/**
|
|
1578
1586
|
* {@inheritDoc @sisense/sdk-ui!CriteriaFilterTileProps.onEdit}
|
|
1579
1587
|
*/
|
|
1580
|
-
onEdit: Function
|
|
1588
|
+
onEdit: Function,
|
|
1589
|
+
/**
|
|
1590
|
+
* {@inheritDoc @sisense/sdk-ui!CriteriaFilterTileProps.config}
|
|
1591
|
+
*/
|
|
1592
|
+
config: Object
|
|
1581
1593
|
},
|
|
1582
1594
|
setup: (t) => l(Tt, t)
|
|
1583
1595
|
}), kn = c({
|
|
@@ -1623,7 +1635,11 @@ const Ae = c({
|
|
|
1623
1635
|
/**
|
|
1624
1636
|
* {@inheritDoc @sisense/sdk-ui!RelativeDateFilterTileProps.onEdit}
|
|
1625
1637
|
*/
|
|
1626
|
-
onEdit: Function
|
|
1638
|
+
onEdit: Function,
|
|
1639
|
+
/**
|
|
1640
|
+
* {@inheritDoc @sisense/sdk-ui!RelativeDateFilterTileProps.config}
|
|
1641
|
+
*/
|
|
1642
|
+
config: Object
|
|
1627
1643
|
},
|
|
1628
1644
|
setup: (t) => l(Bt, t)
|
|
1629
1645
|
}), $n = c({
|
|
@@ -1653,7 +1669,11 @@ const Ae = c({
|
|
|
1653
1669
|
/**
|
|
1654
1670
|
* {@inheritDoc @sisense/sdk-ui!FilterTileProps.onEdit}
|
|
1655
1671
|
*/
|
|
1656
|
-
onEdit: Function
|
|
1672
|
+
onEdit: Function,
|
|
1673
|
+
/**
|
|
1674
|
+
* {@inheritDoc @sisense/sdk-ui!FilterTileProps.config}
|
|
1675
|
+
*/
|
|
1676
|
+
config: Object
|
|
1657
1677
|
},
|
|
1658
1678
|
setup: (t) => l(Et, t)
|
|
1659
1679
|
}), In = c({
|
|
@@ -1740,8 +1760,8 @@ const Ae = c({
|
|
|
1740
1760
|
n({ type: "error", error: u });
|
|
1741
1761
|
}
|
|
1742
1762
|
};
|
|
1743
|
-
return
|
|
1744
|
-
[...
|
|
1763
|
+
return b(
|
|
1764
|
+
[...g(t), r],
|
|
1745
1765
|
() => {
|
|
1746
1766
|
const { app: s } = r.value, { enabled: u } = d(t);
|
|
1747
1767
|
!s || !(u === void 0 || u === !0) || i(s);
|
|
@@ -1779,8 +1799,8 @@ const Ae = c({
|
|
|
1779
1799
|
i({ type: "error", error: p });
|
|
1780
1800
|
}
|
|
1781
1801
|
};
|
|
1782
|
-
return
|
|
1783
|
-
[...
|
|
1802
|
+
return b(
|
|
1803
|
+
[...g(t), s],
|
|
1784
1804
|
() => {
|
|
1785
1805
|
const { app: a } = s.value, { enabled: p } = d(t);
|
|
1786
1806
|
!a || !(p === void 0 || p === !0) || u(a);
|
|
@@ -1806,7 +1826,7 @@ const Ae = c({
|
|
|
1806
1826
|
});
|
|
1807
1827
|
return e.subscribe((o) => {
|
|
1808
1828
|
r(o);
|
|
1809
|
-
}), e.run(d(t)),
|
|
1829
|
+
}), e.run(d(t)), b([...g(t)], () => {
|
|
1810
1830
|
e.run(d(t));
|
|
1811
1831
|
}), w(() => {
|
|
1812
1832
|
e.destroy();
|
|
@@ -1825,7 +1845,7 @@ const Ae = c({
|
|
|
1825
1845
|
});
|
|
1826
1846
|
return e.subscribe((o) => {
|
|
1827
1847
|
r(o);
|
|
1828
|
-
}), e.run(d(t)),
|
|
1848
|
+
}), e.run(d(t)), b([...g(t)], () => {
|
|
1829
1849
|
e.run(d(t));
|
|
1830
1850
|
}), w(() => {
|
|
1831
1851
|
e.destroy();
|
|
@@ -1844,7 +1864,7 @@ const Ae = c({
|
|
|
1844
1864
|
});
|
|
1845
1865
|
return e.subscribe((o) => {
|
|
1846
1866
|
r(o);
|
|
1847
|
-
}), e.run(d(t)),
|
|
1867
|
+
}), e.run(d(t)), b([...g(t)], () => {
|
|
1848
1868
|
e.run(d(t));
|
|
1849
1869
|
}), w(() => {
|
|
1850
1870
|
e.destroy();
|
|
@@ -1874,7 +1894,7 @@ const Ae = c({
|
|
|
1874
1894
|
});
|
|
1875
1895
|
return o.subscribe((u) => {
|
|
1876
1896
|
s(u);
|
|
1877
|
-
}), o.run(d(t)),
|
|
1897
|
+
}), o.run(d(t)), b([...g(t)], () => {
|
|
1878
1898
|
o.run(d(t));
|
|
1879
1899
|
}), w(() => {
|
|
1880
1900
|
o.destroy();
|
|
@@ -1893,7 +1913,7 @@ const Ae = c({
|
|
|
1893
1913
|
});
|
|
1894
1914
|
return e.subscribe((o) => {
|
|
1895
1915
|
r(o);
|
|
1896
|
-
}), e.run(d(t)),
|
|
1916
|
+
}), e.run(d(t)), b([...g(t)], () => {
|
|
1897
1917
|
e.run(d(t));
|
|
1898
1918
|
}), w(() => {
|
|
1899
1919
|
e.destroy();
|
|
@@ -1922,8 +1942,8 @@ const Ae = c({
|
|
|
1922
1942
|
n({ type: "error", error: a });
|
|
1923
1943
|
}
|
|
1924
1944
|
};
|
|
1925
|
-
|
|
1926
|
-
[...
|
|
1945
|
+
b(
|
|
1946
|
+
[...g(t), r, o],
|
|
1927
1947
|
() => {
|
|
1928
1948
|
const { app: u } = r.value, { enabled: a } = d(t);
|
|
1929
1949
|
!u || !(a === void 0 || a === !0) || i(u);
|
|
@@ -1955,8 +1975,8 @@ const Ae = c({
|
|
|
1955
1975
|
n({ type: "error", error: a });
|
|
1956
1976
|
}
|
|
1957
1977
|
};
|
|
1958
|
-
|
|
1959
|
-
[...
|
|
1978
|
+
b(
|
|
1979
|
+
[...g(t), r, o],
|
|
1960
1980
|
() => {
|
|
1961
1981
|
const { app: u } = r.value, { enabled: a } = d(t);
|
|
1962
1982
|
!u || !(a === void 0 || a === !0) || i(u);
|
|
@@ -1979,7 +1999,7 @@ const Ae = c({
|
|
|
1979
1999
|
});
|
|
1980
2000
|
return e.subscribe((o) => {
|
|
1981
2001
|
r(o);
|
|
1982
|
-
}), e.run(d(t)),
|
|
2002
|
+
}), e.run(d(t)), b([...g(t)], () => {
|
|
1983
2003
|
e.run(d(t));
|
|
1984
2004
|
}), w(() => {
|
|
1985
2005
|
e.destroy();
|
|
@@ -2002,8 +2022,8 @@ const Ae = c({
|
|
|
2002
2022
|
n({ type: "error", error: s });
|
|
2003
2023
|
}
|
|
2004
2024
|
};
|
|
2005
|
-
return
|
|
2006
|
-
[...
|
|
2025
|
+
return b(
|
|
2026
|
+
[...g(t), r],
|
|
2007
2027
|
() => {
|
|
2008
2028
|
const { app: i } = r.value, { enabled: s } = d(t);
|
|
2009
2029
|
!i || !(s === void 0 || s === !0) || o(i);
|
|
@@ -2028,8 +2048,8 @@ const Ae = c({
|
|
|
2028
2048
|
n({ type: "error", error: s });
|
|
2029
2049
|
}
|
|
2030
2050
|
};
|
|
2031
|
-
return
|
|
2032
|
-
[...
|
|
2051
|
+
return b(
|
|
2052
|
+
[...g(t), r],
|
|
2033
2053
|
() => {
|
|
2034
2054
|
const { app: i } = r.value, { enabled: s } = d(t);
|
|
2035
2055
|
!i || !(s === void 0 || s === !0) || o(i);
|
|
@@ -2060,8 +2080,8 @@ const Ae = c({
|
|
|
2060
2080
|
o({ type: "error", error: a });
|
|
2061
2081
|
}
|
|
2062
2082
|
};
|
|
2063
|
-
return
|
|
2064
|
-
[...
|
|
2083
|
+
return b(
|
|
2084
|
+
[...g(t, e, n), i],
|
|
2065
2085
|
() => {
|
|
2066
2086
|
const { app: u } = i.value, a = d(n || {}).enabled;
|
|
2067
2087
|
!u || !(a === void 0 || a === !0) || s(u.httpClient);
|
|
@@ -2220,7 +2240,7 @@ const Zn = () => {
|
|
|
2220
2240
|
), [o, i] = T(d(t));
|
|
2221
2241
|
r.subscribe(({ dashboard: a }) => {
|
|
2222
2242
|
i(a);
|
|
2223
|
-
}), r.run(n(t), e),
|
|
2243
|
+
}), r.run(n(t), e), b([...g(t)], () => {
|
|
2224
2244
|
r.run(n(t), e);
|
|
2225
2245
|
}), w(() => {
|
|
2226
2246
|
r.destroy();
|
|
@@ -2244,7 +2264,7 @@ const Zn = () => {
|
|
|
2244
2264
|
const i = Oe(t), s = d(e);
|
|
2245
2265
|
n.run(i, s);
|
|
2246
2266
|
};
|
|
2247
|
-
return o(),
|
|
2267
|
+
return o(), b([...g(t), ...g(e)], () => {
|
|
2248
2268
|
o();
|
|
2249
2269
|
}), w(() => {
|
|
2250
2270
|
n.destroy();
|
|
@@ -2646,6 +2666,12 @@ const Zn = () => {
|
|
|
2646
2666
|
* @category Widget
|
|
2647
2667
|
*/
|
|
2648
2668
|
styleOptions: Object,
|
|
2669
|
+
/**
|
|
2670
|
+
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.config}
|
|
2671
|
+
*
|
|
2672
|
+
* @category Widget
|
|
2673
|
+
*/
|
|
2674
|
+
config: Object,
|
|
2649
2675
|
/**
|
|
2650
2676
|
* {@inheritDoc @sisense/sdk-ui!WidgetByIdProps.title}
|
|
2651
2677
|
*
|
|
@@ -3073,13 +3099,13 @@ const ar = c({
|
|
|
3073
3099
|
customWidgetsContext: J()
|
|
3074
3100
|
});
|
|
3075
3101
|
return l(
|
|
3076
|
-
|
|
3102
|
+
ge,
|
|
3077
3103
|
() => B(N(t), e)
|
|
3078
3104
|
);
|
|
3079
3105
|
}
|
|
3080
3106
|
});
|
|
3081
3107
|
function _e(t) {
|
|
3082
|
-
return E(
|
|
3108
|
+
return E(be.toDashboardProps(t));
|
|
3083
3109
|
}
|
|
3084
3110
|
const ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3085
3111
|
__proto__: null,
|
|
@@ -3151,10 +3177,10 @@ export {
|
|
|
3151
3177
|
yn as CalendarHeatmapChart,
|
|
3152
3178
|
xn as Chart,
|
|
3153
3179
|
rr as ChartWidget,
|
|
3154
|
-
|
|
3180
|
+
gn as ColumnChart,
|
|
3155
3181
|
We as ContextMenu,
|
|
3156
3182
|
En as CriteriaFilterTile,
|
|
3157
|
-
|
|
3183
|
+
jr as CustomWidgetsProvider,
|
|
3158
3184
|
cr as Dashboard,
|
|
3159
3185
|
ar as DashboardById,
|
|
3160
3186
|
yr as DashboardHeaderTargets,
|
|
@@ -3162,8 +3188,9 @@ export {
|
|
|
3162
3188
|
Ae as DrilldownBreadcrumbs,
|
|
3163
3189
|
nr as DrilldownWidget,
|
|
3164
3190
|
$n as FilterTile,
|
|
3191
|
+
gr as FilterTileMenuTargets,
|
|
3165
3192
|
In as FiltersPanel,
|
|
3166
|
-
|
|
3193
|
+
bn as FunnelChart,
|
|
3167
3194
|
Pn as IndicatorChart,
|
|
3168
3195
|
vn as KpiChart,
|
|
3169
3196
|
fn as LineChart,
|
|
@@ -3176,23 +3203,23 @@ export {
|
|
|
3176
3203
|
Wn as SankeyChart,
|
|
3177
3204
|
Cn as ScatterChart,
|
|
3178
3205
|
Mn as ScattermapChart,
|
|
3179
|
-
|
|
3206
|
+
Pr as SisenseContextProvider,
|
|
3180
3207
|
Rn as StreamgraphChart,
|
|
3181
3208
|
mn as SunburstChart,
|
|
3182
3209
|
Sn as Table,
|
|
3183
|
-
|
|
3210
|
+
vr as ThemeProvider,
|
|
3184
3211
|
Dn as TreemapChart,
|
|
3185
3212
|
sr as Widget,
|
|
3186
3213
|
or as WidgetById,
|
|
3187
3214
|
br as WidgetHeaderMenuTargets,
|
|
3188
|
-
|
|
3215
|
+
fr as boxWhiskerProcessResult,
|
|
3189
3216
|
lr as dashboardHelpers,
|
|
3190
3217
|
ur as dashboardModelTranslator,
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3218
|
+
Or as extractDimensionsAndMeasures,
|
|
3219
|
+
Cr as formatDataSet,
|
|
3220
|
+
Sr as formatDate,
|
|
3221
|
+
Fr as formatNumber,
|
|
3222
|
+
Dr as getDefaultDateFormat,
|
|
3196
3223
|
tr as useComposedDashboard,
|
|
3197
3224
|
Zn as useCustomWidgets,
|
|
3198
3225
|
Ln as useExecuteCsvQuery,
|
|
@@ -10,35 +10,27 @@ export interface AreaChartProps extends AreaChartPropsPreact {
|
|
|
10
10
|
* but with filled in areas under each line and an option to display them as stacked.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* Here's how you can use the AreaChart component in a Vue application:
|
|
14
13
|
* ```vue
|
|
15
|
-
* <template>
|
|
16
|
-
* <AreaChart
|
|
17
|
-
:dataOptions="areaChartProps.dataOptions"
|
|
18
|
-
:dataSet="areaChartProps.dataSet"
|
|
19
|
-
:filters="areaChartProps.filters"
|
|
20
|
-
/>
|
|
21
|
-
* </template>
|
|
22
|
-
*
|
|
23
14
|
* <script setup lang="ts">
|
|
24
15
|
* import { ref } from 'vue';
|
|
25
|
-
* import {
|
|
26
|
-
* import
|
|
27
|
-
* import
|
|
16
|
+
* import { AreaChart } from '@sisense/sdk-ui-vue';
|
|
17
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
18
|
+
* import * as DM from './sample-ecommerce';
|
|
28
19
|
*
|
|
29
|
-
* const
|
|
30
|
-
* const measureTotalRevenue = measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Total Revenue');
|
|
31
|
-
* const areaChartProps = ref<AreaChartProps>({
|
|
32
|
-
* dataSet: DM.DataSource,
|
|
20
|
+
* const chartProps = ref({
|
|
33
21
|
* dataOptions: {
|
|
34
|
-
* category: [
|
|
35
|
-
* value: [
|
|
22
|
+
* category: [DM.Commerce.Date.Quarters],
|
|
23
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')],
|
|
36
24
|
* breakBy: [],
|
|
37
25
|
* },
|
|
38
|
-
* filters: [],
|
|
39
26
|
* });
|
|
27
|
+
* </script>
|
|
28
|
+
*
|
|
29
|
+
* <template>
|
|
30
|
+
* <AreaChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
|
|
31
|
+
* </template>
|
|
40
32
|
* ```
|
|
41
|
-
* <img src="media://
|
|
33
|
+
* <img src="media://area-chart-example-1.png" width="700px" />
|
|
42
34
|
* @param {AreaChartProps} - Area chart properties
|
|
43
35
|
* @returns Area Chart component
|
|
44
36
|
* @group Charts
|
|
@@ -11,44 +11,55 @@ export interface AreaRangeChartProps extends AreaRangeChartPropsPreact {
|
|
|
11
11
|
* the minimum and maximum values in a dataset, along with the area between these values.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* <template>
|
|
17
|
-
* <AreaRangeChart
|
|
18
|
-
:dataOptions="areaRangeChartProps.dataOptions"
|
|
19
|
-
:dataSet="areaRangeChartProps.dataSet"
|
|
20
|
-
:filters="areaRangeChartProps.filters"
|
|
21
|
-
/>
|
|
22
|
-
* </template>
|
|
14
|
+
* Area range chart displaying total revenue per quarter from the Sample ECommerce data model,
|
|
15
|
+
* with the range spanning 60%-140% of the actual revenue.
|
|
23
16
|
*
|
|
17
|
+
* ```vue
|
|
24
18
|
* <script setup lang="ts">
|
|
25
19
|
* import { ref } from 'vue';
|
|
26
|
-
* import { measureFactory } from '@sisense/sdk-data';
|
|
27
|
-
* import * as DM from '../assets/sample-retail-model';
|
|
28
20
|
* import { AreaRangeChart, type AreaRangeChartProps } from '@sisense/sdk-ui-vue';
|
|
21
|
+
* import { measureFactory } from '@sisense/sdk-data';
|
|
22
|
+
* import * as DM from './sample-ecommerce';
|
|
29
23
|
*
|
|
30
|
-
* const
|
|
31
|
-
* const areaRangeChartProps = ref<AreaRangeChartProps>({
|
|
32
|
-
* dataSet: DM.DataSource,
|
|
24
|
+
* const chartProps = ref<{ dataOptions: AreaRangeChartProps['dataOptions'] }>({
|
|
33
25
|
* dataOptions: {
|
|
34
|
-
* category: [
|
|
35
|
-
* value: [
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* measureFactory.sum(DM.
|
|
39
|
-
* 0.6,
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* measureFactory.sum(DM.Fact_Sale_orders.OrderRevenue, 'Upper Revenue'),
|
|
43
|
-
* 1.4,
|
|
44
|
-
* ),
|
|
45
|
-
* }],
|
|
26
|
+
* category: [DM.Commerce.Date.Quarters],
|
|
27
|
+
* value: [
|
|
28
|
+
* {
|
|
29
|
+
* title: 'Revenue',
|
|
30
|
+
* upperBound: measureFactory.multiply(measureFactory.sum(DM.Commerce.Revenue), 1.4, 'Upper Revenue'),
|
|
31
|
+
* lowerBound: measureFactory.multiply(measureFactory.sum(DM.Commerce.Revenue), 0.6, 'Lower Revenue'),
|
|
32
|
+
* },
|
|
33
|
+
* ],
|
|
46
34
|
* breakBy: [],
|
|
47
35
|
* },
|
|
48
|
-
* filters: [],
|
|
49
36
|
* });
|
|
37
|
+
* </script>
|
|
38
|
+
*
|
|
39
|
+
* <template>
|
|
40
|
+
* <AreaRangeChart :dataSet="DM.DataSource" :dataOptions="chartProps.dataOptions" />
|
|
41
|
+
* </template>
|
|
50
42
|
* ```
|
|
51
|
-
*
|
|
43
|
+
*
|
|
44
|
+
* <img src="media://area-range-chart-example-1.png" width="700px" />
|
|
45
|
+
*
|
|
46
|
+
* The same range broken down by condition:
|
|
47
|
+
*
|
|
48
|
+
* ```vue
|
|
49
|
+
* chartProps.value.dataOptions = {
|
|
50
|
+
* category: [DM.Commerce.Date.Quarters],
|
|
51
|
+
* value: [
|
|
52
|
+
* {
|
|
53
|
+
* title: 'Revenue',
|
|
54
|
+
* upperBound: measureFactory.multiply(measureFactory.sum(DM.Commerce.Revenue), 1.4, 'Upper Revenue'),
|
|
55
|
+
* lowerBound: measureFactory.multiply(measureFactory.sum(DM.Commerce.Revenue), 0.6, 'Lower Revenue'),
|
|
56
|
+
* },
|
|
57
|
+
* ],
|
|
58
|
+
* breakBy: [DM.Commerce.Condition],
|
|
59
|
+
* };
|
|
60
|
+
* ```
|
|
61
|
+
*
|
|
62
|
+
* <img src="media://area-range-chart-example-2.png" width="700px" />
|
|
52
63
|
* @param {AreaRangeChartProps} - Area chart properties
|
|
53
64
|
* @returns Area Range Chart component
|
|
54
65
|
* @group Charts
|