@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
|
@@ -17,6 +17,7 @@ export class ImpersonationBarModel extends HoistModel {
|
|
|
17
17
|
override telemetryPrefix = 'xh.client.identity';
|
|
18
18
|
|
|
19
19
|
override xhImpl = true;
|
|
20
|
+
override xhName = 'impersonationBarModel';
|
|
20
21
|
|
|
21
22
|
@observable showRequested: boolean = false;
|
|
22
23
|
@observable.ref targets: string[] = [];
|
|
@@ -20,6 +20,8 @@ import 'router5-plugin-browser';
|
|
|
20
20
|
* underlying routes, presenting them to the application as a set of MobX observables.
|
|
21
21
|
*/
|
|
22
22
|
export class RouterModel extends HoistModel {
|
|
23
|
+
override xhName = 'routerModel';
|
|
24
|
+
|
|
23
25
|
/** Router5 state object representing the current state. */
|
|
24
26
|
@observable.ref
|
|
25
27
|
currentState: State;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AppModel } from '@xh/hoist/admin/AppModel';
|
|
2
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* Generate a standardized filename for an Admin module grid export, without datestamp.
|
|
4
5
|
*/
|
|
@@ -9,3 +10,31 @@ export declare function exportFilename(moduleName: string): string;
|
|
|
9
10
|
*/
|
|
10
11
|
export declare function exportFilenameWithDate(moduleName: string): () => string;
|
|
11
12
|
export declare function getAppModel<T extends AppModel>(): T;
|
|
13
|
+
/** Muted "N/A" placeholder for empty values in read-only detail forms. */
|
|
14
|
+
export declare function naSpan(): ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Default readonly renderer for detail forms - FormField's standard formatting (dates, numbers,
|
|
17
|
+
* booleans, JSON, text), or {@link naSpan} when null.
|
|
18
|
+
*/
|
|
19
|
+
export declare function valOrNa(v: any): ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Read-only JsonInput for detail displays - fixed to `height` if given, otherwise filling its
|
|
22
|
+
* container. Pair fill mode with the `xh-admin-readonly-form__fill` class on the enclosing
|
|
23
|
+
* `formFieldSet` to have it take the remaining panel height.
|
|
24
|
+
*/
|
|
25
|
+
export declare function readonlyJsonInput(value: any, height?: number): ReactElement;
|
|
26
|
+
/**
|
|
27
|
+
* Readonly renderer for stored scalar values (config / preference values) - the value as literal
|
|
28
|
+
* text, with no number or date formatting, or {@link naSpan} when null.
|
|
29
|
+
*/
|
|
30
|
+
export declare function rawValueRenderer(v: any): ReactNode;
|
|
31
|
+
/** Readonly renderer for JSON fields in detail forms - {@link readonlyJsonInput} in fill mode. */
|
|
32
|
+
export declare function jsonRenderer(v: any): ReactNode;
|
|
33
|
+
/** Readonly renderer for boolean fields in detail forms - "Yes" / "No", or {@link naSpan} when null. */
|
|
34
|
+
export declare function yesNoRenderer(v: boolean): ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* Readonly renderer for free-text fields in detail forms that may contain Markdown (notes,
|
|
37
|
+
* descriptions). Renders via {@link markdown} within a wrapper styled for compact display, or
|
|
38
|
+
* {@link naSpan} when null.
|
|
39
|
+
*/
|
|
40
|
+
export declare function markdownRenderer(v: string): ReactNode;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ColumnSpec } from '@xh/hoist/cmp/grid/columns';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
2
3
|
export declare const value: ColumnSpec;
|
|
3
4
|
export declare const defaultValue: ColumnSpec;
|
|
4
5
|
export declare const userValue: ColumnSpec;
|
|
5
6
|
export declare const valueType: ColumnSpec;
|
|
7
|
+
/** Renders a config value type (json, string, int, bool, pwd...) as an icon + colored badge. */
|
|
8
|
+
export declare function valueTypeRenderer(valueType: string): ReactElement;
|
|
6
9
|
export declare const groupName: ColumnSpec;
|
|
7
10
|
export declare const clientVisible: ColumnSpec;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FormModel } from '@xh/hoist/cmp/form';
|
|
2
|
+
import { HoistModel } from '@xh/hoist/core';
|
|
3
|
+
import { StoreRecord } from '@xh/hoist/data';
|
|
4
|
+
import { RestGridModel } from '@xh/hoist/desktop/cmp/rest';
|
|
5
|
+
/**
|
|
6
|
+
* Backs a {@link restDetailPanel}. Resolves the host RestGridModel via `@lookup` - the model of an
|
|
7
|
+
* enclosing component must expose it as a public property - then tracks its single selection and
|
|
8
|
+
* mirrors the selected record into a read-only FormModel with a field for every store field.
|
|
9
|
+
*/
|
|
10
|
+
export declare class RestDetailModel extends HoistModel {
|
|
11
|
+
xhImpl: boolean;
|
|
12
|
+
gridModel: RestGridModel;
|
|
13
|
+
formModel: FormModel;
|
|
14
|
+
get record(): StoreRecord;
|
|
15
|
+
get hasSelection(): boolean;
|
|
16
|
+
get readonly(): boolean;
|
|
17
|
+
constructor();
|
|
18
|
+
onLinked(): void;
|
|
19
|
+
edit(): void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FormModel } from '@xh/hoist/cmp/form';
|
|
2
|
+
import { HoistProps, PersistOptions } from '@xh/hoist/core';
|
|
3
|
+
import { StoreRecord } from '@xh/hoist/data';
|
|
4
|
+
import { ReactElement, ReactNode } from 'react';
|
|
5
|
+
import { RestDetailModel } from './RestDetailModel';
|
|
6
|
+
export interface RestDetailPanelProps extends HoistProps<RestDetailModel> {
|
|
7
|
+
/** Icon for the panel header and empty-state placeholder. */
|
|
8
|
+
icon: ReactElement;
|
|
9
|
+
/** Placeholder text when no single record is selected. */
|
|
10
|
+
emptyText?: string;
|
|
11
|
+
/** Default width in pixels. */
|
|
12
|
+
defaultSize?: number;
|
|
13
|
+
/** Minimum width in pixels. */
|
|
14
|
+
minSize?: number;
|
|
15
|
+
/** Options for persisting panel size and collapsed state. */
|
|
16
|
+
persistWith?: PersistOptions;
|
|
17
|
+
/** Panel title for the selected record - defaults to its `name`. */
|
|
18
|
+
titleFn?: (record: StoreRecord) => ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Renders the form body for the selected record - typically one or more `formFieldSet`s of
|
|
21
|
+
* `formField`s bound to the store's field names. Rendered within a read-only `form` bound to
|
|
22
|
+
* the model's FormModel, styled with the `xh-admin-readonly-form` class.
|
|
23
|
+
*/
|
|
24
|
+
renderForm: (record: StoreRecord, formModel: FormModel) => ReactNode;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Read-only detail view of the record selected in a RestGrid, docked to its right. Tracks the
|
|
28
|
+
* grid's selection, refreshes when the grid reloads, and offers an Edit button to open the grid's
|
|
29
|
+
* editor dialog for the selected record.
|
|
30
|
+
*
|
|
31
|
+
* Render as a sibling of `restGrid()` within an `hframe`. The host RestGridModel is resolved via
|
|
32
|
+
* `@lookup`, so the model of an enclosing component must expose it as a public property.
|
|
33
|
+
*/
|
|
34
|
+
export declare const restDetailPanel: import("@xh/hoist/core").ElementFactory<RestDetailPanelProps>;
|
|
@@ -1,26 +1,18 @@
|
|
|
1
1
|
import { ActivityTrackingDataFieldSpec, DataFieldsEditorModel } from '@xh/hoist/admin/tabs/activity/tracking/datafields/DataFieldsEditorModel';
|
|
2
|
+
import { DateRangePickerModel } from '@xh/hoist/cmp/daterange';
|
|
2
3
|
import { FilterChooserModel } from '@xh/hoist/cmp/filter';
|
|
3
4
|
import { FormModel } from '@xh/hoist/cmp/form';
|
|
4
5
|
import { ColumnSpec, GridModel } from '@xh/hoist/cmp/grid';
|
|
5
6
|
import { GroupingChooserModel } from '@xh/hoist/cmp/grouping';
|
|
6
|
-
import { HoistModel, LoadSpec,
|
|
7
|
+
import { HoistModel, LoadSpec, PlainObject } from '@xh/hoist/core';
|
|
7
8
|
import { Cube } from '@xh/hoist/data';
|
|
8
|
-
import { LocalDate } from '@xh/hoist/utils/datetime';
|
|
9
9
|
import { ActivityDetailProvider } from './detail/ActivityDetailModel';
|
|
10
|
-
/**
|
|
11
|
-
* A relative time interval (e.g. 7 days) ending on the current app day. Drives the quick-select
|
|
12
|
-
* buttons and the persisted time period, which rolls forward to end on today on restore.
|
|
13
|
-
*/
|
|
14
|
-
export interface ActivityInterval {
|
|
15
|
-
value: number;
|
|
16
|
-
unit: LocalDateUnit;
|
|
17
|
-
}
|
|
18
|
-
/** Quick-select intervals offered in the toolbar - labels are derived as `${value}${unit[0]}`. */
|
|
19
|
-
export declare const INTERVALS: ActivityInterval[];
|
|
20
10
|
export declare class ActivityTrackingModel extends HoistModel implements ActivityDetailProvider {
|
|
21
11
|
telemetryPrefix: string;
|
|
22
12
|
/** FormModel for server-side querying controls. */
|
|
23
13
|
formModel: FormModel;
|
|
14
|
+
/** Period to query, resolved against the current app day. */
|
|
15
|
+
dateRangePickerModel: DateRangePickerModel;
|
|
24
16
|
/** Models for data-handling components - can be rebuilt due to change in dataFields. */
|
|
25
17
|
groupingChooserModel: GroupingChooserModel;
|
|
26
18
|
cube: Cube;
|
|
@@ -36,7 +28,6 @@ export declare class ActivityTrackingModel extends HoistModel implements Activit
|
|
|
36
28
|
showFilterChooser: boolean;
|
|
37
29
|
get enabled(): boolean;
|
|
38
30
|
get dimensions(): string[];
|
|
39
|
-
get endDay(): LocalDate;
|
|
40
31
|
get hasFilter(): boolean;
|
|
41
32
|
get maxRowOptions(): {
|
|
42
33
|
value: number;
|
|
@@ -54,12 +45,9 @@ export declare class ActivityTrackingModel extends HoistModel implements Activit
|
|
|
54
45
|
doLoadAsync(loadSpec: LoadSpec): Promise<void>;
|
|
55
46
|
setDataFields(dataFields: ActivityTrackingDataFieldSpec[]): void;
|
|
56
47
|
toggleFilterChooser(): void;
|
|
57
|
-
adjustDates(dir: 'add' | 'subtract'): void;
|
|
58
|
-
adjustStartDate(interval: ActivityInterval): void;
|
|
59
|
-
isInterval(interval: ActivityInterval): boolean;
|
|
60
48
|
getDisplayName(fieldName: string): string;
|
|
61
49
|
private createQueryFormModel;
|
|
62
|
-
private
|
|
50
|
+
private createDateRangePickerModel;
|
|
63
51
|
private loadGridAsync;
|
|
64
52
|
private cubeLabelComparator;
|
|
65
53
|
private getComparableValForDim;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConfigPanelModel } from './ConfigPanelModel';
|
|
2
|
+
/**
|
|
3
|
+
* Read-only detail view of the config selected in the grid. Shows the config's metadata and every
|
|
4
|
+
* available view of its value - resolved, instance override, database, and typedClass defaults -
|
|
5
|
+
* opening on the most-derived view.
|
|
6
|
+
*/
|
|
7
|
+
export declare const configDetailPanel: import("@xh/hoist/core").ElementFactory<import("@xh/hoist/core").DefaultHoistProps<ConfigPanelModel>>;
|
|
@@ -3,16 +3,22 @@ import { TabContainerModel } from '@xh/hoist/cmp/tab';
|
|
|
3
3
|
import { HoistModel } from '@xh/hoist/core';
|
|
4
4
|
import './ConfigValue.scss';
|
|
5
5
|
/**
|
|
6
|
-
* Presentation of a config's value
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Presentation of a config's value, bound to the `value` field of an enclosing Form. Plain configs
|
|
7
|
+
* render a single editor by type; configs with a typedClass and/or an active instance-config
|
|
8
|
+
* override render a tab set over the applicable views of the value.
|
|
9
|
+
*
|
|
10
|
+
* Used within the RestGrid editor dialog (editable, opening on the Database tab) and the docked
|
|
11
|
+
* detail panel (read-only, opening on the most-derived view). Pass `height` for a fixed-height
|
|
12
|
+
* display, or omit it to fill the available space.
|
|
9
13
|
*/
|
|
10
14
|
export declare const configValue: import("@xh/hoist/core").ElementFactory<import("@xh/hoist/core").DefaultHoistProps<ConfigValueModel>>;
|
|
11
15
|
declare class ConfigValueModel extends HoistModel {
|
|
12
16
|
xhImpl: boolean;
|
|
13
17
|
tabContainerModel: TabContainerModel;
|
|
14
18
|
get formModel(): FormModel;
|
|
15
|
-
|
|
19
|
+
/** Fixed height for the value display, or null to fill available space. */
|
|
20
|
+
get height(): number | null;
|
|
21
|
+
get readonly(): boolean;
|
|
16
22
|
get valueField(): import("@xh/hoist/cmp/form").BaseFieldModel;
|
|
17
23
|
get resolvedValue(): any;
|
|
18
24
|
get defaultValue(): any;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { UserPreferenceModel } from './UserPreferenceModel';
|
|
2
|
+
/** Read-only detail view of the user preference value selected in the grid. */
|
|
3
|
+
export declare const userPreferenceDetailPanel: import("@xh/hoist/core").ElementFactory<import("@xh/hoist/core").DefaultHoistProps<UserPreferenceModel>>;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { HoistModel, LoadSpec } from '@xh/hoist/core';
|
|
2
2
|
import { RestGridModel } from '@xh/hoist/desktop/cmp/rest';
|
|
3
3
|
export declare class UserPreferenceModel extends HoistModel {
|
|
4
|
+
persistWith: {
|
|
5
|
+
localStorageKey: string;
|
|
6
|
+
};
|
|
4
7
|
gridModel: RestGridModel;
|
|
5
8
|
showEditorDialog: boolean;
|
|
6
9
|
constructor();
|
|
@@ -10,6 +10,7 @@ import { ExceptionHandlerOptions, HoistModel } from '@xh/hoist/core';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class ExceptionDialogModel extends HoistModel {
|
|
12
12
|
xhImpl: boolean;
|
|
13
|
+
xhName: string;
|
|
13
14
|
displayData: {
|
|
14
15
|
exception: HoistException;
|
|
15
16
|
options: ExceptionHandlerOptions;
|
|
@@ -8,6 +8,7 @@ import 'router5-plugin-browser';
|
|
|
8
8
|
* underlying routes, presenting them to the application as a set of MobX observables.
|
|
9
9
|
*/
|
|
10
10
|
export declare class RouterModel extends HoistModel {
|
|
11
|
+
xhName: string;
|
|
11
12
|
/** Router5 state object representing the current state. */
|
|
12
13
|
currentState: State;
|
|
13
14
|
/** Underlying Router5 Router object implementing the routing state. */
|
|
@@ -27,6 +27,8 @@ export interface AgGridModelConfig {
|
|
|
27
27
|
hideHeaders?: boolean;
|
|
28
28
|
/** @internal */
|
|
29
29
|
xhImpl?: boolean;
|
|
30
|
+
/** See {@link HoistBase.xhName}. */
|
|
31
|
+
xhName?: string;
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* @see https://www.ag-grid.com/javascript-grid-column-definitions/#saving-and-restoring-column-state
|
|
@@ -75,7 +77,7 @@ export declare class AgGridModel extends HoistModel {
|
|
|
75
77
|
hideHeaders: boolean;
|
|
76
78
|
agApi: GridApi;
|
|
77
79
|
private _prevSortBy;
|
|
78
|
-
constructor({ sizingMode, showHover, rowBorders, cellBorders, stripeRows, showCellFocus, hideHeaders, xhImpl }?: AgGridModelConfig);
|
|
80
|
+
constructor({ sizingMode, showHover, rowBorders, cellBorders, stripeRows, showCellFocus, hideHeaders, xhName, xhImpl }?: AgGridModelConfig);
|
|
79
81
|
/** True if the grid fully initialized and its state can be queried/mutated. */
|
|
80
82
|
get isReady(): boolean;
|
|
81
83
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { BoxProps, HoistProps, Intent, LayoutProps, TestSupportProps } from '@xh/hoist/core';
|
|
1
|
+
import { BoxProps, DomAttrsProps, HoistProps, Intent, LayoutProps, TestSupportProps } from '@xh/hoist/core';
|
|
2
2
|
import { type ReactElement, type ReactNode } from 'react';
|
|
3
3
|
import { CardModel } from './CardModel';
|
|
4
4
|
import './Card.scss';
|
|
5
|
-
export interface CardProps<M extends CardModel = CardModel> extends HoistProps<M>, TestSupportProps, LayoutProps {
|
|
5
|
+
export interface CardProps<M extends CardModel = CardModel> extends HoistProps<M>, TestSupportProps, DomAttrsProps, LayoutProps {
|
|
6
6
|
/** An icon placed left of the title. */
|
|
7
7
|
icon?: ReactElement;
|
|
8
8
|
/** Intent to apply to the inline header and border. */
|
|
@@ -76,6 +76,8 @@ export interface DataViewConfig {
|
|
|
76
76
|
* with its usages of GridModel.
|
|
77
77
|
*/
|
|
78
78
|
gridOptions?: Omit<GridConfig, keyof DataViewConfig>;
|
|
79
|
+
/** See {@link HoistBase.xhName}. */
|
|
80
|
+
xhName?: string;
|
|
79
81
|
}
|
|
80
82
|
export type ItemHeightFn = (params: {
|
|
81
83
|
record: StoreRecord;
|