@reveldigital/player-client 1.0.15 → 2.0.2

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 (58) hide show
  1. package/README.md +236 -236
  2. package/esm2022/lib/app-init.service.mjs +113 -0
  3. package/esm2022/lib/interfaces/client.interface.mjs +2 -0
  4. package/esm2022/lib/interfaces/command.interface.mjs +2 -0
  5. package/esm2022/lib/interfaces/config.interface.mjs +50 -0
  6. package/esm2022/lib/interfaces/device.interface.mjs +2 -0
  7. package/esm2022/lib/interfaces/event-properties.interface.mjs +2 -0
  8. package/esm2022/lib/interfaces/location.interface.mjs +2 -0
  9. package/esm2022/lib/player-client.module.mjs +71 -0
  10. package/esm2022/lib/player-client.service.mjs +928 -0
  11. package/esm2022/lib/safe-style.pipe.mjs +41 -0
  12. package/{esm2020 → esm2022}/lib/version.mjs +3 -3
  13. package/{esm2020 → esm2022}/public-api.mjs +6 -6
  14. package/{esm2020 → esm2022}/reveldigital-player-client.mjs +4 -4
  15. package/{fesm2020 → fesm2022}/reveldigital-player-client.mjs +1132 -1134
  16. package/fesm2022/reveldigital-player-client.mjs.map +1 -0
  17. package/{reveldigital-player-client.d.ts → index.d.ts} +5 -5
  18. package/lib/app-init.service.d.ts +18 -18
  19. package/lib/app-init.service.d.ts.map +1 -1
  20. package/lib/interfaces/client.interface.d.ts +406 -406
  21. package/lib/interfaces/command.interface.d.ts +78 -78
  22. package/lib/interfaces/config.interface.d.ts +151 -151
  23. package/lib/interfaces/device.interface.d.ts +139 -139
  24. package/lib/interfaces/event-properties.interface.d.ts +134 -134
  25. package/lib/interfaces/location.interface.d.ts +187 -187
  26. package/lib/player-client.module.d.ts +9 -9
  27. package/lib/player-client.service.d.ts +640 -640
  28. package/lib/safe-style.pipe.d.ts +23 -23
  29. package/lib/safe-style.pipe.d.ts.map +1 -1
  30. package/lib/version.d.ts +1 -1
  31. package/lib/version.d.ts.map +1 -1
  32. package/package.json +12 -18
  33. package/public-api.d.ts +3 -3
  34. package/schematics/collection.json +15 -15
  35. package/schematics/ng-add/assets/gadget.yaml +54 -54
  36. package/schematics/ng-add/index.d.ts +18 -4
  37. package/schematics/ng-add/index.js +391 -287
  38. package/schematics/ng-add/index.js.map +1 -1
  39. package/schematics/ng-add/schema.d.ts +4 -4
  40. package/schematics/ng-add/schema.js +2 -2
  41. package/schematics/ng-add/schema.json +23 -23
  42. package/schematics/ng-add/templates/index.html +30 -30
  43. package/schematics/ng-add/templates/polyfills.ts +72 -72
  44. package/schematics/ng-add/utils/changeBasePath.js +19 -19
  45. package/schematics/ng-add/utils/yml2xml.js +132 -132
  46. package/esm2020/lib/app-init.service.mjs +0 -110
  47. package/esm2020/lib/interfaces/client.interface.mjs +0 -2
  48. package/esm2020/lib/interfaces/command.interface.mjs +0 -2
  49. package/esm2020/lib/interfaces/config.interface.mjs +0 -50
  50. package/esm2020/lib/interfaces/device.interface.mjs +0 -2
  51. package/esm2020/lib/interfaces/event-properties.interface.mjs +0 -2
  52. package/esm2020/lib/interfaces/location.interface.mjs +0 -2
  53. package/esm2020/lib/player-client.module.mjs +0 -73
  54. package/esm2020/lib/player-client.service.mjs +0 -928
  55. package/esm2020/lib/safe-style.pipe.mjs +0 -40
  56. package/fesm2015/reveldigital-player-client.mjs +0 -1219
  57. package/fesm2015/reveldigital-player-client.mjs.map +0 -1
  58. package/fesm2020/reveldigital-player-client.mjs.map +0 -1
