@trackunit/react-core-contexts 1.9.103 → 1.9.105

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
@@ -618,13 +618,24 @@ const UserSubscriptionProviderIrisApp = ({ children }) => {
618
618
  const WidgetConfigProviderIrisApp = ({ children }) => {
619
619
  const [pollInterval, setPollInterval] = react.useState(undefined);
620
620
  react.useEffect(() => {
621
- void irisAppRuntimeCore.WidgetConfigRuntime.getPollInterval().then(pi => setPollInterval(pi));
621
+ void irisAppRuntimeCore.WidgetConfigRuntime.getWidgetPollInterval().then(pi => setPollInterval(pi));
622
622
  }, []);
623
623
  const methods = react.useMemo(() => ({
624
624
  onWidgetPollIntervalChanged: setPollInterval,
625
625
  }), [setPollInterval]);
626
626
  useSubscribeToHostChanges(methods);
627
- return jsxRuntime.jsx(reactCoreHooks.WidgetConfigProvider, { value: { ...irisAppRuntimeCore.WidgetConfigRuntime, pollInterval }, children: children });
627
+ const widgetConfigContextValue = react.useMemo(() => ({
628
+ getData: irisAppRuntimeCore.WidgetConfigRuntime.getWidgetData,
629
+ setData: irisAppRuntimeCore.WidgetConfigRuntime.setWidgetData,
630
+ getDataVersion: irisAppRuntimeCore.WidgetConfigRuntime.getWidgetDataVersion,
631
+ getTitle: irisAppRuntimeCore.WidgetConfigRuntime.getWidgetTitle,
632
+ setTitle: irisAppRuntimeCore.WidgetConfigRuntime.setWidgetTitle,
633
+ openEditMode: irisAppRuntimeCore.WidgetConfigRuntime.openEditMode,
634
+ closeEditMode: irisAppRuntimeCore.WidgetConfigRuntime.closeEditMode,
635
+ setLoadingState: irisAppRuntimeCore.WidgetConfigRuntime.setLoadingState,
636
+ pollInterval,
637
+ }), [pollInterval]);
638
+ return jsxRuntime.jsx(reactCoreHooks.WidgetConfigProvider, { value: widgetConfigContextValue, children: children });
628
639
  };
629
640
 
630
641
  /**
package/index.esm.js CHANGED
@@ -616,13 +616,24 @@ const UserSubscriptionProviderIrisApp = ({ children }) => {
616
616
  const WidgetConfigProviderIrisApp = ({ children }) => {
617
617
  const [pollInterval, setPollInterval] = useState(undefined);
618
618
  useEffect(() => {
619
- void WidgetConfigRuntime.getPollInterval().then(pi => setPollInterval(pi));
619
+ void WidgetConfigRuntime.getWidgetPollInterval().then(pi => setPollInterval(pi));
620
620
  }, []);
621
621
  const methods = useMemo(() => ({
622
622
  onWidgetPollIntervalChanged: setPollInterval,
623
623
  }), [setPollInterval]);
624
624
  useSubscribeToHostChanges(methods);
625
- return jsx(WidgetConfigProvider, { value: { ...WidgetConfigRuntime, pollInterval }, children: children });
625
+ const widgetConfigContextValue = useMemo(() => ({
626
+ getData: WidgetConfigRuntime.getWidgetData,
627
+ setData: WidgetConfigRuntime.setWidgetData,
628
+ getDataVersion: WidgetConfigRuntime.getWidgetDataVersion,
629
+ getTitle: WidgetConfigRuntime.getWidgetTitle,
630
+ setTitle: WidgetConfigRuntime.setWidgetTitle,
631
+ openEditMode: WidgetConfigRuntime.openEditMode,
632
+ closeEditMode: WidgetConfigRuntime.closeEditMode,
633
+ setLoadingState: WidgetConfigRuntime.setLoadingState,
634
+ pollInterval,
635
+ }), [pollInterval]);
636
+ return jsx(WidgetConfigProvider, { value: widgetConfigContextValue, children: children });
626
637
  };
627
638
 
628
639
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-contexts",
3
- "version": "1.9.103",
3
+ "version": "1.9.105",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,16 +9,14 @@
9
9
  "dependencies": {
10
10
  "@apollo/client": "3.13.8",
11
11
  "react": "19.0.0",
12
- "jest-fetch-mock": "^3.0.3",
13
- "@trackunit/iris-app-api": "1.9.8",
14
- "@trackunit/react-core-contexts-api": "1.8.75",
15
- "@trackunit/react-core-hooks": "1.7.80",
16
- "@trackunit/i18n-library-translation": "1.7.84",
17
- "@trackunit/react-components": "1.10.40",
18
- "@trackunit/iris-app-runtime-core": "1.8.76",
12
+ "@trackunit/iris-app-api": "1.9.10",
13
+ "@trackunit/iris-app-runtime-core-api": "1.7.78",
14
+ "@trackunit/react-core-hooks": "1.7.82",
15
+ "@trackunit/i18n-library-translation": "1.7.86",
16
+ "@trackunit/react-components": "1.10.42",
17
+ "@trackunit/iris-app-runtime-core": "1.8.78",
19
18
  "graphql": "^16.10.0",
20
19
  "graphql-sse": "^2.5.4",
21
- "@trackunit/react-test-setup": "1.4.70",
22
20
  "@js-temporal/polyfill": "^0.5.1"
23
21
  },
24
22
  "module": "./index.esm.js",
@@ -1,6 +1,6 @@
1
1
  import "@js-temporal/polyfill";
2
2
  import { TranslationResource } from "@trackunit/i18n-library-translation";
3
- import { ErrorHandlingContextValue } from "@trackunit/react-core-contexts-api";
3
+ import { ErrorHandlingContextValue } from "@trackunit/iris-app-runtime-core-api";
4
4
  import { ReactNode } from "react";
5
5
  export interface TrackunitProvidersProps {
6
6
  /** A translation resource for the App extensions to be registered before initialization */
@@ -1,4 +1,4 @@
1
- import { ErrorHandlingContextValue } from "@trackunit/react-core-contexts-api";
1
+ import { ErrorHandlingContextValue } from "@trackunit/iris-app-runtime-core-api";
2
2
  import { type PropsWithChildren } from "react";
3
3
  interface ErrorHandlingProviderIrisAppProps extends PropsWithChildren {
4
4
  errorHandler?: ErrorHandlingContextValue;
@@ -1,4 +1,4 @@
1
- import { IUserPreferencesContext } from "@trackunit/react-core-contexts-api";
1
+ import { IUserPreferencesContext } from "@trackunit/iris-app-runtime-core-api";
2
2
  import { ReactNode } from "react";
3
3
  export type UserPreferencesContextIrisApp = Pick<IUserPreferencesContext, "language" | "timeZonePreference" | "timeZonePreference">;
4
4
  interface CurrentUserPreferenceProviderIrisAppProps {