@xh/hoist 80.0.0-SNAPSHOT.1768360784265 → 80.0.0-SNAPSHOT.1768517142984
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/build/types/cmp/grid/Grid.d.ts +1 -1
- package/build/types/cmp/grid/GridModel.d.ts +6 -6
- package/build/types/cmp/grid/Types.d.ts +17 -12
- package/build/types/cmp/grid/columns/ColumnGroup.d.ts +3 -3
- package/build/types/cmp/grid/filter/GridFilterModel.d.ts +3 -3
- package/build/types/cmp/grid/impl/Utils.d.ts +3 -3
- package/build/types/cmp/tab/TabContainerModel.d.ts +1 -1
- package/build/types/data/cube/Cube.d.ts +7 -6
- package/cmp/grid/GridModel.ts +74 -50
- package/cmp/grid/Types.ts +23 -13
- package/cmp/grid/columns/ColumnGroup.ts +3 -7
- package/cmp/grid/filter/GridFilterModel.ts +12 -6
- package/cmp/grid/impl/Utils.ts +3 -5
- package/cmp/tab/TabContainerModel.ts +2 -2
- package/data/cube/Cube.ts +11 -7
- package/desktop/cmp/form/FormField.scss +14 -5
- package/package.json +1 -1
- package/styles/vars.scss +12 -5
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -5,7 +5,12 @@
|
|
|
5
5
|
* Copyright © 2026 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
GridFilterBindTarget,
|
|
10
|
+
GridFilterFieldSpec,
|
|
11
|
+
GridFilterFieldSpecConfig,
|
|
12
|
+
GridFilterModelConfig
|
|
13
|
+
} from '@xh/hoist/cmp/grid';
|
|
9
14
|
import {HoistModel, managed} from '@xh/hoist/core';
|
|
10
15
|
import {
|
|
11
16
|
CompoundFilter,
|
|
@@ -13,8 +18,6 @@ import {
|
|
|
13
18
|
Filter,
|
|
14
19
|
FilterLike,
|
|
15
20
|
flattenFilter,
|
|
16
|
-
Store,
|
|
17
|
-
View,
|
|
18
21
|
withFilterByField,
|
|
19
22
|
withFilterByTypes
|
|
20
23
|
} from '@xh/hoist/data';
|
|
@@ -31,7 +34,7 @@ export class GridFilterModel extends HoistModel {
|
|
|
31
34
|
override xhImpl = true;
|
|
32
35
|
|
|
33
36
|
gridModel: GridModel;
|
|
34
|
-
bind:
|
|
37
|
+
bind: GridFilterBindTarget;
|
|
35
38
|
@bindable commitOnChange: boolean;
|
|
36
39
|
@managed fieldSpecs: GridFilterFieldSpec[] = [];
|
|
37
40
|
|
|
@@ -66,7 +69,7 @@ export class GridFilterModel extends HoistModel {
|
|
|
66
69
|
setColumnFilters(field: string, filter: FilterLike) {
|
|
67
70
|
// If current bound filter is a CompoundFilter for a single column, wrap it
|
|
68
71
|
// in an 'AND' CompoundFilter so new columns get 'ANDed' alongside it.
|
|
69
|
-
let currFilter = this.filter
|
|
72
|
+
let currFilter: FilterLike = this.filter;
|
|
70
73
|
if (currFilter instanceof CompoundFilter && currFilter.field) {
|
|
71
74
|
currFilter = {filters: [currFilter], op: 'AND'};
|
|
72
75
|
}
|
|
@@ -144,7 +147,10 @@ export class GridFilterModel extends HoistModel {
|
|
|
144
147
|
//--------------------------------
|
|
145
148
|
// Implementation
|
|
146
149
|
//--------------------------------
|
|
147
|
-
private parseFieldSpecs(
|
|
150
|
+
private parseFieldSpecs(
|
|
151
|
+
specs: Array<string | GridFilterFieldSpecConfig>,
|
|
152
|
+
fieldSpecDefaults: Omit<GridFilterFieldSpecConfig, 'field'>
|
|
153
|
+
) {
|
|
148
154
|
const {bind} = this;
|
|
149
155
|
|
|
150
156
|
// If no specs provided, include all source fields.
|
package/cmp/grid/impl/Utils.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2026 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
-
import {Column,
|
|
8
|
-
import {HeaderClassParams} from '@xh/hoist/kit/ag-grid';
|
|
7
|
+
import {Column, ColumnOrGroup, ColumnRenderer, GroupRowRenderer} from '@xh/hoist/cmp/grid';
|
|
8
|
+
import type {HeaderClassParams} from '@xh/hoist/kit/ag-grid';
|
|
9
9
|
import {logWarn} from '@xh/hoist/utils/js';
|
|
10
10
|
import {castArray, isFunction} from 'lodash';
|
|
11
11
|
|
|
@@ -31,9 +31,7 @@ export function managedRenderer<T extends ColumnRenderer | GroupRowRenderer>(
|
|
|
31
31
|
*
|
|
32
32
|
* @internal
|
|
33
33
|
*/
|
|
34
|
-
export function getAgHeaderClassFn(
|
|
35
|
-
column: Column | ColumnGroup
|
|
36
|
-
): (params: HeaderClassParams) => string[] {
|
|
34
|
+
export function getAgHeaderClassFn(column: ColumnOrGroup): (params: HeaderClassParams) => string[] {
|
|
37
35
|
const {headerClass, headerAlign, gridModel} = column;
|
|
38
36
|
|
|
39
37
|
return agParams => {
|
|
@@ -123,7 +123,7 @@ export class TabContainerModel extends HoistModel {
|
|
|
123
123
|
|
|
124
124
|
/**
|
|
125
125
|
* @param config - TabContainer configuration.
|
|
126
|
-
* @param
|
|
126
|
+
* @param depth - Depth in hierarchy of nested TabContainerModels. Not for application use.
|
|
127
127
|
*/
|
|
128
128
|
constructor(
|
|
129
129
|
{
|
|
@@ -138,7 +138,7 @@ export class TabContainerModel extends HoistModel {
|
|
|
138
138
|
xhImpl = false,
|
|
139
139
|
switcher = {mode: 'static'}
|
|
140
140
|
}: TabContainerConfig,
|
|
141
|
-
depth = 0
|
|
141
|
+
depth: number = 0
|
|
142
142
|
) {
|
|
143
143
|
super();
|
|
144
144
|
makeObservable(this);
|
package/data/cube/Cube.ts
CHANGED
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
import {HoistBase, managed, PlainObject, Some} from '@xh/hoist/core';
|
|
9
9
|
import {action, makeObservable, observable} from '@xh/hoist/mobx';
|
|
10
10
|
import {forEachAsync} from '@xh/hoist/utils/async';
|
|
11
|
-
import {
|
|
12
|
-
import {ViewRowData} from './ViewRowData';
|
|
13
|
-
import {Query, QueryConfig} from './Query';
|
|
14
|
-
import {View} from './View';
|
|
11
|
+
import {defaultsDeep, isEmpty} from 'lodash';
|
|
15
12
|
import {Store, StoreRecordIdSpec, StoreTransaction} from '../Store';
|
|
16
13
|
import {StoreRecord} from '../StoreRecord';
|
|
14
|
+
import {BucketSpec} from './BucketSpec';
|
|
15
|
+
import {CubeField, CubeFieldSpec} from './CubeField';
|
|
16
|
+
import {Query, QueryConfig} from './Query';
|
|
17
17
|
import {AggregateRow} from './row/AggregateRow';
|
|
18
|
-
import {BucketRow} from './row/BucketRow';
|
|
19
18
|
import {BaseRow} from './row/BaseRow';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
19
|
+
import {BucketRow} from './row/BucketRow';
|
|
20
|
+
import {View} from './View';
|
|
21
|
+
import {ViewRowData} from './ViewRowData';
|
|
22
22
|
|
|
23
23
|
export interface CubeConfig {
|
|
24
24
|
fields: CubeField[] | CubeFieldSpec[];
|
|
@@ -160,6 +160,10 @@ export class Cube extends HoistBase {
|
|
|
160
160
|
return this._connectedViews.size;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
getField(name: string): CubeField {
|
|
164
|
+
return this.store.getField(name) as CubeField;
|
|
165
|
+
}
|
|
166
|
+
|
|
163
167
|
//------------------
|
|
164
168
|
// Querying API
|
|
165
169
|
//-----------------
|
|
@@ -12,22 +12,31 @@
|
|
|
12
12
|
margin: var(--xh-form-field-margin);
|
|
13
13
|
|
|
14
14
|
&__label {
|
|
15
|
+
// Common label attrs
|
|
15
16
|
color: var(--xh-form-field-label-color);
|
|
16
17
|
font-size: var(--xh-form-field-label-font-size);
|
|
17
18
|
font-style: var(--xh-form-field-label-font-style);
|
|
18
19
|
font-weight: var(--xh-form-field-label-font-weight);
|
|
19
20
|
text-transform: var(--xh-form-field-label-text-transform);
|
|
20
21
|
|
|
21
|
-
// Borders + padding
|
|
22
|
+
// Borders + padding - editable, not inline - the default case.
|
|
22
23
|
border-bottom: var(--xh-form-field-label-border-bottom);
|
|
23
24
|
margin: var(--xh-form-field-label-margin);
|
|
24
25
|
padding: var(--xh-form-field-label-padding);
|
|
25
26
|
|
|
26
|
-
// Borders + padding
|
|
27
|
+
// Borders + padding - readonly, not inline - commonly used to add bottom border when using
|
|
28
|
+
// forms as a kind of detail view, as readonly fields often lack other visual boundaries.
|
|
29
|
+
.xh-form-field--readonly:not(.xh-form-field--inline) & {
|
|
30
|
+
border-bottom: var(--xh-form-field-readonly-label-border-bottom);
|
|
31
|
+
margin: var(--xh-form-field-readonly-label-margin);
|
|
32
|
+
padding: var(--xh-form-field-readonly-label-padding);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Borders + padding - inline, both editable and readonly.
|
|
27
36
|
.xh-form-field--inline & {
|
|
28
|
-
border-bottom: var(--xh-form-field-label-
|
|
29
|
-
margin: var(--xh-form-field-label-
|
|
30
|
-
padding: var(--xh-form-field-label-
|
|
37
|
+
border-bottom: var(--xh-form-field-inline-label-border-bottom);
|
|
38
|
+
margin: var(--xh-form-field-inline-label-margin);
|
|
39
|
+
padding: var(--xh-form-field-inline-label-padding);
|
|
31
40
|
}
|
|
32
41
|
}
|
|
33
42
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "80.0.0-SNAPSHOT.
|
|
3
|
+
"version": "80.0.0-SNAPSHOT.1768517142984",
|
|
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/styles/vars.scss
CHANGED
|
@@ -432,20 +432,27 @@ body {
|
|
|
432
432
|
--xh-form-field-focused-border-color: var(--form-field-focused-border-color, var(--xh-focus-outline-color));
|
|
433
433
|
--xh-form-field-focused-box-shadow: var(--form-field-focused-box-shadow, #{inset 0 0 0 1px var(--xh-form-field-focused-border-color), inset 0 1px 1px var(--xh-form-field-focused-border-color)});
|
|
434
434
|
|
|
435
|
-
// Label styling
|
|
435
|
+
// Label styling - common to all variants
|
|
436
436
|
--xh-form-field-label-color: var(--form-field-label-color, var(--xh-text-color));
|
|
437
437
|
--xh-form-field-label-font-size: var(--form-field-label-font-size, var(--xh-font-size-px));
|
|
438
438
|
--xh-form-field-label-font-style: var(--form-field-label-font-style, normal);
|
|
439
439
|
--xh-form-field-label-font-weight: var(--form-field-label-font-weight, normal);
|
|
440
440
|
--xh-form-field-label-text-transform: var(--form-field-label-text-transform, none);
|
|
441
441
|
|
|
442
|
-
// Label borders+padding
|
|
442
|
+
// Label borders + padding - editable, not inline - the default case.
|
|
443
443
|
--xh-form-field-label-border-bottom: var(--form-field-label-border-bottom, none);
|
|
444
444
|
--xh-form-field-label-margin: var(--form-field-label-margin, 0 0 3px 0);
|
|
445
445
|
--xh-form-field-label-padding: var(--form-field-label-padding, 0);
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
--xh-form-field-label-
|
|
446
|
+
|
|
447
|
+
// Label borders + padding - readonly, not inline
|
|
448
|
+
--xh-form-field-readonly-label-border-bottom: var(--form-field-readonly-label-border-bottom, var(--xh-form-field-label-border-bottom));
|
|
449
|
+
--xh-form-field-readonly-label-margin: var(--form-field-readonly-label-margin, var(--xh-form-field-label-margin));
|
|
450
|
+
--xh-form-field-readonly-label-padding: var(--form-field-readonly-label-padding, var(--xh-form-field-label-padding));
|
|
451
|
+
|
|
452
|
+
// Label borders + padding - inline, both editable and readonly
|
|
453
|
+
--xh-form-field-inline-label-border-bottom: var(--form-field-inline-label-border-bottom, var(--xh-form-field-label-border-bottom));
|
|
454
|
+
--xh-form-field-inline-label-margin: var(--form-field-inline-label-margin, 0); // Defaulted to zero for inline
|
|
455
|
+
--xh-form-field-inline-label-padding: var(--form-field-inline-label-padding, var(--xh-form-field-label-padding));
|
|
449
456
|
|
|
450
457
|
// Messages (general info text + validation results)
|
|
451
458
|
--xh-form-field-msg-font-size: var(--form-field-msg-font-size, var(--xh-font-size-small-px));
|