@trackunit/react-core-hooks 0.2.78-alpha-a3e6a36823.0 → 0.2.79

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
@@ -47,7 +47,6 @@ const AnalyticsContextProvider = AnalyticsContext.Provider; // easy import
47
47
  *
48
48
  * // log event when appropriate
49
49
  * logEvent("Login", { loginPage: "New Manager" });
50
- *
51
50
  * @see {@link IAnalyticsContext}
52
51
  */
53
52
  const useAnalytics = (type) => {
@@ -89,7 +88,6 @@ const AssetSortingProvider = AssetSortingContext.Provider;
89
88
  * headerInitialSort={initialSort}
90
89
  * />
91
90
  * );
92
- *
93
91
  * @see {@link IAssetSortingContext}
94
92
  */
95
93
  const useAssetSorting = () => {
@@ -115,7 +113,6 @@ const EnvironmentContextProvider = (props) => {
115
113
  * import { useEnvironment } from "@trackunit/react-core-hooks";
116
114
  * const { googleMapsApiKey } = useEnvironment();
117
115
  * // use api key for something...
118
- *
119
116
  * @see (@link IEnvironmentContext)
120
117
  */
121
118
  const useEnvironment = () => {
@@ -138,7 +135,6 @@ const GlobalSelectionContext = React__namespace.createContext(null);
138
135
  * const { selection } = useGlobalSelection();
139
136
  * return (selection?.type === "group") ? selection.groupId : undefined;
140
137
  * };
141
- *
142
138
  * @see {@link IGlobalSelectionContext}
143
139
  */
144
140
  const useGlobalSelection = () => {
@@ -163,7 +159,6 @@ const OemBrandingContext = React.createContext(null);
163
159
  * const { getOemBranding, getImageByBrand } = useOemBrandingContext();
164
160
  * // use oem branding
165
161
  * const branding = getOemBranding("some brand")
166
- *
167
162
  * @see {@link IOemBrandingContext}
168
163
  */
169
164
  const useOemBrandingContext = () => {
@@ -253,7 +248,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
253
248
  * }
254
249
  * })();
255
250
  * }, [assetInfo, getAssetLocation]);
256
- *
257
251
  */
258
252
  const useAssetRuntime = () => {
259
253
  const [assetInfo, setAssetInfo] = React.useState();
@@ -347,7 +341,6 @@ const useRestRuntime = () => {
347
341
  * }
348
342
  * })();
349
343
  * }, [getSiteAssets, siteInfo]);
350
- *
351
344
  */
