@sisense/sdk-ui-angular 2.9.0 → 2.10.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.
@@ -14,7 +14,7 @@ export interface WidgetByIdProps extends WithoutPreactChartEventProps<WidgetById
14
14
  * is used to render a widget created in a Sisense Fusion instance.
15
15
  *
16
16
  * To learn more about using Sisense Fusion Widgets in Compose SDK, see
17
- * [Sisense Fusion Widgets](https://sisense.dev/guides/sdk/guides/charts/guide-fusion-widgets.html).
17
+ * [Sisense Fusion Widgets](https://developer.sisense.com/guides/sdk/guides/charts/guide-fusion-widgets.html).
18
18
  *
19
19
  * @example
20
20
  * ```html
@@ -1,2 +1,2 @@
1
1
  export { boxWhiskerProcessResult, extractDimensionsAndMeasures } from '@sisense/sdk-ui-preact';
2
- export type { AppConfig, AreamapChartDataOptions, AreamapChartType, AreamapStyleOptions, AreaRangeStyleOptions, AreaStyleOptions, AreaSubtype, AxisLabel, BeforeRenderHandler, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, BoxplotChartType, BoxplotDataPoint, BoxplotStyleOptions, BoxplotSubtype, BoxWhiskerType, CartesianChartDataOptions, CartesianChartType, CartesianWidgetType, CategoricalChartDataOptions, CategoricalChartType, CategoricalWidgetType, ChartDataOptions, ChartStyleOptions, ChartType, ChartWidgetStyleOptions, Color, ColorPaletteTheme, CommonWidgetProps, ConditionalDataColorOptions, Convolution, DashboardLayoutOptions, DashboardModel, DataColorCondition, DataColorOptions, DataLimits, DataPoint, DateConfig, DateLevel, DayOfWeek, DecimalScale, DrilldownOptions, DrilldownSelection, FilterVariant, FunnelStyleOptions, GaugeIndicatorStyleOptions, GetDashboardModelOptions, GetDashboardModelsOptions, Hierarchy, HierarchyModel, HighchartsOptions, IndicatorBeforeRenderHandler, IndicatorChartDataOptions, IndicatorChartType, IndicatorComponents, IndicatorDataPoint, IndicatorRenderOptions, IndicatorStyleOptions, Labels, Legend, LineStyleOptions, LineSubtype, LineWidth, Markers, Member, MenuItemSection, MenuPosition, MonthOfYear, MultiColumnValueToColorMap, Navigator, NumberFormatConfig, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, PieStyleOptions, PieSubtype, PivotRowsSort, PivotTableDataOptions, PivotTableStyleOptions, PivotTableWidgetStyleOptions, PolarStyleOptions, PolarSubtype, RangeChartDataOptions, RangeChartType, RangeDataColorOptions, ScatterChartDataOptions, ScatterChartType, ScatterDataPoint, ScattermapChartDataOptions, ScattermapChartType, ScattermapLocationLevel, ScattermapMarkers, ScattermapStyleOptions, ScatterMarkerSize, ScatterStyleOptions, SeriesChartType, SeriesLabels, SortDirection, StackableStyleOptions, StackableSubtype, StyledColumn, StyledMeasureColumn, SunburstStyleOptions, TableDataOptions, TableStyleOptions, TableType, TabularWidgetType, ThemeOid, ThemeSettings, TranslationConfig, TreemapStyleOptions, UniformDataColorOptions, ValueToColorMap, WidgetByIdStyleOptions, WidgetDataOptions, WidgetId, WidgetModel, WidgetsOptions, WidgetsPanelColumnLayout, WidgetsPanelLayout, WidgetStyleOptions, WidgetType, X2Title, } from '@sisense/sdk-ui-preact';
2
+ export type { AppConfig, AreamapChartDataOptions, AreamapChartType, AreamapStyleOptions, AreaRangeStyleOptions, AreaStyleOptions, AreaSubtype, AxisLabel, BeforeRenderHandler, BoxplotChartCustomDataOptions, BoxplotChartDataOptions, BoxplotChartType, BoxplotDataPoint, BoxplotStyleOptions, BoxplotSubtype, BoxWhiskerType, CartesianChartDataOptions, CartesianChartType, CartesianWidgetType, CategoricalChartDataOptions, CategoricalChartType, CategoricalWidgetType, ChartDataOptions, ChartStyleOptions, ChartType, ChartWidgetStyleOptions, Color, ColorPaletteTheme, CommonWidgetProps, ConditionalDataColorOptions, Convolution, DashboardLayoutOptions, DashboardModel, DashStyle, DataColorCondition, DataColorOptions, DataLimits, DataPoint, DateConfig, DateLevel, DayOfWeek, DecimalScale, DrilldownOptions, DrilldownSelection, EndCapType, FilterVariant, FunnelStyleOptions, GaugeIndicatorStyleOptions, GetDashboardModelOptions, GetDashboardModelsOptions, Hierarchy, HierarchyModel, HighchartsOptions, IndicatorBeforeRenderHandler, IndicatorChartDataOptions, IndicatorChartType, IndicatorComponents, IndicatorDataPoint, IndicatorRenderOptions, IndicatorStyleOptions, Labels, Legend, LineOptions, LineStyleOptions, LineSubtype, LineWidth, Markers, Member, MenuItemSection, MenuPosition, MonthOfYear, MultiColumnValueToColorMap, Navigator, NumberFormatConfig, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, PieStyleOptions, PieSubtype, PivotRowsSort, PivotTableDataOptions, PivotTableStyleOptions, PivotTableWidgetStyleOptions, PolarStyleOptions, PolarSubtype, RangeChartDataOptions, RangeChartType, RangeDataColorOptions, ScatterChartDataOptions, ScatterChartType, ScatterDataPoint, ScattermapChartDataOptions, ScattermapChartType, ScattermapLocationLevel, ScattermapMarkers, ScattermapStyleOptions, ScatterMarkerSize, ScatterStyleOptions, SeriesChartType, SeriesLabels, SortDirection, StackableStyleOptions, StackableSubtype, StyledColumn, StyledMeasureColumn, SunburstStyleOptions, TableDataOptions, TableStyleOptions, TableType, TabularWidgetType, ThemeOid, ThemeSettings, TranslationConfig, TreemapStyleOptions, UniformDataColorOptions, ValueToColorMap, WidgetByIdStyleOptions, WidgetDataOptions, WidgetId, WidgetModel, WidgetsOptions, WidgetsPanelColumnLayout, WidgetsPanelLayout, WidgetStyleOptions, WidgetType, X2Title, } from '@sisense/sdk-ui-preact';
@@ -1,8 +1,21 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import type { SisenseContextProviderProps as SisenseContextConfig } from '@sisense/sdk-ui-preact';
3
3
  import { ClientApplication } from '@sisense/sdk-ui-preact';
4
+ import { Observable } from 'rxjs';
4
5
  import * as i0 from "@angular/core";
5
6
  export { type SisenseContextConfig };
7
+ /**
8
+ * Represents the state of the Sisense client application.
9
+ */
10
+ type AppState = {
11
+ /** Successfully initialized client application */
12
+ readonly app: ClientApplication;
13
+ readonly error?: never;
14
+ } | {
15
+ /** Error that occurred during initialization or connection */
16
+ readonly error: Error;
17
+ readonly app?: never;
18
+ };
6
19
  /**
7
20
  * Token used to inject {@link SisenseContextConfig} into your application
8
21
  *
@@ -32,17 +45,87 @@ export { type SisenseContextConfig };
32
45
  */
33
46
  export declare const SISENSE_CONTEXT_CONFIG_TOKEN: InjectionToken<SisenseContextConfig>;
34
47
  /**
35
- * Service for working with Sisense Fusion context.
48
+ * Service for managing Sisense Fusion context and client application lifecycle.
49
+ *
50
+ * This service provides a centralized way to configure and manage the connection to a Sisense instance within Angular applications.
36
51
  *
37
52
  * @group Contexts
38
53
  */
39
54
  export declare class SisenseContextService {
40
- private appPromise;
41
- private config;
42
- constructor(sisenseContextConfig: SisenseContextConfig);
43
- /** @internal */
55
+ /**
56
+ * Reactive stream of application state changes.
57
+ *
58
+ * Uses ReplaySubject to ensure late subscribers receive the latest state.
59
+ */
60
+ private readonly app$;
61
+ /**
62
+ * Configuration object for the Sisense connection.
63
+ *
64
+ * This is set once during initialization and remains readonly thereafter
65
+ * to prevent accidental mutations that could lead to inconsistent state.
66
+ */
67
+ private config?;
68
+ /**
69
+ * Flag indicating whether the service has been initialized with configuration.
70
+ *
71
+ * @internal
72
+ */
73
+ isInitialized: boolean;
74
+ constructor(sisenseContextConfig?: SisenseContextConfig);
75
+ /**
76
+ * Retrieves the initialized Sisense client application.
77
+ *
78
+ * This method provides access to the client application instance.
79
+ * It waits for the latest state from the reactive stream and either returns
80
+ * the application or throws the error if initialization failed.
81
+ *
82
+ * @returns Promise that resolves to the ClientApplication instance
83
+ * @throws {Error} When the service is not initialized or when application creation failed
84
+ *
85
+ * @internal
86
+ */
44
87
  getApp(): Promise<ClientApplication>;
45
- getConfig(): SisenseContextConfig;
46
- static ɵfac: i0.ɵɵFactoryDeclaration<SisenseContextService, never>;
88
+ /**
89
+ * Provides reactive access to the Sisense application state.
90
+ *
91
+ * This method returns an Observable that emits the current application state
92
+ * and all subsequent state changes. It's the preferred way to reactively
93
+ * handle application lifecycle events in Angular components.
94
+ *
95
+ * If the service is not initialized, it immediately emits an error state
96
+ * followed by any future state changes once initialization occurs.
97
+ *
98
+ * @returns Observable stream of AppState changes
99
+ *
100
+ * @internal
101
+ */
102
+ getApp$(): Observable<AppState>;
103
+ /**
104
+ * Retrieves the current {@link SisenseContextConfig} configuration object.
105
+ *
106
+ * @returns The current configuration object, or undefined if not yet configured
107
+ */
108
+ getConfig(): SisenseContextConfig | undefined;
109
+ /**
110
+ * Configures and initializes the Sisense context with the provided settings.
111
+ *
112
+ * This method allows to establish a connection to a Sisense instance.
113
+ * It could be used as runtime alternative to {@link SISENSE_CONTEXT_CONFIG_TOKEN} based configuration.
114
+ *
115
+ * @param config - Configuration object
116
+ * @returns Promise that resolves when configuration is complete (success or failure)
117
+ *
118
+ * @example
119
+ * Basic configuration:
120
+ * ```ts
121
+ * await SisenseContextService.setConfig({
122
+ * url: 'https://your-sisense-instance.com',
123
+ * token: 'your-api-token',
124
+ * defaultDataSource: 'Sample ECommerce'
125
+ * });
126
+ * ```
127
+ */
128
+ setConfig(config: SisenseContextConfig): Promise<void>;
129
+ static ɵfac: i0.ɵɵFactoryDeclaration<SisenseContextService, [{ optional: true; }]>;
47
130
  static ɵprov: i0.ɵɵInjectableDeclaration<SisenseContextService>;
48
131
  }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisense/sdk-ui-angular",
3
- "homepage": "https://sisense.dev/guides/sdk/",
3
+ "homepage": "https://developer.sisense.com/guides/sdk/",
4
4
  "description": "Compose SDK package containing general UI elements and related logic tailored for Angular development",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "2.9.0",
14
+ "version": "2.10.0",
15
15
  "author": "Sisense",
16
16
  "license": "SEE LICENSE IN LICENSE.md",
17
17
  "main": "dist",
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "2.9.0";
1
+ declare const _default: "2.10.0";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sisense/sdk-ui-angular",
3
- "homepage": "https://sisense.dev/guides/sdk/",
3
+ "homepage": "https://developer.sisense.com/guides/sdk/",
4
4
  "description": "Compose SDK package containing general UI elements and related logic tailored for Angular development",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "2.9.0",
14
+ "version": "2.10.0",
15
15
  "author": "Sisense",
16
16
  "license": "SEE LICENSE IN LICENSE.md",
17
17
  "main": "dist",
@@ -76,9 +76,9 @@
76
76
  "@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0 || ^20.0.0"
77
77
  },
78
78
  "dependencies": {
79
- "@sisense/sdk-data": "2.9.0",
80
- "@sisense/sdk-tracking": "2.9.0",
81
- "@sisense/sdk-ui-preact": "2.9.0",
79
+ "@sisense/sdk-data": "2.10.0",
80
+ "@sisense/sdk-tracking": "2.10.0",
81
+ "@sisense/sdk-ui-preact": "2.10.0",
82
82
  "rxjs": "^7.8.1",
83
83
  "ts-deepmerge": "^6.2.0",
84
84
  "tslib": "^2.3.0"