@trackunit/react-core-hooks 1.3.138 → 1.3.139
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
|
@@ -1110,7 +1110,8 @@ const useWidgetConfig = () => {
|
|
|
1110
1110
|
const [title, setTitle] = react.useState(null);
|
|
1111
1111
|
const filters = useFilterBarContext();
|
|
1112
1112
|
const { timeRange } = useTimeRange();
|
|
1113
|
-
const {
|
|
1113
|
+
const { hash } = reactRouter.useLocation();
|
|
1114
|
+
const edit = react.useMemo(() => hash.includes("edit=true"), [hash]);
|
|
1114
1115
|
react.useEffect(() => {
|
|
1115
1116
|
irisAppRuntimeCore.WidgetConfigRuntime.getData().then(d => setData(d));
|
|
1116
1117
|
irisAppRuntimeCore.WidgetConfigRuntime.getDataVersion().then(dv => setDataVersion(dv));
|
package/index.esm.js
CHANGED
|
@@ -2,7 +2,7 @@ import { createContext, useContext, useMemo, useState, useCallback, useRef, useE
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { AssetRuntime, CustomerRuntime, EventRuntime, ParamsRuntime, SiteRuntime, WidgetConfigRuntime } from '@trackunit/iris-app-runtime-core';
|
|
4
4
|
import { filterByMultiple } from '@trackunit/shared-utils';
|
|
5
|
-
import {
|
|
5
|
+
import { useLocation } from '@tanstack/react-router';
|
|
6
6
|
|
|
7
7
|
const AnalyticsContext = createContext(null);
|
|
8
8
|
const AnalyticsContextProvider = AnalyticsContext.Provider; // easy import
|
|
@@ -1108,7 +1108,8 @@ const useWidgetConfig = () => {
|
|
|
1108
1108
|
const [title, setTitle] = useState(null);
|
|
1109
1109
|
const filters = useFilterBarContext();
|
|
1110
1110
|
const { timeRange } = useTimeRange();
|
|
1111
|
-
const {
|
|
1111
|
+
const { hash } = useLocation();
|
|
1112
|
+
const edit = useMemo(() => hash.includes("edit=true"), [hash]);
|
|
1112
1113
|
useEffect(() => {
|
|
1113
1114
|
WidgetConfigRuntime.getData().then(d => setData(d));
|
|
1114
1115
|
WidgetConfigRuntime.getDataVersion().then(dv => setDataVersion(dv));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-core-hooks",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.139",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"react": "19.0.0",
|
|
11
11
|
"jest-fetch-mock": "^3.0.3",
|
|
12
12
|
"zod": "3.23.4",
|
|
13
|
-
"@trackunit/react-core-contexts-api": "1.4.
|
|
14
|
-
"@trackunit/iris-app-runtime-core": "1.4.
|
|
13
|
+
"@trackunit/react-core-contexts-api": "1.4.135",
|
|
14
|
+
"@trackunit/iris-app-runtime-core": "1.4.138",
|
|
15
15
|
"@trackunit/shared-utils": "1.5.128",
|
|
16
16
|
"@tanstack/react-router": "1.114.29",
|
|
17
17
|
"@trackunit/react-test-setup": "1.0.18"
|
|
@@ -45,7 +45,7 @@ export declare const useWidgetConfig: () => {
|
|
|
45
45
|
setTitle: (newTitle: string) => Promise<void>;
|
|
46
46
|
filters: import("@trackunit/react-core-contexts-api").FilterBarContext;
|
|
47
47
|
timeRange: import("@trackunit/react-core-contexts-api").TimeRange | null;
|
|
48
|
-
isEditMode:
|
|
48
|
+
isEditMode: boolean;
|
|
49
49
|
openEditMode: () => Promise<void>;
|
|
50
50
|
closeEditMode: () => Promise<void>;
|
|
51
51
|
};
|