352
345
  const useSiteRuntime = () => {
353
346
  const [siteInfo, setSiteInfo] = React.useState();
@@ -377,7 +370,6 @@ const UserSubscriptionProvider = (props) => {
377
370
  * const { numberOfDaysWithAccessToHistoricalData, packageType } = useUserSubscription();
378
371
  * // use it for something
379
372
  * const data = fetchData(numberOfDaysWithAccessToHistoricalData)
380
- *
381
373
  * @see {@link IUserSubscriptionContext}
382
374
  */
383
375
  const useUserSubscription = () => {
@@ -408,7 +400,6 @@ const ToastProvider = (props) => jsxRuntime.jsx(ToastContext.Provider, Object.as
408
400
  * description: error?.message,
409
401
  * duration: 3000,
410
402
  * });
411
- *
412
403
  * @see {@link IToastContext}
413
404
  */
414
405
  const useToast = () => {
@@ -427,7 +418,6 @@ const TokenContext = React__namespace.createContext(null);
427
418
  * @example
428
419
  * import { useToken } from "@trackunit/react-core-hooks";
429
420
  * const { token } = useToken();
430
- *
431
421
  * @see {@link ITokenContext}
432
422
  */
433
423
  const useToken = () => {
@@ -463,7 +453,6 @@ const CurrentUserProvider = (props) => {
463
453
  * const { data, loading } = useGetAccountByIdQuery({
464
454
  * variables: { accountId: assumedUser?.accountId || accountId || "" },
465
455
  * });
466
- *
467
456
  * @see {@link ICurrentUserContext}
468
457
  */
469
458
  const useCurrentUser = () => {
package/index.esm.js CHANGED
@@ -21,7 +21,6 @@ const AnalyticsContextProvider = AnalyticsContext.Provider; // easy import
21
21
  *
22
22
  * // log event when appropriate
23
23
  * logEvent("Login", { loginPage: "New Manager" });
24
- *
25
24
  * @see {@link IAnalyticsContext}
26
25
  */
27
26
  const useAnalytics = (type) => {
@@ -63,7 +62,6 @@ const AssetSortingProvider = AssetSortingContext.Provider;
63
62
  * headerInitialSort={initialSort}
64
63
  * />
65
64
  * );
66
- *
67
65
  * @see {@link IAssetSortingContext}
68
66
  */
69
67
  const useAssetSorting = () => {
@@ -89,7 +87,6 @@ const EnvironmentContextProvider = (props) => {
89
87
  * import { useEnvironment } from "@trackunit/react-core-hooks";
90
88
  * const { googleMapsApiKey } = useEnvironment();
91
89
  * // use api key for something...
92
- *
93
90
  * @see (@link IEnvironmentContext)
94
91
  */
95
92
  const useEnvironment = () => {
@@ -112,7 +109,6 @@ const GlobalSelectionContext = React.createContext(null);
112
109
  * const { selection } = useGlobalSelection();
113
110
  * return (selection?.type === "group") ? selection.groupId : undefined;
114
111
  * };
115
- *
116
112
  * @see {@link IGlobalSelectionContext}
117
113
  */
118
114
  const useGlobalSelection = () => {
@@ -137,7 +133,6 @@ const OemBrandingContext = createContext(null);
137
133
  * const { getOemBranding, getImageByBrand } = useOemBrandingContext();
138
134
  * // use oem branding
139
135
  * const branding = getOemBranding("some brand")
140
- *
141
136
  * @see {@link IOemBrandingContext}
142
137
  */
143
138
  const useOemBrandingContext = () => {
@@ -227,7 +222,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
227
222
  * }
228
223
  * })();
229
224
  * }, [assetInfo, getAssetLocation]);
230
- *
231
225
  */
232
226
  const useAssetRuntime = () => {
233
227
  const [assetInfo, setAssetInfo] = useState();
@@ -321,7 +315,6 @@ const useRestRuntime = () => {
321
315
  * }
322
316
  * })();
323
317
  * }, [getSiteAssets, siteInfo]);
324
- *
325
318
  */
326
319
  const useSiteRuntime = () => {
327
320
  const [siteInfo, setSiteInfo] = useState();
@@ -351,7 +344,6 @@ const UserSubscriptionProvider = (props) => {
351
344
  * const { numberOfDaysWithAccessToHistoricalData, packageType } = useUserSubscription();
352
345
  * // use it for something
353
346
  * const data = fetchData(numberOfDaysWithAccessToHistoricalData)
354
- *
355
347
  * @see {@link IUserSubscriptionContext}
356
348
  */
357
349
  const useUserSubscription = () => {
@@ -382,7 +374,6 @@ const ToastProvider = (props) => jsx(ToastContext.Provider, Object.assign({}, pr
382
374
  * description: error?.message,
383
375
  * duration: 3000,
384
376
  * });
385
- *
386
377
  * @see {@link IToastContext}
387
378
  */
388
379
  const useToast = () => {
@@ -401,7 +392,6 @@ const TokenContext = React.createContext(null);
401
392
  * @example
402
393
  * import { useToken } from "@trackunit/react-core-hooks";
403
394
  * const { token } = useToken();
404
- *
405
395
  * @see {@link ITokenContext}
406
396
  */
407
397
  const useToken = () => {
@@ -437,7 +427,6 @@ const CurrentUserProvider = (props) => {
437
427
  * const { data, loading } = useGetAccountByIdQuery({
438
428
  * variables: { accountId: assumedUser?.accountId || accountId || "" },
439
429
  * });
440
- *
441
430
  * @see {@link ICurrentUserContext}
442
431
  */
443
432
  const useCurrentUser = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-core-hooks",
3
- "version": "0.2.78-alpha-a3e6a36823.0",
3
+ "version": "0.2.79",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -9,9 +9,9 @@
9
9
  "module": "./index.esm.js",
10
10
  "main": "./index.cjs.js",
11
11
  "dependencies": {
12
- "@trackunit/iris-app-runtime-core": "0.3.64-alpha-a3e6a36823.0",
13
- "@trackunit/iris-app-runtime-core-api": "0.3.57-alpha-a3e6a36823.0",
14
- "@trackunit/react-core-contexts-api": "0.2.53-alpha-a3e6a36823.0",
12
+ "@trackunit/iris-app-runtime-core": "0.3.64",
13
+ "@trackunit/iris-app-runtime-core-api": "0.3.57",
14
+ "@trackunit/react-core-contexts-api": "0.2.52",
15
15
  "react": "18.2.0",
16
16
  "react-router-dom": "6.11.2"
17
17
  },
@@ -17,7 +17,6 @@ export declare const AnalyticsContextProvider: import("react").Provider<IAnalyti
17
17
  *
18
18
  * // log event when appropriate
19
19
  * logEvent("Login", { loginPage: "New Manager" });
20
- *
21
20
  * @see {@link IAnalyticsContext}
22
21
  */
23
22
  export declare const useAnalytics: <T extends Record<string, Event<BaseEvent | UnspecifiedEvent>>>(type: T) => IAnalyticsContext<T>;
@@ -30,7 +30,6 @@ export declare const AssetSortingProvider: import("react").Provider<IAssetSortin
30
30
  * headerInitialSort={initialSort}
31
31
  * />
32
32
  * );
33
- *
34
33
  * @see {@link IAssetSortingContext}
35
34
  */
36
35
  export declare const useAssetSorting: () => IAssetSortingContext;
@@ -16,7 +16,6 @@ export declare const EnvironmentContextProvider: (props: IProps) => JSX.Element;
16
16
  * import { useEnvironment } from "@trackunit/react-core-hooks";
17
17
  * const { googleMapsApiKey } = useEnvironment();
18
18
  * // use api key for something...
19
- *
20
19
  * @see (@link IEnvironmentContext)
21
20
  */
22
21
  export declare const useEnvironment: () => IEnvironmentContext;
@@ -11,7 +11,6 @@ import * as React from "react";
11
11
  * const { selection } = useGlobalSelection();
12
12
  * return (selection?.type === "group") ? selection.groupId : undefined;
13
13
  * };
14
- *
15
14
  * @see {@link IGlobalSelectionContext}
16
15
  */
17
16
  export declare const useGlobalSelection: () => IGlobalSelectionContext;
@@ -9,7 +9,6 @@ import { IOemBrandingContext } from "@trackunit/react-core-contexts-api";
9
9
  * const { getOemBranding, getImageByBrand } = useOemBrandingContext();
10
10
  * // use oem branding
11
11
  * const branding = getOemBranding("some brand")
12
- *
13
12
  * @see {@link IOemBrandingContext}
14
13
  */
15
14
  export declare const useOemBrandingContext: () => IOemBrandingContext;
@@ -17,6 +17,5 @@ export interface UseAssetRuntime {
17
17
  * }
18
18
  * })();
19
19
  * }, [assetInfo, getAssetLocation]);
20
- *
21
20
  */
22
21
  export declare const useAssetRuntime: () => UseAssetRuntime;
@@ -18,6 +18,5 @@ export interface UseSiteRuntime {
18
18
  * }
19
19
  * })();
