@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,188 +1,188 @@
1
- /**
2
- * Interface representing comprehensive geographical and address information for a device location.
3
- *
4
- * This interface defines the complete location data structure used throughout
5
- * the Revel Digital system for device positioning, content localization,
6
- * and geographic analytics. Location information enables:
7
- *
8
- * - **Geographic Content Targeting**: Deliver region-specific content
9
- * - **Localization**: Adjust language, currency, and cultural content
10
- * - **Analytics Segmentation**: Group and analyze by geographic regions
11
- * - **Weather Integration**: Display local weather conditions
12
- * - **Distance Calculations**: Proximity-based features and routing
13
- * - **Compliance**: Regional regulatory and legal requirements
14
- *
15
- * ```typescript
16
- * // Access device location information
17
- * const device = await this.client.getDevice();
18
- *
19
- * if (device?.location) {
20
- * const location = device.location;
21
- *
22
- * // Display local information
23
- * console.log(`Device located at: ${location.address}`);
24
- * console.log(`${location.city}, ${location.state} ${location.postalCode}`);
25
- * console.log(`${location.country}`);
26
- *
27
- * // Use coordinates for mapping
28
- * this.showOnMap(location.latitude, location.longitude);
29
- *
30
- * // Load region-specific content
31
- * if (location.country === 'US') {
32
- * this.loadUSContent();
33
- * } else if (location.country === 'CA') {
34
- * this.loadCanadianContent();
35
- * }
36
- *
37
- * // City-specific customization
38
- * switch (location.city) {
39
- * case 'New York':
40
- * this.enableSubwayAlerts();
41
- * break;
42
- * case 'London':
43
- * this.showTubeStatus();
44
- * break;
45
- * }
46
- * }
47
- * ```
48
- *
49
- * @export
50
- * @interface ILocation
51
- * @since 1.0.0
52
- */
53
- export interface ILocation {
54
- /**
55
- * Geographic latitude coordinate in decimal degrees.
56
- *
57
- * Represents the north-south position on Earth's surface.
58
- * Positive values indicate northern hemisphere, negative values
59
- * indicate southern hemisphere.
60
- *
61
- * ```typescript
62
- * // Examples of latitude values:
63
- * // 40.7128 (New York City)
64
- * // 51.5074 (London)
65
- * // -33.8688 (Sydney)
66
- * // 35.6762 (Tokyo)
67
- *
68
- * const lat = location.latitude;
69
- * const hemisphere = lat >= 0 ? 'Northern' : 'Southern';
70
- * console.log(`Location is in the ${hemisphere} hemisphere`);
71
- * ```
72
- */
73
- latitude: number;
74
- /**
75
- * Geographic longitude coordinate in decimal degrees.
76
- *
77
- * Represents the east-west position on Earth's surface.
78
- * Positive values indicate eastern hemisphere, negative values
79
- * indicate western hemisphere.
80
- *
81
- * ```typescript
82
- * // Examples of longitude values:
83
- * // -74.0060 (New York City)
84
- * // -0.1278 (London)
85
- * // 151.2093 (Sydney)
86
- * // 139.6503 (Tokyo)
87
- *
88
- * const lng = location.longitude;
89
- * const hemisphere = lng >= 0 ? 'Eastern' : 'Western';
90
- * console.log(`Location is in the ${hemisphere} hemisphere`);
91
- *
92
- * // Calculate distance between two points
93
- * const distance = this.calculateDistance(
94
- * location.latitude, location.longitude,
95
- * otherLat, otherLng
96
- * );
97
- * ```
98
- */
99
- longitude: number;
100
- /**
101
- * City name where the device is located.
102
- *
103
- * The municipal or city-level administrative division.
104
- * Used for city-specific content, local services, and
105
- * urban area customizations.
106
- *
107
- * "New York", "London", "Tokyo", "Sydney"
108
- */
109
- city: string;
110
- /**
111
- * State, province, or regional administrative division.
112
- *
113
- * The sub-national administrative unit such as state (US),
114
- * province (Canada), or region (EU). Format varies by country.
115
- *
116
- * "California", "Ontario", "Bavaria", "New South Wales"
117
- */
118
- state: string;
119
- /**
120
- * Full street address of the device location.
121
- *
122
- * Complete physical address including street number, street name,
123
- * and any additional address components. Used for precise location
124
- * identification and delivery purposes.
125
- *
126
- * ```typescript
127
- * // Typical address formats:
128
- * // "123 Main Street, Suite 456"
129
- * // "1600 Pennsylvania Avenue NW"
130
- * // "10 Downing Street"
131
- * // "1-1-1 Chiyoda"
132
- *
133
- * if (location.address) {
134
- * console.log(`Full address: ${location.address}`);
135
- * this.displayAddressOnMap(location.address);
136
- * }
137
- * ```
138
- */
139
- address: string;
140
- /**
141
- * Country name or country code.
142
- *
143
- * The nation-state where the device is located. May be provided
144
- * as full country name or standardized country code (ISO 3166).
145
- * Used for country-specific content, legal compliance, and
146
- * international customizations.
147
- *
148
- * ```typescript
149
- * // Country name formats:
150
- * // "United States", "Canada", "United Kingdom", "Japan"
151
- * // Or country codes:
152
- * // "US", "CA", "GB", "JP"
153
- *
154
- * // Handle different formats
155
- * const countryCode = location.country.length === 2
156
- * ? location.country
157
- * : this.getCountryCode(location.country);
158
- *
159
- * this.loadCountrySpecificContent(countryCode);
160
- * ```
161
- */
162
- country: string;
163
- /**
164
- * Postal or ZIP code for the location.
165
- *
166
- * The postal delivery code used by the local postal service.
167
- * Format varies by country (ZIP codes in US, postal codes in Canada/UK, etc.).
168
- * Used for local delivery, regional targeting, and demographic analysis.
169
- *
170
- * ```typescript
171
- * // Postal code formats by country:
172
- * // US: "90210", "10001-1234"
173
- * // Canada: "K1A 0A6", "M5V 3L9"
174
- * // UK: "SW1A 1AA", "M1 1AA"
175
- * // Germany: "10115", "80331"
176
- *
177
- * // Use for regional content targeting
178
- * if (location.postalCode.startsWith('90')) {
179
- * this.loadLosAngelesContent();
180
- * }
181
- *
182
- * // Validate postal code format
183
- * const isValidUS = /^\d{5}(-\d{4})?$/.test(location.postalCode);
184
- * ```
185
- */
186
- postalCode: string;
187
- }
1
+ /**
2
+ * Interface representing comprehensive geographical and address information for a device location.
3
+ *
4
+ * This interface defines the complete location data structure used throughout
5
+ * the Revel Digital system for device positioning, content localization,
6
+ * and geographic analytics. Location information enables:
7
+ *
8
+ * - **Geographic Content Targeting**: Deliver region-specific content
9
+ * - **Localization**: Adjust language, currency, and cultural content
10
+ * - **Analytics Segmentation**: Group and analyze by geographic regions
11
+ * - **Weather Integration**: Display local weather conditions
12
+ * - **Distance Calculations**: Proximity-based features and routing
13
+ * - **Compliance**: Regional regulatory and legal requirements
14
+ *
15
+ * ```typescript
16
+ * // Access device location information
17
+ * const device = await this.client.getDevice();
18
+ *
19
+ * if (device?.location) {
20
+ * const location = device.location;
21
+ *
22
+ * // Display local information
23
+ * console.log(`Device located at: ${location.address}`);
24
+ * console.log(`${location.city}, ${location.state} ${location.postalCode}`);
25
+ * console.log(`${location.country}`);
26
+ *
27
+ * // Use coordinates for mapping
28
+ * this.showOnMap(location.latitude, location.longitude);
29
+ *
30
+ * // Load region-specific content
31
+ * if (location.country === 'US') {
32
+ * this.loadUSContent();
33
+ * } else if (location.country === 'CA') {
34
+ * this.loadCanadianContent();
35
+ * }
36
+ *
37
+ * // City-specific customization
38
+ * switch (location.city) {
39
+ * case 'New York':
40
+ * this.enableSubwayAlerts();
41
+ * break;
42
+ * case 'London':
43
+ * this.showTubeStatus();
44
+ * break;
45
+ * }
46
+ * }
47
+ * ```
48
+ *
49
+ * @export
50
+ * @interface ILocation
51
+ * @since 1.0.0
52
+ */
53
+ export interface ILocation {
54
+ /**
55
+ * Geographic latitude coordinate in decimal degrees.
56
+ *
57
+ * Represents the north-south position on Earth's surface.
58
+ * Positive values indicate northern hemisphere, negative values
59
+ * indicate southern hemisphere.
60
+ *
61
+ * ```typescript
62
+ * // Examples of latitude values:
63
+ * // 40.7128 (New York City)
64
+ * // 51.5074 (London)
65
+ * // -33.8688 (Sydney)
66
+ * // 35.6762 (Tokyo)
67
+ *
68
+ * const lat = location.latitude;
69
+ * const hemisphere = lat >= 0 ? 'Northern' : 'Southern';
70
+ * console.log(`Location is in the ${hemisphere} hemisphere`);
71
+ * ```
72
+ */
73
+ latitude: number;
74
+ /**
75
+ * Geographic longitude coordinate in decimal degrees.
76
+ *
77
+ * Represents the east-west position on Earth's surface.
78
+ * Positive values indicate eastern hemisphere, negative values
79
+ * indicate western hemisphere.
80
+ *
81
+ * ```typescript
82
+ * // Examples of longitude values:
83
+ * // -74.0060 (New York City)
84
+ * // -0.1278 (London)
85
+ * // 151.2093 (Sydney)
86
+ * // 139.6503 (Tokyo)
87
+ *
88
+ * const lng = location.longitude;
89
+ * const hemisphere = lng >= 0 ? 'Eastern' : 'Western';
90
+ * console.log(`Location is in the ${hemisphere} hemisphere`);
91
+ *
92
+ * // Calculate distance between two points
93
+ * const distance = this.calculateDistance(
94
+ * location.latitude, location.longitude,
95
+ * otherLat, otherLng
96
+ * );
97
+ * ```
98
+ */
99
+ longitude: number;
100
+ /**
101
+ * City name where the device is located.
102
+ *
103
+ * The municipal or city-level administrative division.
104
+ * Used for city-specific content, local services, and
105
+ * urban area customizations.
106
+ *
107
+ * "New York", "London", "Tokyo", "Sydney"
108
+ */
109
+ city: string;
110
+ /**
111
+ * State, province, or regional administrative division.
112
+ *
113
+ * The sub-national administrative unit such as state (US),
114
+ * province (Canada), or region (EU). Format varies by country.
115
+ *
116
+ * "California", "Ontario", "Bavaria", "New South Wales"
117
+ */
118
+ state: string;
119
+ /**
120
+ * Full street address of the device location.
121
+ *
122
+ * Complete physical address including street number, street name,
123
+ * and any additional address components. Used for precise location
124
+ * identification and delivery purposes.
125
+ *
126
+ * ```typescript
127
+ * // Typical address formats:
128
+ * // "123 Main Street, Suite 456"
129
+ * // "1600 Pennsylvania Avenue NW"
130
+ * // "10 Downing Street"
131
+ * // "1-1-1 Chiyoda"
132
+ *
133
+ * if (location.address) {
134
+ * console.log(`Full address: ${location.address}`);
135
+ * this.displayAddressOnMap(location.address);
136
+ * }
137
+ * ```
138
+ */
139
+ address: string;
140
+ /**
141
+ * Country name or country code.
142
+ *
143
+ * The nation-state where the device is located. May be provided
144
+ * as full country name or standardized country code (ISO 3166).
145
+ * Used for country-specific content, legal compliance, and
146
+ * international customizations.
147
+ *
148
+ * ```typescript
149
+ * // Country name formats:
150
+ * // "United States", "Canada", "United Kingdom", "Japan"
151
+ * // Or country codes:
152
+ * // "US", "CA", "GB", "JP"
153
+ *
154
+ * // Handle different formats
155
+ * const countryCode = location.country.length === 2
156
+ * ? location.country
157
+ * : this.getCountryCode(location.country);
158
+ *
159
+ * this.loadCountrySpecificContent(countryCode);
160
+ * ```
161
+ */
162
+ country: string;
163
+ /**
164
+ * Postal or ZIP code for the location.
165
+ *
166
+ * The postal delivery code used by the local postal service.
167
+ * Format varies by country (ZIP codes in US, postal codes in Canada/UK, etc.).
168
+ * Used for local delivery, regional targeting, and demographic analysis.
169
+ *
170
+ * ```typescript
171
+ * // Postal code formats by country:
172
+ * // US: "90210", "10001-1234"
173
+ * // Canada: "K1A 0A6", "M5V 3L9"
174
+ * // UK: "SW1A 1AA", "M1 1AA"
175
+ * // Germany: "10115", "80331"
176
+ *
177
+ * // Use for regional content targeting
178
+ * if (location.postalCode.startsWith('90')) {
179
+ * this.loadLosAngelesContent();
180
+ * }
181
+ *
182
+ * // Validate postal code format
183
+ * const isValidUS = /^\d{5}(-\d{4})?$/.test(location.postalCode);
184
+ * ```
185
+ */
186
+ postalCode: string;
187
+ }
188
188
  //# sourceMappingURL=location.interface.d.ts.map
@@ -1,10 +1,10 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@angular/common/http";
3
- import * as i2 from "@angular/router";
4
- import * as i3 from "./safe-style.pipe";
5
- export declare class PlayerClientModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<PlayerClientModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<PlayerClientModule, never, [typeof i1.HttpClientModule, typeof i2.RouterModule, typeof i3.NgSafeStylePipeModule], [typeof i3.NgSafeStylePipeModule]>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<PlayerClientModule>;
9
- }
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/common/http";
3
+ import * as i2 from "@angular/router";
4
+ import * as i3 from "./safe-style.pipe";
5
+ export declare class PlayerClientModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<PlayerClientModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<PlayerClientModule, never, [typeof i1.HttpClientModule, typeof i2.RouterModule, typeof i3.NgSafeStylePipeModule], [typeof i3.NgSafeStylePipeModule]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<PlayerClientModule>;
9
+ }
10
10
  //# sourceMappingURL=player-client.module.d.ts.map