@xh/hoist 87.1.1 → 87.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.npmignore +39 -0
- package/CHANGELOG.md +108 -20
- package/admin/AdminUtils.ts +64 -0
- package/admin/App.scss +88 -0
- package/admin/columns/UserData.ts +30 -3
- package/admin/detail/RestDetailModel.ts +64 -0
- package/admin/detail/RestDetailPanel.ts +106 -0
- package/admin/tabs/activity/tracking/ActivityTrackingModel.ts +27 -94
- package/admin/tabs/activity/tracking/ActivityTrackingPanel.ts +23 -60
- package/admin/tabs/activity/tracking/detail/ActivityDetailView.ts +1 -2
- package/admin/tabs/general/alertBanner/AlertBannerPanel.ts +2 -13
- package/admin/tabs/general/config/ConfigDetailPanel.ts +72 -0
- package/admin/tabs/general/config/ConfigPanel.ts +41 -53
- package/admin/tabs/general/config/ConfigPanelModel.ts +3 -0
- package/admin/tabs/general/config/ConfigValue.scss +14 -0
- package/admin/tabs/general/config/ConfigValue.ts +104 -65
- package/admin/tabs/userData/jsonblob/JsonBlobDetailPanel.ts +93 -0
- package/admin/tabs/userData/jsonblob/JsonBlobModel.ts +4 -0
- package/admin/tabs/userData/jsonblob/JsonBlobPanel.ts +2 -0
- package/admin/tabs/userData/prefs/UserPreferenceDetailPanel.ts +62 -0
- package/admin/tabs/userData/prefs/UserPreferenceModel.ts +10 -3
- package/admin/tabs/userData/prefs/UserPreferencePanel.ts +3 -1
- package/admin/tabs/userData/roles/details/RoleDetails.scss +2 -19
- package/admin/tabs/userData/roles/details/RoleDetails.ts +13 -13
- package/appcontainer/AboutDialogModel.ts +1 -0
- package/appcontainer/AppContainerModel.ts +3 -0
- package/appcontainer/AppStateModel.ts +1 -0
- package/appcontainer/BannerSourceModel.ts +1 -0
- package/appcontainer/ChangelogDialogModel.ts +1 -0
- package/appcontainer/ColChooserOptionsModel.ts +1 -0
- package/appcontainer/ExceptionDialogModel.ts +1 -0
- package/appcontainer/FeedbackDialogModel.ts +1 -0
- package/appcontainer/ImpersonationBarModel.ts +1 -0
- package/appcontainer/MessageSourceModel.ts +1 -0
- package/appcontainer/OptionsDialogModel.ts +1 -0
- package/appcontainer/PageStateModel.ts +1 -0
- package/appcontainer/RouterModel.ts +2 -0
- package/appcontainer/SizingModeModel.ts +1 -0
- package/appcontainer/ThemeModel.ts +1 -0
- package/appcontainer/ToastSourceModel.ts +1 -0
- package/appcontainer/UserAgentModel.ts +1 -0
- package/appcontainer/ViewportSizeModel.ts +1 -0
- package/build/types/admin/AdminUtils.d.ts +29 -0
- package/build/types/admin/columns/UserData.d.ts +3 -0
- package/build/types/admin/detail/RestDetailModel.d.ts +20 -0
- package/build/types/admin/detail/RestDetailPanel.d.ts +34 -0
- package/build/types/admin/tabs/activity/tracking/ActivityTrackingModel.d.ts +5 -17
- package/build/types/admin/tabs/general/config/ConfigDetailPanel.d.ts +7 -0
- package/build/types/admin/tabs/general/config/ConfigValue.d.ts +10 -4
- package/build/types/admin/tabs/userData/jsonblob/JsonBlobDetailPanel.d.ts +3 -0
- package/build/types/admin/tabs/userData/prefs/UserPreferenceDetailPanel.d.ts +3 -0
- package/build/types/admin/tabs/userData/prefs/UserPreferenceModel.d.ts +3 -0
- package/build/types/appcontainer/AboutDialogModel.d.ts +1 -0
- package/build/types/appcontainer/AppContainerModel.d.ts +1 -0
- package/build/types/appcontainer/AppStateModel.d.ts +1 -0
- package/build/types/appcontainer/BannerSourceModel.d.ts +1 -0
- package/build/types/appcontainer/ChangelogDialogModel.d.ts +1 -0
- package/build/types/appcontainer/ColChooserOptionsModel.d.ts +1 -0
- package/build/types/appcontainer/ExceptionDialogModel.d.ts +1 -0
- package/build/types/appcontainer/FeedbackDialogModel.d.ts +1 -0
- package/build/types/appcontainer/ImpersonationBarModel.d.ts +1 -0
- package/build/types/appcontainer/MessageSourceModel.d.ts +1 -0
- package/build/types/appcontainer/OptionsDialogModel.d.ts +1 -0
- package/build/types/appcontainer/PageStateModel.d.ts +1 -0
- package/build/types/appcontainer/RouterModel.d.ts +1 -0
- package/build/types/appcontainer/SizingModeModel.d.ts +1 -0
- package/build/types/appcontainer/ThemeModel.d.ts +1 -0
- package/build/types/appcontainer/ToastSourceModel.d.ts +1 -0
- package/build/types/appcontainer/UserAgentModel.d.ts +1 -0
- package/build/types/appcontainer/ViewportSizeModel.d.ts +1 -0
- package/build/types/cmp/ag-grid/AgGridModel.d.ts +3 -1
- package/build/types/cmp/card/Card.d.ts +2 -2
- package/build/types/cmp/chart/ChartModel.d.ts +2 -0
- package/build/types/cmp/dataview/DataViewModel.d.ts +2 -0
- package/build/types/cmp/daterange/DateRangePickerModel.d.ts +266 -0
- package/build/types/cmp/daterange/DateRangePresets.d.ts +26 -0
- package/build/types/cmp/daterange/DateRangeUtils.d.ts +96 -0
- package/build/types/cmp/daterange/Types.d.ts +152 -0
- package/build/types/cmp/daterange/index.d.ts +4 -0
- package/build/types/cmp/filter/FilterChooserModel.d.ts +3 -1
- package/build/types/cmp/form/FormModel.d.ts +3 -1
- package/build/types/cmp/grid/GridModel.d.ts +2 -0
- package/build/types/cmp/grid/Types.d.ts +2 -0
- package/build/types/cmp/grid/filter/GridFilterModel.d.ts +1 -1
- package/build/types/cmp/grid/impl/ColumnWidthCalculator.d.ts +1 -1
- package/build/types/cmp/grouping/GroupingChooserModel.d.ts +3 -1
- package/build/types/cmp/input/HoistInputProps.d.ts +49 -2
- package/build/types/cmp/tab/TabContainerModel.d.ts +3 -1
- package/build/types/cmp/tab/TabModel.d.ts +3 -1
- package/build/types/cmp/treemap/TreeMapModel.d.ts +2 -0
- package/build/types/cmp/viewmanager/ViewManagerModel.d.ts +2 -0
- package/build/types/cmp/zoneGrid/ZoneGridModel.d.ts +2 -0
- package/build/types/core/HoistBase.d.ts +7 -0
- package/build/types/core/HoistProps.d.ts +26 -1
- package/build/types/core/model/RootRefreshContextModel.d.ts +1 -0
- package/build/types/core/types/Telemetry.d.ts +1 -1
- package/build/types/data/Store.d.ts +3 -1
- package/build/types/data/StoreSelectionModel.d.ts +3 -1
- package/build/types/data/cube/Cube.d.ts +5 -2
- package/build/types/data/cube/View.d.ts +2 -0
- package/build/types/desktop/cmp/appOption/AutoRefreshAppOption.d.ts +3 -0
- package/build/types/desktop/cmp/appOption/ThemeAppOption.d.ts +3 -0
- package/build/types/desktop/cmp/button/Button.d.ts +2 -2
- package/build/types/desktop/cmp/button/ButtonGroup.d.ts +2 -2
- package/build/types/desktop/cmp/dash/DashConfig.d.ts +2 -0
- package/build/types/desktop/cmp/dash/DashViewModel.d.ts +3 -1
- package/build/types/desktop/cmp/dash/canvas/DashCanvasModel.d.ts +1 -1
- package/build/types/desktop/cmp/dash/container/DashContainerModel.d.ts +1 -1
- package/build/types/desktop/cmp/daterange/DateRangePicker.d.ts +66 -0
- package/build/types/desktop/cmp/daterange/impl/CustomTab.d.ts +3 -0
- package/build/types/desktop/cmp/daterange/impl/DateRangePickerLocalModel.d.ts +121 -0
- package/build/types/desktop/cmp/daterange/impl/PeriodTab.d.ts +2 -0
- package/build/types/desktop/cmp/daterange/impl/PresetsTab.d.ts +3 -0
- package/build/types/desktop/cmp/daterange/impl/RelativeTab.d.ts +3 -0
- package/build/types/desktop/cmp/daterange/impl/TabUtils.d.ts +21 -0
- package/build/types/desktop/cmp/daterange/index.d.ts +2 -0
- package/build/types/desktop/cmp/dock/DockContainerModel.d.ts +3 -1
- package/build/types/desktop/cmp/dock/DockViewModel.d.ts +3 -1
- package/build/types/desktop/cmp/grouping/GroupingChooser.d.ts +4 -1
- package/build/types/desktop/cmp/input/IntentInput.d.ts +38 -0
- package/build/types/desktop/cmp/input/NumberInput.d.ts +2 -2
- package/build/types/desktop/cmp/input/SegmentedControl.d.ts +25 -4
- package/build/types/desktop/cmp/input/TextArea.d.ts +2 -2
- package/build/types/desktop/cmp/input/TextInput.d.ts +2 -2
- package/build/types/desktop/cmp/input/index.d.ts +1 -0
- package/build/types/desktop/cmp/leftrightchooser/LeftRightChooserModel.d.ts +3 -1
- package/build/types/desktop/cmp/panel/PanelModel.d.ts +3 -1
- package/build/types/desktop/cmp/rest/RestGridModel.d.ts +1 -1
- package/build/types/desktop/cmp/tab/impl/TabContainer.d.ts +1 -1
- package/build/types/desktop/hooks/UseHotkeys.d.ts +4 -3
- package/build/types/icon/Icon.d.ts +3 -0
- package/build/types/inspector/impl/InspectorUtils.d.ts +3 -0
- package/build/types/inspector/instances/InstancesModel.d.ts +4 -0
- package/build/types/kit/react-day-picker/index.d.ts +3 -3
- package/build/types/mobile/cmp/button/Button.d.ts +2 -2
- package/build/types/mobile/cmp/input/NumberInput.d.ts +2 -2
- package/build/types/mobile/cmp/input/SegmentedControl.d.ts +18 -4
- package/build/types/mobile/cmp/input/TextArea.d.ts +2 -2
- package/build/types/mobile/cmp/input/TextInput.d.ts +2 -2
- package/build/types/mobile/cmp/navigator/NavigatorModel.d.ts +8 -2
- package/build/types/mobile/cmp/navigator/PageModel.d.ts +3 -1
- package/build/types/mobile/cmp/tab/impl/TabContainer.d.ts +1 -1
- package/build/types/svc/InspectorService.d.ts +1 -0
- package/build/types/utils/js/LangUtils.d.ts +24 -5
- package/cmp/README.md +1 -0
- package/cmp/ag-grid/AgGridModel.ts +5 -0
- package/cmp/badge/Badge.ts +5 -3
- package/cmp/card/Card.ts +4 -3
- package/cmp/chart/ChartModel.ts +11 -1
- package/cmp/clock/Clock.ts +1 -1
- package/cmp/dataview/DataViewModel.ts +7 -1
- package/cmp/daterange/DateRangePickerModel.ts +628 -0
- package/cmp/daterange/DateRangePresets.ts +274 -0
- package/cmp/daterange/DateRangeUtils.ts +557 -0
- package/cmp/daterange/README.md +434 -0
- package/cmp/daterange/Types.ts +203 -0
- package/cmp/daterange/index.ts +10 -0
- package/cmp/filter/FilterChooserModel.ts +7 -4
- package/cmp/form/FormModel.ts +6 -0
- package/cmp/form/README.md +1 -0
- package/cmp/grid/GridModel.ts +24 -4
- package/cmp/grid/Types.ts +3 -0
- package/cmp/grid/filter/GridFilterModel.ts +3 -1
- package/cmp/grid/impl/ColumnWidthCalculator.ts +5 -10
- package/cmp/grouping/GroupingChooserModel.ts +6 -1
- package/cmp/input/HoistInputProps.ts +50 -2
- package/cmp/input/README.md +42 -0
- package/cmp/layout/Box.ts +3 -2
- package/cmp/tab/TabContainerModel.ts +9 -1
- package/cmp/tab/TabModel.ts +5 -0
- package/cmp/treemap/SplitTreeMapModel.ts +12 -2
- package/cmp/treemap/TreeMapModel.ts +6 -1
- package/cmp/viewmanager/ViewManagerModel.ts +6 -1
- package/cmp/zoneGrid/ZoneGridModel.ts +7 -0
- package/core/HoistBase.ts +11 -0
- package/core/HoistProps.ts +27 -0
- package/core/README.md +46 -0
- package/core/impl/InstallServices.ts +5 -1
- package/core/model/RootRefreshContextModel.ts +2 -0
- package/core/types/Telemetry.ts +1 -1
- package/data/README.md +3 -1
- package/data/Store.ts +7 -0
- package/data/StoreSelectionModel.ts +5 -1
- package/data/cube/Cube.ts +12 -3
- package/data/cube/View.ts +5 -1
- package/desktop/README.md +2 -0
- package/desktop/appcontainer/LoginPanel.ts +2 -0
- package/desktop/cmp/button/Button.scss +71 -42
- package/desktop/cmp/button/Button.ts +10 -1
- package/desktop/cmp/button/ButtonGroup.ts +4 -1
- package/desktop/cmp/button/grid/ColChooserButton.ts +9 -1
- package/desktop/cmp/button/zoneGrid/ZoneMapperButton.ts +1 -0
- package/desktop/cmp/dash/DashConfig.ts +3 -0
- package/desktop/cmp/dash/DashViewModel.ts +14 -1
- package/desktop/cmp/dash/canvas/DashCanvasModel.ts +3 -1
- package/desktop/cmp/dash/container/DashContainerModel.ts +3 -1
- package/desktop/cmp/daterange/DateRangePicker.scss +577 -0
- package/desktop/cmp/daterange/DateRangePicker.ts +357 -0
- package/desktop/cmp/daterange/impl/CustomTab.ts +165 -0
- package/desktop/cmp/daterange/impl/DateRangePickerLocalModel.ts +482 -0
- package/desktop/cmp/daterange/impl/PeriodTab.ts +138 -0
- package/desktop/cmp/daterange/impl/PresetsTab.ts +58 -0
- package/desktop/cmp/daterange/impl/RelativeTab.ts +108 -0
- package/desktop/cmp/daterange/impl/TabUtils.ts +34 -0
- package/desktop/cmp/daterange/index.ts +8 -0
- package/desktop/cmp/dock/DockContainerModel.ts +6 -1
- package/desktop/cmp/dock/DockViewModel.ts +6 -1
- package/desktop/cmp/filechooser/FileChooser.ts +4 -0
- package/desktop/cmp/form/FormField.ts +1 -0
- package/desktop/cmp/grid/editors/DateEditor.ts +11 -2
- package/desktop/cmp/grouping/GroupingChooser.ts +8 -2
- package/desktop/cmp/input/Checkbox.ts +1 -0
- package/desktop/cmp/input/CodeInput.ts +1 -0
- package/desktop/cmp/input/DateInput.scss +1 -1
- package/desktop/cmp/input/DateInput.ts +1 -0
- package/desktop/cmp/input/IntentInput.scss +202 -0
- package/desktop/cmp/input/IntentInput.ts +213 -0
- package/desktop/cmp/input/NumberInput.ts +11 -2
- package/desktop/cmp/input/Picker.ts +1 -0
- package/desktop/cmp/input/RadioInput.ts +2 -1
- package/desktop/cmp/input/SegmentedControl.scss +57 -5
- package/desktop/cmp/input/SegmentedControl.ts +66 -11
- package/desktop/cmp/input/Select.ts +9 -7
- package/desktop/cmp/input/Slider.ts +2 -0
- package/desktop/cmp/input/SwitchInput.ts +1 -0
- package/desktop/cmp/input/TextArea.ts +11 -2
- package/desktop/cmp/input/TextInput.ts +11 -2
- package/desktop/cmp/input/index.ts +1 -0
- package/desktop/cmp/leftrightchooser/LeftRightChooserModel.ts +5 -0
- package/desktop/cmp/panel/Panel.ts +8 -5
- package/desktop/cmp/panel/PanelModel.ts +8 -0
- package/desktop/cmp/panel/impl/ResizeContainer.ts +2 -1
- package/desktop/cmp/rest/RestGridModel.ts +4 -0
- package/desktop/cmp/tab/impl/TabContainer.ts +2 -0
- package/desktop/cmp/toolbar/Toolbar.scss +20 -6
- package/desktop/hooks/UseHotkeys.ts +41 -12
- package/docs/README.md +2 -0
- package/docs/build-and-publish.md +23 -7
- package/docs/doc-registry.json +8 -0
- package/docs/version-compatibility.md +2 -0
- package/icon/Icon.ts +9 -0
- package/icon/index.ts +24 -0
- package/inspector/README.md +8 -2
- package/inspector/impl/InspectorUtils.ts +12 -0
- package/inspector/instances/DiagnosticsModel.ts +3 -2
- package/inspector/instances/InstancesModel.ts +81 -14
- package/inspector/instances/InstancesPanel.ts +6 -0
- package/kit/react-day-picker/index.ts +3 -3
- package/mobile/appcontainer/LoginPanel.ts +2 -0
- package/mobile/cmp/button/Button.ts +16 -3
- package/mobile/cmp/form/FormField.ts +1 -0
- package/mobile/cmp/input/Checkbox.ts +1 -0
- package/mobile/cmp/input/DateInput.ts +1 -0
- package/mobile/cmp/input/Label.ts +13 -8
- package/mobile/cmp/input/NumberInput.ts +11 -2
- package/mobile/cmp/input/SearchInput.ts +1 -0
- package/mobile/cmp/input/SegmentedControl.scss +36 -6
- package/mobile/cmp/input/SegmentedControl.ts +37 -11
- package/mobile/cmp/input/Select.ts +2 -0
- package/mobile/cmp/input/SwitchInput.ts +1 -0
- package/mobile/cmp/input/TextArea.ts +11 -2
- package/mobile/cmp/input/TextInput.ts +11 -2
- package/mobile/cmp/navigator/NavigatorModel.ts +20 -8
- package/mobile/cmp/navigator/PageModel.ts +6 -1
- package/mobile/cmp/tab/impl/TabContainer.ts +9 -1
- package/package.json +19 -19
- package/styles/vars.scss +32 -2
- package/svc/InspectorService.ts +2 -0
- package/svc/TraceService.ts +5 -2
- package/utils/js/LangUtils.ts +37 -5
|
@@ -47,6 +47,8 @@ export interface DockViewConfig {
|
|
|
47
47
|
allowDialog?: boolean;
|
|
48
48
|
/** Awaitable callback invoked on close. Return false to prevent close. */
|
|
49
49
|
onClose?: () => Awaitable<boolean | void>;
|
|
50
|
+
/** See {@link HoistBase.xhName}. */
|
|
51
|
+
xhName?: string;
|
|
50
52
|
}
|
|
51
53
|
/**
|
|
52
54
|
* Model for a DockView within a DockContainer. Specifies the actual content (child component)
|
|
@@ -79,7 +81,7 @@ export declare class DockViewModel extends HoistModel {
|
|
|
79
81
|
get isActive(): boolean;
|
|
80
82
|
get renderMode(): RenderMode;
|
|
81
83
|
get refreshMode(): RefreshMode;
|
|
82
|
-
constructor({ id, containerModel, title, icon, content, width, height, collapsedWidth, dialogWidth, dialogHeight, refreshMode, renderMode, docked, collapsed, allowClose, allowDialog, onClose }: DockViewConfig);
|
|
84
|
+
constructor({ id, containerModel, title, icon, content, width, height, collapsedWidth, dialogWidth, dialogHeight, refreshMode, renderMode, docked, collapsed, allowClose, allowDialog, onClose, xhName }: DockViewConfig);
|
|
83
85
|
toggleDocked(): void;
|
|
84
86
|
showInDialog(): void;
|
|
85
87
|
showInDock(): void;
|
|
@@ -25,7 +25,10 @@ export interface GroupingChooserProps extends ButtonProps<GroupingChooserModel>
|
|
|
25
25
|
* If unspecified, will default based on favorites enabled status + side.
|
|
26
26
|
*/
|
|
27
27
|
popoverWidth?: number;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* True (default) to style trigger button background and borders to match inputs. Set to false
|
|
30
|
+
* to render an outlined button instead.
|
|
31
|
+
*/
|
|
29
32
|
styleButtonAsInput?: boolean;
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
2
|
+
import { HoistProps, Intent } from '@xh/hoist/core';
|
|
3
|
+
import '@xh/hoist/desktop/register';
|
|
4
|
+
import './IntentInput.scss';
|
|
5
|
+
export declare const INTENTS: Intent[];
|
|
6
|
+
export interface IntentInputProps extends HoistProps, HoistInputProps {
|
|
7
|
+
/** True to render in a compact mode with reduced sizing for space-constrained contexts. */
|
|
8
|
+
compact?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* True to offer a null value, rendered as an additional outlined swatch ahead of the intents
|
|
11
|
+
* and holding the check while the value is null. Defaults to false, leaving the control a
|
|
12
|
+
* required single-select.
|
|
13
|
+
*/
|
|
14
|
+
enableClear?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Intents to offer, in render order. Defaults to all four Hoist intents - specify a subset
|
|
17
|
+
* to restrict or reorder the available choices.
|
|
18
|
+
*/
|
|
19
|
+
intents?: Intent[];
|
|
20
|
+
/**
|
|
21
|
+
* True to render each intent's name alongside its swatch. Defaults to false, for the most
|
|
22
|
+
* compact presentation - note swatches always carry their intent name as a tooltip and as
|
|
23
|
+
* their accessible label, so an unlabelled control remains identifiable.
|
|
24
|
+
*/
|
|
25
|
+
showNames?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* An input for selecting a Hoist Intent, rendered as a compact row of color swatches drawn in
|
|
29
|
+
* the intent colors themselves. The selected swatch is marked with a check and a surrounding
|
|
30
|
+
* ring; names can optionally be rendered alongside each swatch.
|
|
31
|
+
*
|
|
32
|
+
* Set `enableClear` to offer a null value, rendered as an additional outlined swatch ahead of
|
|
33
|
+
* the intents.
|
|
34
|
+
*
|
|
35
|
+
* Designed to fit within a toolbar or a dense form without additional chrome. Swatches are
|
|
36
|
+
* rendered as an ARIA radiogroup, supporting selection via click, enter/space, and arrow keys.
|
|
37
|
+
*/
|
|
38
|
+
export declare const IntentInput: import("react").FC<IntentInputProps>, intentInput: import("@xh/hoist/core").ElementFactory<IntentInputProps>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
1
|
+
import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
|
|
2
2
|
import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
|
|
3
3
|
import '@xh/hoist/desktop/register';
|
|
4
4
|
import { NumericPrecision, ZeroPad } from '@xh/hoist/format';
|
|
5
5
|
import type { Property } from 'csstype';
|
|
6
6
|
import { KeyboardEventHandler, ReactElement, ReactNode, Ref } from 'react';
|
|
7
|
-
export interface NumberInputProps extends HoistProps, LayoutProps, StyleProps, HoistInputProps {
|
|
7
|
+
export interface NumberInputProps extends HoistProps, LayoutProps, StyleProps, HoistInputProps, PasswordManagerSupportProps {
|
|
8
8
|
value?: number;
|
|
9
9
|
/** True to focus the control on render. */
|
|
10
10
|
autoFocus?: boolean;
|
|
@@ -6,8 +6,16 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
|
|
|
6
6
|
/** True to render in a compact mode with reduced sizing for space-constrained contexts. */
|
|
7
7
|
compact?: boolean;
|
|
8
8
|
/**
|
|
9
|
-
* True (default) to
|
|
10
|
-
*
|
|
9
|
+
* True (default) to render all segments at an equal width when {@link fill} is enabled,
|
|
10
|
+
* dividing the available width into equal parts regardless of label length - the conventional
|
|
11
|
+
* segmented-control appearance. Set false to instead size each segment to its content and
|
|
12
|
+
* share only the leftover space, so a longer label yields a wider segment. No effect when
|
|
13
|
+
* `fill` is false.
|
|
14
|
+
*/
|
|
15
|
+
equalSegmentWidths?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* True (default) to stretch the control to fill available width. Set false to size the control
|
|
18
|
+
* to its options. See `equalSegmentWidths` for how the filled width is divided up.
|
|
11
19
|
*/
|
|
12
20
|
fill?: boolean;
|
|
13
21
|
/**
|
|
@@ -23,10 +31,23 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
|
|
|
23
31
|
*/
|
|
24
32
|
options: Array<SegmentedControlOption | SegmentedControlNullOption | OptionPrimitive>;
|
|
25
33
|
/**
|
|
26
|
-
* True to render
|
|
27
|
-
*
|
|
34
|
+
* True (default) to render a border around the control tray. Border color follows the current
|
|
35
|
+
* intent. Note this controls the tray border only - it does not remove the tray background,
|
|
36
|
+
* which is governed independently by `showTrayBackground`.
|
|
28
37
|
*/
|
|
29
38
|
outlined?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* True (default) to fill the control tray with a background, setting it off from the surface
|
|
41
|
+
* behind it. Set false to omit that fill for a lighter presentation.
|
|
42
|
+
*/
|
|
43
|
+
showTrayBackground?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* True to render dividers between options, adding internal structure to the tray. Dividers
|
|
46
|
+
* are suppressed on either side of the selected option so they do not compete with it.
|
|
47
|
+
* Defaults to 'auto', showing dividers only while no option is selected - the state in which
|
|
48
|
+
* the tray offers no other cue that its options are separate and selectable.
|
|
49
|
+
*/
|
|
50
|
+
showOptionDividers?: boolean | 'auto';
|
|
30
51
|
}
|
|
31
52
|
/**
|
|
32
53
|
* An input for selecting a single value from a small set of mutually exclusive options,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
1
|
+
import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
|
|
2
2
|
import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
|
|
3
3
|
import '@xh/hoist/desktop/register';
|
|
4
4
|
import { Ref } from 'react';
|
|
5
5
|
import './TextArea.scss';
|
|
6
|
-
export interface TextAreaProps extends HoistProps, HoistInputProps, LayoutProps, StyleProps {
|
|
6
|
+
export interface TextAreaProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, LayoutProps, StyleProps {
|
|
7
7
|
value?: string;
|
|
8
8
|
/** True to focus the control on render. */
|
|
9
9
|
autoFocus?: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HoistInputModel, HoistInputProps } from '@xh/hoist/cmp/input';
|
|
1
|
+
import { HoistInputModel, HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
|
|
2
2
|
import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
|
|
3
3
|
import '@xh/hoist/desktop/register';
|
|
4
4
|
import type { Property } from 'csstype';
|
|
5
5
|
import { FocusEvent, KeyboardEventHandler, ReactElement, ReactNode, Ref } from 'react';
|
|
6
|
-
export interface TextInputProps extends HoistProps, HoistInputProps, LayoutProps, StyleProps {
|
|
6
|
+
export interface TextInputProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, LayoutProps, StyleProps {
|
|
7
7
|
value?: string;
|
|
8
8
|
/**
|
|
9
9
|
* HTML `autocomplete` attribute to set on underlying <input> element.
|
|
@@ -32,6 +32,8 @@ export interface LeftRightChooserConfig {
|
|
|
32
32
|
rightEmptyText?: string;
|
|
33
33
|
/** @internal */
|
|
34
34
|
xhImpl?: boolean;
|
|
35
|
+
/** See {@link HoistBase.xhName}. */
|
|
36
|
+
xhName?: string;
|
|
35
37
|
}
|
|
36
38
|
/** Data record object for a LeftRightChooser value item. */
|
|
37
39
|
export interface LeftRightChooserItem {
|
|
@@ -82,7 +84,7 @@ export declare class LeftRightChooserModel extends HoistModel {
|
|
|
82
84
|
get rightValues(): any[];
|
|
83
85
|
/** Currently 'selected' values on the left hand side. */
|
|
84
86
|
get leftValues(): any[];
|
|
85
|
-
constructor({ data, onChange, ungroupedName, leftTitle, leftSorted, leftSortBy, leftGroupingEnabled, leftGroupingExpanded, leftEmptyText, readonly, rightTitle, rightSorted, rightSortBy, rightGroupingEnabled, rightGroupingExpanded, rightEmptyText, showCounts, xhImpl }: LeftRightChooserConfig);
|
|
87
|
+
constructor({ data, onChange, ungroupedName, leftTitle, leftSorted, leftSortBy, leftGroupingEnabled, leftGroupingExpanded, leftEmptyText, readonly, rightTitle, rightSorted, rightSortBy, rightGroupingEnabled, rightGroupingExpanded, rightEmptyText, showCounts, xhName, xhImpl }: LeftRightChooserConfig);
|
|
86
88
|
setData(data: LeftRightChooserItem[]): void;
|
|
87
89
|
moveRows(rows: StoreRecord[]): void;
|
|
88
90
|
private getTextColRenderer;
|
|
@@ -70,6 +70,8 @@ export interface PanelConfig {
|
|
|
70
70
|
showModalToggleButton?: boolean;
|
|
71
71
|
/** @internal */
|
|
72
72
|
xhImpl?: any;
|
|
73
|
+
/** See {@link HoistBase.xhName}. */
|
|
74
|
+
xhName?: string;
|
|
73
75
|
}
|
|
74
76
|
export interface PanelPersistState {
|
|
75
77
|
collapsed?: boolean;
|
|
@@ -119,7 +121,7 @@ export declare class PanelModel extends HoistModel implements Persistable<PanelP
|
|
|
119
121
|
get isActive(): boolean;
|
|
120
122
|
_resizeRef: React.RefObject<HTMLDivElement>;
|
|
121
123
|
splitterRef: React.RefObject<HTMLDivElement>;
|
|
122
|
-
constructor({ collapsible, resizable, resizeWhileDragging, defaultSize, minSize, maxSize, defaultCollapsed, side, modalSupport, errorBoundary, renderMode, refreshMode, persistWith, showSplitter, showSplitterCollapseButton, showHeaderCollapseButton, showModalToggleButton, xhImpl }: PanelConfig);
|
|
124
|
+
constructor({ collapsible, resizable, resizeWhileDragging, defaultSize, minSize, maxSize, defaultCollapsed, side, modalSupport, errorBoundary, renderMode, refreshMode, persistWith, showSplitter, showSplitterCollapseButton, showHeaderCollapseButton, showModalToggleButton, xhName, xhImpl }: PanelConfig);
|
|
123
125
|
setCollapsed(collapsed: boolean): void;
|
|
124
126
|
toggleCollapsed(): void;
|
|
125
127
|
setIsModal(isModal: boolean): void;
|
|
@@ -101,7 +101,7 @@ export declare class RestGridModel extends HoistModel {
|
|
|
101
101
|
get selModel(): import("@xh/hoist/data").StoreSelectionModel;
|
|
102
102
|
get selectedRecords(): StoreRecord[];
|
|
103
103
|
get selectedRecord(): StoreRecord;
|
|
104
|
-
constructor({ readonly, toolbarActions, menuActions, formActions, showRefreshButton, actionWarning, prepareCloneFn, unit, filterFields, editors, onRowDoubleClicked, store, appData, ...rest }: RestGridConfig);
|
|
104
|
+
constructor({ readonly, toolbarActions, menuActions, formActions, showRefreshButton, actionWarning, prepareCloneFn, unit, filterFields, editors, onRowDoubleClicked, store, appData, xhName, ...rest }: RestGridConfig);
|
|
105
105
|
/** Load the underlying store. */
|
|
106
106
|
doLoadAsync(loadSpec: any): Promise<void>;
|
|
107
107
|
/** Load the underlying store. */
|
|
@@ -4,4 +4,4 @@ import '../Tabs.scss';
|
|
|
4
4
|
* Desktop implementation of TabContainer.
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export declare function tabContainerImpl({ model, childContainerProps, className, testId, ...props }: TabContainerProps): import("react").ReactElement<import("@xh/hoist/cmp/layout").BoxComponentProps, any>;
|
|
7
|
+
export declare function tabContainerImpl({ model, childContainerProps, className, testId, domAttrs, ...props }: TabContainerProps): import("react").ReactElement<import("@xh/hoist/cmp/layout").BoxComponentProps, any>;
|
|
@@ -6,9 +6,10 @@ import { HotkeyConfig } from '@blueprintjs/core/src/hooks/hotkeys/hotkeyConfig';
|
|
|
6
6
|
* The implementation of this hook is based on BlueprintJS.
|
|
7
7
|
* See their docs {@link https://blueprintjs.com/docs/#core/components/hotkeys} for more info.
|
|
8
8
|
*
|
|
9
|
+
* Both args may change across renders - keys are (de)registered as they do.
|
|
10
|
+
*
|
|
9
11
|
* @param child - element to be given hotkey support. Must specify Component
|
|
10
12
|
* that takes react key events as props (e.g. boxes, panel, div, etc).
|
|
11
|
-
* @param hotkeys -
|
|
12
|
-
* as prescribed by blueprint. A Hotkeys element may also be provided.
|
|
13
|
+
* @param hotkeys - configs for the hotkeys to be installed, as prescribed by blueprint.
|
|
13
14
|
*/
|
|
14
|
-
export declare function useHotkeys(child?: ReactElement<any>, hotkeys?: HotkeyConfig[]): ReactElement
|
|
15
|
+
export declare function useHotkeys(child?: ReactElement<any>, hotkeys?: HotkeyConfig[]): ReactElement;
|
|
@@ -80,6 +80,7 @@ export declare const Icon: {
|
|
|
80
80
|
arrowsLeftRight(p?: IconProps): any;
|
|
81
81
|
arrowsRotate(p?: IconProps): any;
|
|
82
82
|
arrowsUpDown(p?: IconProps): any;
|
|
83
|
+
asterisk(p?: IconProps): any;
|
|
83
84
|
balanceScale(p?: IconProps): any;
|
|
84
85
|
balanceScaleLeft(p?: IconProps): any;
|
|
85
86
|
balanceScaleRight(p?: IconProps): any;
|
|
@@ -94,6 +95,8 @@ export declare const Icon: {
|
|
|
94
95
|
bullhorn(p?: IconProps): any;
|
|
95
96
|
calculator(p?: IconProps): any;
|
|
96
97
|
calendar(p?: IconProps): any;
|
|
98
|
+
calendarDays(p?: IconProps): any;
|
|
99
|
+
calendarRange(p?: IconProps): any;
|
|
97
100
|
camera(p?: IconProps): any;
|
|
98
101
|
caretLeft(p?: IconProps): any;
|
|
99
102
|
caretRight(p?: IconProps): any;
|
|
@@ -23,9 +23,12 @@ export declare class InstancesModel extends HoistModel {
|
|
|
23
23
|
loadedGetters: any[];
|
|
24
24
|
instancesStoreFilter: any;
|
|
25
25
|
propertiesStoreFilter: any;
|
|
26
|
+
/** Keys of favorited instances (`{className}:{xhName}`) - requires an `xhName` to pin. */
|
|
27
|
+
favorites: string[];
|
|
26
28
|
instQuickFilters: string[];
|
|
27
29
|
get showInGroups(): boolean;
|
|
28
30
|
get showXhImpl(): boolean;
|
|
31
|
+
get favoritesOnly(): boolean;
|
|
29
32
|
propQuickFilters: any[];
|
|
30
33
|
get showUnderscoreProps(): boolean;
|
|
31
34
|
get observablePropsOnly(): boolean;
|
|
@@ -35,6 +38,7 @@ export declare class InstancesModel extends HoistModel {
|
|
|
35
38
|
selectInstanceAsync(xhId: string): Promise<void>;
|
|
36
39
|
logInstanceToConsole(rec: StoreRecord): void;
|
|
37
40
|
logPropToConsole(rec: StoreRecord): void;
|
|
41
|
+
toggleFavorite(record: StoreRecord): void;
|
|
38
42
|
togglePropsWatchlistItem(record: StoreRecord): void;
|
|
39
43
|
getInstance(xhId: string): HoistBase;
|
|
40
44
|
private createInstancesGridModel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DayPicker } from 'react
|
|
2
|
-
import 'react
|
|
1
|
+
import { DayPicker } from '@daypicker/react';
|
|
2
|
+
import '@daypicker/react/style.css';
|
|
3
3
|
export { DayPicker };
|
|
4
|
-
export type { DayPickerProps, Matcher } from 'react
|
|
4
|
+
export type { DayPickerProps, Matcher } from '@daypicker/react';
|
|
5
5
|
export declare const dayPicker: import("@xh/hoist/core").ElementFactory<any>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { LayoutProps, StyleProps, HoistModel, HoistProps, TestSupportProps, Intent } from '@xh/hoist/core';
|
|
1
|
+
import { DomAttrsProps, LayoutProps, StyleProps, HoistModel, HoistProps, TestSupportProps, Intent } from '@xh/hoist/core';
|
|
2
2
|
import '@xh/hoist/mobile/register';
|
|
3
3
|
import { ReactNode, ReactElement, MouseEvent } from 'react';
|
|
4
4
|
import './Button.scss';
|
|
5
|
-
export interface ButtonProps<M extends HoistModel = HoistModel> extends HoistProps<M>, TestSupportProps, LayoutProps, StyleProps {
|
|
5
|
+
export interface ButtonProps<M extends HoistModel = HoistModel> extends HoistProps<M>, TestSupportProps, DomAttrsProps, LayoutProps, StyleProps {
|
|
6
6
|
active?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
icon?: ReactElement;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
1
|
+
import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
|
|
2
2
|
import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
|
|
3
3
|
import { NumericPrecision, ZeroPad } from '@xh/hoist/format';
|
|
4
4
|
import '@xh/hoist/mobile/register';
|
|
5
5
|
import type { Property } from 'csstype';
|
|
6
6
|
import './NumberInput.scss';
|
|
7
|
-
export interface NumberInputProps extends HoistProps, HoistInputProps, StyleProps, LayoutProps {
|
|
7
|
+
export interface NumberInputProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, StyleProps, LayoutProps {
|
|
8
8
|
value?: number;
|
|
9
9
|
/** True to commit on every change/keystroke, default false. */
|
|
10
10
|
commitOnChange?: boolean;
|
|
@@ -12,8 +12,8 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
|
|
|
12
12
|
*/
|
|
13
13
|
equalSegmentWidths?: boolean;
|
|
14
14
|
/**
|
|
15
|
-
* True (default) to stretch the control to fill available width
|
|
16
|
-
*
|
|
15
|
+
* True (default) to stretch the control to fill available width. Set false to size the control
|
|
16
|
+
* to its options. See `equalSegmentWidths` for how the filled width is divided up.
|
|
17
17
|
*/
|
|
18
18
|
fill?: boolean;
|
|
19
19
|
/**
|
|
@@ -29,10 +29,24 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
|
|
|
29
29
|
*/
|
|
30
30
|
options: Array<SegmentedControlOption | SegmentedControlNullOption | OptionPrimitive>;
|
|
31
31
|
/**
|
|
32
|
-
* True to render
|
|
33
|
-
*
|
|
32
|
+
* True (default) to render a border around the control tray. Border color follows the current
|
|
33
|
+
* intent. Note this controls the tray border only - it does not remove the tray background,
|
|
34
|
+
* which is governed independently by `showTrayBackground`.
|
|
34
35
|
*/
|
|
35
36
|
outlined?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* True (default) to fill the control tray with a background, setting it off from the surface
|
|
39
|
+
* behind it. Set false to omit that fill for a lighter presentation. With no tray to set a
|
|
40
|
+
* filled tile against, the selected option is indicated with a ring instead.
|
|
41
|
+
*/
|
|
42
|
+
showTrayBackground?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* True to render dividers between options, adding internal structure to the tray. Dividers
|
|
45
|
+
* are suppressed on either side of the selected option so they do not compete with it.
|
|
46
|
+
* Defaults to 'auto', showing dividers only while no option is selected - the state in which
|
|
47
|
+
* the tray offers no other cue that its options are separate and selectable.
|
|
48
|
+
*/
|
|
49
|
+
showOptionDividers?: boolean | 'auto';
|
|
36
50
|
}
|
|
37
51
|
/**
|
|
38
52
|
* An input for selecting a single value from a small set of mutually exclusive options,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
1
|
+
import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
|
|
2
2
|
import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
|
|
3
3
|
import '@xh/hoist/mobile/register';
|
|
4
4
|
import './TextArea.scss';
|
|
5
|
-
export interface TextAreaProps extends HoistProps, HoistInputProps, StyleProps, LayoutProps {
|
|
5
|
+
export interface TextAreaProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, StyleProps, LayoutProps {
|
|
6
6
|
value?: string;
|
|
7
7
|
/** True to commit on every change/keystroke, default false. */
|
|
8
8
|
commitOnChange?: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { HoistInputProps } from '@xh/hoist/cmp/input';
|
|
1
|
+
import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
|
|
2
2
|
import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
|
|
3
3
|
import '@xh/hoist/mobile/register';
|
|
4
4
|
import type { Property } from 'csstype';
|
|
5
5
|
import { ReactElement } from 'react';
|
|
6
6
|
import './TextInput.scss';
|
|
7
|
-
export interface TextInputProps extends HoistProps, HoistInputProps, StyleProps, LayoutProps {
|
|
7
|
+
export interface TextInputProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, StyleProps, LayoutProps {
|
|
8
8
|
value?: string;
|
|
9
9
|
/**
|
|
10
10
|
* HTML `autocapitalize` attribute to set on underlying <input> element.
|
|
@@ -35,6 +35,8 @@ export interface NavigatorConfig {
|
|
|
35
35
|
* See enum for description of supported modes.
|
|
36
36
|
*/
|
|
37
37
|
refreshMode?: RefreshMode;
|
|
38
|
+
/** See {@link HoistBase.xhName}. */
|
|
39
|
+
xhName?: string;
|
|
38
40
|
}
|
|
39
41
|
/**
|
|
40
42
|
* Model for handling stack-based navigation between pages.
|
|
@@ -43,6 +45,11 @@ export interface NavigatorConfig {
|
|
|
43
45
|
export declare class NavigatorModel extends HoistModel {
|
|
44
46
|
disableAppRefreshButton: boolean;
|
|
45
47
|
stack: PageModel[];
|
|
48
|
+
/**
|
|
49
|
+
* Index of the active page, synced from Swiper as each transition completes. Observable so
|
|
50
|
+
* `allowSlideNext`/`allowSlidePrev` stay current - Swiper silently skips locked directions.
|
|
51
|
+
*/
|
|
52
|
+
activePageIdx: number;
|
|
46
53
|
pages: PageConfig[];
|
|
47
54
|
track: boolean;
|
|
48
55
|
pullDownToRefresh: boolean;
|
|
@@ -54,10 +61,9 @@ export declare class NavigatorModel extends HoistModel {
|
|
|
54
61
|
private _touchStartX;
|
|
55
62
|
get activePageId(): string;
|
|
56
63
|
get activePage(): PageModel;
|
|
57
|
-
get activePageIdx(): number;
|
|
58
64
|
get allowSlideNext(): boolean;
|
|
59
65
|
get allowSlidePrev(): boolean;
|
|
60
|
-
constructor({ pages, track, pullDownToRefresh, transitionMs, renderMode, refreshMode }: NavigatorConfig);
|
|
66
|
+
constructor({ pages, track, pullDownToRefresh, transitionMs, renderMode, refreshMode, xhName }: NavigatorConfig);
|
|
61
67
|
/**
|
|
62
68
|
* @param callback - function to execute (once) after the next page transition.
|
|
63
69
|
*/
|
|
@@ -37,6 +37,8 @@ export interface PageConfig {
|
|
|
37
37
|
* no need to specify manually.
|
|
38
38
|
*/
|
|
39
39
|
navigatorModel?: NavigatorModel;
|
|
40
|
+
/** See {@link HoistBase.xhName}. */
|
|
41
|
+
xhName?: string;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
44
|
* Model for a Page within a Navigator. Specifies the actual content (i.e. page)
|
|
@@ -64,5 +66,5 @@ export declare class PageModel extends HoistModel {
|
|
|
64
66
|
get renderMode(): RenderMode;
|
|
65
67
|
get refreshMode(): RefreshMode;
|
|
66
68
|
get isActive(): boolean;
|
|
67
|
-
constructor({ id, navigatorModel, content, props, renderMode, refreshMode, disableDirectLink, disableAppRefreshButton }: PageConfig);
|
|
69
|
+
constructor({ id, navigatorModel, content, props, renderMode, refreshMode, disableDirectLink, disableAppRefreshButton, xhName }: PageConfig);
|
|
68
70
|
}
|
|
@@ -6,4 +6,4 @@ import { TabContainerProps } from '@xh/hoist/cmp/tab';
|
|
|
6
6
|
*
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
|
-
export declare function tabContainerImpl({ model, className, testId, ...props }: TabContainerProps): import("react").ReactElement<any, any>;
|
|
9
|
+
export declare function tabContainerImpl({ model, className, testId, domAttrs, ...props }: TabContainerProps): import("react").ReactElement<any, any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Thunkable } from '@xh/hoist/core';
|
|
1
|
+
import type { HoistBase, Thunkable } from '@xh/hoist/core';
|
|
2
2
|
/**
|
|
3
3
|
* Get a cached value on an object, creating it if it does not yet exist.
|
|
4
4
|
*
|
|
@@ -121,15 +121,34 @@ 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 - via `
|
|
125
|
-
* components) or `constructor.name` (
|
|
124
|
+
* A string, or an object from which a name can be derived - via `xhName` (HoistBase instances),
|
|
125
|
+
* `displayName` (e.g. React components), or `constructor.name` (class instances). Used for
|
|
126
|
+
* logging and tracing.
|
|
126
127
|
*/
|
|
127
|
-
export type NameSource = string | {
|
|
128
|
+
export type NameSource = string | HoistBase | {
|
|
128
129
|
displayName: string;
|
|
129
130
|
} | {
|
|
130
131
|
constructor: {
|
|
131
132
|
name: string;
|
|
132
133
|
};
|
|
133
134
|
};
|
|
134
|
-
/**
|
|
135
|
+
/**
|
|
136
|
+
* Resolve a {@link NameSource} to a string, or null if unresolvable.
|
|
137
|
+
*
|
|
138
|
+
* A HoistBase instance is labelled per {@link formatInstanceLabel}. Other sources resolve via
|
|
139
|
+
* `xhName` or {@link parseTypeName}.
|
|
140
|
+
*/
|
|
135
141
|
export declare function parseNameSource(source: NameSource): string;
|
|
142
|
+
/**
|
|
143
|
+
* Label for a HoistBase instance - `ClassName [xhName]`, or `ClassName [id]` (short `xhId`) when
|
|
144
|
+
* unnamed. An `xhName` matching the class name (e.g. `fetchService`) marks a singleton and is
|
|
145
|
+
* omitted.
|
|
146
|
+
*/
|
|
147
|
+
export declare function formatInstanceLabel(className: string, xhName: string, xhId: string): string;
|
|
148
|
+
/**
|
|
149
|
+
* Resolve a {@link NameSource} to its type-level name - `displayName` or `constructor.name` -
|
|
150
|
+
* ignoring any instance-level `xhName`. Returns null if unresolvable.
|
|
151
|
+
*
|
|
152
|
+
* @internal - use {@link parseNameSource}.
|
|
153
|
+
*/
|
|
154
|
+
export declare function parseTypeName(source: NameSource): string;
|
package/cmp/README.md
CHANGED
|
@@ -174,6 +174,7 @@ techniques.
|
|
|
174
174
|
|
|
175
175
|
| Sub-package | Description |
|
|
176
176
|
|-------------|-------------|
|
|
177
|
+
| `/daterange/` | DateRangePickerModel for period selection - presets, relative lookbacks, months and years, custom ranges. [See README](./daterange/README.md) |
|
|
177
178
|
| `/filter/` | FilterChooserModel for building filter UIs |
|
|
178
179
|
| `/grouping/` | GroupingChooserModel for dimension selection |
|
|
179
180
|
| `/store/` | Store-related UI components (count label, filter field) |
|
|
@@ -58,6 +58,9 @@ export interface AgGridModelConfig {
|
|
|
58
58
|
|
|
59
59
|
/** @internal */
|
|
60
60
|
xhImpl?: boolean;
|
|
61
|
+
|
|
62
|
+
/** See {@link HoistBase.xhName}. */
|
|
63
|
+
xhName?: string;
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
/**
|
|
@@ -125,11 +128,13 @@ export class AgGridModel extends HoistModel {
|
|
|
125
128
|
stripeRows = true,
|
|
126
129
|
showCellFocus = false,
|
|
127
130
|
hideHeaders = false,
|
|
131
|
+
xhName = null,
|
|
128
132
|
xhImpl = false
|
|
129
133
|
}: AgGridModelConfig = {}) {
|
|
130
134
|
super();
|
|
131
135
|
makeObservable(this);
|
|
132
136
|
this.xhImpl = xhImpl;
|
|
137
|
+
this.xhName = xhName;
|
|
133
138
|
|
|
134
139
|
this.sizingMode = sizingMode;
|
|
135
140
|
this.showHover = showHover;
|
package/cmp/badge/Badge.ts
CHANGED
|
@@ -37,8 +37,10 @@ export const [Badge, badge] = hoistCmp.withFactory<BadgeProps>({
|
|
|
37
37
|
|
|
38
38
|
render(props, ref) {
|
|
39
39
|
const classes = [],
|
|
40
|
-
[
|
|
41
|
-
|
|
40
|
+
[
|
|
41
|
+
layoutProps,
|
|
42
|
+
{className, intent, compact, icon, children, testId, domAttrs, ...restProps}
|
|
43
|
+
] = splitLayoutProps(props);
|
|
42
44
|
|
|
43
45
|
if (intent) {
|
|
44
46
|
classes.push(`xh-bg-intent-${intent}`);
|
|
@@ -51,7 +53,7 @@ export const [Badge, badge] = hoistCmp.withFactory<BadgeProps>({
|
|
|
51
53
|
const divProps = mergeDeep(
|
|
52
54
|
{className: classNames(className, classes)},
|
|
53
55
|
{style: layoutProps},
|
|
54
|
-
{[TEST_ID]: testId},
|
|
56
|
+
{[TEST_ID]: testId, ...domAttrs},
|
|
55
57
|
restProps
|
|
56
58
|
);
|
|
57
59
|
|
package/cmp/card/Card.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import {box, fieldset} from '@xh/hoist/cmp/layout';
|
|
9
9
|
import {
|
|
10
10
|
BoxProps,
|
|
11
|
+
DomAttrsProps,
|
|
11
12
|
hoistCmp,
|
|
12
13
|
HoistProps,
|
|
13
14
|
Intent,
|
|
@@ -26,7 +27,7 @@ import {CardModel} from './CardModel';
|
|
|
26
27
|
import './Card.scss';
|
|
27
28
|
|
|
28
29
|
export interface CardProps<M extends CardModel = CardModel>
|
|
29
|
-
extends HoistProps<M>, TestSupportProps, LayoutProps {
|
|
30
|
+
extends HoistProps<M>, TestSupportProps, DomAttrsProps, LayoutProps {
|
|
30
31
|
/** An icon placed left of the title. */
|
|
31
32
|
icon?: ReactElement;
|
|
32
33
|
/** Intent to apply to the inline header and border. */
|
|
@@ -75,9 +76,9 @@ export const [Card, card] = hoistCmp.withFactory<CardProps>({
|
|
|
75
76
|
const wasDisplayed = useRef(false),
|
|
76
77
|
{collapsed, renderMode} = model;
|
|
77
78
|
|
|
78
|
-
let [layoutProps, {testId, ...restProps}] = splitLayoutProps(rest);
|
|
79
|
+
let [layoutProps, {testId, domAttrs, ...restProps}] = splitLayoutProps(rest);
|
|
79
80
|
|
|
80
|
-
restProps = mergeDeep({style: layoutProps}, {[TEST_ID]: testId}, restProps);
|
|
81
|
+
restProps = mergeDeep({style: layoutProps}, {[TEST_ID]: testId, ...domAttrs}, restProps);
|
|
81
82
|
|
|
82
83
|
const classes: string[] = [];
|
|
83
84
|
|
package/cmp/chart/ChartModel.ts
CHANGED
|
@@ -26,6 +26,9 @@ interface ChartConfig {
|
|
|
26
26
|
|
|
27
27
|
/** @internal */
|
|
28
28
|
xhImpl?: boolean;
|
|
29
|
+
|
|
30
|
+
/** See {@link HoistBase.xhName}. */
|
|
31
|
+
xhName?: string;
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
export interface ChartModelDefaults {
|
|
@@ -86,9 +89,16 @@ export class ChartModel extends HoistModel {
|
|
|
86
89
|
super();
|
|
87
90
|
makeObservable(this);
|
|
88
91
|
|
|
89
|
-
const {
|
|
92
|
+
const {
|
|
93
|
+
highchartsConfig,
|
|
94
|
+
series = [],
|
|
95
|
+
contextMenu,
|
|
96
|
+
xhName = null,
|
|
97
|
+
xhImpl = false
|
|
98
|
+
} = config ?? {};
|
|
90
99
|
|
|
91
100
|
this.xhImpl = xhImpl;
|
|
101
|
+
this.xhName = xhName;
|
|
92
102
|
this.highchartsConfig = highchartsConfig;
|
|
93
103
|
this.series = castArray(series);
|
|
94
104
|
this.contextMenu = this.parseContextMenu(contextMenu);
|
package/cmp/clock/Clock.ts
CHANGED
|
@@ -83,7 +83,7 @@ class ClockLocalModel extends HoistModel {
|
|
|
83
83
|
|
|
84
84
|
override onLinked() {
|
|
85
85
|
this.addReaction({
|
|
86
|
-
track: () => this.componentProps.
|
|
86
|
+
track: () => this.componentProps.timezone,
|
|
87
87
|
run: () => this.loadTimezoneOffsetAsync(),
|
|
88
88
|
fireImmediately: true
|
|
89
89
|
});
|