@reveldigital/player-client 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.
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Options for creating a PowerBI embed instance.
3
+ */
4
+ export interface IPowerBIOptions {
5
+ /** Power BI workspace/group ID. */
6
+ workspaceId: string;
7
+ /** Report ID (for report embedding). */
8
+ reportId?: string;
9
+ /** Dashboard ID (for dashboard embedding). */
10
+ dashboardId?: string;
11
+ /** DOM element to embed into. */
12
+ container: HTMLElement;
13
+ /** Embed type: 'report' or 'dashboard'. Defaults to 'report'. */
14
+ type?: 'report' | 'dashboard';
15
+ /** Initial page name for reports. */
16
+ pageName?: string;
17
+ /** Show the filter pane. Defaults to false. */
18
+ showFilterPane?: boolean;
19
+ /** Show the page navigation pane. Defaults to false. */
20
+ showNavPane?: boolean;
21
+ /** Override auto-resolved device registration key. */
22
+ registrationKey?: string;
23
+ /** Override the API base URL. */
24
+ baseUrl?: string;
25
+ /** Token refresh interval in milliseconds (default: 55 min). */
26
+ tokenRefreshInterval?: number;
27
+ }
28
+ /**
29
+ * Parsed Power BI gadget preference as serialized by the template editor.
30
+ */
31
+ export interface IPowerBIPref {
32
+ /** Power BI workspace/group ID. */
33
+ workspaceId?: string;
34
+ /** Report ID. */
35
+ reportId?: string;
36
+ /** Dashboard ID. */
37
+ dashboardId?: string;
38
+ /** Embed type: 'report' or 'dashboard'. */
39
+ type?: 'report' | 'dashboard';
40
+ /** Initial page name for reports. */
41
+ pageName?: string;
42
+ /** Show the filter pane. */
43
+ showFilterPane?: boolean;
44
+ /** Show the page navigation pane. */
45
+ showNavPane?: boolean;
46
+ }
47
+ //# sourceMappingURL=powerbi.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"powerbi.interface.d.ts","sourceRoot":"","sources":["../../../../../projects/reveldigital/player-client/src/lib/interfaces/powerbi.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,SAAS,EAAE,WAAW,CAAC;IACvB,iEAAiE;IACjE,IAAI,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC9B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wDAAwD;IACxD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sDAAsD;IACtD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC9B,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qCAAqC;IACrC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
@@ -5,9 +5,11 @@ import { IClient } from './interfaces/client.interface';
5
5
  import { ICommand } from './interfaces/command.interface';
6
6
  import { IDictionary } from './interfaces/config.interface';
7
7
  import { IDataTableOptions } from './interfaces/datatable.interface';
8
+ import { IPowerBIOptions } from './interfaces/powerbi.interface';
8
9
  import { IDevice } from './interfaces/device.interface';
9
10
  import { IEventProperties } from './interfaces/event-properties.interface';
10
11
  import { DataTableRef, DataTablePrefRef } from './datatable-ref';
12
+ import { PowerBIRef, PowerBIPrefRef } from './powerbi-ref';
11
13
  import * as i0 from "@angular/core";
12
14
  /** @ignore */
