@xh/hoist 80.0.0-SNAPSHOT.1768415875152 → 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.
@@ -5,7 +5,12 @@
5
5
  * Copyright © 2026 Extremely Heavy Industries Inc.
6
6
  */
7
7
 
8
- import {GridFilterFieldSpec, GridFilterModelConfig} from '@xh/hoist/cmp/grid';
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: Store | View;
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 as any;
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(specs, fieldSpecDefaults) {
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.
@@ -4,8 +4,8 @@
4
4
  *
5
5
  * Copyright © 2026 Extremely Heavy Industries Inc.
6
6
  */
7
- import {Column, ColumnGroup, ColumnRenderer, GroupRowRenderer} from '@xh/hoist/cmp/grid';
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 [depth] - Depth in hierarchy of nested TabContainerModels. Not for application use.
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 {CubeField, CubeFieldSpec} from './CubeField';
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 {BucketSpec} from './BucketSpec';
21
- import {defaultsDeep, isEmpty} from 'lodash';
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
  //-----------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "80.0.0-SNAPSHOT.1768415875152",
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",