@trackunit/iris-app-runtime-core 0.3.20 → 0.3.21

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
@@ -30,6 +30,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
30
30
  });
31
31
  }
32
32
 
33
+ /**
34
+ * Setup using the subscribedMethods to subscribe to events from the host.
35
+ *
36
+ * @param subscribedMethods the methods to subscribe to
37
+ * @returns { Connection<HostConnectorApi> } the connection to the host
38
+ */
33
39
  const setupHostConnector = (subscribedMethods) => {
34
40
  var _a;
35
41
  const methods = Object.assign({ onGlobalSelectionChanged: () => { }, onTokenChanged: () => { }, onAssetSortingStateChanged: () => { } }, subscribedMethods);
@@ -42,6 +48,11 @@ const setupHostConnector = (subscribedMethods) => {
42
48
  return connection;
43
49
  };
44
50
  const hostConnector = setupHostConnector({});
51
+ /**
52
+ * Gets the host connector.
53
+ *
54
+ * @returns { Promise<HostConnectorApi> } the connection to the host
55
+ */
45
56
  const getHostConnector = () => {
46
57
  return hostConnector.promise;
47
58
  };
@@ -75,6 +86,13 @@ const CurrentUserRuntime = {
75
86
  }),
76
87
  };
77
88
 
89
+ /**
90
+ * Get the value of a custom field from a raw value.
91
+ *
92
+ * @param customFieldDefinition the definition of the custom field
93
+ * @param newValue the new value to set
94
+ * @returns { CustomFieldValue } an updated CustomFieldValue
95
+ */
78
96
  const getCustomFieldValueFromRawValue = (customFieldDefinition, newValue) => {
79
97
  if (customFieldDefinition.type === irisAppRuntimeCoreApi.CustomFieldType.BOOLEAN) {
80
98
  return {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-runtime-core",
3
- "version": "0.3.20",
3
+ "version": "0.3.21",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./index.cjs",
7
7
  "type": "commonjs",
8
8
  "types": "./src/index.d.ts",
9
9
  "dependencies": {
10
- "@trackunit/iris-app-runtime-core-api": "0.3.18",
10
+ "@trackunit/iris-app-runtime-core-api": "0.3.19",
11
11
  "@trackunit/react-core-contexts-api": "0.2.18"
12
12
  },
13
13
  "peerDependencies": {}
@@ -2,6 +2,13 @@ import { CustomFieldDefinition, CustomFieldError, CustomFieldValue, EntityIdenti
2
2
  export interface DropdownSelection {
3
3
  value: string;
4
4
  }
5
+ /**
6
+ * Get the value of a custom field from a raw value.
7
+ *
8
+ * @param customFieldDefinition the definition of the custom field
9
+ * @param newValue the new value to set
10
+ * @returns { CustomFieldValue } an updated CustomFieldValue
11
+ */
5
12
  export declare const getCustomFieldValueFromRawValue: (customFieldDefinition: CustomFieldDefinition, newValue: boolean | string | string[] | DropdownSelection[] | DropdownSelection | number) => CustomFieldValue;
6
13
  export interface ICustomFieldRuntime {
7
14
  getCustomFieldsFor: (entity: EntityIdentity) => Promise<ValueAndDefinition[]>;
@@ -1,7 +1,18 @@
1
1
  import { ChildConnectorApi, HostConnectorApi } from "@trackunit/iris-app-runtime-core-api";
2
2
  import { Methods } from "penpal";
3
+ /**
4
+ * Setup using the subscribedMethods to subscribe to events from the host.
5
+ *
6
+ * @param subscribedMethods the methods to subscribe to
7
+ * @returns { Connection<HostConnectorApi> } the connection to the host
8
+ */
3
9
  export declare const setupHostConnector: (subscribedMethods: Partial<ChildConnectorApi> & Methods) => {
4
10
  promise: Promise<import("penpal").AsyncMethodReturns<HostConnectorApi>>;
5
11
  destroy: Function;
6
12
  };
13
+ /**
14
+ * Gets the host connector.
15
+ *
16
+ * @returns { Promise<HostConnectorApi> } the connection to the host
17
+ */
7
18
  export declare const getHostConnector: () => Promise<import("penpal").AsyncMethodReturns<HostConnectorApi>>;