13
15
  declare global {
@@ -696,6 +698,54 @@ export declare class PlayerClientService implements OnDestroy {
696
698
  * ```
697
699
  */
698
700
  createDataTableFromPref(prefValue: string, options?: IDataTableOptions): DataTablePrefRef;
701
+ /**
702
+ * Creates a typed Power BI embed wrapper for embedding reports and dashboards.
703
+ *
704
+ * @param options - Power BI embed configuration (workspace, report/dashboard, container, etc.)
705
+ * @returns A {@link PowerBIRef} instance
706
+ * @throws Error if the global Power BI library is not loaded
707
+ *
708
+ * ```typescript
709
+ * const pbi = this.client.createPowerBI({
710
+ * workspaceId: '...',
711
+ * reportId: '...',
712
+ * container: document.getElementById('pbi-container')
713
+ * });
714
+ *
715
+ * // Embed the report
716
+ * await pbi.embed();
717
+ *
718
+ * // Refresh the token
719
+ * await pbi.refresh();
720
+ *
721
+ * // Cleanup when done
722
+ * pbi.dispose();
723
+ * ```
724
+ */
725
+ createPowerBI(options: IPowerBIOptions): PowerBIRef;
726
+ /**
727
+ * Creates a typed Power BI embed wrapper from a gadget preference value.
728
+ *
729
+ * @param prefValue - The raw gadget preference string (JSON) from the template editor
730
+ * @param container - DOM element to embed into
731
+ * @param extraOptions - Additional options to merge with the preference
732
+ * @returns A {@link PowerBIPrefRef} instance
733
+ * @throws Error if the global Power BI library is not loaded
734
+ *
735
+ * ```typescript
736
+ * const pbi = this.client.createPowerBIFromPref(
737
+ * prefs.getString('rdPowerBI'),
738
+ * document.getElementById('pbi-container')
739
+ * );
740
+ *
741
+ * // Embed with preference settings
742
+ * await pbi.embed();
743
+ *
744
+ * // Cleanup when done
745
+ * pbi.dispose();
746
+ * ```
747
+ */
748
+ createPowerBIFromPref(prefValue: string, container: HTMLElement, extraOptions?: Partial<IPowerBIOptions>): PowerBIPrefRef;
699
749
  /** @ignore */
700
750
  private getClient;
701
751
  static ɵfac: i0.ɵɵFactoryDeclaration<PlayerClientService, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"player-client.service.d.ts","sourceRoot":"","sources":["../../../../projects/reveldigital/player-client/src/lib/player-client.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAa,OAAO,EAAgB,MAAM,MAAM,CAAC;AAEzE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;;AAUjE,cAAc;AACd,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,MAAM,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,qBAGa,mBAAoB,YAAW,SAAS;IAEnD,cAAc;IACd,OAAO,CAAC,IAAI,CAAS;IACrB,cAAc;IACd,OAAO,CAAC,aAAa,CAA0B;IAE/C;;;;;;;;;;;OAWG;IACI,UAAU,oBAA2B;IAE5C;;;;;;;;;;;;OAYG;IACI,QAAQ,2BAA8B;IAE7C;;;;;;;;;;OAUG;IACI,QAAQ,mBAAiB;IAEhC;;;;;;;;;;;OAWG;IACI,OAAO,mBAAiB;IAE/B;;;;;;;;;OASG;IACI,SAAS,mBAAiB;IAEjC;;;;;;;;;;OAUG;IACI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,GAAG,CAAC;IAahD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACI,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,YAAY;IAIlF;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACI,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,gBAAgB;IAOhG,cAAc;IACd,OAAO,CAAC,SAAS;yCA18BN,mBAAmB;6CAAnB,mBAAmB;CA0/B/B"}
1
+ {"version":3,"file":"player-client.service.d.ts","sourceRoot":"","sources":["../../../../projects/reveldigital/player-client/src/lib/player-client.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAa,OAAO,EAAgB,MAAM,MAAM,CAAC;AAEzE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;;AAU3D,cAAc;AACd,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,MAAM,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;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QAAQ,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAO/C;;;;;;;;;;;;;;;;;;;;;OAqBG;IACU,SAAS,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAOhD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACU,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAOlD;;;;;;;;;;;;OAYG;IACU,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAK7C;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC;IAahD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACI,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,YAAY;IAIlF;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACI,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,gBAAgB;IAQhG;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACI,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,UAAU;IAI1D;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,cAAc;IAOhI,cAAc;IACd,OAAO,CAAC,SAAS;yCApgCN,mBAAmB;6CAAnB,mBAAmB;CAojC/B"}
@@ -0,0 +1,112 @@
1
+ import { NgZone } from '@angular/core';
2
+ import { IPowerBIOptions, IPowerBIPref } from './interfaces/powerbi.interface';
3
+ /**
4
+ * Angular-friendly wrapper around the global `gadgets.reveldigital.powerbi` library.
5
+ *
6
+ * Provides typed Promise-based methods for embedding Power BI reports and dashboards.
7
+ *
8
+ * ```typescript
9
+ * const pbi = this.client.createPowerBI({
10
+ * workspaceId: '...',
11
+ * reportId: '...',
12
+ * container: this.containerEl.nativeElement
13
+ * });
14
+ *
15
+ * // Embed the report
16
+ * await pbi.embed();
17
+ *
18
+ * // Refresh the token
19
+ * await pbi.refresh();
20
+ *
21
+ * // Cleanup
22
+ * pbi.dispose();
23
+ * ```
24
+ */
25
+ export declare class PowerBIRef {
26
+ /** @ignore */
27
+ private _instance;
28
+ /** @ignore */
29
+ private _zone;
30
+ /**
31
+ * Creates a new PowerBIRef.
32
+ *
33
+ * @param options - Power BI embed configuration
34
+ * @param zone - Angular NgZone for ensuring change detection on callbacks
35
+ * @throws Error if the global Power BI library is not loaded
36
+ */
37
+ constructor(options: IPowerBIOptions, zone: NgZone);
38
+ /**
39
+ * Fetches the embed configuration from the API and renders the Power BI
40
+ * content in the container element.
41
+ *
42
+ * @returns Promise resolving to the embed configuration returned by the API
43
+ */
44
+ embed(): Promise<any>;
45
+ /**
46
+ * Refreshes the embed token without re-rendering.
47
+ *
48
+ * @returns Promise resolving when the token has been refreshed
49
+ */
50
+ refresh(): Promise<void>;
51
+ /**
52
+ * Releases all resources: stops the token refresh timer and disposes
53
+ * the embedded Power BI component.
54
+ */
55
+ dispose(): void;
56
+ /** @ignore */
57
+ static _fromInstance(instance: any, zone: NgZone): PowerBIRef;
58
+ }
59
+ /**
60
+ * Wrapper around a Power BI embed created from a gadget preference value.
61
+ *
62
+ * Automatically configures workspace, report/dashboard, and display settings
63
+ * from the preference.
64
+ *
65
+ * ```typescript
66
+ * const pbi = this.client.createPowerBIFromPref(
67
+ * prefs.getString('rdPowerBI'),
68
+ * this.containerEl.nativeElement
69
+ * );
70
+ *
71
+ * // Embed with preference settings
72
+ * await pbi.embed();
73
+ *
74
+ * // Cleanup
75
+ * pbi.dispose();
76
+ * ```
77
+ */
78
+ export declare class PowerBIPrefRef {
79
+ /** The underlying PowerBIRef with full access to embed, refresh, etc. */
80
+ readonly powerBI: PowerBIRef;
81
+ /** The parsed preference object. */
82
+ readonly pref: IPowerBIPref;
83
+ /**
84
+ * Creates a new PowerBIPrefRef from a gadget preference JSON string.
85
+ *
86
+ * @param prefValue - The raw gadget preference string (JSON)
87
+ * @param container - DOM element to embed into
88
+ * @param zone - Angular NgZone for ensuring change detection on callbacks
89
+ * @param extraOptions - Additional options to merge
90
+ * @throws Error if the global Power BI library is not loaded
91
+ */
92
+ constructor(prefValue: string, container: HTMLElement, zone: NgZone, extraOptions?: Partial<IPowerBIOptions>);
93
+ /**
94
+ * Fetches the embed configuration and renders the Power BI content.
95
+ *
96
+ * @returns Promise resolving to the embed configuration
97
+ */
98
+ embed(): Promise<any>;
99
+ /**
100
+ * Refreshes the embed token without re-rendering.
101
+ *
102
+ * @returns Promise resolving when the token has been refreshed
103
+ */
104
+ refresh(): Promise<void>;
105
+ /**
106
+ * Releases all resources held by the underlying PowerBIRef.
107
+ */
108
+ dispose(): void;
109
+ /** @ignore */
110
+ private _parsePref;
111
+ }
112
+ //# sourceMappingURL=powerbi-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"powerbi-ref.d.ts","sourceRoot":"","sources":["../../../../projects/reveldigital/player-client/src/lib/powerbi-ref.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,UAAU;IAErB,cAAc;IACd,OAAO,CAAC,SAAS,CAAM;IAEvB,cAAc;IACd,OAAO,CAAC,KAAK,CAAS;IAEtB;;;;;;OAMG;gBACS,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM;IAgBlD;;;;;OAKG;IACI,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;IAI5B;;;;OAIG;IACI,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;;OAGG;IACI,OAAO,IAAI,IAAI;IAItB,cAAc;IACd,MAAM,CAAC,aAAa,CAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU;CAM9D;AAGD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,cAAc;IAEzB,yEAAyE;IACzE,SAAgB,OAAO,EAAE,UAAU,CAAC;IAEpC,oCAAoC;IACpC,SAAgB,IAAI,EAAE,YAAY,CAAC;IAEnC;;;;;;;;OAQG;gBACS,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;IAmB5G;;;;OAIG;IACI,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC;IAI5B;;;;OAIG;IACI,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;OAEG;IACI,OAAO,IAAI,IAAI;IAItB,cAAc;IACd,OAAO,CAAC,UAAU;CAOnB"}
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const version = "2.9.0";
1
+ export declare const version = "2.10.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../projects/reveldigital/player-client/src/lib/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,UAAU,CAAA"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../../projects/reveldigital/player-client/src/lib/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,WAAW,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reveldigital/player-client",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "Helper library for interfacing Angular apps with the Revel Digital gadget framework.",
5
5
  "schematics": "./schematics/collection.json",
6
6
  "ng-add": {
package/public-api.d.ts CHANGED
@@ -3,4 +3,6 @@ export * from './lib/player-client.module';
3
3
  export * from './lib/safe-style.pipe';
4
4
  export * from './lib/datatable-ref';
5
5
  export * from './lib/interfaces/datatable.interface';
6
+ export * from './lib/powerbi-ref';
7
+ export * from './lib/interfaces/powerbi.interface';
6
8
  //# sourceMappingURL=public-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../projects/reveldigital/player-client/src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sCAAsC,CAAC"}
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../projects/reveldigital/player-client/src/public-api.ts"],"names":[],"mappings":"AAIA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sCAAsC,CAAC;AACrD,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC"}