Migrating Compose SDK from 1.x.x to 2.0.0
Released in April 2025, the major version 2.0.0 of the Compose SDK introduces several breaking changes.
If your application is still using a Compose SDK version earlier than 2.0.0, follow this guide to migrate.
Minimum React Version
The minimum supported version of React is now v17.0.0.
Minimum Angular Version
The minimum supported version of Angular is now v17.
Removed Deprecated Entities
DashboardWidgetComponentIf your app uses
DashboardWidget(React/Vue) or\<csdk-dashboard-widget\>(Angular) explicitly, replace them with the equivalent as described in the list below.The
DashboardWidgetcomponent was renamed toWidgetByIdand deprecated in version1.23.0. It has now been removed in version2.0.0.React,
Vue
- The
DashboardWidgetcomponent has been removed. Use theWidgetByIdcomponent instead. - The
DashboardWidgetPropsinterface has been removed. Use theWidgetByIdPropsinterface instead. - The
DashboardWidgetStyleOptionsinterface has been removed. Use theWidgetByIdStyleOptionsinterface instead.
Angular
- The
<csdk-dashboard-widget>component has been removed. Use the<csdk-widget-by-id>component instead. - The
DashboardWidgetPropsinterface has been removed. Use theWidgetByIdPropsinterface instead. - The
DashboardWidgetStyleOptionsinterface has been removed. Use theWidgetByIdStyleOptionsinterface instead.
- The
WidgetModelInterfaceIn previous versions,
WidgetModelwas a class instance that included methods to convert its data into component props.
In version1.20.0, these methods were moved into separatewidgetModelTranslatorutility functions and deprecated on theWidgetModelinterface.
In version2.0.0, these methods have been removed, andWidgetModelis now a plain object.Removed deprecated
WidgetModelmethods:getExecuteQueryParams– usewidgetModelTranslator.toExecuteQueryParamsinstead.getExecutePivotQueryParams– usewidgetModelTranslator.toExecutePivotQueryParamsinstead.getChartProps– usewidgetModelTranslator.toChartPropsinstead.getTableProps– usewidgetModelTranslator.toTablePropsinstead.getPivotTableProps– usewidgetModelTranslator.toPivotTablePropsinstead.getPivotTableWidgetProps– usewidgetModelTranslator.toPivotTableWidgetPropsinstead.getChartWidgetProps– usewidgetModelTranslator.toChartWidgetPropsinstead.getTableWidgetProps– removed. UsewidgetModelTranslator.toChartWidgetPropsinstead.getTextWidgetProps– usewidgetModelTranslator.toTextWidgetPropsinstead.
Example:
// Before const chartProps = widgetModel.getChartProps(); // After const chartProps = widgetModelTranslator.toChartProps(widgetModel);Widget type
Previously, the
WidgetModelrelied on theFusionlist of widget types. To improve consistency, theWidgetModelnow uses the Compose SDK's own simplified list of widget types compatible withWidgetcomponent andWidgetProps.
If you create/modifyWidgetModelobjects directly, you need to update thewidgetTypeproperty to use the new type.type WidgetType = 'chart' | 'pivot' | 'text' | 'plugin';Example:
// Before const widgetModel: WidgetModel = { widgetType: 'chart/scatter', chartType: 'scatter', // ... other properties }; // After const widgetModel: WidgetModel = { widgetType: 'chart', chartType: 'scatter', // ... other properties };TableStyleOptionsInterface- Removed deprecated
TableStyleOptions.headersColor– useTableStyleOptions.header.color.enabledinstead. - Removed deprecated
TableStyleOptions.alternatingRowsColor– useTableStyleOptions.rows.alternatingColor.enabledinstead. - Removed deprecated
TableStyleOptions.alternatingColumnsColor– useTableStyleOptions.columns.alternatingColor.enabledinstead.
// Before const styleOptions: TableStyleOptions = { headersColor: true, alternatingColumnsColor: true, alternatingRowsColor: true, }; // After const styleOptions: TableStyleOptions = { header: { color: { enabled: true, }, }, columns: { alternatingColor: { enabled: true, }, }, rows: { alternatingColor: { enabled: true, }, }, };- Removed deprecated
PivotGrandTotals.titleThe deprecated
PivotGrandTotals.titleproperty has been removed.
To customize the title of grand totals, use the translation mechanism (see Translation Guide for details).Example:
const frenchTranslationResources: Partial<TranslationDictionary> = { pivotTable: { grandTotal: 'Total général', subTotal: '{{value}} total', }, };Widget drilldown
DrilldownWidgetProps.drilldownDimensionsandDrilldownOptions.drilldownDimensionswere deprecated in version1.20.0and have now been removed. UseDrilldownWidgetProps.drilldownPathsandDrilldownOptions.drilldownPathsinstead.
// Before const drilldownOptions = { drilldownDimensions: [DM.Commerce.AgeRange, DM.Commerce.Gender, DM.Commerce.Condition], }; // After const drilldownOptions = { drilldownPaths: [DM.Commerce.AgeRange, DM.Commerce.Gender, DM.Commerce.Condition], };Dashboard Helpers
- The deprecated
modifyFilterutility has been removed. Rename usages toreplaceFilterinstead.
- The deprecated
ThemeSettings- The deprecated
themeSettings.chart.panelBackgroundColorproperty has been removed. UsethemeSettings.filter.panel.backgroundColorinstead for theming filter panel.
- The deprecated
Query Params
Angular:
- The deprecated
onBeforeQueryproperty inExecuteQueryParamshas been removed. Use thebeforeQueryparameter instead.
- The deprecated
Type Fixes
All frameworks:
- The deprecated
CriteriaFilterTypetype has been removed. Use the regularFiltertype instead.
Vue:
In version 2.0.0 prop types were aligned across frameworks, with the following changes:
- The
dataOptionsandchartTypeprops for all charts andChartWidgetare now required. - The
dataOptionsprop forTableandPivotTableis now required. - The
urlprop forSisenseContextProvideris now required. - The
widgetsprop forDashboardis now required. - The
closeContextMenuprop forContextMenuis now required. - The
clearDrilldownSelections,currentDimension,filtersDisplayValues, andsliceDrilldownSelectionsprops forDrilldownBreadcrumbsare now required. - The
filter,onUpdate, andtitleprops forCriteriaFilterTileandRelativeDateFilterTileare now required. - The
attribute,filter,onChange, andtitleprops forDateRangeFilterTileandMemberFilterTileare now required. - The
onChangeprop forFilterTileis now required. - The
dashboardOidprop forDashboardByIdis now required. - The
dashboardOidandwidgetOidprops forWidgetByIdare now required. - The
dataSourceprop forGetNlgInsightsis now required.
Angular:
- The
dataPointsSelectprop for multiple charts has been renamed todataPointsSelected. - The callbacks
dataPointClick,dataPointContextMenu,dataPointsSelect, andbeforeRenderfor specific charts are now strictly typed, referencing the values specific to each chart.