@sisense/sdk-ui-angular 1.15.1 → 1.17.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.
Files changed (31) hide show
  1. package/dist/esm2020/lib/component-wrapper-helpers/context-connectors.mjs +7 -3
  2. package/dist/esm2020/lib/components/charts/line-chart.component.mjs +1 -1
  3. package/dist/esm2020/lib/components/charts/pie-chart.component.mjs +1 -1
  4. package/dist/esm2020/lib/components/charts/polar-chart.component.mjs +1 -1
  5. package/dist/esm2020/lib/components/charts/scatter-chart.component.mjs +1 -1
  6. package/dist/esm2020/lib/components/dashboard/dashboard-by-id.component.mjs +4 -2
  7. package/dist/esm2020/lib/components/dashboard/dashboard.component.mjs +9 -4
  8. package/dist/esm2020/lib/components/widgets/dashboard-widget.component.mjs +1 -1
  9. package/dist/esm2020/lib/components/widgets/drilldown-widget.component.mjs +6 -1
  10. package/dist/esm2020/lib/decorators/trackable.decorator.mjs +3 -2
  11. package/dist/esm2020/lib/services/dashboard.service.mjs +3 -1
  12. package/dist/esm2020/lib/services/sisense-context.service.mjs +2 -3
  13. package/dist/esm2020/version.mjs +2 -2
  14. package/dist/fesm2015/sisense-sdk-ui-angular.mjs +31 -10
  15. package/dist/fesm2015/sisense-sdk-ui-angular.mjs.map +1 -1
  16. package/dist/fesm2020/sisense-sdk-ui-angular.mjs +28 -10
  17. package/dist/fesm2020/sisense-sdk-ui-angular.mjs.map +1 -1
  18. package/dist/lib/components/charts/line-chart.component.d.ts +1 -1
  19. package/dist/lib/components/charts/pie-chart.component.d.ts +1 -1
  20. package/dist/lib/components/charts/polar-chart.component.d.ts +1 -1
  21. package/dist/lib/components/charts/scatter-chart.component.d.ts +1 -1
  22. package/dist/lib/components/dashboard/dashboard-by-id.component.d.ts +3 -1
  23. package/dist/lib/components/dashboard/dashboard.component.d.ts +9 -3
  24. package/dist/lib/components/widgets/dashboard-widget.component.d.ts +41 -1
  25. package/dist/lib/components/widgets/drilldown-widget.component.d.ts +15 -0
  26. package/dist/lib/services/dashboard.service.d.ts +2 -0
  27. package/dist/lib/services/query.service.d.ts +1 -2
  28. package/dist/lib/services/theme.service.d.ts +27 -0
  29. package/dist/package.json +1 -1
  30. package/dist/version.d.ts +1 -1
  31. package/package.json +4 -4
