@xh/hoist 83.0.1 → 83.1.0
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 +23 -1
- package/build/types/cmp/error/ErrorBoundary.d.ts +2 -0
- package/build/types/cmp/error/ErrorBoundaryModel.d.ts +12 -0
- package/build/types/cmp/filter/FilterChooserModel.d.ts +18 -0
- package/build/types/cmp/form/Form.d.ts +4 -4
- package/build/types/cmp/form/formfieldset/FormFieldSetModel.d.ts +9 -0
- package/build/types/cmp/grouping/GroupingChooserModel.d.ts +16 -0
- package/build/types/cmp/pinpad/PinPadModel.d.ts +8 -0
- package/build/types/cmp/treemap/SplitTreeMapModel.d.ts +10 -10
- package/build/types/cmp/treemap/TreeMapModel.d.ts +19 -20
- package/build/types/core/HoistComponent.d.ts +20 -22
- package/build/types/core/load/LoadSpec.d.ts +19 -19
- package/build/types/data/impl/RecordSet.d.ts +2 -2
- package/build/types/desktop/cmp/input/DateInput.d.ts +1 -1
- package/build/types/desktop/cmp/leftrightchooser/LeftRightChooserModel.d.ts +1 -1
- package/build/types/svc/AutoRefreshService.d.ts +1 -1
- package/build/types/svc/ChangelogService.d.ts +2 -3
- package/build/types/svc/FetchService.d.ts +19 -17
- package/cmp/error/ErrorBoundary.ts +2 -0
- package/cmp/error/ErrorBoundaryModel.ts +12 -0
- package/cmp/filter/FilterChooserModel.ts +18 -0
- package/cmp/form/Form.ts +4 -4
- package/cmp/form/formfieldset/FormFieldSetModel.ts +9 -0
- package/cmp/grouping/GroupingChooserModel.ts +16 -0
- package/cmp/pinpad/PinPadModel.ts +8 -0
- package/cmp/treemap/SplitTreeMapModel.ts +10 -10
- package/cmp/treemap/TreeMapModel.ts +19 -20
- package/core/HoistComponent.ts +20 -22
- package/core/load/LoadSpec.ts +19 -20
- package/data/impl/RecordSet.ts +3 -3
- package/desktop/cmp/input/DateInput.ts +1 -1
- package/desktop/cmp/leftrightchooser/LeftRightChooserModel.ts +1 -1
- package/mcp/cli/ts.ts +9 -2
- package/mcp/data/ts-registry.ts +116 -12
- package/mcp/formatters/typescript.ts +50 -4
- package/mcp/tools/typescript.ts +9 -2
- package/package.json +2 -2
- package/svc/AutoRefreshService.ts +1 -1
- package/svc/ChangelogService.ts +2 -3
- package/svc/EnvironmentService.ts +7 -5
- package/svc/FetchService.ts +20 -18
- package/svc/WebSocketService.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## 83.1.0 - 2026-04-07
|
|
4
4
|
|
|
5
|
+
### 🐞 Bug Fixes
|
|
6
|
+
|
|
7
|
+
* Fixed `EnvironmentService.ensureVersionRunnable()` to correctly detect client/server version
|
|
8
|
+
mismatches on startup. The previous check compared two values both sourced from the server
|
|
9
|
+
response, making it a tautology that could never fail. Now compares the webpack-baked
|
|
10
|
+
`clientVersion` against the server-reported `appVersion`.
|
|
11
|
+
|
|
12
|
+
### 🤖 AI Docs + Tooling
|
|
13
|
+
|
|
14
|
+
* Improved MCP/CLI TypeScript symbol tools to surface full JSDoc documentation in search results
|
|
15
|
+
and resolve a discoverability gap around component Props interfaces. `hoist-search-symbols`
|
|
16
|
+
now includes JSDoc snippets with each result. Props interfaces (e.g. `PanelProps`) without
|
|
17
|
+
their own JSDoc inherit documentation from their companion component via naming convention.
|
|
18
|
+
`hoist-get-symbol` now cross-references between Props interfaces and their components.
|
|
19
|
+
|
|
20
|
+
## 83.0.2 - 2026-03-30
|
|
21
|
+
|
|
22
|
+
### ⚙️ Technical
|
|
23
|
+
|
|
24
|
+
* Updated `WebSocketService` to support same-origin `baseUrl` values (e.g. `/api/`). Previously
|
|
25
|
+
assumed a cross-origin `baseUrl` in dev mode. Required for compatibility with the new
|
|
26
|
+
webpack-dev-server proxy in `@xh/hoist-dev-utils` v12.
|
|
5
27
|
|
|
6
28
|
## 83.0.1 - 2026-03-25
|
|
7
29
|
|
|
@@ -8,5 +8,7 @@ import { ErrorBoundaryModel } from './ErrorBoundaryModel';
|
|
|
8
8
|
* This wrapper will automatically only catch and handle exceptions that occur during the React
|
|
9
9
|
* lifecycle, but applications that wish to use this component to display other caught exceptions
|
|
10
10
|
* may explicitly use it to handle those exceptions.
|
|
11
|
+
*
|
|
12
|
+
* @see ErrorBoundaryModel
|
|
11
13
|
*/
|
|
12
14
|
export declare const ErrorBoundary: import("react").FC<import("@xh/hoist/core").DefaultHoistProps<ErrorBoundaryModel>>, errorBoundary: import("@xh/hoist/core").ElementFactory<import("@xh/hoist/core").DefaultHoistProps<ErrorBoundaryModel>>;
|
|
@@ -12,6 +12,18 @@ export interface ErrorBoundaryConfig {
|
|
|
12
12
|
*/
|
|
13
13
|
errorRenderer?: (e: unknown) => ReactNode;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Model for an ErrorBoundary component that catches unhandled React lifecycle errors.
|
|
17
|
+
*
|
|
18
|
+
* Tracks a caught error and provides {@link handleError} for applications to programmatically
|
|
19
|
+
* trigger error display for non-lifecycle exceptions. Use {@link showError} to display an
|
|
20
|
+
* already-handled error without re-running the error handler.
|
|
21
|
+
*
|
|
22
|
+
* Configure via `errorHandler` to customize exception handling (defaults to suppressing the
|
|
23
|
+
* alert dialog) and `errorRenderer` to customize the error display.
|
|
24
|
+
*
|
|
25
|
+
* @see ErrorBoundary
|
|
26
|
+
*/
|
|
15
27
|
export declare class ErrorBoundaryModel extends HoistModel {
|
|
16
28
|
errorHandler: ExceptionHandlerOptions | ((e: unknown) => void);
|
|
17
29
|
errorRenderer: (e: unknown) => ReactNode;
|
|
@@ -68,6 +68,24 @@ export interface FilterChooserConfig {
|
|
|
68
68
|
/** Options governing persistence. */
|
|
69
69
|
persistWith?: FilterChooserPersistOptions;
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Model for a Select-based filter control that allows users to search for and compose filters
|
|
73
|
+
* across multiple data fields.
|
|
74
|
+
*
|
|
75
|
+
* Manages the current filter value, user-managed favorites, and available field specs. Supports
|
|
76
|
+
* bidirectional binding to a {@link Store} or Cube {@link View} via the `bind` config — filters
|
|
77
|
+
* are automatically applied to the target as they change, and external filter changes on the
|
|
78
|
+
* target are reflected back into this model.
|
|
79
|
+
*
|
|
80
|
+
* Field specs define which fields are available for filtering and how their values are parsed
|
|
81
|
+
* and displayed. If a `valueSource` is provided, field specs can be auto-populated from the
|
|
82
|
+
* source's fields.
|
|
83
|
+
*
|
|
84
|
+
* Supports persistence of both the current filter value and favorites via `persistWith`.
|
|
85
|
+
*
|
|
86
|
+
* @see FilterChooser
|
|
87
|
+
* @see FilterChooserFieldSpec
|
|
88
|
+
*/
|
|
71
89
|
export declare class FilterChooserModel extends HoistModel {
|
|
72
90
|
value: FilterChooserFilter;
|
|
73
91
|
favorites: FilterChooserFilter[];
|
|
@@ -33,9 +33,9 @@ export interface FormProps<M extends FormModel = FormModel> extends HoistProps<M
|
|
|
33
33
|
* primarily designed to apply defaults to and manage data binding for FormField components, which
|
|
34
34
|
* can be nested at any level below this parent component.
|
|
35
35
|
*
|
|
36
|
-
* @see FormModel
|
|
37
|
-
* @see FieldModel
|
|
38
|
-
* @see FormField
|
|
39
|
-
* @see HoistInput
|
|
36
|
+
* @see FormModel
|
|
37
|
+
* @see FieldModel
|
|
38
|
+
* @see FormField
|
|
39
|
+
* @see HoistInput
|
|
40
40
|
*/
|
|
41
41
|
export declare const Form: import("react").FC<FormProps<FormModel>>, form: import("@xh/hoist/core").ElementFactory<FormProps<FormModel>>;
|
|
@@ -14,6 +14,15 @@ export interface FormFieldSetConfig {
|
|
|
14
14
|
/** Options governing persistence. */
|
|
15
15
|
persistWith?: PersistOptions;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Model for a FormFieldSet — a collapsible container for grouping related form fields.
|
|
19
|
+
*
|
|
20
|
+
* Aggregates validation state from all descendant FieldModels and child FormFieldSetModels,
|
|
21
|
+
* and supports disabling or setting readonly state on all contained fields at once.
|
|
22
|
+
*
|
|
23
|
+
* @see FormFieldSet
|
|
24
|
+
* @see FormModel
|
|
25
|
+
*/
|
|
17
26
|
export declare class FormFieldSetModel extends CardModel {
|
|
18
27
|
config: FormFieldSetConfig;
|
|
19
28
|
parent: FormFieldSetModel;
|
|
@@ -66,6 +66,22 @@ export interface GroupingChooserPersistOptions extends PersistOptions {
|
|
|
66
66
|
}
|
|
67
67
|
/** Target to which GroupingChooser value changes should be automatically synced. */
|
|
68
68
|
export type GroupingBindTarget = GridModel | View;
|
|
69
|
+
/**
|
|
70
|
+
* Model for a control that allows users to select and order a list of dimensions for use with
|
|
71
|
+
* grouping APIs, such as Grid `groupBy` or Cube queries.
|
|
72
|
+
*
|
|
73
|
+
* Manages the current dimension selection, available dimensions, user-managed favorites, and
|
|
74
|
+
* drag-and-drop reordering. Supports bidirectional binding to a {@link GridModel} or Cube
|
|
75
|
+
* {@link View} via the `bind` config — grouping changes are automatically applied to the
|
|
76
|
+
* target, and external changes to the target are reflected back into this model.
|
|
77
|
+
*
|
|
78
|
+
* Dimensions can be auto-populated from the bind target or specified explicitly. When binding
|
|
79
|
+
* to a Cube View, {@link CubeField} instances satisfy the {@link DimensionSpec} interface.
|
|
80
|
+
*
|
|
81
|
+
* Supports persistence of both the current value and favorites via `persistWith`.
|
|
82
|
+
*
|
|
83
|
+
* @see GroupingChooser
|
|
84
|
+
*/
|
|
69
85
|
export declare class GroupingChooserModel extends HoistModel {
|
|
70
86
|
/** App-level defaults for GroupingChooserModel. Instance config takes precedence. */
|
|
71
87
|
static defaults: GroupingChooserModelDefaults;
|
|
@@ -5,6 +5,14 @@ export interface PinPadConfig {
|
|
|
5
5
|
headerText?: string;
|
|
6
6
|
subHeaderText?: string;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Model for a PinPad — a numeric keypad prompt for collecting a PIN from the user.
|
|
10
|
+
*
|
|
11
|
+
* Tracks entered digits, validates PIN completion, and provides observable `value` and
|
|
12
|
+
* `isComplete` getters. Supports configurable PIN length and custom header/subheader text.
|
|
13
|
+
*
|
|
14
|
+
* @see PinPad
|
|
15
|
+
*/
|
|
8
16
|
export declare class PinPadModel extends HoistModel {
|
|
9
17
|
disabled: boolean;
|
|
10
18
|
headerText: string;
|
|
@@ -2,16 +2,6 @@ import { HoistModel, PlainObject, Theme } from '@xh/hoist/core';
|
|
|
2
2
|
import { StoreRecord, StoreRecordId } from '@xh/hoist/data';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
import { TreeMapAlgorithm, TreeMapColorMode, TreeMapModel, TreeMapConfig } from './TreeMapModel';
|
|
5
|
-
/**
|
|
6
|
-
* Core Model for a SplitTreeMap.
|
|
7
|
-
*
|
|
8
|
-
* Binds to a Store (or GridModel) and splits the data into two managed child TreeMaps.
|
|
9
|
-
* Users should specify a `mapFilter` function to control how records are divided
|
|
10
|
-
* across the two TreeMaps.
|
|
11
|
-
*
|
|
12
|
-
* Additionally, accepts and passes along all settings for TreeMapModel.
|
|
13
|
-
* @see TreeMapModel
|
|
14
|
-
*/
|
|
15
5
|
export interface SplitTreeMapConfig extends TreeMapConfig {
|
|
16
6
|
/**
|
|
17
7
|
* Filter used to allocate records between the primary and secondary maps.
|
|
@@ -25,6 +15,16 @@ export interface SplitTreeMapConfig extends TreeMapConfig {
|
|
|
25
15
|
/** Layout orientation to use. */
|
|
26
16
|
orientation?: SplitTreeMapOrientation;
|
|
27
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Core Model for a SplitTreeMap.
|
|
20
|
+
*
|
|
21
|
+
* Binds to a Store (or GridModel) and splits the data into two managed child TreeMaps.
|
|
22
|
+
* Users should specify a `mapFilter` function to control how records are divided
|
|
23
|
+
* across the two TreeMaps.
|
|
24
|
+
*
|
|
25
|
+
* Additionally, accepts and passes along all settings for TreeMapModel.
|
|
26
|
+
* @see TreeMapModel
|
|
27
|
+
*/
|
|
28
28
|
export declare class SplitTreeMapModel extends HoistModel {
|
|
29
29
|
mapFilter: SplitTreeMapFilterFn;
|
|
30
30
|
mapTitleFn: SplitTreeMapTitleFn;
|
|
@@ -3,26 +3,6 @@ import { Store, StoreRecord, StoreRecordId } from '@xh/hoist/data';
|
|
|
3
3
|
import { GridModel } from '@xh/hoist/cmp/grid';
|
|
4
4
|
import { FilterLike } from '@xh/hoist/data/filter/Types';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
|
-
/**
|
|
7
|
-
* Core Model for a TreeMap.
|
|
8
|
-
*
|
|
9
|
-
* You should specify the TreeMap's data store, in addition to which StoreRecord fields should be
|
|
10
|
-
* mapped to label (a node's display name), value (a node's size), and heat (a node's color).
|
|
11
|
-
*
|
|
12
|
-
* Can also (optionally) be bound to a GridModel. This will enable selection syncing and
|
|
13
|
-
* expand / collapse syncing for GridModels in `treeMode`.
|
|
14
|
-
*
|
|
15
|
-
* Supports any Highcharts TreeMap algorithm ('squarified', 'sliceAndDice', 'stripes' or 'strip').
|
|
16
|
-
*
|
|
17
|
-
* Node colors are normalized to a 0-1 range and mapped to a colorAxis via the following colorModes:
|
|
18
|
-
* 'linear' distributes normalized color values across the colorAxis according to the heatField.
|
|
19
|
-
* 'wash' ignores the intensity of the heat value, applying a single positive and negative color.
|
|
20
|
-
* 'none' will ignore the colorAxis, and instead use the neutral color.
|
|
21
|
-
*
|
|
22
|
-
* Color customization can be managed by setting colorAxis stops via the `highchartsConfig`.
|
|
23
|
-
*
|
|
24
|
-
* @see https://www.highcharts.com/docs/chart-and-series-types/treemap for Highcharts config options
|
|
25
|
-
*/
|
|
26
6
|
export interface TreeMapConfig {
|
|
27
7
|
/** A store containing records to be displayed. */
|
|
28
8
|
store?: Store;
|
|
@@ -85,6 +65,25 @@ export interface TreeMapModelDefaults {
|
|
|
85
65
|
algorithm?: TreeMapAlgorithm;
|
|
86
66
|
maxNodes?: number;
|
|
87
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Core Model for a TreeMap, backed by a data Store with fields mapped to each node's label
|
|
70
|
+
* (display name), value (size), and heat (color).
|
|
71
|
+
*
|
|
72
|
+
* Can optionally bind to a GridModel to enable selection and expand/collapse syncing for
|
|
73
|
+
* GridModels in `treeMode`.
|
|
74
|
+
*
|
|
75
|
+
* Supports Highcharts TreeMap algorithms: 'squarified', 'sliceAndDice', 'stripes', and 'strip'.
|
|
76
|
+
*
|
|
77
|
+
* Node colors are normalized to a 0-1 range and mapped to a colorAxis. The `colorMode` config
|
|
78
|
+
* controls how:
|
|
79
|
+
* - 'linear' — distributes values across the colorAxis according to the heatField.
|
|
80
|
+
* - 'wash' — ignores heat intensity, applying a single positive/negative color.
|
|
81
|
+
* - 'none' — ignores the colorAxis entirely, using the neutral color.
|
|
82
|
+
*
|
|
83
|
+
* Color customization can be managed by setting colorAxis stops via `highchartsConfig`.
|
|
84
|
+
* See {@link https://www.highcharts.com/docs/chart-and-series-types/treemap} for Highcharts
|
|
85
|
+
* TreeMap config options.
|
|
86
|
+
*/
|
|
88
87
|
export declare class TreeMapModel extends HoistModel {
|
|
89
88
|
/** App-level defaults for TreeMapModel. Instance config takes precedence. */
|
|
90
89
|
static defaults: TreeMapModelDefaults;
|
|
@@ -51,34 +51,32 @@ export type ComponentConfig<P extends HoistProps> = ((props: RenderPropsOf<P>, r
|
|
|
51
51
|
observer?: boolean;
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* configuration object to specify that function and additional options, as described below.
|
|
54
|
+
* The primary entry point for defining Hoist components — functional React components enhanced
|
|
55
|
+
* with MobX reactivity and integrated model support.
|
|
57
56
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
57
|
+
* Accepts a configuration object (or a bare render function) and returns a React functional
|
|
58
|
+
* component. The `model` config is the key option: use {@link creates} to have the component
|
|
59
|
+
* create and own its backing model, {@link uses} to source a model from props or context, or
|
|
60
|
+
* `false` for simple components with no model. Defaults to `uses('*')` if not specified.
|
|
61
61
|
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* any other sources of observable state.
|
|
62
|
+
* Components are wrapped in the MobX `observer` HOC by default, enabling automatic re-rendering
|
|
63
|
+
* when observable state read during render changes.
|
|
65
64
|
*
|
|
66
|
-
* Forward refs {@link https://reactjs.org/docs/forwarding-refs.html} are supported by
|
|
67
|
-
* render function
|
|
68
|
-
*
|
|
65
|
+
* Forward refs ({@link https://reactjs.org/docs/forwarding-refs.html}) are supported by
|
|
66
|
+
* specifying a render function with two arguments — the second is treated as a ref, and
|
|
67
|
+
* `React.forwardRef` is applied automatically.
|
|
69
68
|
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
69
|
+
* Most components should be defined via one of two convenience methods rather than calling
|
|
70
|
+
* this function directly:
|
|
71
|
+
* - `hoistCmp.factory()` — returns an element factory (the standard pattern for app components).
|
|
72
|
+
* - `hoistCmp.withFactory()` — returns a `[Component, factory]` pair (the standard pattern for
|
|
73
|
+
* library components that need to export both).
|
|
74
74
|
*
|
|
75
|
-
*
|
|
75
|
+
* See `core/README.md` for full documentation on component configuration, model specs, and
|
|
76
|
+
* context lookup behavior.
|
|
76
77
|
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* - `hoistCmp.withFactory` - return a 2-element list containing both the newly
|
|
81
|
-
* defined Component and an elementFactory for it.
|
|
78
|
+
* @param config - specification object, or a render function defining the component.
|
|
79
|
+
* @returns a functional React Component for use within Hoist apps.
|
|
82
80
|
*/
|
|
83
81
|
export declare function hoistCmp<M extends HoistModel>(config: ComponentConfig<DefaultHoistProps<M>>): FC<DefaultHoistProps<M>>;
|
|
84
82
|
export declare function hoistCmp<P extends HoistProps>(config: ComponentConfig<P>): FC<P>;
|
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
import { PlainObject } from '../types/Types';
|
|
2
2
|
import { LoadSupport } from './';
|
|
3
|
-
/**
|
|
4
|
-
* Object describing a load/refresh request in Hoist.
|
|
5
|
-
*
|
|
6
|
-
* Instances of this class are created within the public APIs provided by {@link LoadSupport}
|
|
7
|
-
* and are passed to subclass (i.e. app-level) implementations of `doLoadAsync()`.
|
|
8
|
-
*
|
|
9
|
-
* Application implementations of `doLoadAsync()` can consult this object's flags. Of particular
|
|
10
|
-
* interest are {@link isStale} and {@link isObsolete}, which implementations can read after any
|
|
11
|
-
* async calls return to determine if a newer, subsequent load has already been requested.
|
|
12
|
-
*
|
|
13
|
-
* In addition, `doLoadAsync()` implementations should typically pass along this object to any
|
|
14
|
-
* calls they make to `loadAsync()` on other objects + all calls to {@link FetchService} APIs.
|
|
15
|
-
*
|
|
16
|
-
* Note that Hoist's exception handling and activity tracking will consult the {@link isAutoRefresh}
|
|
17
|
-
* flag on specs passed to their calls to automatically adjust their behavior (e.g. not showing an
|
|
18
|
-
* exception dialog on error, not tracking background refresh activity).
|
|
19
|
-
*
|
|
20
|
-
* @see LoadSupport
|
|
21
|
-
*/
|
|
22
3
|
export type LoadSpecConfig = {
|
|
23
4
|
/** True if triggered by a refresh request (automatic or user-driven). */
|
|
24
5
|
isRefresh?: boolean;
|
|
@@ -27,6 +8,25 @@ export type LoadSpecConfig = {
|
|
|
27
8
|
/** Application-specific information about the load request. */
|
|
28
9
|
meta?: PlainObject;
|
|
29
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Immutable descriptor for a load/refresh request, passed to `doLoadAsync()` implementations.
|
|
13
|
+
*
|
|
14
|
+
* Instances are created automatically by {@link LoadSupport} when `loadAsync()`,
|
|
15
|
+
* `refreshAsync()`, or `autoRefreshAsync()` are called. Application code should not construct
|
|
16
|
+
* LoadSpec instances directly.
|
|
17
|
+
*
|
|
18
|
+
* Within `doLoadAsync()`, check {@link isStale} after any async call to determine if a newer
|
|
19
|
+
* load has already been requested — if so, return early to avoid applying outdated results.
|
|
20
|
+
* Check {@link isAutoRefresh} to adjust behavior for background refreshes (e.g. skip expensive
|
|
21
|
+
* operations, avoid user-facing error dialogs).
|
|
22
|
+
*
|
|
23
|
+
* Pass this object along to any nested `loadAsync()` calls and to all {@link FetchService}
|
|
24
|
+
* requests. Hoist's exception handling and activity tracking consult the LoadSpec to
|
|
25
|
+
* automatically suppress error dialogs and skip tracking for auto-refresh operations.
|
|
26
|
+
*
|
|
27
|
+
* @see LoadSupport
|
|
28
|
+
* @see HoistModel.doLoadAsync
|
|
29
|
+
*/
|
|
30
30
|
export declare class LoadSpec {
|
|
31
31
|
/** True if triggered by a refresh request (automatic or user-driven). */
|
|
32
32
|
isRefresh: boolean;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { StoreRecord, StoreRecordId } from '../StoreRecord';
|
|
2
2
|
import { Store } from '../Store';
|
|
3
3
|
import { Filter } from '../filter/Filter';
|
|
4
|
+
type StoreRecordMap = Map<StoreRecordId, StoreRecord>;
|
|
5
|
+
type ChildRecordMap = Map<StoreRecordId, StoreRecord[]>;
|
|
4
6
|
/**
|
|
5
7
|
* Internal container for StoreRecord management within a Store.
|
|
6
8
|
* Note this is an immutable object; its update and filtering APIs return new instances as required.
|
|
7
9
|
*
|
|
8
10
|
* @internal
|
|
9
11
|
*/
|
|
10
|
-
type StoreRecordMap = Map<StoreRecordId, StoreRecord>;
|
|
11
|
-
type ChildRecordMap = Map<StoreRecordId, StoreRecord[]>;
|
|
12
12
|
export declare class RecordSet {
|
|
13
13
|
store: Store;
|
|
14
14
|
recordMap: StoreRecordMap;
|
|
@@ -103,7 +103,7 @@ export interface DateInputProps extends HoistProps, LayoutProps, HoistInputProps
|
|
|
103
103
|
/**
|
|
104
104
|
* Type of value to publish. Defaults to 'date'. The use of 'localDate' is often a good
|
|
105
105
|
* choice for use cases where there is no time component.
|
|
106
|
-
* @see LocalDate
|
|
106
|
+
* @see LocalDate
|
|
107
107
|
*/
|
|
108
108
|
valueType?: 'date' | 'localDate';
|
|
109
109
|
}
|
|
@@ -67,7 +67,7 @@ export declare class LeftRightChooserModel extends HoistModel {
|
|
|
67
67
|
* Note that this will *not* affect the actual 'value' property, which will continue
|
|
68
68
|
* to include unfiltered records.
|
|
69
69
|
*
|
|
70
|
-
* @see LeftRightChooserFilter
|
|
70
|
+
* @see LeftRightChooserFilter
|
|
71
71
|
* @param fn - predicate function for filtering.
|
|
72
72
|
*/
|
|
73
73
|
setDisplayFilter(fn: FilterTestFn): void;
|
|
@@ -14,7 +14,7 @@ import { HoistService } from '@xh/hoist/core';
|
|
|
14
14
|
* to customize via the global options dialog, or set a default pref value if per-user
|
|
15
15
|
* customization is not desirable.
|
|
16
16
|
*
|
|
17
|
-
* @see RefreshContextModel
|
|
17
|
+
* @see RefreshContextModel
|
|
18
18
|
*/
|
|
19
19
|
export declare class AutoRefreshService extends HoistService {
|
|
20
20
|
xhImpl: boolean;
|
|
@@ -14,9 +14,8 @@ import { HoistService } from '@xh/hoist/core';
|
|
|
14
14
|
*
|
|
15
15
|
* Several additional options can be controlled via soft-config - see below.
|
|
16
16
|
*
|
|
17
|
-
* @see XH.showChangelog
|
|
18
|
-
* @see whatsNewButton
|
|
19
|
-
* the currently deployed app version. Installed by default in desktop appBar.
|
|
17
|
+
* @see XH.showChangelog
|
|
18
|
+
* @see whatsNewButton
|
|
20
19
|
*/
|
|
21
20
|
export declare class ChangelogService extends HoistService {
|
|
22
21
|
xhImpl: boolean;
|
|
@@ -4,31 +4,33 @@ import { Span } from '@xh/hoist/utils/telemetry';
|
|
|
4
4
|
import { PromiseTimeoutSpec } from '@xh/hoist/promise';
|
|
5
5
|
import { StatusCodes } from 'http-status-codes';
|
|
6
6
|
import { IStringifyOptions } from 'qs';
|
|
7
|
+
export interface FetchServiceDefaults {
|
|
8
|
+
autoGenCorrelationIds?: boolean | ((opts: FetchOptions) => boolean);
|
|
9
|
+
correlationIdHeaderKey?: string;
|
|
10
|
+
genCorrelationId?: () => string;
|
|
11
|
+
}
|
|
7
12
|
/**
|
|
8
13
|
* Service for making managed HTTP requests, both to the app's own Hoist server and to remote APIs.
|
|
9
14
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* included, and redirects followed.
|
|
15
|
+
* Typically accessed via `XH.fetchService` or the convenience methods on XH — `XH.fetch()`,
|
|
16
|
+
* `XH.fetchJson()`, `XH.postJson()`, `XH.putJson()`, `XH.deleteJson()` — which delegate here.
|
|
13
17
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* {@link FetchOptions.correlationId}.
|
|
18
|
+
* Wraps the standard Fetch API with CORS enabled, credentials included, and redirects followed.
|
|
19
|
+
* Provides JSON convenience methods (`fetchJson`, `postJson`, `putJson`, `patchJson`,
|
|
20
|
+
* `deleteJson`, `getJson`) that handle serialization and content-type headers automatically.
|
|
18
21
|
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
22
|
+
* Key features:
|
|
23
|
+
* - Configurable timeouts (default 30s) via {@link FetchOptions.timeout}
|
|
24
|
+
* - Auto-abort of duplicate in-flight requests via {@link FetchOptions.autoAbortKey}
|
|
25
|
+
* - Optional correlation IDs for request tracking (see `defaults.autoGenCorrelationIds`)
|
|
26
|
+
* - Request/response interceptors via {@link addInterceptor}
|
|
27
|
+
* - Default headers for all requests via {@link addDefaultHeaders}
|
|
28
|
+
* - Rich exception handling with HTTP status, server messages, and trace IDs
|
|
21
29
|
*
|
|
22
|
-
*
|
|
30
|
+
* All convenience methods accept the same {@link FetchOptions} as the main `fetch()` entry point.
|
|
23
31
|
*
|
|
24
|
-
*
|
|
25
|
-
* as the main entry point `fetch`, as they delegate to fetch after setting additional defaults.
|
|
32
|
+
* @see FetchOptions
|
|
26
33
|
*/
|
|
27
|
-
export interface FetchServiceDefaults {
|
|
28
|
-
autoGenCorrelationIds?: boolean | ((opts: FetchOptions) => boolean);
|
|
29
|
-
correlationIdHeaderKey?: string;
|
|
30
|
-
genCorrelationId?: () => string;
|
|
31
|
-
}
|
|
32
34
|
export declare class FetchService extends HoistService {
|
|
33
35
|
static instance: FetchService;
|
|
34
36
|
/** App-level defaults for FetchService. Instance options take precedence. */
|
|
@@ -18,6 +18,8 @@ import {ErrorBoundaryModel} from './ErrorBoundaryModel';
|
|
|
18
18
|
* This wrapper will automatically only catch and handle exceptions that occur during the React
|
|
19
19
|
* lifecycle, but applications that wish to use this component to display other caught exceptions
|
|
20
20
|
* may explicitly use it to handle those exceptions.
|
|
21
|
+
*
|
|
22
|
+
* @see ErrorBoundaryModel
|
|
21
23
|
*/
|
|
22
24
|
export const [ErrorBoundary, errorBoundary] = hoistCmp.withFactory<ErrorBoundaryModel>({
|
|
23
25
|
displayName: 'ErrorBoundary',
|
|
@@ -23,6 +23,18 @@ export interface ErrorBoundaryConfig {
|
|
|
23
23
|
errorRenderer?: (e: unknown) => ReactNode;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Model for an ErrorBoundary component that catches unhandled React lifecycle errors.
|
|
28
|
+
*
|
|
29
|
+
* Tracks a caught error and provides {@link handleError} for applications to programmatically
|
|
30
|
+
* trigger error display for non-lifecycle exceptions. Use {@link showError} to display an
|
|
31
|
+
* already-handled error without re-running the error handler.
|
|
32
|
+
*
|
|
33
|
+
* Configure via `errorHandler` to customize exception handling (defaults to suppressing the
|
|
34
|
+
* alert dialog) and `errorRenderer` to customize the error display.
|
|
35
|
+
*
|
|
36
|
+
* @see ErrorBoundary
|
|
37
|
+
*/
|
|
26
38
|
export class ErrorBoundaryModel extends HoistModel {
|
|
27
39
|
errorHandler: ExceptionHandlerOptions | ((e: unknown) => void);
|
|
28
40
|
errorRenderer: (e: unknown) => ReactNode;
|
|
@@ -131,6 +131,24 @@ export interface FilterChooserConfig {
|
|
|
131
131
|
persistWith?: FilterChooserPersistOptions;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Model for a Select-based filter control that allows users to search for and compose filters
|
|
136
|
+
* across multiple data fields.
|
|
137
|
+
*
|
|
138
|
+
* Manages the current filter value, user-managed favorites, and available field specs. Supports
|
|
139
|
+
* bidirectional binding to a {@link Store} or Cube {@link View} via the `bind` config — filters
|
|
140
|
+
* are automatically applied to the target as they change, and external filter changes on the
|
|
141
|
+
* target are reflected back into this model.
|
|
142
|
+
*
|
|
143
|
+
* Field specs define which fields are available for filtering and how their values are parsed
|
|
144
|
+
* and displayed. If a `valueSource` is provided, field specs can be auto-populated from the
|
|
145
|
+
* source's fields.
|
|
146
|
+
*
|
|
147
|
+
* Supports persistence of both the current filter value and favorites via `persistWith`.
|
|
148
|
+
*
|
|
149
|
+
* @see FilterChooser
|
|
150
|
+
* @see FilterChooserFieldSpec
|
|
151
|
+
*/
|
|
134
152
|
export class FilterChooserModel extends HoistModel {
|
|
135
153
|
@observable.ref value: FilterChooserFilter = null;
|
|
136
154
|
@observable.ref favorites: FilterChooserFilter[] = [];
|
package/cmp/form/Form.ts
CHANGED
|
@@ -57,10 +57,10 @@ export interface FormProps<M extends FormModel = FormModel>
|
|
|
57
57
|
* primarily designed to apply defaults to and manage data binding for FormField components, which
|
|
58
58
|
* can be nested at any level below this parent component.
|
|
59
59
|
*
|
|
60
|
-
* @see FormModel
|
|
61
|
-
* @see FieldModel
|
|
62
|
-
* @see FormField
|
|
63
|
-
* @see HoistInput
|
|
60
|
+
* @see FormModel
|
|
61
|
+
* @see FieldModel
|
|
62
|
+
* @see FormField
|
|
63
|
+
* @see HoistInput
|
|
64
64
|
*/
|
|
65
65
|
export const [Form, form] = hoistCmp.withFactory<FormProps>({
|
|
66
66
|
displayName: 'Form',
|
|
@@ -30,6 +30,15 @@ export interface FormFieldSetConfig {
|
|
|
30
30
|
persistWith?: PersistOptions;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Model for a FormFieldSet — a collapsible container for grouping related form fields.
|
|
35
|
+
*
|
|
36
|
+
* Aggregates validation state from all descendant FieldModels and child FormFieldSetModels,
|
|
37
|
+
* and supports disabling or setting readonly state on all contained fields at once.
|
|
38
|
+
*
|
|
39
|
+
* @see FormFieldSet
|
|
40
|
+
* @see FormModel
|
|
41
|
+
*/
|
|
33
42
|
export class FormFieldSetModel extends CardModel {
|
|
34
43
|
declare config: FormFieldSetConfig;
|
|
35
44
|
|
|
@@ -92,6 +92,22 @@ export interface GroupingChooserPersistOptions extends PersistOptions {
|
|
|
92
92
|
/** Target to which GroupingChooser value changes should be automatically synced. */
|
|
93
93
|
export type GroupingBindTarget = GridModel | View;
|
|
94
94
|
|
|
95
|
+
/**
|
|
96
|
+
* Model for a control that allows users to select and order a list of dimensions for use with
|
|
97
|
+
* grouping APIs, such as Grid `groupBy` or Cube queries.
|
|
98
|
+
*
|
|
99
|
+
* Manages the current dimension selection, available dimensions, user-managed favorites, and
|
|
100
|
+
* drag-and-drop reordering. Supports bidirectional binding to a {@link GridModel} or Cube
|
|
101
|
+
* {@link View} via the `bind` config — grouping changes are automatically applied to the
|
|
102
|
+
* target, and external changes to the target are reflected back into this model.
|
|
103
|
+
*
|
|
104
|
+
* Dimensions can be auto-populated from the bind target or specified explicitly. When binding
|
|
105
|
+
* to a Cube View, {@link CubeField} instances satisfy the {@link DimensionSpec} interface.
|
|
106
|
+
*
|
|
107
|
+
* Supports persistence of both the current value and favorites via `persistWith`.
|
|
108
|
+
*
|
|
109
|
+
* @see GroupingChooser
|
|
110
|
+
*/
|
|
95
111
|
export class GroupingChooserModel extends HoistModel {
|
|
96
112
|
/** App-level defaults for GroupingChooserModel. Instance config takes precedence. */
|
|
97
113
|
static defaults: GroupingChooserModelDefaults = {
|
|
@@ -21,6 +21,14 @@ export interface PinPadConfig {
|
|
|
21
21
|
subHeaderText?: string;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Model for a PinPad — a numeric keypad prompt for collecting a PIN from the user.
|
|
26
|
+
*
|
|
27
|
+
* Tracks entered digits, validates PIN completion, and provides observable `value` and
|
|
28
|
+
* `isComplete` getters. Supports configurable PIN length and custom header/subheader text.
|
|
29
|
+
*
|
|
30
|
+
* @see PinPad
|
|
31
|
+
*/
|
|
24
32
|
export class PinPadModel extends HoistModel {
|
|
25
33
|
@bindable disabled: boolean;
|
|
26
34
|
@bindable headerText: string;
|
|
@@ -13,16 +13,6 @@ import {uniq} from 'lodash';
|
|
|
13
13
|
|
|
14
14
|
import {TreeMapAlgorithm, TreeMapColorMode, TreeMapModel, TreeMapConfig} from './TreeMapModel';
|
|
15
15
|
|
|
16
|
-
/**
|
|
17
|
-
* Core Model for a SplitTreeMap.
|
|
18
|
-
*
|
|
19
|
-
* Binds to a Store (or GridModel) and splits the data into two managed child TreeMaps.
|
|
20
|
-
* Users should specify a `mapFilter` function to control how records are divided
|
|
21
|
-
* across the two TreeMaps.
|
|
22
|
-
*
|
|
23
|
-
* Additionally, accepts and passes along all settings for TreeMapModel.
|
|
24
|
-
* @see TreeMapModel
|
|
25
|
-
*/
|
|
26
16
|
export interface SplitTreeMapConfig extends TreeMapConfig {
|
|
27
17
|
/**
|
|
28
18
|
* Filter used to allocate records between the primary and secondary maps.
|
|
@@ -40,6 +30,16 @@ export interface SplitTreeMapConfig extends TreeMapConfig {
|
|
|
40
30
|
orientation?: SplitTreeMapOrientation;
|
|
41
31
|
}
|
|
42
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Core Model for a SplitTreeMap.
|
|
35
|
+
*
|
|
36
|
+
* Binds to a Store (or GridModel) and splits the data into two managed child TreeMaps.
|
|
37
|
+
* Users should specify a `mapFilter` function to control how records are divided
|
|
38
|
+
* across the two TreeMaps.
|
|
39
|
+
*
|
|
40
|
+
* Additionally, accepts and passes along all settings for TreeMapModel.
|
|
41
|
+
* @see TreeMapModel
|
|
42
|
+
*/
|
|
43
43
|
export class SplitTreeMapModel extends HoistModel {
|
|
44
44
|
//------------------------
|
|
45
45
|
// Immutable public properties
|