@trackunit/iris-app-runtime-core 1.8.78 → 1.8.80

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.
package/index.cjs.js CHANGED
@@ -42,25 +42,31 @@ const getHostConnector = () => {
42
42
  return hostConnector.promise;
43
43
  };
44
44
 
45
- const AnalyticsContextRuntime = {
45
+ /**
46
+ * This is the runtime API for interacting with analytics engine.
47
+ */
48
+ const AnalyticsRuntime = () => ({
46
49
  logPageView: async (details) => {
47
50
  const api = await getHostConnector();
48
- api.logPageView(details);
51
+ await api.logPageView(details);
49
52
  },
50
53
  logError: async (details) => {
51
54
  const api = await getHostConnector();
52
- api.logError(details);
55
+ await api.logError(details);
53
56
  },
54
57
  logEvent: async (eventName, details, nameSupplement) => {
55
58
  const api = await getHostConnector();
56
- api.logEvent(eventName, details, nameSupplement);
59
+ await api.logEvent(eventName, details, nameSupplement);
57
60
  },
58
61
  setUserProperty: async (name, data) => {
59
62
  const api = await getHostConnector();
60
- api.setUserProperty(name, data);
63
+ await api.setUserProperty(name, data);
61
64
  },
62
- };
65
+ });
63
66
 
