@trackunit/iris-app-runtime-core 0.3.37 → 0.3.39

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 CHANGED
@@ -57,6 +57,25 @@ const getHostConnector = () => {
57
57
  return hostConnector.promise;
58
58
  };
59
59
 
60
+ const AnalyticsContextRuntime = {
61
+ logPageView: (details) => __awaiter(void 0, void 0, void 0, function* () {
62
+ const api = yield getHostConnector();
63
+ api.logPageView(details);
64
+ }),
65
+ logError: (details) => __awaiter(void 0, void 0, void 0, function* () {
66
+ const api = yield getHostConnector();
67
+ api.logError(details);
68
+ }),
69
+ logEvent: (eventName, details, nameSupplement) => __awaiter(void 0, void 0, void 0, function* () {
70
+ const api = yield getHostConnector();
71
+ api.logEvent(eventName, details, nameSupplement);
72
+ }),
73
+ setUserProperty: (name, data) => __awaiter(void 0, void 0, void 0, function* () {
74
+ const api = yield getHostConnector();
75
+ api.setUserProperty(name, data);
76
+ }),
77
+ };
78
+
60
79
  const AssetRuntime = {
61
80
  getAssetInfo: () => __awaiter(void 0, void 0, void 0, function* () {
62
81
  const api = yield getHostConnector();
@@ -91,7 +110,7 @@ const CurrentUserRuntime = {
91
110
  *
92
111
  * @param customFieldDefinition the definition of the custom field
93
112
  * @param newValue the new value to set
94
- * @returns { CustomFieldValue } an updated CustomFieldValue
113
+ * @returns { CustomFieldValue } an updated CustomFieldValue
95
114
  */
96
115
  const getCustomFieldValueFromRawValue = (customFieldDefinition, newValue) => {
97
116
  if (customFieldDefinition.type === irisAppRuntimeCoreApi.CustomFieldType.BOOLEAN) {
@@ -317,6 +336,7 @@ const UserSubscriptionRuntime = {
317
336
  }),
318
337
  };
319
338
 
339
+ exports.AnalyticsContextRuntime = AnalyticsContextRuntime;
320
340
  exports.AssetRuntime = AssetRuntime;
321
341
  exports.AssetSortingRuntime = AssetSortingRuntime;
322
342
  exports.CurrentUserRuntime = CurrentUserRuntime;
package/index.js CHANGED
@@ -54,6 +54,25 @@ const getHostConnector = () => {
54
54
  return hostConnector.promise;
55
55
  };
56
56
 
57
+ const AnalyticsContextRuntime = {
58
+ logPageView: (details) => __awaiter(void 0, void 0, void 0, function* () {
59
+ const api = yield getHostConnector();
60
+ api.logPageView(details);
61
+ }),
62
+ logError: (details) => __awaiter(void 0, void 0, void 0, function* () {
63
+ const api = yield getHostConnector();
64
+ api.logError(details);
65
+ }),
66
+ logEvent: (eventName, details, nameSupplement) => __awaiter(void 0, void 0, void 0, function* () {
67
+ const api = yield getHostConnector();
68
+ api.logEvent(eventName, details, nameSupplement);
69
+ }),
70
+ setUserProperty: (name, data) => __awaiter(void 0, void 0, void 0, function* () {
71
+ const api = yield getHostConnector();
72
+ api.setUserProperty(name, data);
73
+ }),
74
+ };
75
+
57
76
  const AssetRuntime = {
58
77
  getAssetInfo: () => __awaiter(void 0, void 0, void 0, function* () {
59
78
  const api = yield getHostConnector();
@@ -88,7 +107,7 @@ const CurrentUserRuntime = {
88
107
  *
89
108
  * @param customFieldDefinition the definition of the custom field
90
109
  * @param newValue the new value to set
91
- * @returns { CustomFieldValue } an updated CustomFieldValue
110
+ * @returns { CustomFieldValue } an updated CustomFieldValue
92
111
  */
93
112
  const getCustomFieldValueFromRawValue = (customFieldDefinition, newValue) => {
94
113
  if (customFieldDefinition.type === CustomFieldType.BOOLEAN) {
@@ -314,4 +333,4 @@ const UserSubscriptionRuntime = {
314
333
  }),
315
334
  };
316
335
 
317
- export { AssetRuntime, AssetSortingRuntime, CurrentUserRuntime, CustomFieldRuntime, EnvironmentRuntime, GlobalSelectionRuntime, NavigationRuntime, ParamsRuntime, RestRuntime, SiteRuntime, ToastRuntime, TokenRuntime, UserSubscriptionRuntime, getCustomFieldValueFromRawValue, getDateValue, getHostConnector, getStringValue, setupHostConnector };
336
+ export { AnalyticsContextRuntime, AssetRuntime, AssetSortingRuntime, CurrentUserRuntime, CustomFieldRuntime, EnvironmentRuntime, GlobalSelectionRuntime, NavigationRuntime, ParamsRuntime, RestRuntime, SiteRuntime, ToastRuntime, TokenRuntime, UserSubscriptionRuntime, getCustomFieldValueFromRawValue, getDateValue, getHostConnector, getStringValue, setupHostConnector };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-runtime-core",
3
- "version": "0.3.37",
3
+ "version": "0.3.39",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "module": "./index.js",
@@ -8,8 +8,8 @@
8
8
  "type": "module",
9
9
  "types": "./src/index.d.ts",
10
10
  "dependencies": {
11
- "@trackunit/iris-app-runtime-core-api": "0.3.32",
12
- "@trackunit/react-core-contexts-api": "0.2.29"
11
+ "@trackunit/iris-app-runtime-core-api": "0.3.33",
12
+ "@trackunit/react-core-contexts-api": "0.2.30"
13
13
  },
14
14
  "peerDependencies": {}
15
15
  }
@@ -0,0 +1,2 @@
1
+ import { IAnalyticsContextAsync } from "@trackunit/react-core-contexts-api";
2
+ export declare const AnalyticsContextRuntime: IAnalyticsContextAsync<{}>;
@@ -7,7 +7,7 @@ export interface DropdownSelection {
7
7
  *
8
8
  * @param customFieldDefinition the definition of the custom field
9
9
  * @param newValue the new value to set
10
- * @returns { CustomFieldValue } an updated CustomFieldValue
10
+ * @returns { CustomFieldValue } an updated CustomFieldValue
11
11
  */
12
12
  export declare const getCustomFieldValueFromRawValue: (customFieldDefinition: CustomFieldDefinition, newValue: boolean | string | string[] | DropdownSelection[] | DropdownSelection | number) => CustomFieldValue;
13
13
  /**
package/src/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "@trackunit/iris-app-runtime-core-api";
2
+ export * from "./AnalyticsRuntime";
2
3
  export * from "./AssetRuntime";
3
4
  export * from "./AssetSortingRuntime";
4
5
  export * from "./CurrentUserRuntime";