@@ -1,140 +1,140 @@
1
- import { ILocation } from "./location.interface";
2
- /**
3
- * Interface representing a Revel Digital player device with comprehensive details.
4
- *
5
- * This interface defines the complete information available about a device
6
- * running the Revel Digital player software. It includes identification,
7
- * configuration, hardware details, and location information as configured
8
- * in the Revel Digital CMS.
9
- *
10
- * Device information is used for:
11
- * - Content customization based on device capabilities
12
- * - Location-based content delivery
13
- * - Analytics and reporting segmentation
14
- * - Remote device management and targeting
15
- * - Timezone and localization operations
16
- *
17
- * ```typescript
18
- * // Get and use device information
19
- * const device = await this.client.getDevice();
20
- *
21
- * if (device) {
22
- * // Customize content based on device type
23
- * if (device.deviceType === 'android') {
24
- * this.enableTouchInteractions();
25
- * }
26
- *
27
- * // Use location for content filtering
28
- * if (device.location?.country === 'US') {
29
- * this.loadUSContent();
30
- * }
31
- *
32
- * // Check device tags for special configurations
33
- * if (device.tags.includes('kiosk')) {
34
- * this.enableKioskMode();
35
- * }
36
- * }
37
- * ```
38
- *
39
- * @export
40
- * @interface IDevice
41
- * @since 1.0.0
42
- */
43
- export interface IDevice {
44
- /**
45
- * The human-readable name assigned to this device.
46
- *
47
- * This is the display name configured in the Revel Digital CMS
48
- * for easy identification and management of the device.
49
- *
50
- * "Lobby Display", "Conference Room Screen", "Kiosk #1"
51
- */
52
- name: string;
53
- /**
54
- * The unique registration key identifying this device.
55
- *
56
- * This is the primary unique identifier for the device within
57
- * the Revel Digital system. It's used for device authentication,
58
- * remote command targeting, and system operations.
59
- *
60
- * "ABCD-1234-EFGH-5678"
61
- */
62
- registrationKey: string;
63
- /**
64
- * The type/platform of the device hardware.
65
- *
66
- * Indicates the operating system or platform type of the device,
67
- * which can be used to enable platform-specific features or content.
68
- *
69
- * "windows", "android", "linux", "chromeos"
70
- */
71
- deviceType: string;
72
- /**
73
- * The date when this device was first registered and entered service.
74
- *
75
- * This timestamp indicates when the device was initially set up
76
- * and began operating within the Revel Digital system.
77
- */
78
- enteredService: Date;
79
- /**
80
- * The language/locale code configured for this device.
81
- *
82
- * Used for internationalization and localization of content.
83
- * May be undefined if not specifically configured.
84
- *
85
- * "en-US", "fr-FR", "de-DE", "ja-JP"
86
- */
87
- langCode?: string;
88
- /**
89
- * The timezone identifier assigned to this device.
90
- *
91
- * Defines the local timezone for time-sensitive operations
92
- * and content scheduling. May be undefined if not configured.
93
- *
94
- * "America/New_York", "Europe/London", "Asia/Tokyo"
95
- */
96
- timeZone?: string;
97
- /**
98
- * Array of descriptive tags associated with this device.
99
- *
100
- * Tags provide a flexible way to categorize and group devices
101
- * for management, content targeting, and operational purposes.
102
- * Tags are typically derived from the device description field
103
- * in the CMS (split by newlines).
104
- *
105
- * ```typescript
106
- * // Common tag examples
107
- * tags: ["kiosk", "lobby", "interactive"]
108
- * tags: ["conference-room", "building-a", "floor-2"]
109
- * tags: ["retail", "storefront", "promotional"]
110
- *
111
- * // Check for specific capabilities
112
- * if (device.tags.includes('touch-enabled')) {
113
- * this.enableTouchFeatures();
114
- * }
115
- * ```
116
- */
117
- tags: Array<string>;
118
- /**
119
- * Geographic location information for this device.
120
- *
121
- * Contains detailed location data including coordinates, address,
122
- * and administrative divisions. This information can be used for
123
- * location-based content delivery, analytics, and regional customization.
124
- * May be undefined if location information is not configured.
125
- *
126
- * @see ILocation interface for detailed location properties
127
- *
128
- * ```typescript
129
- * if (device.location) {
130
- * const { city, state, country } = device.location;
131
- * console.log(`Device located in ${city}, ${state}, ${country}`);
132
- *
133
- * // Use for weather, news, or regional content
134
- * this.loadLocalContent(device.location);
135
- * }
136
- * ```
137
- */
138
- location?: ILocation;
139
- }
1
+ import { ILocation } from "./location.interface";
2
+ /**
3
+ * Interface representing a Revel Digital player device with comprehensive details.
4
+ *
5
+ * This interface defines the complete information available about a device
6
+ * running the Revel Digital player software. It includes identification,
7
+ * configuration, hardware details, and location information as configured
8
+ * in the Revel Digital CMS.
9
+ *
10
+ * Device information is used for:
11
+ * - Content customization based on device capabilities
12
+ * - Location-based content delivery
13
+ * - Analytics and reporting segmentation
14
+ * - Remote device management and targeting
15
+ * - Timezone and localization operations
16
+ *
17
+ * ```typescript
18
+ * // Get and use device information
19
+ * const device = await this.client.getDevice();
20
+ *
21
+ * if (device) {
22
+ * // Customize content based on device type
23
+ * if (device.deviceType === 'android') {
24
+ * this.enableTouchInteractions();
25
+ * }
26
+ *
27
+ * // Use location for content filtering
28
+ * if (device.location?.country === 'US') {
29
+ * this.loadUSContent();
30
+ * }
31
+ *
32
+ * // Check device tags for special configurations
33
+ * if (device.tags.includes('kiosk')) {
34
+ * this.enableKioskMode();
35
+ * }
36
+ * }
37
+ * ```
38
+ *
39
+ * @export
40
+ * @interface IDevice
41
+ * @since 1.0.0
42
+ */
43
+ export interface IDevice {
44
+ /**
45
+ * The human-readable name assigned to this device.
46
+ *
47
+ * This is the display name configured in the Revel Digital CMS
48
+ * for easy identification and management of the device.
49
+ *
50
+ * "Lobby Display", "Conference Room Screen", "Kiosk #1"
51
+ */
52
+ name: string;
53
+ /**
54
+ * The unique registration key identifying this device.
55
+ *
56
+ * This is the primary unique identifier for the device within
57
+ * the Revel Digital system. It's used for device authentication,
58
+ * remote command targeting, and system operations.
59
+ *
60
+ * "ABCD-1234-EFGH-5678"
61
+ */
62
+ registrationKey: string;
63
+ /**
64
+ * The type/platform of the device hardware.
65
+ *
66
+ * Indicates the operating system or platform type of the device,
67
+ * which can be used to enable platform-specific features or content.
68
+ *
69
+ * "windows", "android", "linux", "chromeos"
70
+ */
71
+ deviceType: string;
72
+ /**
73
+ * The date when this device was first registered and entered service.
74
+ *
75
+ * This timestamp indicates when the device was initially set up
76
+ * and began operating within the Revel Digital system.
77
+ */
78
+ enteredService: Date;
79
+ /**
80
+ * The language/locale code configured for this device.
81
+ *
82
+ * Used for internationalization and localization of content.
83
+ * May be undefined if not specifically configured.
84
+ *
85
+ * "en-US", "fr-FR", "de-DE", "ja-JP"
86
+ */
87
+ langCode?: string;
88
+ /**
89
+ * The timezone identifier assigned to this device.
90
+ *
91
+ * Defines the local timezone for time-sensitive operations
92
+ * and content scheduling. May be undefined if not configured.
93
+ *
94
+ * "America/New_York", "Europe/London", "Asia/Tokyo"
95
+ */
96
+ timeZone?: string;
97
+ /**
98
+ * Array of descriptive tags associated with this device.
99
+ *
100
+ * Tags provide a flexible way to categorize and group devices
101
+ * for management, content targeting, and operational purposes.
102
+ * Tags are typically derived from the device description field
103
+ * in the CMS (split by newlines).
104
+ *
105
+ * ```typescript
106
+ * // Common tag examples
107
+ * tags: ["kiosk", "lobby", "interactive"]
108
+ * tags: ["conference-room", "building-a", "floor-2"]
109
+ * tags: ["retail", "storefront", "promotional"]
110
+ *
111
+ * // Check for specific capabilities
112
+ * if (device.tags.includes('touch-enabled')) {
113
+ * this.enableTouchFeatures();
114
+ * }
115
+ * ```
116
+ */
117
+ tags: Array<string>;
118
+ /**
119
+ * Geographic location information for this device.
120
+ *
121
+ * Contains detailed location data including coordinates, address,
122
+ * and administrative divisions. This information can be used for
123
+ * location-based content delivery, analytics, and regional customization.
124
+ * May be undefined if location information is not configured.
125
+ *
126
+ * @see ILocation interface for detailed location properties
127
+ *
128
+ * ```typescript
129
+ * if (device.location) {
130
+ * const { city, state, country } = device.location;
131
+ * console.log(`Device located in ${city}, ${state}, ${country}`);
132
+ *
133
+ * // Use for weather, news, or regional content
134
+ * this.loadLocalContent(device.location);
135
+ * }
136
+ * ```
137
+ */
138
+ location?: ILocation;
139
+ }
140
140
  //# sourceMappingURL=device.interface.d.ts.map