67
+ /**
68
+ * This is the runtime API for interacting with asset information available only on the asset page.
69
+ */
64
70
  const AssetRuntime = {
65
71
  getAssetInfo: async () => {
66
72
  const api = await getHostConnector();
@@ -355,29 +361,6 @@ const ExportDataRuntime = {
355
361
  },
356
362
  };
357
363
 
358
- const OemBrandingContextRuntime = {
359
- getOemBrandingContextRuntime: async () => {
360
- const api = await getHostConnector();
361
- return {
362
- getAllBrandingDetails: api.getAllBrandingDetails,
363
- getOemImage: api.getOemImage,
364
- getOemBranding: api.getOemBranding,
365
- };
366
- },
367
- getAllBrandingDetails: async () => {
368
- const api = await getHostConnector();
369
- return api.getAllBrandingDetails();
370
- },
371
- getOemImage: async (imageId, size) => {
372
- const api = await getHostConnector();
373
- return api.getOemImage(imageId, size);
374
- },
375
- getOemBranding: async (accountId) => {
376
- const api = await getHostConnector();
377
- return api.getOemBranding(accountId);
378
- },
379
- };
380
-
381
364
  const ModalDialogRuntime = {
382
365
  async openModal() {
383
366
  const scrollX = window.scrollX || 0;
@@ -474,6 +457,21 @@ const NavigationRuntime = {
474
457
  },
475
458
  };
476
459
 
460
+ const OemBrandingRuntime = {
461
+ getAllBrandingDetails: async () => {
462
+ const api = await getHostConnector();
463
+ return api.getAllBrandingDetails();
464
+ },
465
+ getOemImage: async (imageId, size) => {
466
+ const api = await getHostConnector();
467
+ return api.getOemImage(imageId, size);
468
+ },
469
+ getOemBranding: async (accountId) => {
470
+ const api = await getHostConnector();
471
+ return api.getOemBranding(accountId);
472
+ },
473
+ };
474
+
477
475
  const ParamsRuntime = {
478
476
  getAppName: async () => {
479
477
  const api = await getHostConnector();
@@ -623,7 +621,7 @@ const WidgetConfigRuntime = {
623
621
  },
624
622
  };
625
623
 
626
- exports.AnalyticsContextRuntime = AnalyticsContextRuntime;
624
+ exports.AnalyticsRuntime = AnalyticsRuntime;
627
625
  exports.AssetRuntime = AssetRuntime;
628
626
  exports.AssetSortingRuntime = AssetSortingRuntime;
629
627
  exports.AssetsFilterBarRuntime = AssetsFilterBarRuntime;
@@ -637,7 +635,7 @@ exports.EventRuntime = EventRuntime;
637
635
  exports.ExportDataRuntime = ExportDataRuntime;
638
636
  exports.ModalDialogRuntime = ModalDialogRuntime;
639
637
  exports.NavigationRuntime = NavigationRuntime;
640
- exports.OemBrandingContextRuntime = OemBrandingContextRuntime;
638
+ exports.OemBrandingRuntime = OemBrandingRuntime;
641
639
  exports.ParamsRuntime = ParamsRuntime;
642
640
  exports.RestRuntime = RestRuntime;
643
641
  exports.RouterRuntime = RouterRuntime;
package/index.esm.js CHANGED
@@ -40,25 +40,31 @@ const getHostConnector = () => {
40
40
  return hostConnector.promise;
41
41
  };
42
42
 
43
- const AnalyticsContextRuntime = {
43
+ /**
44
+ * This is the runtime API for interacting with analytics engine.
45
+ */
46
+ const AnalyticsRuntime = () => ({
44
47
  logPageView: async (details) => {
45
48
  const api = await getHostConnector();
46
- api.logPageView(details);
49
+ await api.logPageView(details);
47
50
  },
48
51
  logError: async (details) => {
49
52
  const api = await getHostConnector();
50
- api.logError(details);
53
+ await api.logError(details);
51
54
  },
52
55
  logEvent: async (eventName, details, nameSupplement) => {
53
56
  const api = await getHostConnector();
54
- api.logEvent(eventName, details, nameSupplement);
57
+ await api.logEvent(eventName, details, nameSupplement);
55
58
  },
56
59
  setUserProperty: async (name, data) => {
57
60
  const api = await getHostConnector();
58
- api.setUserProperty(name, data);
61
+ await api.setUserProperty(name, data);
59
62
  },
60
- };
63
+ });
61
64
 
65
+ /**
66
+ * This is the runtime API for interacting with asset information available only on the asset page.
67
+ */
62
68
  const AssetRuntime = {
63
69
  getAssetInfo: async () => {
64
70
  const api = await getHostConnector();
@@ -353,29 +359,6 @@ const ExportDataRuntime = {
353
359
  },
354
360
  };
355
361
 
356
- const OemBrandingContextRuntime = {
357
- getOemBrandingContextRuntime: async () => {
358
- const api = await getHostConnector();
359
- return {
360
- getAllBrandingDetails: api.getAllBrandingDetails,
361
- getOemImage: api.getOemImage,
362
- getOemBranding: api.getOemBranding,
363
- };
364
- },
365
- getAllBrandingDetails: async () => {
366
- const api = await getHostConnector();
367
- return api.getAllBrandingDetails();
368
- },
369
- getOemImage: async (imageId, size) => {
370
- const api = await getHostConnector();
371
- return api.getOemImage(imageId, size);
372
- },
373
- getOemBranding: async (accountId) => {
374
- const api = await getHostConnector();
375
- return api.getOemBranding(accountId);
376
- },
377
- };
378
-
379
362
  const ModalDialogRuntime = {
380
363
  async openModal() {
381
364
  const scrollX = window.scrollX || 0;
@@ -472,6 +455,21 @@ const NavigationRuntime = {
472
455
  },
473
456
  };
474
457
 
458
+ const OemBrandingRuntime = {
459
+ getAllBrandingDetails: async () => {
460
+ const api = await getHostConnector();
461
+ return api.getAllBrandingDetails();
462
+ },
463
+ getOemImage: async (imageId, size) => {
464
+ const api = await getHostConnector();
465
+ return api.getOemImage(imageId, size);
466
+ },
467
+ getOemBranding: async (accountId) => {
468
+ const api = await getHostConnector();
469
+ return api.getOemBranding(accountId);
470
+ },
471
+ };
472
+
475
473
  const ParamsRuntime = {
476
474
  getAppName: async () => {
477
475
  const api = await getHostConnector();
@@ -621,4 +619,4 @@ const WidgetConfigRuntime = {
621
619
  },
622
620
  };
623
621
 
624
- export { AnalyticsContextRuntime, AssetRuntime, AssetSortingRuntime, AssetsFilterBarRuntime, ConfirmationDialogRuntime, CurrentUserPreferenceRuntime, CurrentUserRuntime, CustomerRuntime, CustomersFilterBarRuntime, EnvironmentRuntime, EventRuntime, ExportDataRuntime, ModalDialogRuntime, NavigationRuntime, OemBrandingContextRuntime, ParamsRuntime, RestRuntime, RouterRuntime, SiteRuntime, SitesFilterBarRuntime, ThemeCssRuntime, TimeRangeRuntime, ToastRuntime, TokenRuntime, UserSubscriptionRuntime, WidgetConfigRuntime, getCustomFieldValueForDisplayInUI, getCustomFieldValueToSaveFromRawValue, getDateValue, getHostConnector, getStringValue, isValidCustomFieldValue, setupHostConnector };
622
+ export { AnalyticsRuntime, AssetRuntime, AssetSortingRuntime, AssetsFilterBarRuntime, ConfirmationDialogRuntime, CurrentUserPreferenceRuntime, CurrentUserRuntime, CustomerRuntime, CustomersFilterBarRuntime, EnvironmentRuntime, EventRuntime, ExportDataRuntime, ModalDialogRuntime, NavigationRuntime, OemBrandingRuntime, ParamsRuntime, RestRuntime, RouterRuntime, SiteRuntime, SitesFilterBarRuntime, ThemeCssRuntime, TimeRangeRuntime, ToastRuntime, TokenRuntime, UserSubscriptionRuntime, WidgetConfigRuntime, getCustomFieldValueForDisplayInUI, getCustomFieldValueToSaveFromRawValue, getDateValue, getHostConnector, getStringValue, isValidCustomFieldValue, setupHostConnector };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-runtime-core",
3
- "version": "1.8.78",
3
+ "version": "1.8.80",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "penpal": "^6.2.2",
11
- "@trackunit/iris-app-runtime-core-api": "1.7.78"
11
+ "@trackunit/iris-app-runtime-core-api": "1.7.80"
12
12
  },
13
13
  "module": "./index.esm.js",
14
14
  "main": "./index.cjs.js",
@@ -1,2 +1,5 @@
1
- import { AnalyticsRuntimeApi } from "@trackunit/iris-app-runtime-core-api";
2
- export declare const AnalyticsContextRuntime: AnalyticsRuntimeApi;
1
+ import { AnalyticsRuntimeApi, EventDictionary } from "@trackunit/iris-app-runtime-core-api";
2
+ /**
3
+ * This is the runtime API for interacting with analytics engine.
4
+ */
5
+ export declare const AnalyticsRuntime: <TEvents extends EventDictionary>() => AnalyticsRuntimeApi<TEvents>;
@@ -1,2 +1,5 @@
1
1
  import { AssetRuntimeApi } from "@trackunit/iris-app-runtime-core-api";
2
+ /**
3
+ * This is the runtime API for interacting with asset information available only on the asset page.
4
+ */
2
5
  export declare const AssetRuntime: AssetRuntimeApi;
@@ -0,0 +1,2 @@
1
+ import { OemBrandingRuntimeApi } from "@trackunit/iris-app-runtime-core-api";
2
+ export declare const OemBrandingRuntime: OemBrandingRuntimeApi;
package/src/index.d.ts CHANGED
@@ -13,9 +13,9 @@ export * from "./EnvironmentRuntime";
13
13
  export * from "./EventRuntime";
14
14
  export * from "./ExportDataRuntime";
15
15
  export * from "./HostConnector";
16
- export * from "./IrisOemManifestRuntime";
17
16
  export * from "./ModalDialogRuntime";
18
17
  export * from "./NavigationRuntime";
18
+ export * from "./OemBrandingRuntime";
19
19
  export * from "./ParamsRuntime";
20
20
  export * from "./RestRuntime";
21
21
  export * from "./RouterRuntime";
@@ -1,5 +0,0 @@
1
- import { OemBrandingContext, OemBrandingRuntimeApi } from "@trackunit/iris-app-runtime-core-api";
2
- export interface OemBrandingContextRuntimeApi {
3
- getOemBrandingContextRuntime: () => Promise<OemBrandingContext>;
4
- }
5
- export declare const OemBrandingContextRuntime: OemBrandingContextRuntimeApi & OemBrandingRuntimeApi;