@xh/hoist 83.1.0 → 84.0.1
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 +76 -0
- package/admin/tabs/cluster/instances/logs/levels/LogLevelDialogModel.ts +106 -10
- package/admin/tabs/cluster/metrics/MetricsModel.ts +3 -3
- package/appcontainer/AppContainerModel.ts +1 -1
- package/appcontainer/README.md +20 -0
- package/assets.d.ts +34 -0
- package/build/types/cmp/ag-grid/AgGrid.d.ts +8 -19
- package/build/types/cmp/ag-grid/AgGridModel.d.ts +18 -5
- package/build/types/cmp/card/Card.d.ts +9 -4
- package/build/types/cmp/card/CardModel.d.ts +15 -2
- package/build/types/cmp/chart/Chart.d.ts +2 -2
- package/build/types/cmp/chart/ChartModel.d.ts +11 -1
- package/build/types/cmp/dataview/DataView.d.ts +4 -2
- package/build/types/cmp/dataview/DataViewModel.d.ts +16 -4
- package/build/types/cmp/filter/FilterChooserModel.d.ts +7 -1
- package/build/types/cmp/form/Form.d.ts +2 -1
- package/build/types/cmp/form/FormModel.d.ts +12 -0
- package/build/types/cmp/form/field/BaseFieldModel.d.ts +7 -0
- package/build/types/cmp/form/formfieldset/FormFieldSetModel.d.ts +7 -1
- package/build/types/cmp/grid/GridModel.d.ts +16 -1
- package/build/types/cmp/grid/GridSorter.d.ts +14 -0
- package/build/types/cmp/grid/Types.d.ts +18 -0
- package/build/types/cmp/grid/columns/Column.d.ts +40 -2
- package/build/types/cmp/grid/columns/ColumnGroup.d.ts +10 -0
- package/build/types/cmp/grouping/GroupingChooserModel.d.ts +9 -2
- package/build/types/cmp/layout/Box.d.ts +19 -7
- package/build/types/cmp/layout/Frame.d.ts +17 -5
- package/build/types/cmp/loadingindicator/LoadingIndicator.d.ts +6 -4
- package/build/types/cmp/pinpad/PinPadModel.d.ts +6 -1
- package/build/types/cmp/spinner/Spinner.d.ts +31 -10
- package/build/types/cmp/tab/TabContainerModel.d.ts +11 -0
- package/build/types/cmp/tab/TabModel.d.ts +7 -0
- package/build/types/cmp/tab/Types.d.ts +4 -0
- package/build/types/cmp/treemap/TreeMapModel.d.ts +3 -3
- package/build/types/cmp/viewmanager/ViewManagerModel.d.ts +9 -0
- package/build/types/cmp/zoneGrid/ZoneGridModel.d.ts +22 -3
- package/build/types/cmp/zoneGrid/impl/ZoneMapperModel.d.ts +6 -0
- package/build/types/core/HoistComponent.d.ts +29 -8
- package/build/types/core/HoistProps.d.ts +9 -3
- package/build/types/core/load/LoadSpec.d.ts +1 -1
- package/build/types/core/persist/provider/ViewManagerProvider.d.ts +7 -0
- package/build/types/data/Store.d.ts +35 -1
- package/build/types/data/StoreSelectionModel.d.ts +18 -2
- package/build/types/data/cube/Cube.d.ts +26 -6
- package/build/types/data/cube/Query.d.ts +10 -0
- package/build/types/data/cube/View.d.ts +21 -2
- package/build/types/data/cube/aggregate/Aggregator.d.ts +13 -0
- package/build/types/data/cube/aggregate/AverageAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/AverageStrictAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/ChildCountAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/LeafCountAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/MaxAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/MinAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/NullAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/SingleAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/SumAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/SumStrictAggregator.d.ts +1 -0
- package/build/types/data/cube/aggregate/UniqueAggregator.d.ts +1 -0
- package/build/types/data/filter/BaseFilterFieldSpec.d.ts +9 -0
- package/build/types/data/filter/Types.d.ts +12 -0
- package/build/types/desktop/cmp/button/AppMenuButton.d.ts +5 -0
- package/build/types/desktop/cmp/button/Button.d.ts +5 -1
- package/build/types/desktop/cmp/dash/canvas/DashCanvasModel.d.ts +12 -3
- package/build/types/desktop/cmp/dash/container/DashContainerModel.d.ts +9 -0
- package/build/types/desktop/cmp/dock/DockViewModel.d.ts +7 -0
- package/build/types/desktop/cmp/filechooser/FileChooserModel.d.ts +8 -0
- package/build/types/desktop/cmp/grid/editors/BooleanEditor.d.ts +1 -0
- package/build/types/desktop/cmp/grid/editors/DateEditor.d.ts +1 -0
- package/build/types/desktop/cmp/grid/editors/NumberEditor.d.ts +1 -0
- package/build/types/desktop/cmp/grid/editors/SelectEditor.d.ts +1 -0
- package/build/types/desktop/cmp/grid/editors/TextAreaEditor.d.ts +1 -0
- package/build/types/desktop/cmp/grid/editors/TextEditor.d.ts +1 -0
- package/build/types/desktop/cmp/input/Picker.d.ts +1 -1
- package/build/types/desktop/cmp/input/SegmentedControl.d.ts +16 -2
- package/build/types/desktop/cmp/leftrightchooser/LeftRightChooserModel.d.ts +7 -0
- package/build/types/desktop/cmp/modalsupport/ModalSupportModel.d.ts +28 -2
- package/build/types/desktop/cmp/panel/Panel.d.ts +5 -2
- package/build/types/desktop/cmp/panel/PanelModel.d.ts +12 -2
- package/build/types/desktop/cmp/rest/RestGrid.d.ts +10 -0
- package/build/types/desktop/cmp/rest/RestGridModel.d.ts +9 -1
- package/build/types/desktop/cmp/toolbar/Toolbar.d.ts +4 -1
- package/build/types/format/FormatDate.d.ts +4 -4
- package/build/types/icon/Icon.d.ts +3 -0
- package/build/types/kit/blueprint/Wrappers.d.ts +12 -1
- package/build/types/mobile/cmp/navigator/NavigatorModel.d.ts +8 -0
- package/build/types/mobile/cmp/navigator/PageModel.d.ts +7 -0
- package/build/types/mobile/cmp/panel/DialogPanel.d.ts +0 -2
- package/build/types/security/BaseOAuthClient.d.ts +9 -0
- package/build/types/security/authzero/AuthZeroClient.d.ts +6 -0
- package/build/types/security/msal/MsalClient.d.ts +6 -0
- package/build/types/svc/FetchService.d.ts +10 -7
- package/build/types/svc/TraceService.d.ts +17 -2
- package/build/types/utils/async/Timer.d.ts +6 -0
- package/build/types/utils/js/LangUtils.d.ts +1 -1
- package/build/types/utils/js/TestUtils.d.ts +1 -1
- package/build/types/utils/react/index.d.ts +0 -1
- package/build/types/utils/telemetry/Span.d.ts +12 -2
- package/cmp/ag-grid/AgGrid.ts +8 -19
- package/cmp/ag-grid/AgGridModel.ts +18 -5
- package/cmp/card/Card.ts +9 -4
- package/cmp/card/CardModel.ts +15 -2
- package/cmp/chart/Chart.ts +2 -2
- package/cmp/chart/ChartModel.ts +11 -1
- package/cmp/dataview/DataView.ts +4 -2
- package/cmp/dataview/DataViewModel.ts +16 -4
- package/cmp/filter/FilterChooserModel.ts +7 -1
- package/cmp/form/Form.ts +2 -1
- package/cmp/form/FormModel.ts +12 -0
- package/cmp/form/README.md +13 -0
- package/cmp/form/field/BaseFieldModel.ts +7 -0
- package/cmp/form/formfieldset/FormFieldSetModel.ts +7 -1
- package/cmp/grid/Grid.scss +14 -8
- package/cmp/grid/GridModel.ts +16 -1
- package/cmp/grid/GridSorter.ts +14 -0
- package/cmp/grid/README.md +12 -0
- package/cmp/grid/Types.ts +18 -0
- package/cmp/grid/columns/Column.ts +40 -2
- package/cmp/grid/columns/ColumnGroup.ts +10 -0
- package/cmp/grouping/GroupingChooserModel.ts +9 -2
- package/cmp/layout/Box.ts +19 -7
- package/cmp/layout/Frame.ts +17 -5
- package/cmp/layout/README.md +16 -21
- package/cmp/loadingindicator/LoadingIndicator.scss +1 -1
- package/cmp/loadingindicator/LoadingIndicator.ts +11 -9
- package/cmp/pinpad/PinPadModel.ts +6 -1
- package/cmp/spinner/Spinner.scss +13 -0
- package/cmp/spinner/Spinner.ts +58 -20
- package/cmp/tab/TabContainerModel.ts +11 -0
- package/cmp/tab/TabModel.ts +7 -0
- package/cmp/tab/Types.ts +4 -0
- package/cmp/treemap/TreeMapModel.ts +3 -3
- package/cmp/viewmanager/ViewManagerModel.ts +9 -0
- package/cmp/zoneGrid/ZoneGridModel.ts +22 -3
- package/cmp/zoneGrid/impl/ZoneMapperModel.ts +6 -0
- package/core/ExceptionHandler.ts +1 -1
- package/core/HoistComponent.ts +36 -11
- package/core/HoistProps.ts +9 -3
- package/core/README.md +68 -6
- package/core/impl/InstanceManager.ts +1 -0
- package/core/load/LoadSpec.ts +1 -1
- package/core/persist/provider/ViewManagerProvider.ts +7 -0
- package/data/README.md +48 -124
- package/data/Store.ts +35 -1
- package/data/StoreSelectionModel.ts +18 -2
- package/data/cube/Cube.ts +26 -6
- package/data/cube/Query.ts +10 -0
- package/data/cube/README.md +236 -0
- package/data/cube/View.ts +21 -2
- package/data/cube/aggregate/Aggregator.ts +13 -0
- package/data/cube/aggregate/AverageAggregator.ts +1 -0
- package/data/cube/aggregate/AverageStrictAggregator.ts +1 -0
- package/data/cube/aggregate/ChildCountAggregator.ts +1 -0
- package/data/cube/aggregate/LeafCountAggregator.ts +1 -0
- package/data/cube/aggregate/MaxAggregator.ts +1 -0
- package/data/cube/aggregate/MinAggregator.ts +1 -0
- package/data/cube/aggregate/NullAggregator.ts +1 -0
- package/data/cube/aggregate/SingleAggregator.ts +1 -0
- package/data/cube/aggregate/SumAggregator.ts +1 -0
- package/data/cube/aggregate/SumStrictAggregator.ts +1 -0
- package/data/cube/aggregate/UniqueAggregator.ts +1 -0
- package/data/filter/BaseFilterFieldSpec.ts +9 -0
- package/data/filter/Types.ts +12 -0
- package/desktop/README.md +131 -9
- package/desktop/appcontainer/AboutDialog.ts +2 -0
- package/desktop/appcontainer/Banner.ts +5 -2
- package/desktop/appcontainer/ChangelogDialog.ts +1 -0
- package/desktop/appcontainer/ExceptionDialog.ts +4 -0
- package/desktop/appcontainer/ExceptionDialogDetails.ts +4 -1
- package/desktop/appcontainer/FeedbackDialog.ts +4 -1
- package/desktop/appcontainer/ImpersonationBar.ts +4 -0
- package/desktop/appcontainer/LockoutPanel.ts +4 -1
- package/desktop/appcontainer/LoginPanel.ts +7 -3
- package/desktop/appcontainer/Message.ts +9 -3
- package/desktop/appcontainer/OptionsDialog.ts +3 -1
- package/desktop/appcontainer/VersionBar.ts +1 -0
- package/desktop/appcontainer/suspend/IdlePanel.ts +4 -4
- package/desktop/appcontainer/suspend/SuspendPanel.ts +3 -0
- package/desktop/cmp/button/AppMenuButton.ts +5 -0
- package/desktop/cmp/button/Button.ts +14 -4
- package/desktop/cmp/dash/README.md +14 -0
- package/desktop/cmp/dash/canvas/DashCanvasModel.ts +12 -3
- package/desktop/cmp/dash/container/DashContainerModel.ts +9 -0
- package/desktop/cmp/dock/DockViewModel.ts +7 -0
- package/desktop/cmp/filechooser/FileChooserModel.ts +9 -2
- package/desktop/cmp/grid/editors/BooleanEditor.ts +1 -0
- package/desktop/cmp/grid/editors/DateEditor.ts +1 -0
- package/desktop/cmp/grid/editors/NumberEditor.ts +1 -0
- package/desktop/cmp/grid/editors/SelectEditor.ts +1 -0
- package/desktop/cmp/grid/editors/TextAreaEditor.ts +1 -0
- package/desktop/cmp/grid/editors/TextEditor.ts +1 -0
- package/desktop/cmp/input/Picker.ts +2 -2
- package/desktop/cmp/input/SegmentedControl.ts +20 -2
- package/desktop/cmp/leftrightchooser/LeftRightChooserModel.ts +7 -0
- package/desktop/cmp/modalsupport/ModalSupportModel.ts +31 -2
- package/desktop/cmp/panel/Panel.ts +29 -21
- package/desktop/cmp/panel/PanelModel.ts +12 -2
- package/desktop/cmp/panel/README.md +20 -0
- package/desktop/cmp/rest/RestGrid.ts +10 -0
- package/desktop/cmp/rest/RestGridModel.ts +9 -1
- package/desktop/cmp/toolbar/Toolbar.ts +9 -2
- package/desktop/cmp/viewmanager/ViewManager.ts +1 -1
- package/docs/README.md +9 -4
- package/docs/coding-conventions.md +29 -21
- package/docs/doc-registry.json +31 -15
- package/docs/planning/docs-roadmap-log.md +11 -0
- package/docs/planning/docs-roadmap.md +1 -0
- package/docs/upgrade-notes/v84-upgrade-notes.md +136 -0
- package/docs/version-compatibility.md +2 -0
- package/format/FormatDate.ts +4 -4
- package/icon/Icon.ts +9 -0
- package/icon/README.md +62 -22
- package/icon/index.ts +24 -0
- package/kit/README.md +8 -2
- package/kit/blueprint/Wrappers.ts +12 -1
- package/mcp/README.md +47 -26
- package/mcp/cli/ts.ts +39 -4
- package/mcp/data/ts-registry.ts +57 -17
- package/mcp/tools/typescript.ts +32 -4
- package/mobile/appcontainer/AboutDialog.ts +3 -0
- package/mobile/appcontainer/Banner.ts +2 -0
- package/mobile/appcontainer/ExceptionDialog.ts +4 -0
- package/mobile/appcontainer/ExceptionDialogDetails.ts +1 -0
- package/mobile/appcontainer/FeedbackDialog.ts +4 -1
- package/mobile/appcontainer/ImpersonationBar.ts +2 -0
- package/mobile/appcontainer/LockoutPanel.ts +2 -0
- package/mobile/appcontainer/LoginPanel.ts +7 -3
- package/mobile/appcontainer/Message.ts +9 -3
- package/mobile/appcontainer/OptionsDialog.ts +5 -1
- package/mobile/appcontainer/VersionBar.ts +1 -0
- package/mobile/appcontainer/suspend/IdlePanel.ts +5 -6
- package/mobile/appcontainer/suspend/SuspendPanel.ts +3 -0
- package/mobile/cmp/navigator/NavigatorModel.ts +8 -0
- package/mobile/cmp/navigator/PageModel.ts +7 -0
- package/mobile/cmp/panel/DialogPanel.ts +0 -2
- package/package.json +11 -11
- package/security/BaseOAuthClient.ts +9 -0
- package/security/authzero/AuthZeroClient.ts +6 -0
- package/security/msal/MsalClient.ts +6 -0
- package/styles/vars.scss +14 -0
- package/svc/FetchService.ts +25 -15
- package/svc/README.md +39 -9
- package/svc/TraceService.ts +69 -11
- package/utils/README.md +0 -1
- package/utils/async/Timer.ts +6 -0
- package/utils/js/LangUtils.ts +1 -1
- package/utils/js/TestUtils.ts +1 -1
- package/utils/react/index.ts +0 -1
- package/utils/telemetry/Span.ts +21 -4
- package/build/types/utils/react/ClassName.d.ts +0 -14
- package/utils/react/ClassName.ts +0 -24
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { PersistenceProvider, PersistenceProviderConfig } from '../PersistenceProvider';
|
|
2
2
|
import type { ViewManagerModel } from '@xh/hoist/cmp/viewmanager/ViewManagerModel';
|
|
3
|
+
/**
|
|
4
|
+
* PersistenceProvider that delegates state storage to a ViewManagerModel, enabling components
|
|
5
|
+
* to persist their state as part of user-managed named views.
|
|
6
|
+
*
|
|
7
|
+
* @see ViewManagerModel
|
|
8
|
+
* @see PersistenceProvider
|
|
9
|
+
*/
|
|
3
10
|
export declare class ViewManagerProvider<S> extends PersistenceProvider<S> {
|
|
4
11
|
readonly viewManagerModel: ViewManagerModel;
|
|
5
12
|
constructor(cfg: PersistenceProviderConfig<S>);
|
|
@@ -3,6 +3,20 @@ import { HoistBase, PlainObject, Some } from '@xh/hoist/core';
|
|
|
3
3
|
import { Field, FieldSpec, Filter, FilterBindTarget, FilterLike, FilterValueSource, StoreRecord, StoreRecordId, StoreRecordOrId, StoreValidationMessagesMap, StoreValidationResultsMap, ValidationResult } from '@xh/hoist/data';
|
|
4
4
|
import { StoreValidator } from '@xh/hoist/data/impl/StoreValidator';
|
|
5
5
|
import { RecordSet } from './impl/RecordSet';
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for a {@link Store}. At minimum, provide `fields` (or let them be inferred
|
|
8
|
+
* from GridModel columns). Data can be supplied at construction via `data`, or loaded later
|
|
9
|
+
* via `Store.loadData()`.
|
|
10
|
+
*
|
|
11
|
+
* Can also be passed inline as the `store` config on {@link GridConfig}, where it will be
|
|
12
|
+
* used to construct a Store automatically.
|
|
13
|
+
*
|
|
14
|
+
* See the data package README (`data/README.md`) for tree data, filtering, validation, and
|
|
15
|
+
* performance tuning guidance.
|
|
16
|
+
*
|
|
17
|
+
* @see Store
|
|
18
|
+
* @see FieldSpec
|
|
19
|
+
*/
|
|
6
20
|
export interface StoreConfig {
|
|
7
21
|
/** Field names, configs, or instances. */
|
|
8
22
|
fields?: Array<string | FieldSpec | Field>;
|
|
@@ -135,7 +149,27 @@ export interface ChildRawData {
|
|
|
135
149
|
}
|
|
136
150
|
export type StoreRecordIdSpec = string | ((data: PlainObject) => StoreRecordId);
|
|
137
151
|
/**
|
|
138
|
-
* A managed
|
|
152
|
+
* A managed, observable collection of in-memory {@link StoreRecord}s - the core data container
|
|
153
|
+
* in Hoist. Used directly by applications and as the data source for {@link GridModel},
|
|
154
|
+
* {@link DataViewModel}, and other data-bound components.
|
|
155
|
+
*
|
|
156
|
+
* Stores provide:
|
|
157
|
+
* - Observable record collections with filtering via composable {@link Filter} objects
|
|
158
|
+
* - Hierarchical/tree data with parent-child navigation
|
|
159
|
+
* - Local modification tracking (add/modify/remove) with commit/revert
|
|
160
|
+
* - Record reuse across data reloads to preserve grid row state
|
|
161
|
+
* - Pluggable validation via {@link Field} rules
|
|
162
|
+
*
|
|
163
|
+
* Data is loaded via `loadData()` (full replacement) or `updateData()` (transactional). Fields
|
|
164
|
+
* can be defined explicitly or inferred from GridModel columns. `Store.defaults` provides
|
|
165
|
+
* app-wide configuration.
|
|
166
|
+
*
|
|
167
|
+
* See the data package README (`data/README.md`) for full documentation including tree data,
|
|
168
|
+
* filtering patterns, validation, and common pitfalls.
|
|
169
|
+
*
|
|
170
|
+
* @see StoreConfig
|
|
171
|
+
* @see StoreRecord
|
|
172
|
+
* @see Field
|
|
139
173
|
*/
|
|
140
174
|
export declare class Store extends HoistBase implements FilterBindTarget, FilterValueSource, GridFilterBindTarget {
|
|
141
175
|
/** App-level defaults for Store. Instance config takes precedence. */
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
import { HoistModel } from '@xh/hoist/core';
|
|
2
2
|
import { Store } from './Store';
|
|
3
3
|
import { StoreRecord, StoreRecordId, StoreRecordOrId } from './StoreRecord';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for a {@link StoreSelectionModel}. Typically passed via the `selModel` config
|
|
6
|
+
* on {@link GridConfig} rather than constructed directly.
|
|
7
|
+
*
|
|
8
|
+
* @see StoreSelectionModel
|
|
9
|
+
*/
|
|
4
10
|
export interface StoreSelectionConfig {
|
|
5
11
|
store?: Store;
|
|
6
12
|
mode?: 'single' | 'multiple' | 'disabled';
|
|
13
|
+
/** @internal */
|
|
7
14
|
xhImpl?: boolean;
|
|
8
15
|
}
|
|
9
16
|
/**
|
|
10
|
-
* Model for managing
|
|
11
|
-
*
|
|
17
|
+
* Model for managing record selection within a {@link Store}. Supports `single`, `multiple`,
|
|
18
|
+
* and `disabled` modes.
|
|
19
|
+
*
|
|
20
|
+
* Typically accessed via `gridModel.selModel` rather than created directly - configure via
|
|
21
|
+
* the `selModel` property on {@link GridConfig}.
|
|
22
|
+
*
|
|
23
|
+
* Key observables for reacting to selection state: `selectedRecord` / `selectedRecords`
|
|
24
|
+
* (reactive to both identity and data changes), `selectedId` / `selectedIds` (identity only),
|
|
25
|
+
* `isEmpty`, `count`. Use `select()` and `clear()` for programmatic control.
|
|
26
|
+
*
|
|
27
|
+
* @see StoreSelectionConfig
|
|
12
28
|
*/
|
|
13
29
|
export declare class StoreSelectionModel extends HoistModel {
|
|
14
30
|
readonly store: Store;
|
|
@@ -9,6 +9,16 @@ import { BaseRow } from './row/BaseRow';
|
|
|
9
9
|
import { BucketRow } from './row/BucketRow';
|
|
10
10
|
import { View } from './View';
|
|
11
11
|
import { ViewRowData } from './ViewRowData';
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for a {@link Cube}. Provide `fields` (including at least one dimension
|
|
14
|
+
* and one or more measures with aggregators) and load data via `data` or
|
|
15
|
+
* `Cube.loadDataAsync()`.
|
|
16
|
+
*
|
|
17
|
+
* See the Cube package README (`data/cube/README.md`) for aggregator options and usage patterns.
|
|
18
|
+
*
|
|
19
|
+
* @see Cube
|
|
20
|
+
* @see CubeFieldSpec
|
|
21
|
+
*/
|
|
12
22
|
export interface CubeConfig {
|
|
13
23
|
fields: CubeField[] | CubeFieldSpec[];
|
|
14
24
|
/** Default configs applied to all `CubeField`s constructed internally by this Cube. */
|
|
@@ -64,13 +74,23 @@ export type OmitFn = (row: AggregateRow | BucketRow) => boolean;
|
|
|
64
74
|
*/
|
|
65
75
|
export type BucketSpecFn = (rows: BaseRow[]) => BucketSpec;
|
|
66
76
|
/**
|
|
67
|
-
*
|
|
77
|
+
* Client-side OLAP-style data structure for multi-dimensional grouping and aggregation.
|
|
78
|
+
*
|
|
79
|
+
* A Cube wraps a flat {@link Store} of leaf-level records and supports creating {@link View}s
|
|
80
|
+
* via structured {@link Query} objects. Each View filters, groups, and aggregates the source
|
|
81
|
+
* data into a hierarchical result for use in tree grids, treemaps, and other visualizations.
|
|
82
|
+
*
|
|
83
|
+
* Fields are defined as {@link CubeField}s - each marked as either a dimension (groupable)
|
|
84
|
+
* or a measure with an {@link Aggregator} (e.g. SUM, AVG, MIN, MAX). Views can be transient
|
|
85
|
+
* (run a query once) or connected for efficient, auto-updating results as source data changes.
|
|
86
|
+
*
|
|
87
|
+
* See the Cube package README (`data/cube/README.md`) for full documentation including
|
|
88
|
+
* aggregator options, querying patterns, and View integration with Store/GridModel.
|
|
68
89
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
* auto-updating results in response to updates to the underlying data.
|
|
90
|
+
* @see CubeConfig
|
|
91
|
+
* @see CubeField
|
|
92
|
+
* @see View
|
|
93
|
+
* @see Query
|
|
74
94
|
*/
|
|
75
95
|
export declare class Cube extends HoistBase {
|
|
76
96
|
static RECORD_ID_DELIMITER: string;
|
|
@@ -3,6 +3,16 @@ import { Cube } from './Cube';
|
|
|
3
3
|
import { CubeField } from './CubeField';
|
|
4
4
|
/**
|
|
5
5
|
* Queries determine what data is extracted, grouped, and aggregated from a {@link Cube}.
|
|
6
|
+
* Passed via the `query` property of {@link ViewConfig} when creating a View.
|
|
7
|
+
*
|
|
8
|
+
* Key options beyond `dimensions` and `filter`: `includeRoot` adds a grand-total row,
|
|
9
|
+
* `includeLeaves` exposes source records as tree children, and `provideLeaves` makes them
|
|
10
|
+
* accessible programmatically without rendering in the tree.
|
|
11
|
+
*
|
|
12
|
+
* See the Cube package README (`data/cube/README.md#querying-with-views`) for query patterns.
|
|
13
|
+
*
|
|
14
|
+
* @see Cube
|
|
15
|
+
* @see View
|
|
6
16
|
*/
|
|
7
17
|
export interface QueryConfig {
|
|
8
18
|
/**
|
|
@@ -5,6 +5,15 @@ import { ViewRowData } from '@xh/hoist/data/cube/ViewRowData';
|
|
|
5
5
|
import { AggregationContext } from './aggregate/AggregationContext';
|
|
6
6
|
import { BaseRow } from './row/BaseRow';
|
|
7
7
|
import { LeafRow } from './row/LeafRow';
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for a {@link View} - a query result from a {@link Cube} that can optionally
|
|
10
|
+
* stay connected for live updates. Create via {@link Cube.createView}.
|
|
11
|
+
*
|
|
12
|
+
* See the Cube package README (`data/cube/README.md`) for query patterns.
|
|
13
|
+
*
|
|
14
|
+
* @see View
|
|
15
|
+
* @see QueryConfig
|
|
16
|
+
*/
|
|
8
17
|
export interface ViewConfig {
|
|
9
18
|
/** Query to be used to construct this view. */
|
|
10
19
|
query: Query;
|
|
@@ -31,8 +40,18 @@ export interface DimensionValue {
|
|
|
31
40
|
values: Set<any>;
|
|
32
41
|
}
|
|
33
42
|
/**
|
|
34
|
-
* Primary interface for consuming grouped and aggregated data from
|
|
35
|
-
*
|
|
43
|
+
* Primary interface for consuming grouped and aggregated data from a {@link Cube}.
|
|
44
|
+
* Created via {@link Cube.createView} with a {@link QueryConfig} and optional connected
|
|
45
|
+
* stores. Views can be transient (run once) or connected for auto-updating results.
|
|
46
|
+
*
|
|
47
|
+
* Use `updateQuery()` to change dimensions, filters, or options dynamically.
|
|
48
|
+
*
|
|
49
|
+
* See the Cube package README (`data/cube/README.md`) for query patterns and examples
|
|
50
|
+
* of grand totals, leaf drill-down, and store integration.
|
|
51
|
+
*
|
|
52
|
+
* @see ViewConfig
|
|
53
|
+
* @see QueryConfig
|
|
54
|
+
* @see Cube
|
|
36
55
|
*/
|
|
37
56
|
export declare class View extends HoistBase implements FilterBindTarget, FilterValueSource, GridFilterBindTarget {
|
|
38
57
|
static isView(obj: unknown): obj is View;
|
|
@@ -2,6 +2,19 @@ import { AggregationContext } from './AggregationContext';
|
|
|
2
2
|
import { BaseRow } from '../row/BaseRow';
|
|
3
3
|
import { LeafRow } from '../row/LeafRow';
|
|
4
4
|
import { RowUpdate } from '../row/RowUpdate';
|
|
5
|
+
/**
|
|
6
|
+
* Abstract base class for Cube field aggregation functions.
|
|
7
|
+
*
|
|
8
|
+
* Subclasses implement {@link aggregate} to compute a summary value for a set of rows, and
|
|
9
|
+
* may optionally override {@link replace} to efficiently update the aggregation when a single
|
|
10
|
+
* child row changes (the default re-aggregates from scratch).
|
|
11
|
+
*
|
|
12
|
+
* Standard implementations are provided for common operations: sum, average, min, max,
|
|
13
|
+
* unique, count, and null. Custom aggregators can extend this class for application-specific
|
|
14
|
+
* aggregation logic.
|
|
15
|
+
*
|
|
16
|
+
* @see CubeField.aggregator
|
|
17
|
+
*/
|
|
5
18
|
export declare abstract class Aggregator {
|
|
6
19
|
/**
|
|
7
20
|
* Does this aggregator depend only on leaf nodes contained by the node being aggregated?
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Aggregator } from './Aggregator';
|
|
2
|
+
/** Averages numeric values, returning null if any leaf value is null. */
|
|
2
3
|
export declare class AverageStrictAggregator extends Aggregator {
|
|
3
4
|
aggregate(rows: any, fieldName: any): number;
|
|
4
5
|
replace(rows: any, currAgg: any, update: any, context: any): any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Aggregator } from './Aggregator';
|
|
2
|
+
/** Returns the count of all leaf (non-aggregate) descendant rows. */
|
|
2
3
|
export declare class LeafCountAggregator extends Aggregator {
|
|
3
4
|
aggregate(rows: any, fieldName: any): number;
|
|
4
5
|
replace(rows: any, currAgg: any, update: any, context: any): any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Aggregator } from './Aggregator';
|
|
2
|
+
/** Returns the maximum value across rows, skipping nulls. */
|
|
2
3
|
export declare class MaxAggregator extends Aggregator {
|
|
3
4
|
aggregate(rows: any, fieldName: any): any;
|
|
4
5
|
replace(rows: any, currAgg: any, update: any, context: any): any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Aggregator } from './Aggregator';
|
|
2
|
+
/** Returns the minimum value across rows, skipping nulls. */
|
|
2
3
|
export declare class MinAggregator extends Aggregator {
|
|
3
4
|
aggregate(rows: any, fieldName: any): any;
|
|
4
5
|
replace(rows: any, currAgg: any, update: any, context: any): any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Aggregator } from './Aggregator';
|
|
2
|
+
/** Sums numeric values, returning null if any value is null. */
|
|
2
3
|
export declare class SumStrictAggregator extends Aggregator {
|
|
3
4
|
aggregate(rows: any, fieldName: any): any;
|
|
4
5
|
replace(rows: any, currAgg: any, update: any, context: any): any;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Aggregator } from './Aggregator';
|
|
2
|
+
/** Returns the value if all rows share the same value, otherwise null. */
|
|
2
3
|
export declare class UniqueAggregator extends Aggregator {
|
|
3
4
|
aggregate(rows: any, fieldName: any): any;
|
|
4
5
|
replace(rows: any, currAgg: any, update: any, context: any): any;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { HoistBase } from '@xh/hoist/core';
|
|
2
2
|
import { Field, FieldType, FilterValueSource } from '@xh/hoist/data';
|
|
3
3
|
import { FieldFilterOperator } from './Types';
|
|
4
|
+
/**
|
|
5
|
+
* Base configuration for field-level filtering options - defines available operators, value
|
|
6
|
+
* enumeration, and display metadata. Not used directly by applications; extended by
|
|
7
|
+
* {@link GridFilterFieldSpecConfig} (for column-header filters via {@link GridFilterModelConfig})
|
|
8
|
+
* and {@link FilterChooserFieldSpecConfig} (for {@link FilterChooserModel}).
|
|
9
|
+
*
|
|
10
|
+
* @see GridFilterFieldSpec
|
|
11
|
+
* @see FilterChooserFieldSpec
|
|
12
|
+
*/
|
|
4
13
|
export interface BaseFilterFieldSpecConfig {
|
|
5
14
|
/** Identifying field name to filter on. */
|
|
6
15
|
field: string;
|
|
@@ -3,6 +3,10 @@ import type { Filter } from './Filter';
|
|
|
3
3
|
import type { StoreRecord, Field, FieldType } from '../';
|
|
4
4
|
export type FilterLike = Filter | FilterSpec | FilterTestFn | FilterLike[];
|
|
5
5
|
export type FilterSpec = FieldFilterSpec | FunctionFilterSpec | CompoundFilterSpec;
|
|
6
|
+
/**
|
|
7
|
+
* Plain-object form of a {@link FieldFilter} - a single field/operator/value condition.
|
|
8
|
+
* Can be passed anywhere a {@link FilterLike} is accepted.
|
|
9
|
+
*/
|
|
6
10
|
export interface FieldFilterSpec {
|
|
7
11
|
/** Name of Field to filter or Field instance. */
|
|
8
12
|
field: string | Field;
|
|
@@ -13,6 +17,10 @@ export interface FieldFilterSpec {
|
|
|
13
17
|
valueType?: FieldType;
|
|
14
18
|
}
|
|
15
19
|
export type FieldFilterOperator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'like' | 'not like' | 'begins' | 'not begins' | 'ends' | 'not ends' | 'includes' | 'excludes';
|
|
20
|
+
/**
|
|
21
|
+
* Plain-object form of a {@link CompoundFilter} - a group of filters joined by AND/OR.
|
|
22
|
+
* Can be passed anywhere a {@link FilterLike} is accepted.
|
|
23
|
+
*/
|
|
16
24
|
export interface CompoundFilterSpec {
|
|
17
25
|
/** Collection of Filters or configs to create. */
|
|
18
26
|
filters: FilterLike[];
|
|
@@ -20,6 +28,10 @@ export interface CompoundFilterSpec {
|
|
|
20
28
|
op?: CompoundFilterOperator;
|
|
21
29
|
}
|
|
22
30
|
export type CompoundFilterOperator = 'AND' | 'OR' | 'and' | 'or';
|
|
31
|
+
/**
|
|
32
|
+
* Plain-object form of a {@link FunctionFilter} - a custom function-based filter.
|
|
33
|
+
* Can be passed anywhere a {@link FilterLike} is accepted.
|
|
34
|
+
*/
|
|
23
35
|
export interface FunctionFilterSpec {
|
|
24
36
|
/** Key used to identify this FunctionFilter.*/
|
|
25
37
|
key: string;
|
|
@@ -40,5 +40,10 @@ export interface AppMenuButtonProps extends ButtonProps {
|
|
|
40
40
|
renderWithUserProfile?: boolean | RenderWithUserProfileCustomFn;
|
|
41
41
|
}
|
|
42
42
|
type RenderWithUserProfileCustomFn = (user: HoistUser) => ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* Application-level menu button rendered in the AppBar. Provides a dropdown menu with standard
|
|
45
|
+
* items for About, Admin, Feedback, Options, Theme, Impersonation, Changelog, and Logout.
|
|
46
|
+
* Individual items can be hidden via props, and custom items added via `extraItems`.
|
|
47
|
+
*/
|
|
43
48
|
export declare const AppMenuButton: import("react").FC<AppMenuButtonProps>, appMenuButton: import("@xh/hoist/core").ElementFactory<AppMenuButtonProps>;
|
|
44
49
|
export {};
|
|
@@ -19,10 +19,14 @@ export interface ButtonProps<M extends HoistModel = null> extends HoistProps<M>,
|
|
|
19
19
|
/** Alias for title. */
|
|
20
20
|
tooltip?: string;
|
|
21
21
|
}
|
|
22
|
+
export interface ButtonDefaults {
|
|
23
|
+
minimal?: boolean;
|
|
24
|
+
outlined?: boolean;
|
|
25
|
+
}
|
|
22
26
|
/**
|
|
23
27
|
* Wrapper around Blueprint's Button component. Defaults to the `minimal` style for reduced chrome
|
|
24
28
|
* and adds layout support for top-level sizing and margin/padding props.
|
|
25
29
|
*
|
|
26
30
|
* Relays all other props supported by Blueprint's button.
|
|
27
31
|
*/
|
|
28
|
-
export declare const Button:
|
|
32
|
+
export declare const Button: any, button: import("@xh/hoist/core").ElementFactory<ButtonProps<null>>;
|
|
@@ -2,6 +2,15 @@ import type { LayoutItem } from 'react-grid-layout';
|
|
|
2
2
|
import { Persistable, PersistableState } from '@xh/hoist/core';
|
|
3
3
|
import { DashCanvasViewModel, DashCanvasViewSpec, DashConfig, DashViewState, DashModel } from '../';
|
|
4
4
|
import '@xh/hoist/desktop/register';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for a {@link DashCanvasModel} - a grid-based dashboard layout with
|
|
7
|
+
* drag-and-drop positioning and resizing of views.
|
|
8
|
+
*
|
|
9
|
+
* See the dash package README (`desktop/cmp/dash/README.md`) for architecture and usage.
|
|
10
|
+
*
|
|
11
|
+
* @see DashCanvasModel
|
|
12
|
+
* @see DashCanvasViewSpec
|
|
13
|
+
*/
|
|
5
14
|
export interface DashCanvasConfig extends DashConfig<DashCanvasViewSpec, DashCanvasItemState> {
|
|
6
15
|
/**
|
|
7
16
|
* Total number of columns (x coordinates for views correspond with column numbers).
|
|
@@ -14,7 +23,7 @@ export interface DashCanvasConfig extends DashConfig<DashCanvasViewSpec, DashCan
|
|
|
14
23
|
*/
|
|
15
24
|
rowHeight?: number;
|
|
16
25
|
/**
|
|
17
|
-
* Compaction strategy for condensing empty space. Use `'wrap'` with caution
|
|
26
|
+
* Compaction strategy for condensing empty space. Use `'wrap'` with caution - it only
|
|
18
27
|
* works well if all items are 1 row high. Default `'vertical'`.
|
|
19
28
|
*/
|
|
20
29
|
compact?: boolean | 'vertical' | 'horizontal' | 'wrap';
|
|
@@ -113,7 +122,7 @@ export declare class DashCanvasModel extends DashModel<DashCanvasViewSpec, DashC
|
|
|
113
122
|
* Add a view to the canvas.
|
|
114
123
|
* @param specId - ID of the DashCanvasViewSpec to add.
|
|
115
124
|
* @param opts - optional title, state, dimensions, and position. `position` accepts a view
|
|
116
|
-
* ID in addition to the enumerated values
|
|
125
|
+
* ID in addition to the enumerated values - the new view will take that view's position.
|
|
117
126
|
*/
|
|
118
127
|
addView(specId: string, opts?: {
|
|
119
128
|
title?: string;
|
|
@@ -139,7 +148,7 @@ export declare class DashCanvasModel extends DashModel<DashCanvasViewSpec, DashC
|
|
|
139
148
|
ensureViewVisible(id: string): void;
|
|
140
149
|
/**
|
|
141
150
|
* Handle a completed drop from react-grid-layout. Creates the new view from `draggedInView`
|
|
142
|
-
* and places it at the drop location. Called by the DashCanvas component
|
|
151
|
+
* and places it at the drop location. Called by the DashCanvas component - not typically
|
|
143
152
|
* called directly by application code.
|
|
144
153
|
*/
|
|
145
154
|
onDrop(rglLayout: LayoutItem[], layoutItem: LayoutItem, evt: Event): void;
|
|
@@ -3,6 +3,15 @@ import { DashContainerViewModel } from '@xh/hoist/desktop/cmp/dash/container/Das
|
|
|
3
3
|
import { GoldenLayout } from '@xh/hoist/kit/golden-layout';
|
|
4
4
|
import { DashConfig, DashModel } from '../';
|
|
5
5
|
import { DashContainerViewSpec } from './DashContainerViewSpec';
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for a {@link DashContainerModel} - a tab-and-stack based dashboard layout
|
|
8
|
+
* with draggable, resizable views powered by GoldenLayout.
|
|
9
|
+
*
|
|
10
|
+
* See the dash package README (`desktop/cmp/dash/README.md`) for architecture and usage.
|
|
11
|
+
*
|
|
12
|
+
* @see DashContainerModel
|
|
13
|
+
* @see DashViewSpec
|
|
14
|
+
*/
|
|
6
15
|
export interface DashContainerConfig extends DashConfig<DashContainerViewSpec, DashContainerViewState> {
|
|
7
16
|
/** Strategy for rendering DashContainerViews. Can also be set per-view in `viewSpecs`*/
|
|
8
17
|
renderMode?: RenderMode;
|
|
@@ -3,6 +3,13 @@ import { ModalSupportModel } from '@xh/hoist/desktop/cmp/modalsupport/ModalSuppo
|
|
|
3
3
|
import '@xh/hoist/desktop/register';
|
|
4
4
|
import { ReactElement } from 'react';
|
|
5
5
|
import { DockContainerModel } from './DockContainerModel';
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for a {@link DockViewModel} - a dockable view within a
|
|
8
|
+
* {@link DockContainerModel}.
|
|
9
|
+
*
|
|
10
|
+
* @see DockViewModel
|
|
11
|
+
* @see DockContainerModel
|
|
12
|
+
*/
|
|
6
13
|
export interface DockViewConfig {
|
|
7
14
|
/** Unique identifier for this DockViewModel. */
|
|
8
15
|
id: string;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { GridModel } from '@xh/hoist/cmp/grid';
|
|
2
2
|
import { HoistModel } from '@xh/hoist/core';
|
|
3
3
|
import '@xh/hoist/desktop/register';
|
|
4
|
+
/**
|
|
5
|
+
* Model managing file selection state for a FileChooser component.
|
|
6
|
+
*
|
|
7
|
+
* Tracks selected files, supports add/remove/clear operations, and de-duplicates by filename.
|
|
8
|
+
* Includes a managed GridModel to display selected files with name and size columns.
|
|
9
|
+
*
|
|
10
|
+
* @see FileChooser
|
|
11
|
+
*/
|
|
4
12
|
export declare class FileChooserModel extends HoistModel {
|
|
5
13
|
files: File[];
|
|
6
14
|
lastRejectedCount: number;
|
|
@@ -12,4 +12,5 @@ export interface BooleanEditorProps extends EditorProps<CheckboxProps> {
|
|
|
12
12
|
*/
|
|
13
13
|
quickToggle?: boolean;
|
|
14
14
|
}
|
|
15
|
+
/** Checkbox-based inline cell editor for boolean values in a Grid. */
|
|
15
16
|
export declare const BooleanEditor: import("react").FC<BooleanEditorProps>, booleanEditor: import("@xh/hoist/core").ElementFactory<BooleanEditorProps>;
|
|
@@ -3,4 +3,5 @@ import '@xh/hoist/desktop/register';
|
|
|
3
3
|
import { EditorProps } from './EditorProps';
|
|
4
4
|
import './Editors.scss';
|
|
5
5
|
export type DateEditorProps = EditorProps<DateInputProps>;
|
|
6
|
+
/** Date picker inline cell editor with calendar popover rendered within the grid viewport. */
|
|
6
7
|
export declare const DateEditor: import("react").FC<DateEditorProps>, dateEditor: import("@xh/hoist/core").ElementFactory<DateEditorProps>;
|
|
@@ -3,4 +3,5 @@ import '@xh/hoist/desktop/register';
|
|
|
3
3
|
import { EditorProps } from './EditorProps';
|
|
4
4
|
import './Editors.scss';
|
|
5
5
|
export type NumberEditorProps = EditorProps<NumberInputProps>;
|
|
6
|
+
/** Numeric input inline cell editor with guards to reject non-numeric key presses. */
|
|
6
7
|
export declare const NumberEditor: import("react").FC<NumberEditorProps>, numberEditor: import("@xh/hoist/core").ElementFactory<NumberEditorProps>;
|
|
@@ -3,4 +3,5 @@ import '@xh/hoist/desktop/register';
|
|
|
3
3
|
import { EditorProps } from './EditorProps';
|
|
4
4
|
import './Editors.scss';
|
|
5
5
|
export type SelectEditorProps = EditorProps<SelectProps>;
|
|
6
|
+
/** Dropdown select inline cell editor for choice fields in a Grid. */
|
|
6
7
|
export declare const SelectEditor: import("react").FC<SelectEditorProps>, selectEditor: import("@xh/hoist/core").ElementFactory<SelectEditorProps>;
|
|
@@ -3,4 +3,5 @@ import { TextAreaProps } from '../../input';
|
|
|
3
3
|
import { EditorProps } from './EditorProps';
|
|
4
4
|
import './Editors.scss';
|
|
5
5
|
export type TextAreaEditorProps = EditorProps<TextAreaProps>;
|
|
6
|
+
/** Multi-line text input inline cell editor for long-form string values in a Grid. */
|
|
6
7
|
export declare const TextAreaEditor: import("react").FC<TextAreaEditorProps>, textAreaEditor: import("@xh/hoist/core").ElementFactory<TextAreaEditorProps>;
|
|
@@ -3,4 +3,5 @@ import '@xh/hoist/desktop/register';
|
|
|
3
3
|
import { EditorProps } from './EditorProps';
|
|
4
4
|
import './Editors.scss';
|
|
5
5
|
export type TextEditorProps = EditorProps<TextInputProps>;
|
|
6
|
+
/** Text input inline cell editor for string values in a Grid. */
|
|
6
7
|
export declare const TextEditor: import("react").FC<TextEditorProps>, textEditor: import("@xh/hoist/core").ElementFactory<TextEditorProps>;
|
|
@@ -101,7 +101,7 @@ export interface PickerProps extends HoistProps, HoistInputProps, LayoutProps, S
|
|
|
101
101
|
* Receives an array of selected option objects, the full list of option objects, and the
|
|
102
102
|
* configured `displayNoun` (if any). Return a ReactNode for display. Overrides the default
|
|
103
103
|
* button text, including any `displayNoun`-based summary. Does not replace the button
|
|
104
|
-
* itself
|
|
104
|
+
* itself - use `buttonProps` to customize the button's icon, intent, or other properties.
|
|
105
105
|
*/
|
|
106
106
|
buttonTextRenderer?: (selectedOpts: SelectOption[], allOpts: SelectOption[], displayNoun: string) => ReactNode;
|
|
107
107
|
/**
|
|
@@ -23,9 +23,9 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
|
|
|
23
23
|
* with value/label/icon/disabled properties, or a primitive value used as both
|
|
24
24
|
* the value and the display label.
|
|
25
25
|
*/
|
|
26
|
-
options:
|
|
26
|
+
options: Array<SegmentedControlOption | SegmentedControlNullOption | OptionPrimitive>;
|
|
27
27
|
/**
|
|
28
|
-
* True to render with an outlined style
|
|
28
|
+
* True to render with an outlined style - a border around the control tray
|
|
29
29
|
* with no inner background fill. Border color follows the current intent.
|
|
30
30
|
*/
|
|
31
31
|
outlined?: boolean;
|
|
@@ -40,6 +40,20 @@ export interface SegmentedControlOption {
|
|
|
40
40
|
/** True to disable this individual option. */
|
|
41
41
|
disabled?: boolean;
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Variant of SegmentedControlOption for representing a null/"no value" selection.
|
|
45
|
+
* Label is required to force use case to override default js 'null' toString rendering.
|
|
46
|
+
*/
|
|
47
|
+
export interface SegmentedControlNullOption {
|
|
48
|
+
/** Null value for this option. */
|
|
49
|
+
value: null;
|
|
50
|
+
/** Display label - required for null options. */
|
|
51
|
+
label: string;
|
|
52
|
+
/** Icon element, displayed before the label. */
|
|
53
|
+
icon?: ReactElement;
|
|
54
|
+
/** True to disable this individual option. */
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
}
|
|
43
57
|
/**
|
|
44
58
|
* An input for selecting a single value from a small set of mutually exclusive options,
|
|
45
59
|
* rendered as a group of toggle buttons with clear visual indication of the active
|
|
@@ -2,6 +2,12 @@ import { GridModel, GridSorterLike } from '@xh/hoist/cmp/grid';
|
|
|
2
2
|
import { HoistModel, HSide, Some } from '@xh/hoist/core';
|
|
3
3
|
import '@xh/hoist/desktop/register';
|
|
4
4
|
import { FilterTestFn, StoreRecord } from '@xh/hoist/data';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for a {@link LeftRightChooserModel} - a dual-list control for moving items
|
|
7
|
+
* between "available" (left) and "selected" (right) collections.
|
|
8
|
+
*
|
|
9
|
+
* @see LeftRightChooserModel
|
|
10
|
+
*/
|
|
5
11
|
export interface LeftRightChooserConfig {
|
|
6
12
|
data?: LeftRightChooserItem[];
|
|
7
13
|
/** True to globally prevent the user from moving items between sides. */
|
|
@@ -24,6 +30,7 @@ export interface LeftRightChooserConfig {
|
|
|
24
30
|
rightGroupingEnabled?: boolean;
|
|
25
31
|
rightGroupingExpanded?: boolean;
|
|
26
32
|
rightEmptyText?: string;
|
|
33
|
+
/** @internal */
|
|
27
34
|
xhImpl?: boolean;
|
|
28
35
|
}
|
|
29
36
|
/** Data record object for a LeftRightChooser value item. */
|
|
@@ -1,14 +1,40 @@
|
|
|
1
1
|
import { HoistModel } from '@xh/hoist/core';
|
|
2
2
|
import '@xh/hoist/desktop/register';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration for a {@link ModalSupportModel}. Passed via the `modalSupport` config on
|
|
5
|
+
* {@link PanelConfig} - set to `true` for defaults or provide a config object to customize
|
|
6
|
+
* the dialog dimensions and behavior.
|
|
7
|
+
*
|
|
8
|
+
* @see ModalSupportModel
|
|
9
|
+
* @see PanelModel
|
|
10
|
+
*/
|
|
3
11
|
export interface ModalSupportConfig {
|
|
12
|
+
/** Width of the modal dialog. Default `'90vw'`. */
|
|
4
13
|
width?: string | number;
|
|
14
|
+
/** Height of the modal dialog. Default `'90vh'`. */
|
|
5
15
|
height?: string | number;
|
|
16
|
+
/** True to start in modal (popped-out) state. Default `false`. */
|
|
6
17
|
defaultModal?: boolean;
|
|
18
|
+
/** True to allow closing the modal by clicking outside it. Default `true`. */
|
|
7
19
|
canOutsideClickClose?: boolean;
|
|
8
20
|
}
|
|
9
21
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
22
|
+
* Model enabling a {@link Panel}'s content to toggle between inline and modal (floating
|
|
23
|
+
* dialog) display while preserving all component state.
|
|
24
|
+
*
|
|
25
|
+
* Uses a React portal to move a single persistent DOM host node between an inline container
|
|
26
|
+
* and a Blueprint Dialog. Because the child component is rendered into the host node once
|
|
27
|
+
* and the node is physically relocated (not re-mounted), all React component state, MobX
|
|
28
|
+
* subscriptions, and DOM state (scroll position, focus, ag-Grid state, etc.) are preserved
|
|
29
|
+
* across toggles.
|
|
30
|
+
*
|
|
31
|
+
* This is the key advantage over the alternative of mounting a second copy of a component
|
|
32
|
+
* inside a separate dialog - ModalSupport guarantees zero state loss on toggle.
|
|
33
|
+
*
|
|
34
|
+
* Not created directly by applications - enable via `modalSupport` on {@link PanelConfig}.
|
|
35
|
+
*
|
|
36
|
+
* @see ModalSupportConfig
|
|
37
|
+
* @see PanelModel
|
|
12
38
|
*/
|
|
13
39
|
export declare class ModalSupportModel extends HoistModel {
|
|
14
40
|
xhImpl: boolean;
|