20
20
  * }, [getSiteAssets, siteInfo]);
21
- *
22
21
  */
23
22
  export declare const useSiteRuntime: () => UseSiteRuntime;
@@ -17,7 +17,6 @@ export declare const UserSubscriptionProvider: (props: IProps) => JSX.Element;
17
17
  * const { numberOfDaysWithAccessToHistoricalData, packageType } = useUserSubscription();
18
18
  * // use it for something
19
19
  * const data = fetchData(numberOfDaysWithAccessToHistoricalData)
20
- *
21
20
  * @see {@link IUserSubscriptionContext}
22
21
  */
23
22
  export declare const useUserSubscription: () => IUserSubscriptionContext;
@@ -23,7 +23,6 @@ export declare const ToastProvider: (props: ContextProviderProps) => JSX.Element
23
23
  * description: error?.message,
24
24
  * duration: 3000,
25
25
  * });
26
- *
27
26
  * @see {@link IToastContext}
28
27
  */
29
28
  export declare const useToast: () => IToastContext;
@@ -7,7 +7,6 @@ import * as React from "react";
7
7
  * @example
8
8
  * import { useToken } from "@trackunit/react-core-hooks";
9
9
  * const { token } = useToken();
10
- *
11
10
  * @see {@link ITokenContext}
12
11
  */
13
12
  export declare const useToken: () => ITokenContext;
@@ -20,7 +20,6 @@ export declare const CurrentUserProvider: (props: Props) => JSX.Element;
20
20
  * const { data, loading } = useGetAccountByIdQuery({
21
21
  * variables: { accountId: assumedUser?.accountId || accountId || "" },
22
22
  * });
23
- *
24
23
  * @see {@link ICurrentUserContext}
25
24
  */
26
25
  export declare const useCurrentUser: () => ICurrentUserContext;