@trackunit/iris-app-runtime-core 1.4.79 → 1.4.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
@@ -507,6 +507,29 @@ const UserSubscriptionRuntime = {
507
507
  },
508
508
  };
509
509
 
510
+ const WidgetConfigRuntime = {
511
+ getData: async () => {
512
+ const api = await getHostConnector();
513
+ return api.getWidgetData();
514
+ },
515
+ setData: async (data, dataVersion) => {
516
+ const api = await getHostConnector();
517
+ return api.setWidgetData(data, dataVersion);
518
+ },
519
+ getDataVersion: async () => {
520
+ const api = await getHostConnector();
521
+ return api.getWidgetDataVersion();
522
+ },
523
+ getTitle: async () => {
524
+ const api = await getHostConnector();
525
+ return api.getWidgetTitle();
526
+ },
527
+ setTitle: async (title) => {
528
+ const api = await getHostConnector();
529
+ return api.setWidgetTitle(title);
530
+ },
531
+ };
532
+
510
533
  exports.AnalyticsContextRuntime = AnalyticsContextRuntime;
511
534
  exports.AssetRuntime = AssetRuntime;
512
535
  exports.AssetSortingRuntime = AssetSortingRuntime;
@@ -532,6 +555,7 @@ exports.TimeRangeRuntime = TimeRangeRuntime;
532
555
  exports.ToastRuntime = ToastRuntime;
533
556
  exports.TokenRuntime = TokenRuntime;
534
557
  exports.UserSubscriptionRuntime = UserSubscriptionRuntime;
558
+ exports.WidgetConfigRuntime = WidgetConfigRuntime;
535
559
  exports.getCustomFieldValueForDisplayInUI = getCustomFieldValueForDisplayInUI;
536
560
  exports.getCustomFieldValueToSaveFromRawValue = getCustomFieldValueToSaveFromRawValue;
537
561
  exports.getDateValue = getDateValue;
package/index.esm.js CHANGED
@@ -505,4 +505,27 @@ const UserSubscriptionRuntime = {
505
505
  },
506
506
  };
507
507
 
508
- export { AnalyticsContextRuntime, AssetRuntime, AssetSortingRuntime, AssetsFilterBarRuntime, ConfirmationDialogRuntime, CurrentUserPreferenceRuntime, CurrentUserRuntime, CustomerRuntime, CustomersFilterBarRuntime, EnvironmentRuntime, EventRuntime, FilterBarRuntime, ModalDialogRuntime, NavigationRuntime, OemBrandingContextRuntime, ParamsRuntime, RestRuntime, RouterRuntime, SiteRuntime, SitesFilterBarRuntime, ThemeCssRuntime, TimeRangeRuntime, ToastRuntime, TokenRuntime, UserSubscriptionRuntime, getCustomFieldValueForDisplayInUI, getCustomFieldValueToSaveFromRawValue, getDateValue, getHostConnector, getStringValue, isValidCustomFieldValue, setupHostConnector };
508
+ const WidgetConfigRuntime = {
509
+ getData: async () => {
510
+ const api = await getHostConnector();
511
+ return api.getWidgetData();
512
+ },
513
+ setData: async (data, dataVersion) => {
514
+ const api = await getHostConnector();
515
+ return api.setWidgetData(data, dataVersion);
516
+ },
517
+ getDataVersion: async () => {
518
+ const api = await getHostConnector();
519
+ return api.getWidgetDataVersion();
520
+ },
521
+ getTitle: async () => {
522
+ const api = await getHostConnector();
523
+ return api.getWidgetTitle();
524
+ },
525
+ setTitle: async (title) => {
526
+ const api = await getHostConnector();
527
+ return api.setWidgetTitle(title);
528
+ },
529
+ };
530
+
531
+ export { AnalyticsContextRuntime, AssetRuntime, AssetSortingRuntime, AssetsFilterBarRuntime, ConfirmationDialogRuntime, CurrentUserPreferenceRuntime, CurrentUserRuntime, CustomerRuntime, CustomersFilterBarRuntime, EnvironmentRuntime, EventRuntime, FilterBarRuntime, ModalDialogRuntime, NavigationRuntime, OemBrandingContextRuntime, 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.4.79",
3
+ "version": "1.4.80",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,8 +9,8 @@
9
9
  "dependencies": {
10
10
  "penpal": "^6.2.2",
11
11
  "jest-fetch-mock": "^3.0.3",
12
- "@trackunit/react-core-contexts-api": "1.4.78",
13
- "@trackunit/iris-app-runtime-core-api": "1.3.79"
12
+ "@trackunit/react-core-contexts-api": "1.4.79",
13
+ "@trackunit/iris-app-runtime-core-api": "1.3.80"
14
14
  },
15
15
  "module": "./index.esm.js",
16
16
  "main": "./index.cjs.js",
@@ -0,0 +1,8 @@
1
+ export interface WidgetConfigRuntimeApi {
2
+ getData: () => Promise<Record<string, unknown>>;
3
+ setData: (data: Record<string, unknown>, dataVersion: number) => Promise<void>;
4
+ getDataVersion: () => Promise<number>;
5
+ getTitle: () => Promise<string>;
6
+ setTitle: (title: string) => Promise<void>;
7
+ }
8
+ export declare const WidgetConfigRuntime: WidgetConfigRuntimeApi;
package/src/index.d.ts CHANGED
@@ -26,3 +26,4 @@ export * from "./TimeRangeRuntime";
26
26
  export * from "./ToastRuntime";
27
27
  export * from "./TokenRuntime";
28
28
  export * from "./UserSubscriptionRuntime";
29
+ export * from "./WidgetConfigRuntime";