@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
|
@@ -57,13 +57,16 @@ export interface PanelProps<M extends PanelModel = PanelModel> extends HoistProp
|
|
|
57
57
|
/** Allow the panel content area to scroll vertically. */
|
|
58
58
|
scrollable?: boolean;
|
|
59
59
|
}
|
|
60
|
+
export interface PanelDefaults {
|
|
61
|
+
compactHeader?: boolean;
|
|
62
|
+
}
|
|
60
63
|
/**
|
|
61
64
|
* A Panel container builds on the lower-level layout components to offer a header element
|
|
62
65
|
* w/standardized styling, title, and Icon as well as support for top and bottom toolbars.
|
|
63
66
|
*
|
|
64
67
|
* Panels also support resizing and collapsing their contents via its `model` prop. Provide an
|
|
65
|
-
* optional
|
|
68
|
+
* optional {@link PanelModel} config as a prop to enable and customize these features.
|
|
66
69
|
*
|
|
67
70
|
* A Panel will accept a ref argument to provide access to its top level DOM element.
|
|
68
71
|
*/
|
|
69
|
-
export declare const Panel:
|
|
72
|
+
export declare const Panel: any, panel: import("@xh/hoist/core").ElementFactory<PanelProps<PanelModel>>;
|
|
@@ -3,6 +3,12 @@ import { HoistModel, Persistable, PersistableState, PersistOptions, RefreshConte
|
|
|
3
3
|
import '@xh/hoist/desktop/register';
|
|
4
4
|
import { ModalSupportConfig, ModalSupportModel } from '../modalsupport/';
|
|
5
5
|
import { ErrorBoundaryConfig, ErrorBoundaryModel } from '@xh/hoist/cmp/error/ErrorBoundaryModel';
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for a {@link PanelModel} - controls resizing, collapsing, and modal behavior
|
|
8
|
+
* of a desktop {@link Panel}. Created automatically by Panel when not provided explicitly.
|
|
9
|
+
*
|
|
10
|
+
* @see PanelModel
|
|
11
|
+
*/
|
|
6
12
|
export interface PanelConfig {
|
|
7
13
|
/** Can panel be resized? */
|
|
8
14
|
resizable?: boolean;
|
|
@@ -70,8 +76,12 @@ export interface PanelPersistState {
|
|
|
70
76
|
size?: number | string;
|
|
71
77
|
}
|
|
72
78
|
/**
|
|
73
|
-
* PanelModel supports configuration and state-management for user-driven Panel resizing
|
|
74
|
-
* expand/collapse, along with support for saving this state via a configured
|
|
79
|
+
* PanelModel supports configuration and state-management for user-driven {@link Panel} resizing
|
|
80
|
+
* and expand/collapse, along with support for saving this state via a configured
|
|
81
|
+
* PersistenceProvider.
|
|
82
|
+
*
|
|
83
|
+
* See the panel package README (`desktop/cmp/panel/README.md`) for sizing, collapsing,
|
|
84
|
+
* and modal support documentation.
|
|
75
85
|
*/
|
|
76
86
|
export declare class PanelModel extends HoistModel implements Persistable<PanelPersistState> {
|
|
77
87
|
config: PanelConfig;
|
|
@@ -30,4 +30,14 @@ export interface RestGridProps extends HoistProps<RestGridModel>, Omit<PanelProp
|
|
|
30
30
|
*/
|
|
31
31
|
tbar?: ReactNode;
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* A full-featured Grid with a built-in toolbar, record editing form, and refresh support,
|
|
35
|
+
* designed for CRUD operations against REST-style server endpoints.
|
|
36
|
+
*
|
|
37
|
+
* Intended to pair with `RestController` from hoist-core, which provides standard CRUD
|
|
38
|
+
* endpoints for a GORM domain class. RestGrid's underlying {@link RestStore} maps directly
|
|
39
|
+
* to the controller's create/read/update/delete/bulk operations and lookup data support.
|
|
40
|
+
*
|
|
41
|
+
* @see RestGridModel
|
|
42
|
+
*/
|
|
33
43
|
export declare const RestGrid: import("react").FC<RestGridProps>, restGrid: import("@xh/hoist/core").ElementFactory<RestGridProps>;
|
|
@@ -9,6 +9,13 @@ import { ReactNode } from 'react';
|
|
|
9
9
|
import { FormFieldProps } from '../form';
|
|
10
10
|
import { RestStore, RestStoreConfig } from './data/RestStore';
|
|
11
11
|
import { RestFormModel } from './impl/RestFormModel';
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for a {@link RestGridModel} - extends {@link GridConfig} with CRUD support
|
|
14
|
+
* for editing records via a built-in form backed by a hoist-core `RestController`.
|
|
15
|
+
*
|
|
16
|
+
* @see RestGridModel
|
|
17
|
+
* @see RestGrid
|
|
18
|
+
*/
|
|
12
19
|
export interface RestGridConfig extends GridConfig {
|
|
13
20
|
store?: RestStore | RestStoreConfig;
|
|
14
21
|
/** Prevent users from creating, updating, or destroying a record. Defaults to false. */
|
|
@@ -68,7 +75,8 @@ export interface RestGridModelDefaults {
|
|
|
68
75
|
unit?: string;
|
|
69
76
|
}
|
|
70
77
|
/**
|
|
71
|
-
* Core Model for a RestGrid.
|
|
78
|
+
* Core Model for a {@link RestGrid}. Configures the grid's columns, editors, toolbar and
|
|
79
|
+
* context menu actions, and its backing {@link RestStore} for server-side CRUD operations.
|
|
72
80
|
*/
|
|
73
81
|
export declare class RestGridModel extends HoistModel {
|
|
74
82
|
/** App-level defaults for RestGridModel. Instance config takes precedence. */
|
|
@@ -23,8 +23,11 @@ export interface ToolbarProps extends HoistProps, BoxProps {
|
|
|
23
23
|
*/
|
|
24
24
|
minVisibleItems?: number;
|
|
25
25
|
}
|
|
26
|
+
export interface ToolbarDefaults {
|
|
27
|
+
compact?: boolean;
|
|
28
|
+
}
|
|
26
29
|
/**
|
|
27
30
|
* A toolbar with built-in styling and padding.
|
|
28
31
|
* In horizontal toolbars, items which overflow can be collapsed into a drop-down menu.
|
|
29
32
|
*/
|
|
30
|
-
export declare const Toolbar:
|
|
33
|
+
export declare const Toolbar: any, toolbar: import("@xh/hoist/core").ElementFactory<ToolbarProps>;
|
|
@@ -10,7 +10,7 @@ export interface DateFormatOptions extends FormatOptions<DateLike> {
|
|
|
10
10
|
nullDisplay?: ReactNode;
|
|
11
11
|
/**
|
|
12
12
|
* A MomentJs format string. Wrap literal text in square brackets to prevent
|
|
13
|
-
* interpretation as format tokens
|
|
13
|
+
* interpretation as format tokens - e.g. `'[today at] h:mma'`.
|
|
14
14
|
*/
|
|
15
15
|
fmt?: string;
|
|
16
16
|
}
|
|
@@ -33,17 +33,17 @@ export declare function fmtTime(v: DateLike, opts?: DateFormatOptions | string):
|
|
|
33
33
|
export interface CompactDateFormatOptions extends FormatOptions<DateLike> {
|
|
34
34
|
/**
|
|
35
35
|
* Format for date matching current day, defaults to 'hh:mma' for dates, 'MMM D' for
|
|
36
|
-
* LocalDates. Wrap literal text in square brackets
|
|
36
|
+
* LocalDates. Wrap literal text in square brackets - e.g. `'[today]'` or `'[today at] h:mma'`.
|
|
37
37
|
*/
|
|
38
38
|
sameDayFmt?: string;
|
|
39
39
|
/**
|
|
40
40
|
* Format for dates within the number of months specified by the distantThreshold, defaults
|
|
41
|
-
* to 'MMM D'. Wrap literal text in square brackets
|
|
41
|
+
* to 'MMM D'. Wrap literal text in square brackets - e.g. `'[recent]'`.
|
|
42
42
|
*/
|
|
43
43
|
nearFmt?: string;
|
|
44
44
|
/**
|
|
45
45
|
* Format for dates beyond number of months specified by the distantThreshold, defaults to
|
|
46
|
-
* 'YYYY-MM-DD'. Wrap literal text in square brackets
|
|
46
|
+
* 'YYYY-MM-DD'. Wrap literal text in square brackets - e.g. `'[older]'`.
|
|
47
47
|
*/
|
|
48
48
|
distantFmt?: string;
|
|
49
49
|
/** Number of months away from the current month to be considered 'recent' or 'near'. */
|
|
@@ -109,6 +109,7 @@ export declare const Icon: {
|
|
|
109
109
|
chevronRight(p?: IconProps): any;
|
|
110
110
|
chevronUp(p?: IconProps): any;
|
|
111
111
|
circle(p?: IconProps): any;
|
|
112
|
+
circleNotch(p?: IconProps): any;
|
|
112
113
|
clipboard(p?: IconProps): any;
|
|
113
114
|
clock(p?: IconProps): any;
|
|
114
115
|
cloudDownload(p?: IconProps): any;
|
|
@@ -236,6 +237,8 @@ export declare const Icon: {
|
|
|
236
237
|
slashedCircle(p?: IconProps): any;
|
|
237
238
|
sparkles(p?: IconProps): any;
|
|
238
239
|
spinner(p?: IconProps): any;
|
|
240
|
+
spinnerScale(p?: IconProps): any;
|
|
241
|
+
spinnerThird(p?: IconProps): any;
|
|
239
242
|
square(p?: IconProps): any;
|
|
240
243
|
squareMinus(p?: IconProps): any;
|
|
241
244
|
star(p?: IconProps): any;
|
|
@@ -4,5 +4,16 @@ import React from 'react';
|
|
|
4
4
|
declare const Dialog: React.FC<DialogProps>;
|
|
5
5
|
declare const Popover: React.FC<PopoverProps>;
|
|
6
6
|
export { Alert, BpSegmentedControl, Button, ButtonGroup, Callout, BpCard, Checkbox, ControlGroup, DatePicker, Dialog, Drawer, EditableText, FileInput, FormGroup, Hotkeys, Hotkey, InputGroup, Label, Menu, MenuItem, MenuDivider, Navbar, NavbarDivider, NavbarGroup, NavbarHeading, NumericInput, OverflowList, Overlay, Popover, Radio, RadioGroup, RangeSlider, Slider, Switch, Tab, Tabs, Tag, TagInput, TextArea, Text, Tooltip, Tree };
|
|
7
|
-
export declare const alert: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").AlertProps>, bpSegmentedControl: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").SegmentedControlProps>, button: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").ButtonProps>, controlGroup: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").ControlGroupProps>, checkbox: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").CheckboxProps>,
|
|
7
|
+
export declare const alert: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").AlertProps>, bpSegmentedControl: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").SegmentedControlProps>, button: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").ButtonProps>, controlGroup: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").ControlGroupProps>, checkbox: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").CheckboxProps>, datePicker: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/datetime").DatePickerProps>, menuDivider: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").MenuDividerProps>, menuItem: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").MenuItemProps>, navbarDivider: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").NavbarDividerProps>, numericInput: import("@xh/hoist/core").ElementFactory<Omit<import("@blueprintjs/core").HTMLInputProps, "size"> & import("@blueprintjs/core").NumericInputProps>, overflowList: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").OverflowListProps<any>>, popover: import("@xh/hoist/core").ElementFactory<PopoverProps<import("@blueprintjs/core").DefaultPopoverTargetHTMLProps>>, radio: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").ControlProps>, rangeSlider: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").RangeSliderProps>, slider: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").SliderProps>, switchControl: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").SwitchProps>, textArea: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").TextAreaProps>, tree: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").TreeProps<unknown>>, tagInput: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").TagInputProps>, fileInput: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").FileInputProps>, overlay: import("@xh/hoist/core").ElementFactory<Omit<import("@blueprintjs/core").Overlay2Props, "ref"> & React.RefAttributes<import("@blueprintjs/core").OverlayInstance>>, tooltip: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").TooltipProps<import("@blueprintjs/core").DefaultPopoverTargetHTMLProps>>;
|
|
8
8
|
export declare const buttonGroup: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").ButtonGroupProps>, callout: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").CalloutProps>, bpCard: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").CardProps>, drawer: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").DrawerProps>, editableText: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").EditableTextProps>, formGroup: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").FormGroupProps>, hotkey: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").HotkeyProps>, hotkeys: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").HotkeysProps>, inputGroup: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").InputGroupProps>, label: import("@xh/hoist/core").ElementFactory<React.AllHTMLAttributes<HTMLLabelElement> & React.RefAttributes<HTMLLabelElement>>, menu: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").MenuProps>, navbar: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").NavbarProps>, navbarHeading: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").NavbarHeadingProps>, navbarGroup: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").NavbarGroupProps>, radioGroup: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").RadioGroupProps>, tabs: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").TabsProps>, tab: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").TabProps>, tag: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").TagProps>, text: import("@xh/hoist/core").ElementFactory<import("@blueprintjs/core").TextProps>;
|
|
9
|
+
/**
|
|
10
|
+
* Blueprint Dialog wrapped with transitions disabled. This is the standard way to create
|
|
11
|
+
* custom modal dialogs in Hoist apps - import from `@xh/hoist/kit/blueprint` rather than
|
|
12
|
+
* from Blueprint directly.
|
|
13
|
+
*
|
|
14
|
+
* Pair with a HoistModel that manages an observable `isOpen` property. The parent component
|
|
15
|
+
* renders the dialog factory alongside its other children - it shows/hides based on `isOpen`.
|
|
16
|
+
*
|
|
17
|
+
* See the desktop package README (`desktop/README.md#dialogs`) for the full usage pattern.
|
|
18
|
+
*/
|
|
19
|
+
export declare const dialog: import("@xh/hoist/core").ElementFactory<DialogProps>;
|
|
@@ -2,6 +2,14 @@ import { HoistModel, RefreshMode, RenderMode } from '@xh/hoist/core';
|
|
|
2
2
|
import { Swiper } from 'swiper/types';
|
|
3
3
|
import '@xh/hoist/mobile/register';
|
|
4
4
|
import { PageConfig, PageModel } from './PageModel';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for a {@link NavigatorModel} - the primary stack-based navigation controller
|
|
7
|
+
* for mobile Hoist apps. Supports swipe-based page transitions, pull-to-refresh, and
|
|
8
|
+
* configurable render/refresh strategies.
|
|
9
|
+
*
|
|
10
|
+
* @see NavigatorModel
|
|
11
|
+
* @see PageConfig
|
|
12
|
+
*/
|
|
5
13
|
export interface NavigatorConfig {
|
|
6
14
|
/** Configs for PageModels, representing all supported pages within this Navigator/App. */
|
|
7
15
|
pages: PageConfig[];
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { Content, HoistModel, HoistProps, RefreshMode, RenderMode } from '@xh/hoist/core';
|
|
2
2
|
import '@xh/hoist/mobile/register';
|
|
3
3
|
import { NavigatorModel } from './NavigatorModel';
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for a {@link PageModel} - a single page within a {@link NavigatorModel}.
|
|
6
|
+
* Passed as entries in the `pages` array of a {@link NavigatorConfig}.
|
|
7
|
+
*
|
|
8
|
+
* @see PageModel
|
|
9
|
+
* @see NavigatorConfig
|
|
10
|
+
*/
|
|
4
11
|
export interface PageConfig {
|
|
5
12
|
/** Unique ID. Must match a configured Router5 route name. */
|
|
6
13
|
id: string;
|
|
@@ -10,7 +10,5 @@ export interface DialogPanelProps extends PanelProps {
|
|
|
10
10
|
*
|
|
11
11
|
* These views do not participate in navigation or routing, and are used for showing fullscreen
|
|
12
12
|
* views outside of the Navigator / TabContainer context.
|
|
13
|
-
*
|
|
14
|
-
* @see FullscreenPanel for a true fullscreen, non-floating alternative.
|
|
15
13
|
*/
|
|
16
14
|
export declare const DialogPanel: import("react").FC<DialogPanelProps>, dialogPanel: import("@xh/hoist/core").ElementFactory<DialogPanelProps>;
|
|
@@ -2,6 +2,15 @@ import { HoistBase } from '@xh/hoist/core';
|
|
|
2
2
|
import { Token } from '@xh/hoist/security/Token';
|
|
3
3
|
import { AccessTokenSpec, TokenMap } from './Types';
|
|
4
4
|
export type LoginMethod = 'REDIRECT' | 'POPUP';
|
|
5
|
+
/**
|
|
6
|
+
* Base configuration shared by all OAuth client implementations. Extended by
|
|
7
|
+
* {@link MsalClientConfig} and {@link AuthZeroClientConfig} with provider-specific options.
|
|
8
|
+
*
|
|
9
|
+
* See the security package README (`security/README.md`) for authentication architecture
|
|
10
|
+
* and setup guidance.
|
|
11
|
+
*
|
|
12
|
+
* @see BaseOAuthClient
|
|
13
|
+
*/
|
|
5
14
|
export interface BaseOAuthClientConfig<S extends AccessTokenSpec> {
|
|
6
15
|
/** Client ID (GUID) of your app registered with your Oauth provider. */
|
|
7
16
|
clientId: string;
|
|
@@ -2,6 +2,12 @@ import type { Auth0ClientOptions } from '@auth0/auth0-spa-js';
|
|
|
2
2
|
import { Token } from '@xh/hoist/security/Token';
|
|
3
3
|
import { AccessTokenSpec, TokenMap } from '../Types';
|
|
4
4
|
import { BaseOAuthClient, BaseOAuthClientConfig } from '../BaseOAuthClient';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration for an {@link AuthZeroClient} - the Auth0 OAuth client.
|
|
7
|
+
* Extends {@link BaseOAuthClientConfig} with Auth0-specific options.
|
|
8
|
+
*
|
|
9
|
+
* @see AuthZeroClient
|
|
10
|
+
*/
|
|
5
11
|
export interface AuthZeroClientConfig extends BaseOAuthClientConfig<AuthZeroTokenSpec> {
|
|
6
12
|
/** Domain of your app registered with Auth0. */
|
|
7
13
|
domain: string;
|
|
@@ -4,6 +4,12 @@ import { PlainObject } from '@xh/hoist/core';
|
|
|
4
4
|
import { Token } from '@xh/hoist/security/Token';
|
|
5
5
|
import { BaseOAuthClient, BaseOAuthClientConfig } from '../BaseOAuthClient';
|
|
6
6
|
import { AccessTokenSpec, TokenMap } from '../Types';
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for a {@link MsalClient} - the Microsoft Entra ID (Azure AD) OAuth client.
|
|
9
|
+
* Extends {@link BaseOAuthClientConfig} with MSAL-specific options.
|
|
10
|
+
*
|
|
11
|
+
* @see MsalClient
|
|
12
|
+
*/
|
|
7
13
|
export interface MsalClientConfig extends BaseOAuthClientConfig<MsalTokenSpec> {
|
|
8
14
|
/**
|
|
9
15
|
* Authority for your organization's tenant: `https://login.microsoftonline.com/[tenantId]`.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Awaitable, HoistService, LoadSpec, LoadSpecConfig, PlainObject, TrackOptions } from '@xh/hoist/core';
|
|
2
2
|
import { HoistException } from '@xh/hoist/exception';
|
|
3
|
-
import { Span } from '@xh/hoist/utils/telemetry';
|
|
3
|
+
import { Span, SpanConfig } 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';
|
|
@@ -12,8 +12,8 @@ export interface FetchServiceDefaults {
|
|
|
12
12
|
/**
|
|
13
13
|
* Service for making managed HTTP requests, both to the app's own Hoist server and to remote APIs.
|
|
14
14
|
*
|
|
15
|
-
* Typically accessed via `XH.fetchService` or the convenience methods on XH
|
|
16
|
-
* `XH.fetchJson()`, `XH.postJson()`, `XH.putJson()`, `XH.deleteJson()`
|
|
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.
|
|
17
17
|
*
|
|
18
18
|
* Wraps the standard Fetch API with CORS enabled, credentials included, and redirects followed.
|
|
19
19
|
* Provides JSON convenience methods (`fetchJson`, `postJson`, `putJson`, `patchJson`,
|
|
@@ -248,10 +248,12 @@ export interface FetchOptions {
|
|
|
248
248
|
*/
|
|
249
249
|
track?: string | TrackOptions;
|
|
250
250
|
/**
|
|
251
|
-
*
|
|
252
|
-
*
|
|
251
|
+
* Parent span for this fetch request. Use to nest fetch calls under a business-level span.
|
|
252
|
+
*
|
|
253
|
+
* Accepts an existing Span instance, a SpanConfig, or a string span name. When a SpanConfig or
|
|
254
|
+
* string is provided, FetchService will create and manage the parent span internally.
|
|
253
255
|
*/
|
|
254
|
-
span?: Span;
|
|
256
|
+
span?: Span | SpanConfig | string;
|
|
255
257
|
/**
|
|
256
258
|
* Distributed trace ID for this request. Set automatically by FetchService
|
|
257
259
|
* @internal
|
|
@@ -272,7 +274,8 @@ export interface FetchException extends HoistException {
|
|
|
272
274
|
traceId: string;
|
|
273
275
|
/**
|
|
274
276
|
* True if exception resulted from the fetch being aborted by fetchService, or the application.
|
|
275
|
-
* @see FetchService.abort
|
|
277
|
+
* @see FetchService.abort
|
|
278
|
+
* @see FetchOptions.autoAbortKey
|
|
276
279
|
*/
|
|
277
280
|
isFetchAborted: boolean;
|
|
278
281
|
}
|
|
@@ -8,7 +8,7 @@ import { Span, SpanConfig } from '@xh/hoist/utils/telemetry';
|
|
|
8
8
|
* end-to-end traces from user interaction through server processing and back.
|
|
9
9
|
*
|
|
10
10
|
* Controlled by the `xhTraceConfig` soft config. When disabled (the default), all
|
|
11
|
-
* span-creation methods are no-ops
|
|
11
|
+
* span-creation methods are no-ops - the wrapped function still executes normally.
|
|
12
12
|
*
|
|
13
13
|
* Completed spans are batched and exported to the Hoist server endpoint `xh/submitSpans`,
|
|
14
14
|
* which relays them to the configured collector.
|
|
@@ -42,7 +42,10 @@ export declare class TraceService extends HoistService {
|
|
|
42
42
|
* Create a new span, or return null if tracing is disabled.
|
|
43
43
|
* Inherits the parent's `source` tag if not specified.
|
|
44
44
|
*
|
|
45
|
-
*
|
|
45
|
+
* Sampling rules from `xhTraceConfig.sampleRules` are evaluated against the span's tags
|
|
46
|
+
* at creation time (head-based). Child spans inherit their parent's sampling decision.
|
|
47
|
+
* Unsampled spans may still be exported if they end in error and `alwaysSampleErrors` is
|
|
48
|
+
* enabled — see {@link exportSpan}.
|
|
46
49
|
*
|
|
47
50
|
* @param config - span name string, or a SpanConfig with name and optional tags.
|
|
48
51
|
*/
|
|
@@ -55,8 +58,20 @@ export declare class TraceService extends HoistService {
|
|
|
55
58
|
*/
|
|
56
59
|
pushPendingAsync(): Promise<void>;
|
|
57
60
|
private pushPendingBuffered;
|
|
61
|
+
/** Evaluate sampling rules against a span's tags. */
|
|
62
|
+
private shouldSample;
|
|
63
|
+
private getSampleRate;
|
|
64
|
+
/** For strings, simple glob matching: `*` = any, `foo*` = prefix, `*foo` = suffix, `*foo*` = contains. */
|
|
65
|
+
private matchesValue;
|
|
58
66
|
}
|
|
59
67
|
interface TraceConfig {
|
|
60
68
|
enabled: boolean;
|
|
69
|
+
sampleRules?: SamplingRule[];
|
|
70
|
+
sampleRate?: number;
|
|
71
|
+
alwaysSampleErrors?: boolean;
|
|
72
|
+
}
|
|
73
|
+
interface SamplingRule {
|
|
74
|
+
match: Record<string, string>;
|
|
75
|
+
sampleRate: number;
|
|
61
76
|
}
|
|
62
77
|
export {};
|
|
@@ -54,6 +54,12 @@ export declare class Timer {
|
|
|
54
54
|
private get timeoutMs();
|
|
55
55
|
destroy(): void;
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Configuration for a {@link Timer} - a managed interval that runs a function repeatedly
|
|
59
|
+
* with configurable delay, timeout, and app-config-driven intervals.
|
|
60
|
+
*
|
|
61
|
+
* @see Timer
|
|
62
|
+
*/
|
|
57
63
|
export interface TimerSpec {
|
|
58
64
|
/**
|
|
59
65
|
* Function to run.
|
|
@@ -121,7 +121,7 @@ export declare function mergeDeep<T, S1, S2>(object: T, source1: S1, source2: S2
|
|
|
121
121
|
export declare function mergeDeep<T, S1, S2, S3>(object: T, source1: S1, source2: S2, source3: S3): T & S1 & S2 & S3;
|
|
122
122
|
export declare function mergeDeep<T, S>(target: T, ...sources: S[]): T & S;
|
|
123
123
|
/**
|
|
124
|
-
* A string, or an object from which a name can be derived
|
|
124
|
+
* A string, or an object from which a name can be derived - via `displayName` (e.g. React
|
|
125
125
|
* components) or `constructor.name` (e.g. class instances). Used for logging and tracing.
|
|
126
126
|
*/
|
|
127
127
|
export type NameSource = string | {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HoistProps } from '@xh/hoist/core';
|
|
2
2
|
/**
|
|
3
3
|
* HTML attribute name used to tag elements with stable test identifiers. Use as a computed
|
|
4
|
-
* property key on element specs
|
|
4
|
+
* property key on element specs - e.g. `{[TEST_ID]: 'my-grid'}` - to emit a `data-testid`
|
|
5
5
|
* attribute that automated test drivers can locate reliably.
|
|
6
6
|
*/
|
|
7
7
|
export declare const TEST_ID = "data-testid";
|
|
@@ -17,7 +17,7 @@ export declare class Span {
|
|
|
17
17
|
name: string;
|
|
18
18
|
/** Epoch ms (Date.now()-based). */
|
|
19
19
|
startTime: number;
|
|
20
|
-
/** Epoch ms
|
|
20
|
+
/** Epoch ms - set when span ends. */
|
|
21
21
|
endTime: number;
|
|
22
22
|
/** Duration in ms (endTime - startTime). */
|
|
23
23
|
get duration(): number;
|
|
@@ -25,6 +25,8 @@ export declare class Span {
|
|
|
25
25
|
status: SpanStatus;
|
|
26
26
|
tags: PlainObject;
|
|
27
27
|
events: SpanEvent[];
|
|
28
|
+
/** Whether this span was selected by client-side sampling rules. */
|
|
29
|
+
sampled: boolean;
|
|
28
30
|
constructor(config: SpanConfig);
|
|
29
31
|
/** End this span, recording status and computing duration. */
|
|
30
32
|
end(status?: SpanStatus): void;
|
|
@@ -33,6 +35,13 @@ export declare class Span {
|
|
|
33
35
|
/** Serialize for export to the server. */
|
|
34
36
|
toJSON(): PlainObject;
|
|
35
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Configuration for a {@link Span} - a lightweight trace span for distributed tracing.
|
|
40
|
+
* Create via {@link TraceService} rather than directly.
|
|
41
|
+
*
|
|
42
|
+
* @see Span
|
|
43
|
+
* @see TraceService
|
|
44
|
+
*/
|
|
36
45
|
export interface SpanConfig {
|
|
37
46
|
name: string;
|
|
38
47
|
kind?: SpanKind;
|
|
@@ -40,6 +49,7 @@ export interface SpanConfig {
|
|
|
40
49
|
parent?: Span;
|
|
41
50
|
startTime?: number;
|
|
42
51
|
caller?: NameSource;
|
|
52
|
+
sampled?: boolean;
|
|
43
53
|
}
|
|
44
54
|
export interface SpanEvent {
|
|
45
55
|
name: string;
|
|
@@ -52,7 +62,7 @@ export type SpanStatus = 'ok' | 'error' | 'unset';
|
|
|
52
62
|
* Format a W3C traceparent header value.
|
|
53
63
|
* @see https://www.w3.org/TR/trace-context/#traceparent-header
|
|
54
64
|
*/
|
|
55
|
-
export declare function formatTraceparent(traceId: string, spanId: string): string;
|
|
65
|
+
export declare function formatTraceparent(traceId: string, spanId: string, sampled?: boolean): string;
|
|
56
66
|
/** Generate a 32-hex-char (128-bit) trace ID. */
|
|
57
67
|
export declare function genTraceId(): string;
|
|
58
68
|
/** Generate a 16-hex-char (64-bit) span ID. */
|
package/cmp/ag-grid/AgGrid.ts
CHANGED
|
@@ -29,27 +29,16 @@ export interface AgGridProps
|
|
|
29
29
|
extends HoistProps<AgGridModel>, GridOptions, LayoutProps, TestSupportProps {}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* backing model for convenient access to the ag-Grid APIs and other utility methods.
|
|
32
|
+
* Low-level escape hatch for direct use of ag-Grid - most applications should use the standard
|
|
33
|
+
* Hoist {@link Grid} component and {@link GridModel} instead.
|
|
35
34
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* This minimal wrapper around AgGridReact provides Hoist theming/styling, layout support, and
|
|
36
|
+
* an {@link AgGridModel} for access to the ag-Grid APIs. All ag-Grid Grid Properties can be
|
|
37
|
+
* passed as props directly. It is intended for advanced use cases that require ag-Grid features
|
|
38
|
+
* not yet exposed by the managed Hoist Grid layer (most notably pivoting).
|
|
39
39
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* extensions and customizations. That fully managed component is expected to cover the majority of
|
|
43
|
-
* use cases within Hoist apps and is recommended as the primary grid class within the toolkit.
|
|
44
|
-
*
|
|
45
|
-
* This wrapper is provided for advanced usages of grid that wish to leverage features of the
|
|
46
|
-
* underlying component not yet supported by the Hoist layer - most notably pivoting - where the
|
|
47
|
-
* managed option would conflict with or complicate access to those features.
|
|
48
|
-
*
|
|
49
|
-
* Note that this component uses the ag-Grid `getRowHeight` prop to provide the grid with row
|
|
50
|
-
* heights. As of 4/2023, this may cause scrolling to be slow in large data sets, and
|
|
51
|
-
* applications may wish to set this prop to `null` and use either a fixed `rowWidth` property, or
|
|
52
|
-
* an explicit per-row setting instead. See GridModel for a more efficient, data aware approach.
|
|
40
|
+
* @see Grid
|
|
41
|
+
* @see GridModel
|
|
53
42
|
*/
|
|
54
43
|
export const [AgGrid, agGrid] = hoistCmp.withFactory<AgGridProps>({
|
|
55
44
|
displayName: 'AgGrid',
|
|
@@ -25,6 +25,16 @@ import {
|
|
|
25
25
|
} from 'lodash';
|
|
26
26
|
import {GridSorter, GridSorterLike} from '../grid/GridSorter';
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* Configuration for an {@link AgGridModel} - the low-level model backing the Hoist `AgGrid`
|
|
30
|
+
* component. This interface is only relevant when using `AgGrid` directly for advanced or
|
|
31
|
+
* minimally-managed ag-Grid use cases. Most applications should use {@link GridConfig} and
|
|
32
|
+
* the standard {@link GridModel} instead, which extends this with columns, store binding,
|
|
33
|
+
* selection, filtering, and other managed features.
|
|
34
|
+
*
|
|
35
|
+
* @see AgGridModel
|
|
36
|
+
* @see GridConfig
|
|
37
|
+
*/
|
|
28
38
|
export interface AgGridModelConfig {
|
|
29
39
|
sizingMode?: SizingMode;
|
|
30
40
|
|
|
@@ -79,12 +89,15 @@ export interface AgGridState {
|
|
|
79
89
|
}
|
|
80
90
|
|
|
81
91
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
92
|
+
* Low-level model backing the {@link AgGrid} escape-hatch component - most applications should
|
|
93
|
+
* use {@link GridModel} instead, which extends this class with columns, store binding,
|
|
94
|
+
* selection, filtering, and other managed features.
|
|
95
|
+
*
|
|
96
|
+
* Provides reactive grid styling properties, access to the ag-Grid API, and utility methods
|
|
97
|
+
* for getting/setting serializable grid state.
|
|
84
98
|
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
* allowing applications to save "views" of the grid.
|
|
99
|
+
* @see AgGridModelConfig
|
|
100
|
+
* @see GridModel
|
|
88
101
|
*/
|
|
89
102
|
export class AgGridModel extends HoistModel {
|
|
90
103
|
static AUTO_GROUP_COL_ID = 'ag-Grid-AutoColumn';
|
package/cmp/card/Card.ts
CHANGED
|
@@ -40,10 +40,15 @@ export interface CardProps<M extends CardModel = CardModel>
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* A bordered container for grouping related content
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
43
|
+
* A bordered container for grouping related content, rendered as an HTML fieldset/legend.
|
|
44
|
+
* Supports an optional inline header (`title`, `icon`, `intent`) and user-driven
|
|
45
|
+
* collapse/expand via its backing {@link CardModel}.
|
|
46
|
+
*
|
|
47
|
+
* Children are arranged vertically in a flexbox container by default - pass
|
|
48
|
+
* `contentBoxProps` to customize the content layout.
|
|
49
|
+
*
|
|
50
|
+
* @see CardModel
|
|
51
|
+
* @see FormFieldSet
|
|
47
52
|
*/
|
|
48
53
|
export const [Card, card] = hoistCmp.withFactory<CardProps>({
|
|
49
54
|
displayName: 'Card',
|
package/cmp/card/CardModel.ts
CHANGED
|
@@ -18,6 +18,13 @@ import {throwIf} from '@xh/hoist/utils/js';
|
|
|
18
18
|
import {isNil} from 'lodash';
|
|
19
19
|
import {action, observable} from 'mobx';
|
|
20
20
|
|
|
21
|
+
/**
|
|
22
|
+
* Configuration for a {@link CardModel}. A CardModel is created automatically by {@link Card}
|
|
23
|
+
* when not provided explicitly - pass a config via the Card's `model` prop to customize.
|
|
24
|
+
*
|
|
25
|
+
* @see CardModel
|
|
26
|
+
* @see Card
|
|
27
|
+
*/
|
|
21
28
|
export interface CardModelConfig {
|
|
22
29
|
/** Can card be collapsed? */
|
|
23
30
|
collapsible?: boolean;
|
|
@@ -37,8 +44,14 @@ export interface CardPersistState {
|
|
|
37
44
|
}
|
|
38
45
|
|
|
39
46
|
/**
|
|
40
|
-
*
|
|
41
|
-
*
|
|
47
|
+
* Model for a {@link Card} - manages collapsible state and render mode for the Card's content.
|
|
48
|
+
* Created automatically by Card when not provided - pass via the Card's `model` prop to
|
|
49
|
+
* customize collapsibility, default state, or persistence.
|
|
50
|
+
*
|
|
51
|
+
* Also serves as the base class for {@link FormFieldSetModel}.
|
|
52
|
+
*
|
|
53
|
+
* @see CardModelConfig
|
|
54
|
+
* @see Card
|
|
42
55
|
*/
|
|
43
56
|
export class CardModel extends HoistModel implements Persistable<CardPersistState> {
|
|
44
57
|
declare config: CardModelConfig;
|
package/cmp/chart/Chart.ts
CHANGED
|
@@ -52,8 +52,8 @@ export interface ChartProps<M extends ChartModel = ChartModel>
|
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* Wrapper Component for a Highcharts chart. Provides basic rendering / lifecycle management
|
|
55
|
-
* as well as configuration and theme defaults.
|
|
56
|
-
*
|
|
55
|
+
* as well as configuration and theme defaults. Sourced from a {@link ChartModel}, either
|
|
56
|
+
* passed directly via the `model` prop or resolved from context.
|
|
57
57
|
*/
|
|
58
58
|
export const [Chart, chart] = hoistCmp.withFactory<ChartProps>({
|
|
59
59
|
displayName: 'Chart',
|
package/cmp/chart/ChartModel.ts
CHANGED
|
@@ -33,7 +33,17 @@ export interface ChartModelDefaults {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* Model
|
|
36
|
+
* Model for a Highcharts-based {@link Chart} component. Holds the Highcharts configuration
|
|
37
|
+
* object and data series, providing observable state that drives chart rendering.
|
|
38
|
+
*
|
|
39
|
+
* Set `highchartsConfig` for chart-level options (chart type, axes, legend, etc.) and
|
|
40
|
+
* `series` for the data to display. Both are observable and can be updated at any time
|
|
41
|
+
* via their setters to trigger a re-render.
|
|
42
|
+
*
|
|
43
|
+
* The underlying Highcharts instance is available via the `highchart` property for
|
|
44
|
+
* read-only access - mutations should go through `setHighchartsConfig` or `setSeries`.
|
|
45
|
+
*
|
|
46
|
+
* @see Chart
|
|
37
47
|
*/
|
|
38
48
|
export class ChartModel extends HoistModel {
|
|
39
49
|
/** App-level defaults for ChartModel. Instance config takes precedence. */
|
package/cmp/dataview/DataView.ts
CHANGED
|
@@ -39,8 +39,10 @@ export interface DataViewProps<M extends DataViewModel = DataViewModel>
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* A DataView is a specialized version of the Grid component. It displays its data within
|
|
43
|
-
* single column, using a configured component for rendering each item.
|
|
42
|
+
* A DataView is a specialized version of the {@link Grid} component. It displays its data within
|
|
43
|
+
* a single column, using a configured component for rendering each item.
|
|
44
|
+
*
|
|
45
|
+
* @see DataViewModel
|
|
44
46
|
*/
|
|
45
47
|
export const [DataView, dataView] = hoistCmp.withFactory<DataViewProps>({
|
|
46
48
|
displayName: 'DataView',
|