@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
|
@@ -42,20 +42,30 @@ export interface ButtonProps<M extends HoistModel = null>
|
|
|
42
42
|
tooltip?: string;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
export interface ButtonDefaults {
|
|
46
|
+
minimal?: boolean;
|
|
47
|
+
outlined?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
45
50
|
/**
|
|
46
51
|
* Wrapper around Blueprint's Button component. Defaults to the `minimal` style for reduced chrome
|
|
47
52
|
* and adds layout support for top-level sizing and margin/padding props.
|
|
48
53
|
*
|
|
49
54
|
* Relays all other props supported by Blueprint's button.
|
|
50
55
|
*/
|
|
51
|
-
export const [Button, button] = hoistCmp.withFactory<ButtonProps>({
|
|
56
|
+
export const [Button, button] = hoistCmp.withFactory<ButtonProps, ButtonDefaults>({
|
|
52
57
|
displayName: 'Button',
|
|
53
58
|
model: false,
|
|
54
59
|
className: 'xh-button',
|
|
60
|
+
defaults: {
|
|
61
|
+
minimal: true,
|
|
62
|
+
outlined: false
|
|
63
|
+
},
|
|
55
64
|
|
|
56
65
|
render(props, ref) {
|
|
57
66
|
const [layoutProps, nonLayoutProps] = splitLayoutProps(props),
|
|
58
|
-
classes = []
|
|
67
|
+
classes = [],
|
|
68
|
+
{defaults} = Button;
|
|
59
69
|
|
|
60
70
|
const {
|
|
61
71
|
autoFocus,
|
|
@@ -63,9 +73,9 @@ export const [Button, button] = hoistCmp.withFactory<ButtonProps>({
|
|
|
63
73
|
disabled,
|
|
64
74
|
icon,
|
|
65
75
|
intent,
|
|
66
|
-
minimal =
|
|
76
|
+
minimal = defaults.minimal,
|
|
67
77
|
onClick,
|
|
68
|
-
outlined,
|
|
78
|
+
outlined = defaults.outlined,
|
|
69
79
|
rightIcon,
|
|
70
80
|
style,
|
|
71
81
|
text,
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Dashboard
|
|
2
2
|
|
|
3
|
+
| Section | Description |
|
|
4
|
+
|---------|-------------|
|
|
5
|
+
| [Overview](#overview) | Dashboard system intro, DashContainer vs DashCanvas comparison |
|
|
6
|
+
| [Architecture](#architecture) | Model hierarchy, ViewSpec/ViewModel lifecycle |
|
|
7
|
+
| [DashContainer](#dashcontainer) | Space-filling tabbed/tiled layout via GoldenLayout |
|
|
8
|
+
| [DashCanvas](#dashcanvas) | Scrollable grid-based widget layout via react-grid-layout |
|
|
9
|
+
| [DashCanvasWidgetChooser](#dashcanvaswidgetchooser) | UI for adding widgets to a DashCanvas |
|
|
10
|
+
| [Common Features](#common-features) | ViewSpecs, state persistence, publishing, refresh |
|
|
11
|
+
| [Widget Content Patterns](#widget-content-patterns) | Implementing widget views and their models |
|
|
12
|
+
| [Common Patterns](#common-patterns) | Initialization, programmatic layout, view management |
|
|
13
|
+
| [Common Pitfalls](#common-pitfalls) | Frequent issues and how to avoid them |
|
|
14
|
+
| [Key Source Files](#key-source-files) | Primary source files for the dash package |
|
|
15
|
+
| [Related Packages](#related-packages) | Links to related hoist-react packages |
|
|
16
|
+
|
|
3
17
|
## Overview
|
|
4
18
|
|
|
5
19
|
The `/desktop/cmp/dash/` package provides Hoist's dashboard system — configurable layouts where
|
|
@@ -32,6 +32,15 @@ import {
|
|
|
32
32
|
compact
|
|
33
33
|
} from 'lodash';
|
|
34
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Configuration for a {@link DashCanvasModel} - a grid-based dashboard layout with
|
|
37
|
+
* drag-and-drop positioning and resizing of views.
|
|
38
|
+
*
|
|
39
|
+
* See the dash package README (`desktop/cmp/dash/README.md`) for architecture and usage.
|
|
40
|
+
*
|
|
41
|
+
* @see DashCanvasModel
|
|
42
|
+
* @see DashCanvasViewSpec
|
|
43
|
+
*/
|
|
35
44
|
export interface DashCanvasConfig extends DashConfig<DashCanvasViewSpec, DashCanvasItemState> {
|
|
36
45
|
/**
|
|
37
46
|
* Total number of columns (x coordinates for views correspond with column numbers).
|
|
@@ -46,7 +55,7 @@ export interface DashCanvasConfig extends DashConfig<DashCanvasViewSpec, DashCan
|
|
|
46
55
|
rowHeight?: number;
|
|
47
56
|
|
|
48
57
|
/**
|
|
49
|
-
* Compaction strategy for condensing empty space. Use `'wrap'` with caution
|
|
58
|
+
* Compaction strategy for condensing empty space. Use `'wrap'` with caution - it only
|
|
50
59
|
* works well if all items are 1 row high. Default `'vertical'`.
|
|
51
60
|
*/
|
|
52
61
|
compact?: boolean | 'vertical' | 'horizontal' | 'wrap';
|
|
@@ -336,7 +345,7 @@ export class DashCanvasModel
|
|
|
336
345
|
* Add a view to the canvas.
|
|
337
346
|
* @param specId - ID of the DashCanvasViewSpec to add.
|
|
338
347
|
* @param opts - optional title, state, dimensions, and position. `position` accepts a view
|
|
339
|
-
* ID in addition to the enumerated values
|
|
348
|
+
* ID in addition to the enumerated values - the new view will take that view's position.
|
|
340
349
|
*/
|
|
341
350
|
@action
|
|
342
351
|
addView(
|
|
@@ -411,7 +420,7 @@ export class DashCanvasModel
|
|
|
411
420
|
|
|
412
421
|
/**
|
|
413
422
|
* Handle a completed drop from react-grid-layout. Creates the new view from `draggedInView`
|
|
414
|
-
* and places it at the drop location. Called by the DashCanvas component
|
|
423
|
+
* and places it at the drop location. Called by the DashCanvas component - not typically
|
|
415
424
|
* called directly by application code.
|
|
416
425
|
*/
|
|
417
426
|
onDrop(rglLayout: LayoutItem[], layoutItem: LayoutItem, evt: Event) {
|
|
@@ -50,6 +50,15 @@ import {
|
|
|
50
50
|
} from './impl/DashContainerUtils';
|
|
51
51
|
import {showContextMenu} from '@xh/hoist/kit/blueprint';
|
|
52
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Configuration for a {@link DashContainerModel} - a tab-and-stack based dashboard layout
|
|
55
|
+
* with draggable, resizable views powered by GoldenLayout.
|
|
56
|
+
*
|
|
57
|
+
* See the dash package README (`desktop/cmp/dash/README.md`) for architecture and usage.
|
|
58
|
+
*
|
|
59
|
+
* @see DashContainerModel
|
|
60
|
+
* @see DashViewSpec
|
|
61
|
+
*/
|
|
53
62
|
export interface DashContainerConfig extends DashConfig<
|
|
54
63
|
DashContainerViewSpec,
|
|
55
64
|
DashContainerViewState
|
|
@@ -22,6 +22,13 @@ import {throwIf} from '@xh/hoist/utils/js';
|
|
|
22
22
|
import {ReactElement} from 'react';
|
|
23
23
|
import {DockContainerModel} from './DockContainerModel';
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Configuration for a {@link DockViewModel} - a dockable view within a
|
|
27
|
+
* {@link DockContainerModel}.
|
|
28
|
+
*
|
|
29
|
+
* @see DockViewModel
|
|
30
|
+
* @see DockContainerModel
|
|
31
|
+
*/
|
|
25
32
|
export interface DockViewConfig {
|
|
26
33
|
/** Unique identifier for this DockViewModel. */
|
|
27
34
|
id: string;
|
|
@@ -10,10 +10,17 @@ import {actionCol, calcActionColWidth} from '@xh/hoist/desktop/cmp/grid';
|
|
|
10
10
|
import '@xh/hoist/desktop/register';
|
|
11
11
|
import {Icon} from '@xh/hoist/icon';
|
|
12
12
|
import {action, makeObservable, observable} from '@xh/hoist/mobx';
|
|
13
|
-
import {isEmpty} from 'codemirror/src/util/misc';
|
|
14
13
|
import {filesize} from 'filesize';
|
|
15
|
-
import {find, uniqBy, without} from 'lodash';
|
|
14
|
+
import {find, isEmpty, uniqBy, without} from 'lodash';
|
|
16
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Model managing file selection state for a FileChooser component.
|
|
18
|
+
*
|
|
19
|
+
* Tracks selected files, supports add/remove/clear operations, and de-duplicates by filename.
|
|
20
|
+
* Includes a managed GridModel to display selected files with name and size columns.
|
|
21
|
+
*
|
|
22
|
+
* @see FileChooser
|
|
23
|
+
*/
|
|
17
24
|
export class FileChooserModel extends HoistModel {
|
|
18
25
|
@observable.ref
|
|
19
26
|
files: File[] = [];
|
|
@@ -25,6 +25,7 @@ export interface BooleanEditorProps extends EditorProps<CheckboxProps> {
|
|
|
25
25
|
quickToggle?: boolean;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
/** Checkbox-based inline cell editor for boolean values in a Grid. */
|
|
28
29
|
export const [BooleanEditor, booleanEditor] = hoistCmp.withFactory<BooleanEditorProps>({
|
|
29
30
|
displayName: 'BooleanEditor',
|
|
30
31
|
className: 'xh-boolean-editor',
|
|
@@ -14,6 +14,7 @@ import {useInlineEditorModel} from './impl/InlineEditorModel';
|
|
|
14
14
|
|
|
15
15
|
export type DateEditorProps = EditorProps<DateInputProps>;
|
|
16
16
|
|
|
17
|
+
/** Date picker inline cell editor with calendar popover rendered within the grid viewport. */
|
|
17
18
|
export const [DateEditor, dateEditor] = hoistCmp.withFactory<DateEditorProps>({
|
|
18
19
|
displayName: 'DateEditor',
|
|
19
20
|
className: 'xh-date-editor',
|
|
@@ -17,6 +17,7 @@ import {useInlineEditorModel} from './impl/InlineEditorModel';
|
|
|
17
17
|
|
|
18
18
|
export type NumberEditorProps = EditorProps<NumberInputProps>;
|
|
19
19
|
|
|
20
|
+
/** Numeric input inline cell editor with guards to reject non-numeric key presses. */
|
|
20
21
|
export const [NumberEditor, numberEditor] = hoistCmp.withFactory<NumberEditorProps>({
|
|
21
22
|
displayName: 'NumberEditor',
|
|
22
23
|
className: 'xh-number-editor',
|
|
@@ -14,6 +14,7 @@ import {useInlineEditorModel} from './impl/InlineEditorModel';
|
|
|
14
14
|
|
|
15
15
|
export type SelectEditorProps = EditorProps<SelectProps>;
|
|
16
16
|
|
|
17
|
+
/** Dropdown select inline cell editor for choice fields in a Grid. */
|
|
17
18
|
export const [SelectEditor, selectEditor] = hoistCmp.withFactory<SelectEditorProps>({
|
|
18
19
|
displayName: 'SelectEditor',
|
|
19
20
|
className: 'xh-select-editor',
|
|
@@ -13,6 +13,7 @@ import {useInlineEditorModel} from './impl/InlineEditorModel';
|
|
|
13
13
|
|
|
14
14
|
export type TextAreaEditorProps = EditorProps<TextAreaProps>;
|
|
15
15
|
|
|
16
|
+
/** Multi-line text input inline cell editor for long-form string values in a Grid. */
|
|
16
17
|
export const [TextAreaEditor, textAreaEditor] = hoistCmp.withFactory<TextAreaEditorProps>({
|
|
17
18
|
displayName: 'TextAreaEditor',
|
|
18
19
|
className: 'xh-textarea-editor',
|
|
@@ -13,6 +13,7 @@ import {useInlineEditorModel} from './impl/InlineEditorModel';
|
|
|
13
13
|
|
|
14
14
|
export type TextEditorProps = EditorProps<TextInputProps>;
|
|
15
15
|
|
|
16
|
+
/** Text input inline cell editor for string values in a Grid. */
|
|
16
17
|
export const [TextEditor, textEditor] = hoistCmp.withFactory<TextEditorProps>({
|
|
17
18
|
displayName: 'TextEditor',
|
|
18
19
|
className: 'xh-text-editor',
|
|
@@ -151,7 +151,7 @@ export interface PickerProps extends HoistProps, HoistInputProps, LayoutProps, S
|
|
|
151
151
|
* Receives an array of selected option objects, the full list of option objects, and the
|
|
152
152
|
* configured `displayNoun` (if any). Return a ReactNode for display. Overrides the default
|
|
153
153
|
* button text, including any `displayNoun`-based summary. Does not replace the button
|
|
154
|
-
* itself
|
|
154
|
+
* itself - use `buttonProps` to customize the button's icon, intent, or other properties.
|
|
155
155
|
*/
|
|
156
156
|
buttonTextRenderer?: (
|
|
157
157
|
selectedOpts: SelectOption[],
|
|
@@ -440,7 +440,7 @@ const optionsList = hoistCmp.factory<PickerModel>(({model, props}) => {
|
|
|
440
440
|
useVirtual =
|
|
441
441
|
enableVirtual != null ? executeIfFunction(enableVirtual) : filteredOptions.length > 100;
|
|
442
442
|
|
|
443
|
-
// Read selection state so observer re-renders on changes
|
|
443
|
+
// Read selection state so observer re-renders on changes - needed for virtual mode
|
|
444
444
|
// where option rows are not individually observed.
|
|
445
445
|
if (useVirtual) model.getSelectedValues();
|
|
446
446
|
|
|
@@ -41,10 +41,10 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
|
|
|
41
41
|
* with value/label/icon/disabled properties, or a primitive value used as both
|
|
42
42
|
* the value and the display label.
|
|
43
43
|
*/
|
|
44
|
-
options:
|
|
44
|
+
options: Array<SegmentedControlOption | SegmentedControlNullOption | OptionPrimitive>;
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* True to render with an outlined style
|
|
47
|
+
* True to render with an outlined style - a border around the control tray
|
|
48
48
|
* with no inner background fill. Border color follows the current intent.
|
|
49
49
|
*/
|
|
50
50
|
outlined?: boolean;
|
|
@@ -64,6 +64,24 @@ export interface SegmentedControlOption {
|
|
|
64
64
|
disabled?: boolean;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Variant of SegmentedControlOption for representing a null/"no value" selection.
|
|
69
|
+
* Label is required to force use case to override default js 'null' toString rendering.
|
|
70
|
+
*/
|
|
71
|
+
export interface SegmentedControlNullOption {
|
|
72
|
+
/** Null value for this option. */
|
|
73
|
+
value: null;
|
|
74
|
+
|
|
75
|
+
/** Display label - required for null options. */
|
|
76
|
+
label: string;
|
|
77
|
+
|
|
78
|
+
/** Icon element, displayed before the label. */
|
|
79
|
+
icon?: ReactElement;
|
|
80
|
+
|
|
81
|
+
/** True to disable this individual option. */
|
|
82
|
+
disabled?: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
67
85
|
/**
|
|
68
86
|
* An input for selecting a single value from a small set of mutually exclusive options,
|
|
69
87
|
* rendered as a group of toggle buttons with clear visual indication of the active
|
|
@@ -12,6 +12,12 @@ import {Icon} from '@xh/hoist/icon';
|
|
|
12
12
|
import {bindable, computed, makeObservable} from '@xh/hoist/mobx';
|
|
13
13
|
import {FilterTestFn, StoreConfig, StoreRecord} from '@xh/hoist/data';
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Configuration for a {@link LeftRightChooserModel} - a dual-list control for moving items
|
|
17
|
+
* between "available" (left) and "selected" (right) collections.
|
|
18
|
+
*
|
|
19
|
+
* @see LeftRightChooserModel
|
|
20
|
+
*/
|
|
15
21
|
export interface LeftRightChooserConfig {
|
|
16
22
|
data?: LeftRightChooserItem[];
|
|
17
23
|
|
|
@@ -41,6 +47,7 @@ export interface LeftRightChooserConfig {
|
|
|
41
47
|
rightGroupingExpanded?: boolean;
|
|
42
48
|
rightEmptyText?: string;
|
|
43
49
|
|
|
50
|
+
/** @internal */
|
|
44
51
|
xhImpl?: boolean;
|
|
45
52
|
}
|
|
46
53
|
|
|
@@ -10,16 +10,45 @@ import '@xh/hoist/desktop/register';
|
|
|
10
10
|
import {makeObservable, bindable} from '@xh/hoist/mobx';
|
|
11
11
|
import {createObservableRef} from '@xh/hoist/utils/react';
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Configuration for a {@link ModalSupportModel}. Passed via the `modalSupport` config on
|
|
15
|
+
* {@link PanelConfig} - set to `true` for defaults or provide a config object to customize
|
|
16
|
+
* the dialog dimensions and behavior.
|
|
17
|
+
*
|
|
18
|
+
* @see ModalSupportModel
|
|
19
|
+
* @see PanelModel
|
|
20
|
+
*/
|
|
13
21
|
export interface ModalSupportConfig {
|
|
22
|
+
/** Width of the modal dialog. Default `'90vw'`. */
|
|
14
23
|
width?: string | number;
|
|
24
|
+
|
|
25
|
+
/** Height of the modal dialog. Default `'90vh'`. */
|
|
15
26
|
height?: string | number;
|
|
27
|
+
|
|
28
|
+
/** True to start in modal (popped-out) state. Default `false`. */
|
|
16
29
|
defaultModal?: boolean;
|
|
30
|
+
|
|
31
|
+
/** True to allow closing the modal by clicking outside it. Default `true`. */
|
|
17
32
|
canOutsideClickClose?: boolean;
|
|
18
33
|
}
|
|
19
34
|
|
|
20
35
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
36
|
+
* Model enabling a {@link Panel}'s content to toggle between inline and modal (floating
|
|
37
|
+
* dialog) display while preserving all component state.
|
|
38
|
+
*
|
|
39
|
+
* Uses a React portal to move a single persistent DOM host node between an inline container
|
|
40
|
+
* and a Blueprint Dialog. Because the child component is rendered into the host node once
|
|
41
|
+
* and the node is physically relocated (not re-mounted), all React component state, MobX
|
|
42
|
+
* subscriptions, and DOM state (scroll position, focus, ag-Grid state, etc.) are preserved
|
|
43
|
+
* across toggles.
|
|
44
|
+
*
|
|
45
|
+
* This is the key advantage over the alternative of mounting a second copy of a component
|
|
46
|
+
* inside a separate dialog - ModalSupport guarantees zero state loss on toggle.
|
|
47
|
+
*
|
|
48
|
+
* Not created directly by applications - enable via `modalSupport` on {@link PanelConfig}.
|
|
49
|
+
*
|
|
50
|
+
* @see ModalSupportConfig
|
|
51
|
+
* @see PanelModel
|
|
23
52
|
*/
|
|
24
53
|
export class ModalSupportModel extends HoistModel {
|
|
25
54
|
override xhImpl = true;
|
|
@@ -104,16 +104,20 @@ export interface PanelProps<M extends PanelModel = PanelModel>
|
|
|
104
104
|
scrollable?: boolean;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
export interface PanelDefaults {
|
|
108
|
+
compactHeader?: boolean;
|
|
109
|
+
}
|
|
110
|
+
|
|
107
111
|
/**
|
|
108
112
|
* A Panel container builds on the lower-level layout components to offer a header element
|
|
109
113
|
* w/standardized styling, title, and Icon as well as support for top and bottom toolbars.
|
|
110
114
|
*
|
|
111
115
|
* Panels also support resizing and collapsing their contents via its `model` prop. Provide an
|
|
112
|
-
* optional
|
|
116
|
+
* optional {@link PanelModel} config as a prop to enable and customize these features.
|
|
113
117
|
*
|
|
114
118
|
* A Panel will accept a ref argument to provide access to its top level DOM element.
|
|
115
119
|
*/
|
|
116
|
-
export const [Panel, panel] = hoistCmp.withFactory<PanelProps>({
|
|
120
|
+
export const [Panel, panel] = hoistCmp.withFactory<PanelProps, PanelDefaults>({
|
|
117
121
|
displayName: 'Panel',
|
|
118
122
|
model: uses(PanelModel, {
|
|
119
123
|
fromContext: false,
|
|
@@ -121,6 +125,9 @@ export const [Panel, panel] = hoistCmp.withFactory<PanelProps>({
|
|
|
121
125
|
createDefault: () => new PanelModel({collapsible: false, resizable: false, xhImpl: true})
|
|
122
126
|
}),
|
|
123
127
|
className: 'xh-panel',
|
|
128
|
+
defaults: {
|
|
129
|
+
compactHeader: false
|
|
130
|
+
},
|
|
124
131
|
|
|
125
132
|
render({model, className, testId, ...props}, ref) {
|
|
126
133
|
const contextModel = useContextModel('*');
|
|
@@ -128,25 +135,26 @@ export const [Panel, panel] = hoistCmp.withFactory<PanelProps>({
|
|
|
128
135
|
let wasDisplayed = useRef(false),
|
|
129
136
|
[layoutProps, nonLayoutProps] = splitLayoutProps(props);
|
|
130
137
|
|
|
131
|
-
const {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
138
|
+
const {defaults} = Panel,
|
|
139
|
+
{
|
|
140
|
+
tbar,
|
|
141
|
+
bbar,
|
|
142
|
+
title,
|
|
143
|
+
icon,
|
|
144
|
+
compactHeader = defaults.compactHeader,
|
|
145
|
+
collapsedTitle,
|
|
146
|
+
collapsedIcon,
|
|
147
|
+
headerClassName,
|
|
148
|
+
headerItems,
|
|
149
|
+
mask: maskProp,
|
|
150
|
+
loadingIndicator: loadingIndicatorProp,
|
|
151
|
+
contextMenu,
|
|
152
|
+
hotkeys,
|
|
153
|
+
contentBoxProps,
|
|
154
|
+
scrollable,
|
|
155
|
+
children,
|
|
156
|
+
...rest
|
|
157
|
+
} = nonLayoutProps;
|
|
150
158
|
|
|
151
159
|
useLayoutEffect(() => {
|
|
152
160
|
model.enforceSizeLimits();
|
|
@@ -27,6 +27,12 @@ import {createRef} from 'react';
|
|
|
27
27
|
import {ModalSupportConfig, ModalSupportModel} from '../modalsupport/';
|
|
28
28
|
import {ErrorBoundaryConfig, ErrorBoundaryModel} from '@xh/hoist/cmp/error/ErrorBoundaryModel';
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* Configuration for a {@link PanelModel} - controls resizing, collapsing, and modal behavior
|
|
32
|
+
* of a desktop {@link Panel}. Created automatically by Panel when not provided explicitly.
|
|
33
|
+
*
|
|
34
|
+
* @see PanelModel
|
|
35
|
+
*/
|
|
30
36
|
export interface PanelConfig {
|
|
31
37
|
/** Can panel be resized? */
|
|
32
38
|
resizable?: boolean;
|
|
@@ -113,8 +119,12 @@ export interface PanelPersistState {
|
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
/**
|
|
116
|
-
* PanelModel supports configuration and state-management for user-driven Panel resizing
|
|
117
|
-
* expand/collapse, along with support for saving this state via a configured
|
|
122
|
+
* PanelModel supports configuration and state-management for user-driven {@link Panel} resizing
|
|
123
|
+
* and expand/collapse, along with support for saving this state via a configured
|
|
124
|
+
* PersistenceProvider.
|
|
125
|
+
*
|
|
126
|
+
* See the panel package README (`desktop/cmp/panel/README.md`) for sizing, collapsing,
|
|
127
|
+
* and modal support documentation.
|
|
118
128
|
*/
|
|
119
129
|
export class PanelModel extends HoistModel implements Persistable<PanelPersistState> {
|
|
120
130
|
declare config: PanelConfig;
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Panel
|
|
2
2
|
|
|
3
|
+
| Section | Description |
|
|
4
|
+
|---------|-------------|
|
|
5
|
+
| [Overview](#overview) | Panel as the standard desktop container with toolbars and masks |
|
|
6
|
+
| [Basic Usage](#basic-usage) | Minimal panel examples with titles, icons, and toolbars |
|
|
7
|
+
| [Layout](#layout) | Internal vframe structure and content flow |
|
|
8
|
+
| [contentBoxProps](#contentboxprops) | Controlling the inner content frame (padding, flex, scroll) |
|
|
9
|
+
| [scrollable](#scrollable) | Convenience shorthand for vertical content scrolling |
|
|
10
|
+
| [Toolbars](#toolbars) | tbar/bbar, separators, compact mode, and overflow menus |
|
|
11
|
+
| [Panel + Grid Pattern](#panel--grid-pattern) | Common panel-wrapping-grid structure from real apps |
|
|
12
|
+
| [Mask](#mask) | Loading overlays with TaskObserver and onLoad binding |
|
|
13
|
+
| [Collapsing and Resizing](#collapsing-and-resizing) | PanelModel config for collapse, resize, and splitters |
|
|
14
|
+
| [collapsedTitle / collapsedIcon](#collapsedtitle--collapsedicon) | Identifying collapsed panels with custom titles and icons |
|
|
15
|
+
| [compactHeader](#compactheader) | Reduced-size headers for visual hierarchy |
|
|
16
|
+
| [headerItems](#headeritems) | Inline controls in the panel header |
|
|
17
|
+
| [Persistence](#persistence) | Persisting collapsed state and size across sessions |
|
|
18
|
+
| [Modal Support](#modal-support) | Popping panel content into a near-full-screen dialog |
|
|
19
|
+
| [Configuration Reference](#configuration-reference) | Full Panel props and PanelModel config tables |
|
|
20
|
+
| [Common Pitfalls](#common-pitfalls) | mask: 'onLoad' requirements and collapsible panel tips |
|
|
21
|
+
| [Key Source Files](#key-source-files) | Source file locations for Panel and related components |
|
|
22
|
+
|
|
3
23
|
## Overview
|
|
4
24
|
|
|
5
25
|
Panel is the standard container for desktop Hoist application views. Nearly every screen in a Hoist
|
|
@@ -53,6 +53,16 @@ export interface RestGridProps
|
|
|
53
53
|
tbar?: ReactNode;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* A full-featured Grid with a built-in toolbar, record editing form, and refresh support,
|
|
58
|
+
* designed for CRUD operations against REST-style server endpoints.
|
|
59
|
+
*
|
|
60
|
+
* Intended to pair with `RestController` from hoist-core, which provides standard CRUD
|
|
61
|
+
* endpoints for a GORM domain class. RestGrid's underlying {@link RestStore} maps directly
|
|
62
|
+
* to the controller's create/read/update/delete/bulk operations and lookup data support.
|
|
63
|
+
*
|
|
64
|
+
* @see RestGridModel
|
|
65
|
+
*/
|
|
56
66
|
export const [RestGrid, restGrid] = hoistCmp.withFactory<RestGridProps>({
|
|
57
67
|
displayName: 'RestGrid',
|
|
58
68
|
model: uses(RestGridModel, {publishMode: 'limited'}),
|
|
@@ -20,6 +20,13 @@ import {addAction, deleteAction, editAction, viewAction} from './Actions';
|
|
|
20
20
|
import {RestStore, RestStoreConfig} from './data/RestStore';
|
|
21
21
|
import {RestFormModel} from './impl/RestFormModel';
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for a {@link RestGridModel} - extends {@link GridConfig} with CRUD support
|
|
25
|
+
* for editing records via a built-in form backed by a hoist-core `RestController`.
|
|
26
|
+
*
|
|
27
|
+
* @see RestGridModel
|
|
28
|
+
* @see RestGrid
|
|
29
|
+
*/
|
|
23
30
|
export interface RestGridConfig extends GridConfig {
|
|
24
31
|
store?: RestStore | RestStoreConfig;
|
|
25
32
|
|
|
@@ -93,7 +100,8 @@ export interface RestGridModelDefaults {
|
|
|
93
100
|
}
|
|
94
101
|
|
|
95
102
|
/**
|
|
96
|
-
* Core Model for a RestGrid.
|
|
103
|
+
* Core Model for a {@link RestGrid}. Configures the grid's columns, editors, toolbar and
|
|
104
|
+
* context menu actions, and its backing {@link RestStore} for server-side CRUD operations.
|
|
97
105
|
*/
|
|
98
106
|
export class RestGridModel extends HoistModel {
|
|
99
107
|
/** App-level defaults for RestGridModel. Instance config takes precedence. */
|
|
@@ -45,22 +45,29 @@ export interface ToolbarProps extends HoistProps, BoxProps {
|
|
|
45
45
|
minVisibleItems?: number;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
export interface ToolbarDefaults {
|
|
49
|
+
compact?: boolean;
|
|
50
|
+
}
|
|
51
|
+
|
|
48
52
|
/**
|
|
49
53
|
* A toolbar with built-in styling and padding.
|
|
50
54
|
* In horizontal toolbars, items which overflow can be collapsed into a drop-down menu.
|
|
51
55
|
*/
|
|
52
|
-
export const [Toolbar, toolbar] = hoistCmp.withFactory<ToolbarProps>({
|
|
56
|
+
export const [Toolbar, toolbar] = hoistCmp.withFactory<ToolbarProps, ToolbarDefaults>({
|
|
53
57
|
displayName: 'Toolbar',
|
|
54
58
|
model: false,
|
|
55
59
|
memo: false,
|
|
56
60
|
observer: false,
|
|
57
61
|
className: 'xh-toolbar',
|
|
62
|
+
defaults: {
|
|
63
|
+
compact: false
|
|
64
|
+
},
|
|
58
65
|
|
|
59
66
|
render(
|
|
60
67
|
{
|
|
61
68
|
children,
|
|
62
69
|
className,
|
|
63
|
-
compact =
|
|
70
|
+
compact = Toolbar.defaults.compact,
|
|
64
71
|
vertical = false,
|
|
65
72
|
enableOverflowMenu = false,
|
|
66
73
|
collapseFrom = 'end',
|
|
@@ -139,7 +139,7 @@ const menuButton = hoistCmp.factory<ViewManagerLocalModel>({
|
|
|
139
139
|
icon: !isLoading
|
|
140
140
|
? icon
|
|
141
141
|
: box({
|
|
142
|
-
item: spinner({
|
|
142
|
+
item: spinner({compact: true}),
|
|
143
143
|
width: 16.25
|
|
144
144
|
}),
|
|
145
145
|
rightIcon: Icon.chevronDown(),
|
package/docs/README.md
CHANGED
|
@@ -36,6 +36,7 @@ See [`docs-roadmap.md`](./planning/docs-roadmap.md) for documentation coverage t
|
|
|
36
36
|
| Save and restore named view configurations | [`/cmp/viewmanager/`](../cmp/viewmanager/README.md) |
|
|
37
37
|
| Use layout containers (Box, HBox, VBox, Frame) | [`/cmp/layout/`](../cmp/layout/README.md) |
|
|
38
38
|
| Work with Stores, Records, Fields, or Filters | [`/data/`](../data/README.md) |
|
|
39
|
+
| Set up Cube aggregation with Views and Queries | [`/data/cube/`](../data/cube/README.md) |
|
|
39
40
|
| Use FetchService, ConfigService, or PrefService | [`/svc/`](../svc/README.md) |
|
|
40
41
|
| Add distributed tracing spans to operations | [`/svc/`](../svc/README.md) |
|
|
41
42
|
| Format numbers, dates, or currencies | [`/format/`](../format/README.md) |
|
|
@@ -52,6 +53,7 @@ See [`docs-roadmap.md`](./planning/docs-roadmap.md) for documentation coverage t
|
|
|
52
53
|
| Use timers, decorators, LocalDate, or utility hooks | [`/utils/`](../utils/README.md) |
|
|
53
54
|
| Understand app shell, dialogs, toasts, or theming | [`/appcontainer/`](../appcontainer/README.md) |
|
|
54
55
|
| Use icons in buttons, menus, and grids | [`/icon/`](../icon/README.md) |
|
|
56
|
+
| Customize the spinner icon or animation | [`/icon/`](../icon/README.md#spinner-component) |
|
|
55
57
|
| Configure OAuth authentication (Auth0 or MSAL) | [`/security/`](../security/README.md) + [Authentication](./authentication.md) |
|
|
56
58
|
| Debug model instances or detect memory leaks | [`/inspector/`](../inspector/README.md) |
|
|
57
59
|
| Understand third-party library integration | [`/kit/`](../kit/README.md) |
|
|
@@ -70,7 +72,8 @@ See [`docs-roadmap.md`](./planning/docs-roadmap.md) for documentation coverage t
|
|
|
70
72
|
| Package | Description | Key Topics |
|
|
71
73
|
|---------|-------------|------------|
|
|
72
74
|
| [`/core/`](../core/README.md) | Foundation classes defining Hoist's component, model, and service architecture | HoistBase, HoistModel, HoistService, hoistCmp, XH, element factories, decorators, lifecycle |
|
|
73
|
-
| [`/data/`](../data/README.md) | Observable data layer with filtering, validation, and
|
|
75
|
+
| [`/data/`](../data/README.md) | Observable data layer with Store, Field, filtering, validation, and tree data | Store, StoreRecord, Field, Filter, tree data, loadData, processRawData |
|
|
76
|
+
| [`/data/cube/`](../data/cube/README.md) | Client-side OLAP-style aggregation with dimensions, measures, and Views | Cube, CubeField, View, Query, aggregator, dimension, includeRoot, includeLeaves |
|
|
74
77
|
| [`/svc/`](../svc/README.md) | Built-in singleton services for data access and app-wide operations | FetchService, ConfigService, PrefService, IdentityService, TrackService, TraceService, WebSocketService |
|
|
75
78
|
|
|
76
79
|
### Components
|
|
@@ -120,7 +123,7 @@ Cross-cutting documentation that spans multiple packages:
|
|
|
120
123
|
|
|
121
124
|
| Package | Description | Key Topics |
|
|
122
125
|
|---------|-------------|------------|
|
|
123
|
-
| [`/icon/`](../icon/README.md) | Factory-based icon system wrapping FontAwesome Pro | Icon singleton, IconProps, intent coloring, size variants, asHtml, fileIcon, serializeIcon |
|
|
126
|
+
| [`/icon/`](../icon/README.md) | Factory-based icon system wrapping FontAwesome Pro | Icon singleton, IconProps, intent coloring, size variants, asHtml, fileIcon, serializeIcon, Spinner, SpinnerProps |
|
|
124
127
|
| [`/security/`](../security/README.md) | OAuth 2.0 client abstraction for Auth0 and Microsoft Entra ID (MSAL) | BaseOAuthClient, AuthZeroClient, MsalClient, Token, AccessTokenSpec, auto-refresh, re-login |
|
|
125
128
|
| [`/kit/`](../kit/README.md) | Centralized wrappers for third-party libraries used by Hoist | installAgGrid, installHighcharts, Blueprint, Onsen, GoldenLayout, react-select, version constraints |
|
|
126
129
|
| [`/inspector/`](../inspector/README.md) | Built-in developer tool for real-time inspection of Hoist instances and memory | InspectorPanel, StatsModel, InstancesModel, property watchlist, model leak detection |
|
|
@@ -161,6 +164,8 @@ breaking changes, before/after code examples, and verification checklists.
|
|
|
161
164
|
|
|
162
165
|
| Version | Released | Difficulty | Key Changes |
|
|
163
166
|
|---------|----------|------------|-------------|
|
|
167
|
+
| [v84](./upgrade-notes/v84-upgrade-notes.md) | 2026-04-15 | 🟢 LOW | FontAwesome v7, icon-based Spinner, `getClassName` removal, hoistCmp `defaults` |
|
|
168
|
+
| [v83](./upgrade-notes/v83-upgrade-notes.md) | 2026-03-24 | 🟢 LOW | TraceService, static defaults pattern, `downloadjs` removal, `SegmentedControl` |
|
|
164
169
|
| [v82](./upgrade-notes/v82-upgrade-notes.md) | 2026-02-25 | 🟢 LOW | `FetchService` static correlation IDs, `xh-popup--framed` removal, DashContainer CSS wrapper |
|
|
165
170
|
| [v81](./upgrade-notes/v81-upgrade-notes.md) | 2026-02-12 | 🟢 LOW | Panel CSS rename, `completeAuthAsync` return type, Blueprint `Card` → `BpCard` |
|
|
166
171
|
| [v80](./upgrade-notes/v80-upgrade-notes.md) | 2026-01-27 | 🟢 LOW | FormField BEM CSS classes, `appLoadModel` → `appLoadObserver`, jQuery resolution |
|
|
@@ -184,7 +189,7 @@ breaking changes, before/after code examples, and verification checklists.
|
|
|
184
189
|
- [`/CHANGELOG.md`](../CHANGELOG.md) — Version history and release notes (v56+)
|
|
185
190
|
- [`archive/CHANGELOG-pre-v56.md`](./archive/CHANGELOG-pre-v56.md) — Archived changelog for
|
|
186
191
|
versions prior to v56
|
|
187
|
-
- [`changelog-format.md`](./changelog-format.md) —
|
|
188
|
-
|
|
192
|
+
- [`changelog-format.md`](./changelog-format.md) — Conventions for writing and reviewing
|
|
193
|
+
hoist-react library CHANGELOG entries
|
|
189
194
|
- [Toolbox](https://github.com/xh/toolbox) — XH's example application showcasing hoist-react
|
|
190
195
|
patterns and components
|