@@ -106,15 +106,20 @@ const createThemeContextConnector = (themeService) => {
106
106
  const createSisenseContextConnector = (sisenseContextService) => {
107
107
  return {
108
108
  prepareContext() {
109
+ var _a;
109
110
  return __awaiter(this, void 0, void 0, function* () {
110
- const { enableTracking, showRuntimeErrors } = sisenseContextService.getConfig();
111
+ const { enableTracking, showRuntimeErrors, appConfig } = sisenseContextService.getConfig();
111
112
  const app = yield sisenseContextService.getApp();
112
113
  return {
113
114
  app,
114
115
  isInitialized: true,
115
116
  showRuntimeErrors,
116
117
  tracking: {
117
- enabled: enableTracking,
118
+ // if tracking is configured in appConfig, use it, otherwise use enableTracking
119
+ // if none is set, default to true
120
+ enabled: ((_a = appConfig === null || appConfig === void 0 ? void 0 : appConfig.trackingConfig) === null || _a === void 0 ? void 0 : _a.enabled) !== undefined
121
+ ? appConfig.trackingConfig.enabled
122
+ : enableTracking !== null && enableTracking !== void 0 ? enableTracking : true,
118
123
  packageName: 'sdk-ui-angular',
119
124
  },
120
125
  };
@@ -160,8 +165,8 @@ const SISENSE_CONTEXT_CONFIG_TOKEN = new InjectionToken('Props for connecting to
160
165
  class SisenseContextService {
161
166
  constructor(sisenseContextConfig) {
162
167
  this.appPromise = createClientApplication(sisenseContextConfig);
163
- const { enableTracking, showRuntimeErrors } = sisenseContextConfig;
164
- this.config = Object.assign(Object.assign({}, sisenseContextConfig), { enableTracking: enableTracking !== null && enableTracking !== void 0 ? enableTracking : true, showRuntimeErrors: showRuntimeErrors !== null && showRuntimeErrors !== void 0 ? showRuntimeErrors : true });
168
+ const { showRuntimeErrors } = sisenseContextConfig;
169
+ this.config = Object.assign(Object.assign({}, sisenseContextConfig), { showRuntimeErrors: showRuntimeErrors !== null && showRuntimeErrors !== void 0 ? showRuntimeErrors : true });
165
170
  }
166
171
  /** @internal */
167
172
  getApp() {
@@ -250,6 +255,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
250
255
  /**
251
256
  * Service for working with Sisense Fusion dashboards.
252
257
  *
258
+ * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
259
+ *
253
260
  * @group Fusion Embed
254
261
  * @fusionEmbed
255
262
  */
@@ -347,7 +354,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
347
354
  }]
348
355
  }], ctorParameters: function () { return [{ type: SisenseContextService }]; } });
349
356
 
350
- var packageVersion = '1.15.1';
357
+ var packageVersion = '1.17.0';
351
358
 
352
359
  function Trackable(target, propertyKey, descriptor) {
353
360
  const originalMethod = descriptor.value;
@@ -371,17 +378,19 @@ function TrackableService(trackableMethods) {
371
378
  };
372
379
  }
373
380
  function track(action, methodName) {
381
+ var _a, _b, _c;
374
382
  return __awaiter(this, void 0, void 0, function* () {
375
383
  try {
376
384
  const { enableTracking } = DecoratorsModule.sisenseContextService.getConfig();
377
385
  const app = yield DecoratorsModule.sisenseContextService.getApp();
386
+ const trackingEnabled = enableTracking && ((_c = (_b = (_a = app.settings) === null || _a === void 0 ? void 0 : _a.trackingConfig) === null || _b === void 0 ? void 0 : _b.enabled) !== null && _c !== void 0 ? _c : enableTracking);
378
387
  if (app === null || app === void 0 ? void 0 : app.httpClient) {
379
388
  const payload = {
380
389
  packageName: 'sdk-ui-angular',
381
390
  packageVersion,
382
391
  methodName,
383
392
  };
384
- void trackProductEvent(action, payload, app.httpClient, !enableTracking);
393
+ void trackProductEvent(action, payload, app.httpClient, !trackingEnabled);
385
394
  }
386
395
  }
387
396
  catch (e) {
@@ -3315,6 +3324,11 @@ class DrilldownWidgetComponent {
3315
3324
  themeService) {
3316
3325
  this.sisenseContextService = sisenseContextService;
3317
3326
  this.themeService = themeService;
3327
+ /**
3328
+ * Drilldown result change handler callback
3329
+ *
3330
+ * @category Callbacks
3331
+ */
3318
3332
  this.drilldownResultChange = new EventEmitter();
3319
3333
  this.componentAdapter = new ComponentAdapter(() => this.createPreactComponent(), [
3320
3334
  createSisenseContextConnector(this.sisenseContextService),
@@ -3549,6 +3563,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3549
3563
  /**
3550
3564
  * An Angular component used for easily rendering a dashboard by its ID created in a Sisense Fusion instance.
3551
3565
  *
3566
+ * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
3567
+ *
3552
3568
  * @example
3553
3569
  * ```html
3554
3570
  * <csdk-dashboard-by-id
@@ -3569,7 +3585,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3569
3585
  * ```
3570
3586
  * @group Fusion Embed
3571
3587
  * @fusionEmbed
3572
- * @internal
3588
+ * @alpha
3573
3589
  */
3574
3590
  class DashboardByIdComponent {
3575
3591
  /**
@@ -3641,7 +3657,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3641
3657
  }] } });
3642
3658
 
3643
3659
  /**
3644
- * An Angular component used for easily rendering a dashboard.
3660
+ * An Angular component used for easily rendering a dashboard created in Sisense Fusion.
3661
+ *
3662
+ * **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
3645
3663
  *
3646
3664
  * @example
3647
3665
  * ```html
@@ -3676,7 +3694,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3676
3694
  * ```
3677
3695
  * @group Fusion Embed
3678
3696
  * @fusionEmbed
3679
- * @internal
3697
+ * @alpha
3680
3698
  */
3681
3699
  class DashboardComponent {
3682
3700
  /**
@@ -3727,6 +3745,7 @@ class DashboardComponent {
3727
3745
  filters: this.filters,
3728
3746
  defaultDataSource: this.defaultDataSource,
3729
3747
  widgetFilterOptions: this.widgetFilterOptions,
3748
+ styleOptions: this.styleOptions,
3730
3749
  };
3731
3750
  return createElement(Dashboard, props);
3732
3751
  }
@@ -3738,7 +3757,7 @@ class DashboardComponent {
3738
3757
  }
3739
3758
  }
3740
3759
  DashboardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardComponent, deps: [{ token: SisenseContextService }, { token: ThemeService }], target: i0.ɵɵFactoryTarget.Component });
3741
- DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardComponent, selector: "csdk-dashboard", inputs: { title: "title", layout: "layout", widgets: "widgets", filters: "filters", defaultDataSource: "defaultDataSource", widgetFilterOptions: "widgetFilterOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
3760
+ DashboardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: DashboardComponent, selector: "csdk-dashboard", inputs: { title: "title", layout: "layout", widgets: "widgets", filters: "filters", defaultDataSource: "defaultDataSource", widgetFilterOptions: "widgetFilterOptions", styleOptions: "styleOptions" }, viewQueries: [{ propertyName: "preactRef", first: true, predicate: ["preact"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "\n <div #preact style=\"width: 100%; height: 100%\"></div>\n", isInline: true });
3742
3761
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: DashboardComponent, decorators: [{
3743
3762
  type: Component,
3744
3763
  args: [{
@@ -3760,6 +3779,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
3760
3779
  type: Input
3761
3780
  }], widgetFilterOptions: [{
3762
3781
  type: Input
3782
+ }], styleOptions: [{
3783
+ type: Input
3763
3784
  }] } });
3764
3785
 
3765
3786
  /**