@xh/hoist 73.0.0-SNAPSHOT.1745973083869 → 73.0.0-SNAPSHOT.1746025071597
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/CHANGELOG.md +7 -1
- package/admin/AdminUtils.ts +0 -5
- package/admin/App.scss +6 -0
- package/admin/AppModel.ts +5 -17
- package/admin/{tabs/client/clients/ClientsColumns.ts → columns/Clients.ts} +20 -53
- package/admin/columns/Core.ts +34 -35
- package/admin/columns/Tracking.ts +74 -44
- package/admin/columns/index.ts +1 -0
- package/admin/tabs/activity/tracking/ActivityTracking.scss +0 -18
- package/admin/tabs/activity/tracking/ActivityTrackingModel.ts +205 -296
- package/admin/tabs/activity/tracking/ActivityTrackingPanel.ts +51 -81
- package/admin/tabs/activity/tracking/charts/ChartsModel.ts +218 -0
- package/admin/tabs/activity/tracking/charts/ChartsPanel.ts +76 -0
- package/admin/tabs/activity/tracking/detail/ActivityDetailModel.ts +60 -114
- package/admin/tabs/activity/tracking/detail/ActivityDetailView.ts +40 -63
- package/admin/tabs/client/clients/ClientsModel.ts +10 -11
- package/admin/tabs/cluster/instances/memory/MemoryMonitorModel.ts +2 -1
- package/build/types/admin/AdminUtils.d.ts +0 -2
- package/build/types/admin/AppModel.d.ts +1 -4
- package/build/types/admin/{tabs/client/clients/ClientsColumns.d.ts → columns/Clients.d.ts} +3 -7
- package/build/types/admin/columns/Core.d.ts +5 -5
- package/build/types/admin/columns/Tracking.d.ts +7 -4
- package/build/types/admin/columns/index.d.ts +1 -0
- package/build/types/admin/tabs/activity/tracking/ActivityTrackingModel.d.ts +26 -30
- package/build/types/admin/tabs/activity/tracking/charts/ChartsModel.d.ts +34 -0
- package/build/types/admin/tabs/activity/tracking/charts/ChartsPanel.d.ts +2 -0
- package/build/types/admin/tabs/activity/tracking/detail/ActivityDetailModel.d.ts +1 -13
- package/build/types/cmp/form/FormModel.d.ts +40 -17
- package/build/types/cmp/form/field/SubformsFieldModel.d.ts +18 -20
- package/build/types/core/HoistBase.d.ts +2 -2
- package/build/types/data/cube/CubeField.d.ts +5 -4
- package/build/types/desktop/cmp/appOption/AutoRefreshAppOption.d.ts +3 -3
- package/build/types/desktop/cmp/appOption/ThemeAppOption.d.ts +3 -3
- package/cmp/error/ErrorBoundaryModel.ts +1 -1
- package/cmp/form/FormModel.ts +112 -20
- package/cmp/form/field/SubformsFieldModel.ts +22 -28
- package/cmp/grid/impl/GridHScrollbar.ts +2 -1
- package/core/HoistBase.ts +12 -12
- package/data/cube/CubeField.ts +18 -17
- package/package.json +1 -1
- package/svc/TrackService.ts +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/admin/tabs/activity/tracking/chart/AggChartModel.ts +0 -218
- package/admin/tabs/activity/tracking/chart/AggChartPanel.ts +0 -61
- package/admin/tabs/activity/tracking/datafields/DataFieldsEditor.ts +0 -147
- package/admin/tabs/activity/tracking/datafields/DataFieldsEditorModel.ts +0 -133
- package/build/types/admin/tabs/activity/tracking/chart/AggChartModel.d.ts +0 -33
- package/build/types/admin/tabs/activity/tracking/chart/AggChartPanel.d.ts +0 -2
- package/build/types/admin/tabs/activity/tracking/datafields/DataFieldsEditor.d.ts +0 -2
- package/build/types/admin/tabs/activity/tracking/datafields/DataFieldsEditorModel.d.ts +0 -46
|
@@ -15,40 +15,36 @@ import {BaseFieldModel, BaseFieldConfig} from './BaseFieldModel';
|
|
|
15
15
|
import {FormConfig} from '../FormModel';
|
|
16
16
|
|
|
17
17
|
export interface SubformsFieldConfig extends BaseFieldConfig {
|
|
18
|
-
/**
|
|
19
|
-
* Config for a {@link FormModel} to be auto-created to manage and validate the data for each
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
18
|
+
/** Config for FormModel representing a subform. */
|
|
22
19
|
subforms: FormConfig;
|
|
23
20
|
|
|
24
21
|
/**
|
|
25
|
-
* Initial value of this field.
|
|
26
|
-
* initialized to provide value.
|
|
22
|
+
* Initial value of this field. If a function, will be
|
|
23
|
+
* executed dynamically when form is initialized to provide value.
|
|
27
24
|
*/
|
|
28
25
|
initialValue?: any[];
|
|
29
26
|
}
|
|
30
27
|
|
|
31
28
|
/**
|
|
32
|
-
* A data field in a form whose value is a collection of
|
|
33
|
-
* with arbitrary internal complexity. A dedicated {@link FormModel} is auto-created to manage and
|
|
34
|
-
* validate each object independently.
|
|
29
|
+
* A data field in a form whose value is a collection of FormModels (subforms).
|
|
35
30
|
*
|
|
36
|
-
* Applications should initialize this field with an array of objects.
|
|
37
|
-
* into an array of managed FormModels which will form the value of this field.
|
|
31
|
+
* Applications should initialize this field with an array of objects. These values will be
|
|
32
|
+
* loaded into an array of managed FormModels which will form the value of this field.
|
|
38
33
|
*
|
|
39
34
|
* Applications should *not* modify the value property directly, unless they wish to reinitialize
|
|
40
|
-
* all existing form contents to new values.
|
|
41
|
-
*
|
|
35
|
+
* all existing form contents to new values. Use the methods add() or remove() to
|
|
36
|
+
* adjust the contents of the collection while preserving existing form state.
|
|
42
37
|
*
|
|
43
|
-
* Validation rules for the entire collection may be specified as for any field, but
|
|
44
|
-
* the subforms will also bubble up to this field, affecting its overall
|
|
38
|
+
* Validation rules for the entire collection may be specified as for any field, but
|
|
39
|
+
* validations on the subforms will also bubble up to this field, affecting its overall
|
|
40
|
+
* validation state.
|
|
45
41
|
*/
|
|
46
42
|
export class SubformsFieldModel extends BaseFieldModel {
|
|
47
|
-
|
|
48
|
-
@managed
|
|
49
|
-
|
|
43
|
+
// (Sub)FormModels created by this model, tracked to support cleanup.
|
|
44
|
+
@managed
|
|
45
|
+
private createdModels: FormModel[] = [];
|
|
50
46
|
private formConfig: FormConfig = null;
|
|
51
|
-
private
|
|
47
|
+
private origInitialValues: any[];
|
|
52
48
|
|
|
53
49
|
constructor({subforms, initialValue = [], ...rest}: SubformsFieldConfig) {
|
|
54
50
|
super(rest);
|
|
@@ -165,16 +161,14 @@ export class SubformsFieldModel extends BaseFieldModel {
|
|
|
165
161
|
//-----------------------------
|
|
166
162
|
// Collection management
|
|
167
163
|
//-----------------------------
|
|
168
|
-
/**
|
|
164
|
+
/**
|
|
165
|
+
* Add a new record (subform) to this field.
|
|
166
|
+
*
|
|
167
|
+
* @param initialValues - object containing initial values for new record.
|
|
168
|
+
* @param index - index in collection where subform should be inserted.
|
|
169
|
+
*/
|
|
169
170
|
@action
|
|
170
|
-
add(
|
|
171
|
-
opts: {
|
|
172
|
-
/** Initial values for the new object/subform. */
|
|
173
|
-
initialValues?: PlainObject;
|
|
174
|
-
/** Index within the collection where the new subform should be inserted. */
|
|
175
|
-
index?: number;
|
|
176
|
-
} = {}
|
|
177
|
-
) {
|
|
171
|
+
add(opts: {initialValues?: PlainObject; index?: number} = {}) {
|
|
178
172
|
const {initialValues = {}, index = this.value.length} = opts,
|
|
179
173
|
newSubforms = this.parseValue([initialValues]),
|
|
180
174
|
newValue = clone(this.value);
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
import {GridLocalModel, GridModel} from '@xh/hoist/cmp/grid';
|
|
8
8
|
import {div} from '@xh/hoist/cmp/layout';
|
|
9
9
|
import {hoistCmp, HoistModel, HoistProps, useLocalModel} from '@xh/hoist/core';
|
|
10
|
-
import {
|
|
10
|
+
import {makeObservable} from '@xh/hoist/mobx';
|
|
11
11
|
import {observeResize} from '@xh/hoist/utils/js';
|
|
12
12
|
import {sumBy} from 'lodash';
|
|
13
|
+
import {action, observable} from 'mobx';
|
|
13
14
|
import {createRef, RefObject} from 'react';
|
|
14
15
|
|
|
15
16
|
/**
|
package/core/HoistBase.ts
CHANGED
|
@@ -4,21 +4,15 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2025 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
+
import {runInAction} from 'mobx';
|
|
8
|
+
import {XH, PersistenceProvider, PersistOptions, DebounceSpec, Some, PersistableState} from './';
|
|
7
9
|
import {
|
|
8
|
-
|
|
9
|
-
autorun as mobxAutorun,
|
|
10
|
-
comparer,
|
|
11
|
-
reaction as mobxReaction,
|
|
12
|
-
runInAction,
|
|
13
|
-
when as mobxWhen
|
|
14
|
-
} from '@xh/hoist/mobx';
|
|
15
|
-
import {
|
|
10
|
+
throwIf,
|
|
16
11
|
getOrCreate,
|
|
12
|
+
logInfo,
|
|
17
13
|
logDebug,
|
|
18
14
|
logError,
|
|
19
|
-
logInfo,
|
|
20
15
|
logWarn,
|
|
21
|
-
throwIf,
|
|
22
16
|
withDebug,
|
|
23
17
|
withInfo
|
|
24
18
|
} from '@xh/hoist/utils/js';
|
|
@@ -31,9 +25,15 @@ import {
|
|
|
31
25
|
isString,
|
|
32
26
|
upperFirst
|
|
33
27
|
} from 'lodash';
|
|
28
|
+
import {
|
|
29
|
+
action,
|
|
30
|
+
comparer,
|
|
31
|
+
autorun as mobxAutorun,
|
|
32
|
+
reaction as mobxReaction,
|
|
33
|
+
when as mobxWhen
|
|
34
|
+
} from '@xh/hoist/mobx';
|
|
34
35
|
import {IAutorunOptions, IReactionOptions} from 'mobx/dist/api/autorun';
|
|
35
|
-
import {
|
|
36
|
-
import {DebounceSpec, PersistableState, PersistenceProvider, PersistOptions, Some, XH} from './';
|
|
36
|
+
import {IReactionDisposer, IEqualsComparer} from 'mobx/dist/internal';
|
|
37
37
|
|
|
38
38
|
export interface HoistBaseClass {
|
|
39
39
|
new (...args: any[]): HoistBase;
|
package/data/cube/CubeField.ts
CHANGED
|
@@ -28,8 +28,23 @@ export interface CubeFieldSpec extends FieldSpec {
|
|
|
28
28
|
/** True to allow this field to be used for grouping.*/
|
|
29
29
|
isDimension?: boolean;
|
|
30
30
|
|
|
31
|
-
/**
|
|
32
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Instance of a Hoist Cube Aggregator (from the aggregate package), or string alias for the
|
|
33
|
+
* same (e.g. 'MAX').
|
|
34
|
+
*/
|
|
35
|
+
aggregator?:
|
|
36
|
+
| Aggregator
|
|
37
|
+
| 'AVG'
|
|
38
|
+
| 'AVG_STRICT'
|
|
39
|
+
| 'CHILD_COUNT'
|
|
40
|
+
| 'LEAF_COUNT'
|
|
41
|
+
| 'MAX'
|
|
42
|
+
| 'MIN'
|
|
43
|
+
| 'NULL'
|
|
44
|
+
| 'SINGLE'
|
|
45
|
+
| 'SUM'
|
|
46
|
+
| 'SUM_STRICT'
|
|
47
|
+
| 'UNIQUE';
|
|
33
48
|
|
|
34
49
|
/** Function to determine if aggregation should be performed at a given level of a query result. */
|
|
35
50
|
canAggregateFn?: CanAggregateFn;
|
|
@@ -45,20 +60,6 @@ export interface CubeFieldSpec extends FieldSpec {
|
|
|
45
60
|
parentDimension?: string;
|
|
46
61
|
}
|
|
47
62
|
|
|
48
|
-
/** Convenient (and serializable) alias for one of Hoist's Cube {@link Aggregator} classes. */
|
|
49
|
-
export type AggregatorToken =
|
|
50
|
-
| 'AVG'
|
|
51
|
-
| 'AVG_STRICT'
|
|
52
|
-
| 'CHILD_COUNT'
|
|
53
|
-
| 'LEAF_COUNT'
|
|
54
|
-
| 'MAX'
|
|
55
|
-
| 'MIN'
|
|
56
|
-
| 'NULL'
|
|
57
|
-
| 'SINGLE'
|
|
58
|
-
| 'SUM'
|
|
59
|
-
| 'SUM_STRICT'
|
|
60
|
-
| 'UNIQUE';
|
|
61
|
-
|
|
62
63
|
/**
|
|
63
64
|
* @param dimension - dimension of aggregation
|
|
64
65
|
* @param value - value of record on dimension
|
|
@@ -113,7 +114,7 @@ export class CubeField extends Field {
|
|
|
113
114
|
//------------------------
|
|
114
115
|
// Implementation
|
|
115
116
|
//------------------------
|
|
116
|
-
private parseAggregator(val:
|
|
117
|
+
private parseAggregator(val: any): Aggregator {
|
|
117
118
|
if (isString(val)) {
|
|
118
119
|
switch (val) {
|
|
119
120
|
case 'AVG':
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "73.0.0-SNAPSHOT.
|
|
3
|
+
"version": "73.0.0-SNAPSHOT.1746025071597",
|
|
4
4
|
"description": "Hoist add-on for building and deploying React Applications.",
|
|
5
5
|
"repository": "github:xh/hoist-react",
|
|
6
6
|
"homepage": "https://xh.io",
|
package/svc/TrackService.ts
CHANGED
|
@@ -119,6 +119,8 @@ export class TrackService extends HoistService {
|
|
|
119
119
|
msg: stripTags(options.message),
|
|
120
120
|
clientUsername: XH.getUsername(),
|
|
121
121
|
appVersion: XH.getEnv('clientVersion'),
|
|
122
|
+
loadId: XH.loadId,
|
|
123
|
+
tabId: XH.tabId,
|
|
122
124
|
url: window.location.href,
|
|
123
125
|
timestamp: Date.now()
|
|
124
126
|
};
|