@xh/hoist 73.0.0-SNAPSHOT.1744145928224 → 73.0.0-SNAPSHOT.1744206740883

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/admin/AdminUtils.ts +18 -1
  3. package/admin/tabs/activity/tracking/detail/ActivityDetailModel.ts +3 -3
  4. package/admin/tabs/cluster/instances/BaseInstanceModel.ts +1 -29
  5. package/admin/tabs/cluster/instances/services/DetailsPanel.ts +3 -1
  6. package/admin/tabs/cluster/objects/DetailModel.ts +5 -40
  7. package/admin/tabs/cluster/objects/DetailPanel.ts +3 -1
  8. package/appcontainer/AppContainerModel.ts +2 -0
  9. package/appcontainer/AppStateModel.ts +1 -2
  10. package/build/types/admin/AdminUtils.d.ts +4 -0
  11. package/build/types/admin/tabs/cluster/instances/BaseInstanceModel.d.ts +1 -3
  12. package/build/types/admin/tabs/cluster/objects/DetailModel.d.ts +1 -3
  13. package/build/types/cmp/viewmanager/ViewManagerModel.d.ts +7 -0
  14. package/build/types/core/XH.d.ts +2 -1
  15. package/build/types/format/FormatMisc.d.ts +3 -2
  16. package/build/types/svc/ClientHealthService.d.ts +80 -0
  17. package/build/types/svc/TrackService.d.ts +0 -12
  18. package/build/types/svc/index.d.ts +1 -0
  19. package/build/types/utils/js/index.d.ts +0 -1
  20. package/cmp/viewmanager/ViewManagerModel.ts +10 -1
  21. package/core/XH.ts +3 -1
  22. package/desktop/cmp/viewmanager/ViewMenu.ts +11 -9
  23. package/format/FormatMisc.ts +6 -4
  24. package/package.json +1 -1
  25. package/security/msal/MsalClient.ts +2 -6
  26. package/svc/ClientHealthService.ts +219 -0
  27. package/svc/TrackService.ts +3 -67
  28. package/svc/index.ts +1 -0
  29. package/tsconfig.tsbuildinfo +1 -1
  30. package/utils/js/index.ts +0 -1
  31. package/build/types/utils/js/BrowserUtils.d.ts +0 -41
  32. package/utils/js/BrowserUtils.ts +0 -103
package/utils/js/index.ts CHANGED
@@ -9,6 +9,5 @@ export * from './LangUtils';
9
9
  export * from './Decorators';
10
10
  export * from './LogUtils';
11
11
  export * from './DomUtils';
12
- export * from './BrowserUtils';
13
12
  export * from './TestUtils';
14
13
  export * from './VersionUtils';
@@ -1,41 +0,0 @@
1
- /**
2
- * Extract information (if available) about the client browser's window, screen, and network speed.
3
- */
4
- export declare function getClientDeviceInfo(): ClientDeviceInfo;
5
- export interface ClientDeviceInfo {
6
- window: {
7
- devicePixelRatio: number;
8
- screenX: number;
9
- screenY: number;
10
- innerWidth: number;
11
- innerHeight: number;
12
- outerWidth: number;
13
- outerHeight: number;
14
- };
15
- screen?: {
16
- availWidth: number;
17
- availHeight: number;
18
- width: number;
19
- height: number;
20
- colorDepth: number;
21
- pixelDepth: number;
22
- availLeft: number;
23
- availTop: number;
24
- orientation?: {
25
- angle: number;
26
- type: string;
27
- };
28
- };
29
- connection?: {
30
- downlink: number;
31
- effectiveType: string;
32
- rtt: number;
33
- };
34
- memory: {
35
- modelCount: number;
36
- usedPctLimit?: number;
37
- jsHeapSizeLimit?: number;
38
- totalJSHeapSize?: number;
39
- usedJSHeapSize?: number;
40
- };
41
- }
@@ -1,103 +0,0 @@
1
- /*
2
- * This file belongs to Hoist, an application development toolkit
3
- * developed by Extremely Heavy Industries (www.xh.io | info@xh.io)
4
- *
5
- * Copyright © 2025 Extremely Heavy Industries Inc.
6
- */
7
- import {XH} from '@xh/hoist/core';
8
- import {pick, round} from 'lodash';
9
-
10
- /**
11
- * Extract information (if available) about the client browser's window, screen, and network speed.
12
- */
13
- export function getClientDeviceInfo(): ClientDeviceInfo {
14
- const ret: ClientDeviceInfo = {
15
- window: pick(window, [
16
- 'devicePixelRatio',
17
- 'screenX',
18
- 'screenY',
19
- 'innerWidth',
20
- 'innerHeight',
21
- 'outerWidth',
22
- 'outerHeight'
23
- ]),
24
- memory: {
25
- modelCount: XH.getModels().length
26
- }
27
- };
28
-
29
- const screen = window.screen as any;
30
- if (screen) {
31
- ret.screen = pick(screen, [
32
- 'availWidth',
33
- 'availHeight',
34
- 'width',
35
- 'height',
36
- 'colorDepth',
37
- 'pixelDepth',
38
- 'availLeft',
39
- 'availTop'
40
- ]);
41
- if (screen.orientation) {
42
- ret.screen.orientation = pick(screen.orientation, ['angle', 'type']);
43
- }
44
- }
45
-
46
- const nav = window.navigator as any;
47
- if (nav.connection) {
48
- ret.connection = pick(nav.connection, ['downlink', 'effectiveType', 'rtt']);
49
- }
50
-
51
- const perf = window.performance as any;
52
- if (perf?.memory) {
53
- ['jsHeapSizeLimit', 'totalJSHeapSize', 'usedJSHeapSize'].forEach(key => {
54
- const raw = perf.memory[key];
55
- if (raw) ret.memory[key] = round(raw / 1024 / 1024); // convert to MB
56
- });
57
-
58
- const {jsHeapSizeLimit: limit, usedJSHeapSize: used} = ret.memory;
59
- if (limit && used) {
60
- ret.memory.usedPctLimit = round((used / limit) * 100, 1);
61
- }
62
- }
63
-
64
- return ret;
65
- }
66
-
67
- export interface ClientDeviceInfo {
68
- window: {
69
- devicePixelRatio: number;
70
- screenX: number;
71
- screenY: number;
72
- innerWidth: number;
73
- innerHeight: number;
74
- outerWidth: number;
75
- outerHeight: number;
76
- };
77
- screen?: {
78
- availWidth: number;
79
- availHeight: number;
80
- width: number;
81
- height: number;
82
- colorDepth: number;
83
- pixelDepth: number;
84
- availLeft: number;
85
- availTop: number;
86
- orientation?: {
87
- angle: number;
88
- type: string;
89
- };
90
- };
91
- connection?: {
92
- downlink: number;
93
- effectiveType: string;
94
- rtt: number;
95
- };
96
- memory: {
97
- modelCount: number;
98
- usedPctLimit?: number;
99
- jsHeapSizeLimit?: number;
100
- totalJSHeapSize?: number;
101
- usedJSHeapSize?: number;
102
- };
103
- }