@@ -1,135 +1,135 @@
1
- /**
2
- * Interface representing flexible properties for analytics events.
3
- *
4
- * This interface defines a flexible structure for attaching custom properties
5
- * and metadata to analytics events. It allows gadgets to provide rich contextual
6
- * information alongside event tracking for detailed analytics and reporting.
7
- *
8
- * Event properties are used to:
9
- * - Provide context and metadata for analytics events
10
- * - Enable detailed filtering and segmentation in reports
11
- * - Track custom business metrics and KPIs
12
- * - Debug and troubleshoot gadget behavior
13
- * - Correlate events across user sessions and devices
14
- *
15
- * ```typescript
16
- * // Simple properties
17
- * const simpleProps: IEventProperties = {
18
- * action: 'button_click',
19
- * buttonId: 'submit'
20
- * };
21
- *
22
- * // Rich event data
23
- * const detailedProps: IEventProperties = {
24
- * // User interaction details
25
- * action: 'content_interaction',
26
- * interactionType: 'swipe',
27
- * direction: 'left',
28
- *
29
- * // Performance metrics
30
- * loadTime: 1250,
31
- * renderTime: 85,
32
- *
33
- * // Business context
34
- * contentId: 'promo-2023-12',
35
- * contentType: 'advertisement',
36
- * campaign: 'holiday-sales',
37
- *
38
- * // Technical details
39
- * deviceInfo: {
40
- * screenWidth: 1920,
41
- * screenHeight: 1080,
42
- * userAgent: 'RevelDigital/1.0'
43
- * },
44
- *
45
- * // Timestamps and session data
46
- * timestamp: new Date().toISOString(),
47
- * sessionId: 'sess-abc123',
48
- * userId: 'user-456',
49
- *
50
- * // Custom business metrics
51
- * conversionValue: 29.99,
52
- * category: 'electronics',
53
- * tags: ['featured', 'sale', 'popular']
54
- * };
55
- *
56
- * // Track events with properties
57
- * this.client.track('user_interaction', simpleProps);
58
- * this.client.track('content_viewed', detailedProps);
59
- * ```
60
- *
61
- * @export
62
- * @interface IEventProperties
63
- * @since 1.0.0
64
- */
65
- export interface IEventProperties {
66
- /**
67
- * Flexible key-value pairs for event metadata and context.
68
- *
69
- * This index signature allows any string key to be associated with
70
- * any value type, providing maximum flexibility for event properties.
71
- *
72
- * ## Common Property Categories:
73
- *
74
- * **User Interaction Properties:**
75
- * - `action`: Type of action performed (click, swipe, scroll, etc.)
76
- * - `element`: UI element identifier
77
- * - `coordinates`: Mouse/touch coordinates
78
- * - `duration`: Time spent on action
79
- *
80
- * **Content Properties:**
81
- * - `contentId`: Unique content identifier
82
- * - `contentType`: Type of content (video, image, text, etc.)
83
- * - `contentTitle`: Human-readable content title
84
- * - `contentUrl`: Source URL if applicable
85
- *
86
- * **Performance Properties:**
87
- * - `loadTime`: Time to load content (milliseconds)
88
- * - `renderTime`: Time to render content (milliseconds)
89
- * - `errorCount`: Number of errors encountered
90
- * - `retryCount`: Number of retry attempts
91
- *
92
- * **Session Properties:**
93
- * - `sessionId`: Current user session identifier
94
- * - `userId`: User identifier if available
95
- * - `deviceId`: Device identifier
96
- * - `timestamp`: Event timestamp
97
- *
98
- * **Business Properties:**
99
- * - `campaign`: Marketing campaign identifier
100
- * - `category`: Business category or classification
101
- * - `value`: Monetary or business value
102
- * - `conversion`: Conversion tracking information
103
- *
104
- * ```typescript
105
- * // User interaction tracking
106
- * {
107
- * action: 'video_play',
108
- * videoId: 'vid-123',
109
- * videoTitle: 'Product Demo',
110
- * playPosition: 0,
111
- * quality: 'HD'
112
- * }
113
- *
114
- * // Performance monitoring
115
- * {
116
- * operation: 'api_call',
117
- * endpoint: '/api/content',
118
- * responseTime: 245,
119
- * statusCode: 200,
120
- * cacheHit: true
121
- * }
122
- *
123
- * // Business metrics
124
- * {
125
- * event: 'conversion',
126
- * conversionType: 'signup',
127
- * value: 0,
128
- * source: 'qr_code',
129
- * campaign: 'spring2023'
130
- * }
131
- * ```
132
- */
133
- [key: string]: any;
134
- }
1
+ /**
2
+ * Interface representing flexible properties for analytics events.
3
+ *
4
+ * This interface defines a flexible structure for attaching custom properties
5
+ * and metadata to analytics events. It allows gadgets to provide rich contextual
6
+ * information alongside event tracking for detailed analytics and reporting.
7
+ *
8
+ * Event properties are used to:
9
+ * - Provide context and metadata for analytics events
10
+ * - Enable detailed filtering and segmentation in reports
11
+ * - Track custom business metrics and KPIs
12
+ * - Debug and troubleshoot gadget behavior
13
+ * - Correlate events across user sessions and devices
14
+ *
15
+ * ```typescript
16
+ * // Simple properties
17
+ * const simpleProps: IEventProperties = {
18
+ * action: 'button_click',
19
+ * buttonId: 'submit'
20
+ * };
21
+ *
22
+ * // Rich event data
23
+ * const detailedProps: IEventProperties = {
24
+ * // User interaction details
25
+ * action: 'content_interaction',
26
+ * interactionType: 'swipe',
27
+ * direction: 'left',
28
+ *
29
+ * // Performance metrics
30
+ * loadTime: 1250,
31
+ * renderTime: 85,
32
+ *
33
+ * // Business context
34
+ * contentId: 'promo-2023-12',
35
+ * contentType: 'advertisement',
36
+ * campaign: 'holiday-sales',
37
+ *
38
+ * // Technical details
39
+ * deviceInfo: {
40
+ * screenWidth: 1920,
41
+ * screenHeight: 1080,
42
+ * userAgent: 'RevelDigital/1.0'
43
+ * },
44
+ *
45
+ * // Timestamps and session data
46
+ * timestamp: new Date().toISOString(),
47
+ * sessionId: 'sess-abc123',
48
+ * userId: 'user-456',
49
+ *
50
+ * // Custom business metrics
51
+ * conversionValue: 29.99,
52
+ * category: 'electronics',
53
+ * tags: ['featured', 'sale', 'popular']
54
+ * };
55
+ *
56
+ * // Track events with properties
57
+ * this.client.track('user_interaction', simpleProps);
58
+ * this.client.track('content_viewed', detailedProps);
59
+ * ```
60
+ *
61
+ * @export
62
+ * @interface IEventProperties
63
+ * @since 1.0.0
64
+ */
65
+ export interface IEventProperties {
66
+ /**
67
+ * Flexible key-value pairs for event metadata and context.
68
+ *
69
+ * This index signature allows any string key to be associated with
70
+ * any value type, providing maximum flexibility for event properties.
71
+ *
72
+ * ## Common Property Categories:
73
+ *
74
+ * **User Interaction Properties:**
75
+ * - `action`: Type of action performed (click, swipe, scroll, etc.)
76
+ * - `element`: UI element identifier
77
+ * - `coordinates`: Mouse/touch coordinates
78
+ * - `duration`: Time spent on action
79
+ *
80
+ * **Content Properties:**
81
+ * - `contentId`: Unique content identifier
82
+ * - `contentType`: Type of content (video, image, text, etc.)
83
+ * - `contentTitle`: Human-readable content title
84
+ * - `contentUrl`: Source URL if applicable
85
+ *
86
+ * **Performance Properties:**
87
+ * - `loadTime`: Time to load content (milliseconds)
88
+ * - `renderTime`: Time to render content (milliseconds)
89
+ * - `errorCount`: Number of errors encountered
90
+ * - `retryCount`: Number of retry attempts
91
+ *
92
+ * **Session Properties:**
93
+ * - `sessionId`: Current user session identifier
94
+ * - `userId`: User identifier if available
95
+ * - `deviceId`: Device identifier
96
+ * - `timestamp`: Event timestamp
97
+ *
98
+ * **Business Properties:**
99
+ * - `campaign`: Marketing campaign identifier
100
+ * - `category`: Business category or classification
101
+ * - `value`: Monetary or business value
102
+ * - `conversion`: Conversion tracking information
103
+ *
104
+ * ```typescript
105
+ * // User interaction tracking
106
+ * {
107
+ * action: 'video_play',
108
+ * videoId: 'vid-123',
109
+ * videoTitle: 'Product Demo',
110
+ * playPosition: 0,
111
+ * quality: 'HD'
112
+ * }
113
+ *
114
+ * // Performance monitoring
115
+ * {
116
+ * operation: 'api_call',
117
+ * endpoint: '/api/content',
118
+ * responseTime: 245,
119
+ * statusCode: 200,
120
+ * cacheHit: true
121
+ * }
122
+ *
123
+ * // Business metrics
124
+ * {
125
+ * event: 'conversion',
126
+ * conversionType: 'signup',
127
+ * value: 0,
128
+ * source: 'qr_code',
129
+ * campaign: 'spring2023'
130
+ * }
131
+ * ```
132
+ */
133
+ [key: string]: any;
134
+ }
135
135
  //# sourceMappingURL=event-properties.interface.d.ts.map