@sisense/sdk-ui-angular 1.18.1 → 1.19.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.
@@ -1,6 +1,7 @@
1
- import { ContextConnector, CustomSisenseContext, CustomThemeProviderProps } from '@sisense/sdk-ui-preact';
1
+ import { ContextConnector, CustomSisenseContext, CustomThemeProviderProps, CustomPluginsProviderProps } from '@sisense/sdk-ui-preact';
2
2
  import { SisenseContextService } from '../services/sisense-context.service';
3
3
  import { ThemeService } from '../services/theme.service';
4
+ import { PluginsService } from '../services/plugins.service';
4
5
  /**
5
6
  * Creates theme context connector
6
7
  *
@@ -15,3 +16,10 @@ export declare const createThemeContextConnector: (themeService: ThemeService) =
15
16
  * @internal
16
17
  */
17
18
  export declare const createSisenseContextConnector: (sisenseContextService: SisenseContextService) => ContextConnector<CustomSisenseContext>;
19
+ /**
20
+ * Creates plugins context connector
21
+ *
22
+ * @param pluginsService - The plugin service
23
+ * @internal
24
+ */
25
+ export declare const createPluginsContextConnector: (pluginsService: PluginsService) => ContextConnector<CustomPluginsProviderProps['context']>;
@@ -2,6 +2,7 @@ import { AfterViewInit, ElementRef, OnChanges, OnDestroy } from '@angular/core';
2
2
  import { type DashboardByIdProps } from '@sisense/sdk-ui-preact';
3
3
  import { SisenseContextService } from '../../services/sisense-context.service';
4
4
  import { ThemeService } from '../../services/theme.service';
5
+ import { PluginsService } from '../../services/plugins.service';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * An Angular component used for easily rendering a dashboard by its ID created in a Sisense Fusion instance.
@@ -43,6 +44,13 @@ export declare class DashboardByIdComponent implements AfterViewInit, OnChanges,
43
44
  * @category Constructor
44
45
  */
45
46
  themeService: ThemeService;
47
+ /**
48
+ * Plugin service
49
+ *
50
+ * @internal
51
+ * @category Constructor
52
+ */
53
+ pluginService: PluginsService;
46
54
  /**
47
55
  * @internal
48
56
  */
@@ -70,7 +78,14 @@ export declare class DashboardByIdComponent implements AfterViewInit, OnChanges,
70
78
  *
71
79
  * @category Constructor
72
80
  */
73
- themeService: ThemeService);
81
+ themeService: ThemeService,
82
+ /**
83
+ * Plugin service
84
+ *
85
+ * @internal
86
+ * @category Constructor
87
+ */
88
+ pluginService: PluginsService);
74
89
  /**
75
90
  * @internal
76
91
  */
@@ -1,5 +1,6 @@
1
1
  export * from './query.service';
2
2
  export * from './sisense-context.service';
3
3
  export * from './theme.service';
4
+ export * from './plugins.service';
4
5
  export * from './dashboard.service';
5
6
  export * from './widget.service';
@@ -0,0 +1,37 @@
1
+ import { BehaviorSubject } from 'rxjs';
2
+ import { WidgetPlugin } from '@sisense/sdk-ui-preact';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Service for working with plugins fetched from an external environment.
6
+ *
7
+ * Provides methods for registering, retrieving, and interacting with plugins.
8
+ *
9
+ * @internal
10
+ * @group Contexts
11
+ */
12
+ export declare class PluginsService {
13
+ private pluginMap$;
14
+ constructor();
15
+ /**
16
+ * Registers a new plugin into the plugin map.
17
+ *
18
+ * @param pluginType - The unique identifier for the plugin type.
19
+ * @param plugin - The plugin instance to register.
20
+ */
21
+ registerPlugin(pluginType: string, plugin: WidgetPlugin): void;
22
+ /**
23
+ * Retrieves a plugin by its type.
24
+ *
25
+ * @param pluginType - The unique identifier for the plugin type.
26
+ * @returns The plugin instance if found, otherwise undefined.
27
+ */
28
+ getPlugin(pluginType: string): WidgetPlugin | undefined;
29
+ /**
30
+ * Retrieves a complete plugin map.
31
+ *
32
+ * @returns A plugin map.
33
+ */
34
+ getPlugins(): BehaviorSubject<Map<string, WidgetPlugin<{}>>>;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<PluginsService, never>;
36
+ static ɵprov: i0.ɵɵInjectableDeclaration<PluginsService>;
37
+ }
@@ -1,5 +1,5 @@
1
1
  import { InjectionToken } from '@angular/core';
2
- import { type ThemeProviderProps as ThemeConfig } from '@sisense/sdk-ui-preact';
2
+ import { type ThemeProviderProps as ThemeConfig, type CompleteThemeSettings } from '@sisense/sdk-ui-preact';
3
3
  import { type ThemeSettings } from '../sdk-ui-core-exports';
4
4
  import { SisenseContextService } from './sisense-context.service';
5
5
  import * as i0 from "@angular/core";
@@ -53,156 +53,7 @@ export declare class ThemeService {
53
53
  private initThemeSettings;
54
54
  private applyThemeSettings;
55
55
  /** @internal */
56
- getThemeSettings(): import("rxjs").Observable<{
57
- chart: {
58
- textColor: string;
59
- secondaryTextColor: string;
60
- backgroundColor: string;
61
- panelBackgroundColor: string;
62
- animation: {
63
- init: {
64
- duration: number | "auto";
65
- };
66
- redraw: {
67
- duration: number | "auto";
68
- };
69
- };
70
- };
71
- palette: {
72
- variantColors: import("@sisense/sdk-ui-preact").Color[];
73
- };
74
- typography: {
75
- fontFamily: string;
76
- primaryTextColor: string;
77
- secondaryTextColor: string;
78
- };
79
- general: {
80
- brandColor: string;
81
- backgroundColor: string;
82
- primaryButtonTextColor: string;
83
- primaryButtonHoverColor: string;
84
- };
85
- widget: {
86
- spaceAround: import("@sisense/sdk-ui-preact").SpaceSizes;
87
- cornerRadius: import("@sisense/sdk-ui-preact").RadiusSizes;
88
- shadow: import("@sisense/sdk-ui-preact").ShadowsTypes;
89
- border: boolean;
90
- borderColor: string;
91
- header: {
92
- titleTextColor: string;
93
- titleAlignment: import("@sisense/sdk-ui-preact").AlignmentTypes;
94
- dividerLine: boolean;
95
- dividerLineColor: string;
96
- backgroundColor: string;
97
- };
98
- };
99
- dashboard: {
100
- backgroundColor: string;
101
- dividerLineWidth: number;
102
- dividerLineColor: string;
103
- };
104
- filter: {
105
- panel: {
106
- titleColor: string;
107
- backgroundColor: string;
108
- };
109
- };
110
- aiChat: {
111
- backgroundColor: string;
112
- primaryTextColor: string;
113
- secondaryTextColor: string;
114
- primaryFontSize: [fontSize: string, lineHeight: string];
115
- border: string | false;
116
- borderRadius: string | false;
117
- body: {
118
- paddingLeft: string;
119
- paddingRight: string;
120
- paddingTop: string;
121
- paddingBottom: string;
122
- gapBetweenMessages: string;
123
- };
124
- footer: {
125
- paddingLeft: string;
126
- paddingRight: string;
127
- paddingTop: string;
128
- paddingBottom: string;
129
- };
130
- userMessages: {
131
- backgroundColor: string;
132
- };
133
- systemMessages: {
134
- backgroundColor: string;
135
- };
136
- input: {
137
- backgroundColor: string;
138
- focus: {
139
- outlineColor: string;
140
- };
141
- };
142
- header: {
143
- backgroundColor: string;
144
- textColor: string;
145
- };
146
- dropup: {
147
- backgroundColor: string;
148
- boxShadow: string;
149
- borderRadius: string;
150
- headers: {
151
- textColor: string;
152
- hover: {
153
- backgroundColor: string;
154
- };
155
- };
156
- items: {
157
- textColor: string;
158
- hover: {
159
- backgroundColor: string;
160
- };
161
- };
162
- };
163
- suggestions: {
164
- textColor: string;
165
- backgroundColor: string;
166
- border: string;
167
- borderGradient: [string, string] | null;
168
- borderRadius: string;
169
- hover: {
170
- textColor: string;
171
- backgroundColor: string;
172
- };
173
- loadingGradient: [string, string];
174
- gap: string;
175
- };
176
- clickableMessages: {
177
- textColor: string;
178
- backgroundColor: string;
179
- border: string | false;
180
- borderGradient: [string, string] | null;
181
- hover: {
182
- textColor: string;
183
- backgroundColor: string;
184
- };
185
- };
186
- dataTopics: {
187
- backgroundColor: string;
188
- items: {
189
- textColor: string;
190
- backgroundColor: string;
191
- };
192
- };
193
- icons: {
194
- color: string;
195
- feedbackIcons: {
196
- hoverColor: string;
197
- };
198
- };
199
- tooltips: {
200
- backgroundColor: string;
201
- textColor: string;
202
- boxShadow: string;
203
- };
204
- };
205
- }>;
56
+ getThemeSettings(): import("rxjs").Observable<CompleteThemeSettings>;
206
57
  updateThemeSettings(theme: string | ThemeSettings): Promise<void>;
207
58
  static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, [null, { optional: true; }]>;
208
59
  static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
package/dist/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "1.18.1",
14
+ "version": "1.19.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: "1.18.1";
1
+ declare const _default: "1.19.0";
2
2
  export default _default;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "1.18.1",
14
+ "version": "1.19.0",
15
15
  "author": "Sisense",
16
16
  "license": "SEE LICENSE IN LICENSE.md",
17
17
  "main": "dist",
@@ -45,9 +45,9 @@
45
45
  "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0"
46
46
  },
47
47
  "dependencies": {
48
- "@sisense/sdk-data": "^1.18.1",
49
- "@sisense/sdk-tracking": "^1.18.1",
50
- "@sisense/sdk-ui-preact": "^1.18.1",
48
+ "@sisense/sdk-data": "^1.19.0",
49
+ "@sisense/sdk-tracking": "^1.19.0",
50
+ "@sisense/sdk-ui-preact": "^1.19.0",
51
51
  "rxjs": "^7.8.1",
52
52
  "ts-deepmerge": "^6.2.0",
53
53
  "tslib": "^2.3.0"