@xh/hoist 71.0.0-SNAPSHOT.1735061018823 → 71.0.0-SNAPSHOT.1735062266455
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 +12 -0
- package/admin/tabs/activity/tracking/ActivityTrackingPanel.ts +1 -1
- package/admin/tabs/cluster/ClusterTab.ts +1 -1
- package/admin/tabs/cluster/connpool/ConnPoolMonitorPanel.ts +1 -1
- package/admin/tabs/cluster/environment/ServerEnvPanel.ts +1 -1
- package/admin/tabs/cluster/logs/LogDisplay.ts +1 -1
- package/admin/tabs/cluster/logs/LogViewer.ts +1 -1
- package/admin/tabs/cluster/memory/MemoryMonitorPanel.ts +1 -1
- package/admin/tabs/cluster/services/DetailsPanel.ts +1 -1
- package/admin/tabs/cluster/websocket/WebSocketPanel.ts +1 -1
- package/admin/tabs/monitor/MonitorTab.ts +1 -1
- package/admin/tabs/userData/roles/RolePanel.ts +1 -1
- package/build/types/{desktop/cmp → cmp}/error/ErrorMessage.d.ts +4 -4
- package/build/types/cmp/error/index.d.ts +1 -0
- package/build/types/{desktop/cmp → cmp}/loadingindicator/LoadingIndicator.d.ts +0 -1
- package/build/types/{desktop/cmp → cmp}/mask/Mask.d.ts +1 -3
- package/build/types/{desktop/cmp → cmp}/treemap/SplitTreeMap.d.ts +0 -1
- package/build/types/{desktop/cmp → cmp}/treemap/SplitTreeMapModel.d.ts +0 -1
- package/build/types/{desktop/cmp → cmp}/treemap/TreeMap.d.ts +0 -1
- package/build/types/{desktop/cmp → cmp}/treemap/TreeMapModel.d.ts +0 -1
- package/build/types/data/cube/Query.d.ts +7 -1
- package/build/types/desktop/cmp/error/impl/ErrorMessage.d.ts +7 -0
- package/build/types/desktop/cmp/mask/impl/Mask.d.ts +8 -0
- package/build/types/dynamics/desktop.d.ts +2 -1
- package/build/types/dynamics/mobile.d.ts +2 -1
- package/build/types/mobile/cmp/error/impl/ErrorMessage.d.ts +7 -0
- package/build/types/mobile/cmp/mask/impl/Mask.d.ts +8 -0
- package/cmp/error/ErrorBoundary.ts +2 -4
- package/{desktop/cmp → cmp}/error/ErrorMessage.scss +8 -1
- package/{desktop/cmp → cmp}/error/ErrorMessage.ts +24 -50
- package/cmp/error/index.ts +1 -0
- package/{desktop/cmp → cmp}/loadingindicator/LoadingIndicator.scss +4 -1
- package/{desktop/cmp → cmp}/loadingindicator/LoadingIndicator.ts +5 -9
- package/{desktop/cmp → cmp}/mask/Mask.ts +16 -25
- package/{desktop/cmp → cmp}/treemap/SplitTreeMap.scss +16 -0
- package/{desktop/cmp → cmp}/treemap/SplitTreeMap.ts +14 -6
- package/{desktop/cmp → cmp}/treemap/SplitTreeMapModel.ts +0 -1
- package/{desktop/cmp → cmp}/treemap/TreeMap.ts +2 -3
- package/{desktop/cmp → cmp}/treemap/TreeMapModel.ts +0 -1
- package/data/cube/Query.ts +11 -0
- package/data/cube/row/BaseRow.ts +8 -6
- package/desktop/appcontainer/AppContainer.ts +5 -3
- package/desktop/cmp/dash/container/DashContainer.ts +1 -1
- package/desktop/cmp/error/impl/ErrorMessage.ts +65 -0
- package/desktop/cmp/mask/impl/Mask.ts +40 -0
- package/desktop/cmp/panel/Panel.ts +2 -2
- package/desktop/cmp/rest/RestGrid.ts +1 -1
- package/dynamics/desktop.ts +4 -2
- package/dynamics/mobile.ts +4 -2
- package/mobile/appcontainer/AppContainer.ts +5 -3
- package/mobile/appcontainer/OptionsDialog.ts +1 -1
- package/mobile/cmp/error/impl/ErrorMessage.ts +65 -0
- package/mobile/cmp/mask/impl/Mask.ts +34 -0
- package/mobile/cmp/panel/Panel.ts +2 -2
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/types/desktop/cmp/error/index.d.ts +0 -1
- package/build/types/desktop/cmp/treemap/impl/Splitter.d.ts +0 -6
- package/build/types/mobile/cmp/error/ErrorMessage.d.ts +0 -42
- package/build/types/mobile/cmp/error/index.d.ts +0 -1
- package/build/types/mobile/cmp/loadingindicator/LoadingIndicator.d.ts +0 -27
- package/build/types/mobile/cmp/loadingindicator/index.d.ts +0 -1
- package/build/types/mobile/cmp/mask/Mask.d.ts +0 -25
- package/build/types/mobile/cmp/mask/index.d.ts +0 -1
- package/desktop/cmp/error/index.ts +0 -1
- package/desktop/cmp/treemap/impl/Splitter.scss +0 -15
- package/desktop/cmp/treemap/impl/Splitter.ts +0 -28
- package/mobile/cmp/error/ErrorMessage.scss +0 -25
- package/mobile/cmp/error/ErrorMessage.ts +0 -140
- package/mobile/cmp/error/index.ts +0 -8
- package/mobile/cmp/loadingindicator/LoadingIndicator.scss +0 -81
- package/mobile/cmp/loadingindicator/LoadingIndicator.ts +0 -90
- package/mobile/cmp/loadingindicator/index.ts +0 -7
- package/mobile/cmp/mask/Mask.ts +0 -75
- package/mobile/cmp/mask/index.ts +0 -7
- /package/build/types/{desktop/cmp → cmp}/loadingindicator/index.d.ts +0 -0
- /package/build/types/{desktop/cmp → cmp}/mask/index.d.ts +0 -0
- /package/build/types/{desktop/cmp → cmp}/treemap/index.d.ts +0 -0
- /package/{desktop/cmp → cmp}/loadingindicator/index.ts +0 -0
- /package/{desktop/cmp → cmp}/mask/index.ts +0 -0
- /package/{desktop/cmp → cmp}/treemap/TreeMap.scss +0 -0
- /package/{desktop/cmp → cmp}/treemap/index.ts +0 -0
- /package/desktop/cmp/mask/{Mask.scss → impl/Mask.scss} +0 -0
- /package/mobile/cmp/mask/{Mask.scss → impl/Mask.scss} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## v71.0.0-SNAPSHOT - unreleased
|
|
4
4
|
|
|
5
|
+
### 💥 Breaking Changes
|
|
6
|
+
|
|
7
|
+
* `ErrorMessage` is now cross-platform. Its import paths has changed from `@xh/hoist/desktop/cmp/error`
|
|
8
|
+
and `@xh/hoist/mobile/cmp/error` to `@xh/hoist/cmp/error`.
|
|
9
|
+
* `Mask` is now cross-platform. Its import paths has changed from `@xh/hoist/desktop/cmp/mask`
|
|
10
|
+
and `@xh/hoist/mobile/cmp/mask` to `@xh/hoist/cmp/mask`.
|
|
11
|
+
* `LoadingIndicator` is now cross-platform. Its import paths has changed from
|
|
12
|
+
`@xh/hoist/desktop/cmp/loadingindicator` and `@xh/hoist/mobile/cmp/loadingindicator` to
|
|
13
|
+
`@xh/hoist/cmp/loadingindicator`.
|
|
14
|
+
* `TreeMap` and `SplitTreeMap` are now cross-platform and can be used in mobile applications.
|
|
15
|
+
Their import paths have changed from `@xh/hoist/desktop/cmp/treemap` to `@xh/hoist/cmp/treemap`.
|
|
16
|
+
|
|
5
17
|
### 🎁 New Features
|
|
6
18
|
|
|
7
19
|
* Major Improvements to ViewManager component
|
|
@@ -9,7 +9,7 @@ import {grid} from '@xh/hoist/cmp/grid';
|
|
|
9
9
|
import {div, hframe} from '@xh/hoist/cmp/layout';
|
|
10
10
|
import {creates, hoistCmp} from '@xh/hoist/core';
|
|
11
11
|
import {button, buttonGroup, colChooserButton, exportButton} from '@xh/hoist/desktop/cmp/button';
|
|
12
|
-
import {errorMessage} from '@xh/hoist/
|
|
12
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
13
13
|
import {filterChooser} from '@xh/hoist/desktop/cmp/filter';
|
|
14
14
|
import {formField} from '@xh/hoist/desktop/cmp/form';
|
|
15
15
|
import {groupingChooser} from '@xh/hoist/desktop/cmp/grouping';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import {grid} from '@xh/hoist/cmp/grid';
|
|
8
8
|
import {tabContainer} from '@xh/hoist/cmp/tab';
|
|
9
9
|
import {creates, hoistCmp} from '@xh/hoist/core';
|
|
10
|
-
import {mask} from '@xh/hoist/
|
|
10
|
+
import {mask} from '@xh/hoist/cmp/mask';
|
|
11
11
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
12
12
|
import {tabSwitcher} from '@xh/hoist/desktop/cmp/tab';
|
|
13
13
|
import {box, div, hspacer, p, placeholder, vframe} from '@xh/hoist/cmp/layout';
|
|
@@ -11,7 +11,7 @@ import {grid, gridCountLabel} from '@xh/hoist/cmp/grid';
|
|
|
11
11
|
import {filler, hframe, vframe} from '@xh/hoist/cmp/layout';
|
|
12
12
|
import {creates, hoistCmp} from '@xh/hoist/core';
|
|
13
13
|
import {button, exportButton} from '@xh/hoist/desktop/cmp/button';
|
|
14
|
-
import {errorMessage} from '@xh/hoist/
|
|
14
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
15
15
|
import {jsonInput} from '@xh/hoist/desktop/cmp/input';
|
|
16
16
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
17
17
|
import {toolbar} from '@xh/hoist/desktop/cmp/toolbar';
|
|
@@ -10,7 +10,7 @@ import {filler} from '@xh/hoist/cmp/layout';
|
|
|
10
10
|
import {storeFilterField} from '@xh/hoist/cmp/store';
|
|
11
11
|
import {creates, hoistCmp} from '@xh/hoist/core';
|
|
12
12
|
import {exportButton} from '@xh/hoist/desktop/cmp/button';
|
|
13
|
-
import {errorMessage} from '@xh/hoist/
|
|
13
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
14
14
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
15
15
|
|
|
16
16
|
export const serverEnvPanel = hoistCmp.factory({
|
|
@@ -11,7 +11,7 @@ import {hoistCmp, uses, XH} from '@xh/hoist/core';
|
|
|
11
11
|
import {button, modalToggleButton} from '@xh/hoist/desktop/cmp/button';
|
|
12
12
|
import {gridFindField} from '@xh/hoist/desktop/cmp/grid';
|
|
13
13
|
import {numberInput, switchInput, textInput} from '@xh/hoist/desktop/cmp/input';
|
|
14
|
-
import {loadingIndicator} from '@xh/hoist/
|
|
14
|
+
import {loadingIndicator} from '@xh/hoist/cmp/loadingindicator';
|
|
15
15
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
16
16
|
import {toolbar, toolbarSep} from '@xh/hoist/desktop/cmp/toolbar';
|
|
17
17
|
import {Icon} from '@xh/hoist/icon';
|
|
@@ -9,7 +9,7 @@ import {grid} from '@xh/hoist/cmp/grid';
|
|
|
9
9
|
import {hframe} from '@xh/hoist/cmp/layout';
|
|
10
10
|
import {storeFilterField} from '@xh/hoist/cmp/store';
|
|
11
11
|
import {creates, hoistCmp} from '@xh/hoist/core';
|
|
12
|
-
import {errorMessage} from '@xh/hoist/
|
|
12
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
13
13
|
import {select} from '@xh/hoist/desktop/cmp/input';
|
|
14
14
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
15
15
|
import {Icon} from '@xh/hoist/icon';
|
|
@@ -11,7 +11,7 @@ import {grid, gridCountLabel} from '@xh/hoist/cmp/grid';
|
|
|
11
11
|
import {code, filler, fragment, hbox, hspacer, span, vframe} from '@xh/hoist/cmp/layout';
|
|
12
12
|
import {creates, hoistCmp} from '@xh/hoist/core';
|
|
13
13
|
import {button, exportButton} from '@xh/hoist/desktop/cmp/button';
|
|
14
|
-
import {errorMessage} from '@xh/hoist/
|
|
14
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
15
15
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
16
16
|
import {toolbar, toolbarSeparator} from '@xh/hoist/desktop/cmp/toolbar';
|
|
17
17
|
import {fmtDate} from '@xh/hoist/format';
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import {DetailsModel} from '@xh/hoist/admin/tabs/cluster/services/DetailsModel';
|
|
8
8
|
import {placeholder} from '@xh/hoist/cmp/layout';
|
|
9
9
|
import {creates, hoistCmp, XH} from '@xh/hoist/core';
|
|
10
|
-
import {errorMessage} from '@xh/hoist/
|
|
10
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
11
11
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
12
12
|
import {jsonInput} from '@xh/hoist/desktop/cmp/input';
|
|
13
13
|
import {Icon} from '@xh/hoist/icon';
|
|
@@ -11,7 +11,7 @@ import {relativeTimestamp} from '@xh/hoist/cmp/relativetimestamp';
|
|
|
11
11
|
import {storeFilterField} from '@xh/hoist/cmp/store';
|
|
12
12
|
import {creates, hoistCmp, XH} from '@xh/hoist/core';
|
|
13
13
|
import {exportButton} from '@xh/hoist/desktop/cmp/button';
|
|
14
|
-
import {errorMessage} from '@xh/hoist/
|
|
14
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
15
15
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
16
16
|
import {recordActionBar} from '@xh/hoist/desktop/cmp/record';
|
|
17
17
|
import {toolbarSep} from '@xh/hoist/desktop/cmp/toolbar';
|
|
@@ -12,7 +12,7 @@ import {filler, hbox, label, placeholder, tileFrame} from '@xh/hoist/cmp/layout'
|
|
|
12
12
|
import {relativeTimestamp} from '@xh/hoist/cmp/relativetimestamp';
|
|
13
13
|
import {creates, hoistCmp, XH} from '@xh/hoist/core';
|
|
14
14
|
import {button} from '@xh/hoist/desktop/cmp/button';
|
|
15
|
-
import {errorMessage} from '@xh/hoist/
|
|
15
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
16
16
|
import {switchInput} from '@xh/hoist/desktop/cmp/input';
|
|
17
17
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
18
18
|
import {toolbar, toolbarSep} from '@xh/hoist/desktop/cmp/toolbar';
|
|
@@ -9,7 +9,7 @@ import {grid} from '@xh/hoist/cmp/grid';
|
|
|
9
9
|
import {fragment, hframe, vframe} from '@xh/hoist/cmp/layout';
|
|
10
10
|
import {creates, hoistCmp} from '@xh/hoist/core';
|
|
11
11
|
import {button} from '@xh/hoist/desktop/cmp/button';
|
|
12
|
-
import {errorMessage} from '@xh/hoist/
|
|
12
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
13
13
|
import {filterChooser} from '@xh/hoist/desktop/cmp/filter';
|
|
14
14
|
import {switchInput} from '@xh/hoist/desktop/cmp/input';
|
|
15
15
|
import {panel} from '@xh/hoist/desktop/cmp/panel';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BoxProps, HoistProps } from '@xh/hoist/core';
|
|
2
|
-
import { ButtonProps } from '@xh/hoist/desktop/cmp/button';
|
|
3
|
-
import '@xh/hoist/
|
|
2
|
+
import type { ButtonProps as DesktopButtonProps } from '@xh/hoist/desktop/cmp/button';
|
|
3
|
+
import type { ButtonProps as MobileButtonProps } from '@xh/hoist/mobile/cmp/button';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import './ErrorMessage.scss';
|
|
6
6
|
export interface ErrorMessageProps extends HoistProps, Omit<BoxProps, 'title'> {
|
|
@@ -13,7 +13,7 @@ export interface ErrorMessageProps extends HoistProps, Omit<BoxProps, 'title'> {
|
|
|
13
13
|
* If provided, component will render an inline action button - prompting to user to take some
|
|
14
14
|
* action that might resolve the error, such as retrying a failed data load.
|
|
15
15
|
*/
|
|
16
|
-
actionButtonProps?:
|
|
16
|
+
actionButtonProps?: DesktopButtonProps | MobileButtonProps;
|
|
17
17
|
/**
|
|
18
18
|
* If provided, will render a "Details" button that calls this function.
|
|
19
19
|
* Use `detailsButtonProps` for further control over this button. Default false.
|
|
@@ -22,7 +22,7 @@ export interface ErrorMessageProps extends HoistProps, Omit<BoxProps, 'title'> {
|
|
|
22
22
|
/**
|
|
23
23
|
* If provided, component will render an inline details button.
|
|
24
24
|
*/
|
|
25
|
-
detailsButtonProps?:
|
|
25
|
+
detailsButtonProps?: DesktopButtonProps | MobileButtonProps;
|
|
26
26
|
/**
|
|
27
27
|
* Error to display. If undefined, this component will look for an error property on its model.
|
|
28
28
|
* If no error is found, this component will not be displayed.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Corner, HoistProps, Some, TaskObserver } from '@xh/hoist/core';
|
|
3
|
-
import '@xh/hoist/desktop/register';
|
|
4
3
|
import './LoadingIndicator.scss';
|
|
5
4
|
export interface LoadingIndicatorProps extends HoistProps {
|
|
6
5
|
/** TaskObserver(s) that should be monitored to determine if the Indicator should be displayed. */
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { HoistProps, Some, TaskObserver } from '@xh/hoist/core';
|
|
2
|
-
import '@xh/hoist/desktop/register';
|
|
3
2
|
import { ReactNode, MouseEvent } from 'react';
|
|
4
|
-
import './Mask.scss';
|
|
5
3
|
export interface MaskProps extends HoistProps {
|
|
6
4
|
/** Task(s) that should be monitored to determine if the mask should be displayed. */
|
|
7
5
|
bind?: Some<TaskObserver>;
|
|
8
|
-
/** True (default) to contain mask within its parent, false to fill the viewport. */
|
|
6
|
+
/** True (default) to contain mask within its parent, false to fill the viewport. Desktop only. */
|
|
9
7
|
inline?: boolean;
|
|
10
8
|
/** True to display mask. */
|
|
11
9
|
isDisplayed?: boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps, HoistProps } from '@xh/hoist/core';
|
|
3
|
-
import '@xh/hoist/desktop/register';
|
|
4
3
|
import './SplitTreeMap.scss';
|
|
5
4
|
import { SplitTreeMapModel } from './SplitTreeMapModel';
|
|
6
5
|
export interface SplitTreeMapProps extends HoistProps<SplitTreeMapModel>, BoxProps {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HoistModel, PlainObject, Theme } from '@xh/hoist/core';
|
|
2
|
-
import '@xh/hoist/desktop/register';
|
|
3
2
|
import { StoreRecord, StoreRecordId } from '@xh/hoist/data';
|
|
4
3
|
import { ReactNode } from 'react';
|
|
5
4
|
import { TreeMapAlgorithm, TreeMapColorMode, TreeMapModel, TreeMapConfig } from './TreeMapModel';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HoistProps, LayoutProps, TestSupportProps } from '@xh/hoist/core';
|
|
3
|
-
import '@xh/hoist/desktop/register';
|
|
4
3
|
import './TreeMap.scss';
|
|
5
4
|
import { TreeMapModel } from './TreeMapModel';
|
|
6
5
|
export interface TreeMapProps extends HoistProps<TreeMapModel>, LayoutProps, TestSupportProps {
|
|
@@ -2,7 +2,6 @@ import { HoistModel, PlainObject, Theme } from '@xh/hoist/core';
|
|
|
2
2
|
import { Store, StoreRecord, StoreRecordId } from '@xh/hoist/data';
|
|
3
3
|
import { GridModel } from '@xh/hoist/cmp/grid';
|
|
4
4
|
import { FilterLike } from '@xh/hoist/data/filter/Types';
|
|
5
|
-
import '@xh/hoist/desktop/register';
|
|
6
5
|
import { ReactNode } from 'react';
|
|
7
6
|
/**
|
|
8
7
|
* Core Model for a TreeMap.
|
|
@@ -36,6 +36,11 @@ export interface QueryConfig {
|
|
|
36
36
|
includeRoot?: boolean;
|
|
37
37
|
/** True to include leaf nodes in return.*/
|
|
38
38
|
includeLeaves?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* True (default) to recursively omit single-child parents in the hierarchy.
|
|
41
|
+
* Apps can implement further omit logic using `omitFn`.
|
|
42
|
+
*/
|
|
43
|
+
omitRedundantNodes?: boolean;
|
|
39
44
|
/**
|
|
40
45
|
* Optional function to be called for each aggregate node to determine if it should be "locked",
|
|
41
46
|
* preventing drill-down into its children. Defaults to Cube.lockFn.
|
|
@@ -60,12 +65,13 @@ export declare class Query {
|
|
|
60
65
|
readonly filter: Filter;
|
|
61
66
|
readonly includeRoot: boolean;
|
|
62
67
|
readonly includeLeaves: boolean;
|
|
68
|
+
readonly omitRedundantNodes: boolean;
|
|
63
69
|
readonly cube: Cube;
|
|
64
70
|
readonly lockFn: LockFn;
|
|
65
71
|
readonly bucketSpecFn: BucketSpecFn;
|
|
66
72
|
readonly omitFn: OmitFn;
|
|
67
73
|
private readonly _testFn;
|
|
68
|
-
constructor({ cube, fields, dimensions, filter, includeRoot, includeLeaves, lockFn, bucketSpecFn, omitFn }: QueryConfig);
|
|
74
|
+
constructor({ cube, fields, dimensions, filter, includeRoot, includeLeaves, omitRedundantNodes, lockFn, bucketSpecFn, omitFn }: QueryConfig);
|
|
69
75
|
clone(overrides: Partial<QueryConfig>): Query;
|
|
70
76
|
test(record: StoreRecord): boolean;
|
|
71
77
|
/**
|
|
@@ -15,12 +15,13 @@ export declare let colChooser: any;
|
|
|
15
15
|
export declare let zoneMapper: any;
|
|
16
16
|
export declare let columnHeaderFilter: any;
|
|
17
17
|
export declare let dockContainerImpl: any;
|
|
18
|
-
export declare let errorMessage: any;
|
|
19
18
|
export declare let gridFilterDialog: any;
|
|
20
19
|
export declare let pinPadImpl: any;
|
|
21
20
|
export declare let storeFilterFieldImpl: any;
|
|
22
21
|
export declare let tabContainerImpl: any;
|
|
23
22
|
export declare let useContextMenu: any;
|
|
23
|
+
export declare let errorMessageImpl: any;
|
|
24
|
+
export declare let maskImpl: any;
|
|
24
25
|
/**
|
|
25
26
|
* Provide implementations of functions and classes exported in this file.
|
|
26
27
|
*
|
|
@@ -11,10 +11,11 @@
|
|
|
11
11
|
export declare let ColChooserModel: any;
|
|
12
12
|
export declare let colChooser: any;
|
|
13
13
|
export declare let zoneMapper: any;
|
|
14
|
-
export declare let errorMessage: any;
|
|
15
14
|
export declare let pinPadImpl: any;
|
|
16
15
|
export declare let storeFilterFieldImpl: any;
|
|
17
16
|
export declare let tabContainerImpl: any;
|
|
17
|
+
export declare let errorMessageImpl: any;
|
|
18
|
+
export declare let maskImpl: any;
|
|
18
19
|
/**
|
|
19
20
|
* Provide implementations of functions and classes exported in this file.
|
|
20
21
|
*
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* Copyright © 2024 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
7
|
import {elementFactory, hoistCmp, uses, XH} from '@xh/hoist/core';
|
|
8
|
-
import {errorMessage
|
|
9
|
-
import {errorMessage as mobileErrorMessage} from '@xh/hoist/dynamics/mobile';
|
|
8
|
+
import {errorMessage} from '@xh/hoist/cmp/error';
|
|
10
9
|
import {Component, ReactNode} from 'react';
|
|
11
10
|
import {ErrorBoundaryModel} from './ErrorBoundaryModel';
|
|
12
11
|
|
|
@@ -34,8 +33,7 @@ export const [ErrorBoundary, errorBoundary] = hoistCmp.withFactory<ErrorBoundary
|
|
|
34
33
|
if (!error) return reactErrorBoundary({model, children});
|
|
35
34
|
if (errorRenderer) return errorRenderer(error);
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
return cmp({
|
|
36
|
+
return errorMessage({
|
|
39
37
|
error,
|
|
40
38
|
title: 'Unexpected error while rendering this component',
|
|
41
39
|
actionFn: () => model.clear(),
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
.xh-error-message {
|
|
9
9
|
align-items: center;
|
|
10
10
|
justify-content: center;
|
|
11
|
-
padding: 10px;
|
|
12
11
|
|
|
13
12
|
&__inner {
|
|
14
13
|
padding: var(--xh-pad-px);
|
|
@@ -31,3 +30,11 @@
|
|
|
31
30
|
font-weight: bold;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
33
|
+
|
|
34
|
+
.xh-desktop .xh-error-message {
|
|
35
|
+
padding: 10px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.xh-mobile .xh-error-message__inner {
|
|
39
|
+
margin: 0 var(--xh-pad-px);
|
|
40
|
+
}
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2024 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import '@xh/hoist/
|
|
7
|
+
import {BoxProps, hoistCmp, HoistProps, XH} from '@xh/hoist/core';
|
|
8
|
+
import {frame} from '@xh/hoist/cmp/layout';
|
|
9
|
+
import {errorMessageImpl as desktopErrorMessageImpl} from '@xh/hoist/dynamics/desktop';
|
|
10
|
+
import {errorMessageImpl as mobileErrorMessageImpl} from '@xh/hoist/dynamics/mobile';
|
|
11
|
+
import type {ButtonProps as DesktopButtonProps} from '@xh/hoist/desktop/cmp/button';
|
|
12
|
+
import type {ButtonProps as MobileButtonProps} from '@xh/hoist/mobile/cmp/button';
|
|
11
13
|
import {isNil, isString} from 'lodash';
|
|
12
|
-
import {
|
|
14
|
+
import {ReactNode} from 'react';
|
|
13
15
|
import './ErrorMessage.scss';
|
|
14
|
-
import {Icon} from '@xh/hoist/icon';
|
|
15
16
|
|
|
16
17
|
export interface ErrorMessageProps extends HoistProps, Omit<BoxProps, 'title'> {
|
|
17
18
|
/**
|
|
@@ -24,7 +25,7 @@ export interface ErrorMessageProps extends HoistProps, Omit<BoxProps, 'title'> {
|
|
|
24
25
|
* If provided, component will render an inline action button - prompting to user to take some
|
|
25
26
|
* action that might resolve the error, such as retrying a failed data load.
|
|
26
27
|
*/
|
|
27
|
-
actionButtonProps?:
|
|
28
|
+
actionButtonProps?: DesktopButtonProps | MobileButtonProps;
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* If provided, will render a "Details" button that calls this function.
|
|
@@ -35,7 +36,7 @@ export interface ErrorMessageProps extends HoistProps, Omit<BoxProps, 'title'> {
|
|
|
35
36
|
/**
|
|
36
37
|
* If provided, component will render an inline details button.
|
|
37
38
|
*/
|
|
38
|
-
detailsButtonProps?:
|
|
39
|
+
detailsButtonProps?: DesktopButtonProps | MobileButtonProps;
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
42
|
* Error to display. If undefined, this component will look for an error property on its model.
|
|
@@ -90,52 +91,25 @@ export const [ErrorMessage, errorMessage] = hoistCmp.withFactory<ErrorMessagePro
|
|
|
90
91
|
detailsButtonProps = {...detailsButtonProps, onClick: () => detailsFn(error)};
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
let buttons = [],
|
|
94
|
-
buttonBar = null;
|
|
95
|
-
if (detailsButtonProps) buttons.push(detailsButton(detailsButtonProps));
|
|
96
|
-
if (actionButtonProps) buttons.push(actionButton(actionButtonProps));
|
|
97
|
-
if (buttons.length == 1) {
|
|
98
|
-
buttonBar = buttons[0];
|
|
99
|
-
} else if (buttons.length == 2) {
|
|
100
|
-
buttonBar = hbox(buttons[0], filler(), buttons[1]);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
94
|
return frame({
|
|
104
95
|
ref,
|
|
105
96
|
className,
|
|
106
97
|
...rest,
|
|
107
|
-
item:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
98
|
+
item: XH.isMobileApp
|
|
99
|
+
? mobileErrorMessageImpl({
|
|
100
|
+
error,
|
|
101
|
+
message,
|
|
102
|
+
title,
|
|
103
|
+
actionButtonProps,
|
|
104
|
+
detailsButtonProps
|
|
105
|
+
})
|
|
106
|
+
: desktopErrorMessageImpl({
|
|
107
|
+
error,
|
|
108
|
+
message,
|
|
109
|
+
title,
|
|
110
|
+
actionButtonProps,
|
|
111
|
+
detailsButtonProps
|
|
112
|
+
})
|
|
111
113
|
});
|
|
112
114
|
}
|
|
113
115
|
});
|
|
114
|
-
|
|
115
|
-
const titleCmp = hoistCmp.factory(({title}) => {
|
|
116
|
-
if (isValidElement(title)) return title;
|
|
117
|
-
if (isString(title)) return div({className: 'xh-error-message__title', item: title});
|
|
118
|
-
return null;
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
const messageCmp = hoistCmp.factory(({message}) => {
|
|
122
|
-
if (isValidElement(message)) return message;
|
|
123
|
-
if (isString(message)) return p(message);
|
|
124
|
-
return null;
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
const actionButton = hoistCmp.factory<ButtonProps>(props => {
|
|
128
|
-
return button({
|
|
129
|
-
text: 'Retry',
|
|
130
|
-
icon: Icon.refresh(),
|
|
131
|
-
...props
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
const detailsButton = hoistCmp.factory<ButtonProps>(props => {
|
|
136
|
-
return button({
|
|
137
|
-
text: 'Details',
|
|
138
|
-
icon: Icon.detail(),
|
|
139
|
-
...props
|
|
140
|
-
});
|
|
141
|
-
});
|
package/cmp/error/index.ts
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
position: absolute;
|
|
6
6
|
padding: var(--xh-pad-half-px);
|
|
7
|
-
font-size: var(--xh-font-size-small-px);
|
|
8
7
|
background-color: var(--xh-loading-indicator-bg);
|
|
9
8
|
color: var(--xh-loading-indicator-color);
|
|
10
9
|
border-color: var(--xh-loading-indicator-border-color);
|
|
@@ -80,3 +79,7 @@
|
|
|
80
79
|
white-space: nowrap;
|
|
81
80
|
}
|
|
82
81
|
}
|
|
82
|
+
|
|
83
|
+
.xh-desktop .xh-loading-indicator {
|
|
84
|
+
font-size: var(--xh-font-size-small-px);
|
|
85
|
+
}
|
|
@@ -16,7 +16,6 @@ import {
|
|
|
16
16
|
TaskObserver,
|
|
17
17
|
useLocalModel
|
|
18
18
|
} from '@xh/hoist/core';
|
|
19
|
-
import '@xh/hoist/desktop/register';
|
|
20
19
|
import {withDefault} from '@xh/hoist/utils/js';
|
|
21
20
|
import classNames from 'classnames';
|
|
22
21
|
import {truncate} from 'lodash';
|
|
@@ -49,14 +48,10 @@ export const [LoadingIndicator, loadingIndicator] = hoistCmp.withFactory<Loading
|
|
|
49
48
|
displayName: 'LoadingIndicator',
|
|
50
49
|
className: 'xh-loading-indicator',
|
|
51
50
|
|
|
52
|
-
render(
|
|
53
|
-
isDisplayed,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
spinner = true,
|
|
57
|
-
corner = 'br',
|
|
58
|
-
className
|
|
59
|
-
}) {
|
|
51
|
+
render(
|
|
52
|
+
{isDisplayed, message, maxMessageLength = 30, spinner = true, corner = 'br', className},
|
|
53
|
+
ref
|
|
54
|
+
) {
|
|
60
55
|
const impl = useLocalModel(LocalMaskModel);
|
|
61
56
|
|
|
62
57
|
isDisplayed = withDefault(isDisplayed, impl.task?.isPending);
|
|
@@ -80,6 +75,7 @@ export const [LoadingIndicator, loadingIndicator] = hoistCmp.withFactory<Loading
|
|
|
80
75
|
};
|
|
81
76
|
|
|
82
77
|
return div({
|
|
78
|
+
ref,
|
|
83
79
|
className: classNames(className, hasMessageCls, hasSpinnerCls, cornerCls),
|
|
84
80
|
item: hbox(innerItems())
|
|
85
81
|
});
|
|
@@ -4,20 +4,24 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Copyright © 2024 Extremely Heavy Industries Inc.
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import {
|
|
8
|
+
hoistCmp,
|
|
9
|
+
HoistModel,
|
|
10
|
+
HoistProps,
|
|
11
|
+
Some,
|
|
12
|
+
TaskObserver,
|
|
13
|
+
useLocalModel,
|
|
14
|
+
XH
|
|
15
|
+
} from '@xh/hoist/core';
|
|
16
|
+
import {maskImpl as desktopMaskImpl} from '@xh/hoist/dynamics/desktop';
|
|
17
|
+
import {maskImpl as mobileMaskImpl} from '@xh/hoist/dynamics/mobile';
|
|
12
18
|
import {withDefault} from '@xh/hoist/utils/js';
|
|
13
19
|
import {ReactNode, MouseEvent} from 'react';
|
|
14
|
-
import classNames from 'classnames';
|
|
15
|
-
import './Mask.scss';
|
|
16
20
|
|
|
17
21
|
export interface MaskProps extends HoistProps {
|
|
18
22
|
/** Task(s) that should be monitored to determine if the mask should be displayed. */
|
|
19
23
|
bind?: Some<TaskObserver>;
|
|
20
|
-
/** True (default) to contain mask within its parent, false to fill the viewport. */
|
|
24
|
+
/** True (default) to contain mask within its parent, false to fill the viewport. Desktop only. */
|
|
21
25
|
inline?: boolean;
|
|
22
26
|
/** True to display mask. */
|
|
23
27
|
isDisplayed?: boolean;
|
|
@@ -41,29 +45,16 @@ export const [Mask, mask] = hoistCmp.withFactory<MaskProps>({
|
|
|
41
45
|
displayName: 'Mask',
|
|
42
46
|
className: 'xh-mask',
|
|
43
47
|
|
|
44
|
-
render({isDisplayed, message, inline = true, spinner = false, className}) {
|
|
48
|
+
render({isDisplayed, message, onClick, inline = true, spinner = false, className}) {
|
|
45
49
|
const impl = useLocalModel(MaskLocalModel);
|
|
46
50
|
|
|
47
51
|
isDisplayed = withDefault(isDisplayed, impl.task?.isPending);
|
|
48
52
|
message = withDefault(message, impl.task?.message);
|
|
49
53
|
|
|
50
54
|
if (!isDisplayed) return null;
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
isOpen: true,
|
|
55
|
-
canEscapeKeyClose: false,
|
|
56
|
-
usePortal: !inline,
|
|
57
|
-
enforceFocus: !inline,
|
|
58
|
-
item: vbox({
|
|
59
|
-
className: 'xh-mask-body',
|
|
60
|
-
items: [
|
|
61
|
-
spinner ? spinnerCmp() : null,
|
|
62
|
-
spinner ? vspacer(10) : null,
|
|
63
|
-
message ? box({className: 'xh-mask-text', item: message}) : null
|
|
64
|
-
]
|
|
65
|
-
})
|
|
66
|
-
});
|
|
55
|
+
return XH.isMobileApp
|
|
56
|
+
? mobileMaskImpl({message, onClick, spinner, className})
|
|
57
|
+
: desktopMaskImpl({message, onClick, inline, spinner, className});
|
|
67
58
|
}
|
|
68
59
|
});
|
|
69
60
|
|
|
@@ -36,6 +36,22 @@
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
&__splitter {
|
|
40
|
+
background-color: var(--xh-resizable-bg);
|
|
41
|
+
|
|
42
|
+
&--vertical {
|
|
43
|
+
height: 4px;
|
|
44
|
+
border-top: var(--xh-resizable-border-width-px) solid var(--xh-resizable-border-color);
|
|
45
|
+
border-bottom: var(--xh-resizable-border-width-px) solid var(--xh-resizable-border-color);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&--horizontal {
|
|
49
|
+
width: 4px;
|
|
50
|
+
border-left: var(--xh-resizable-border-width-px) solid var(--xh-resizable-border-color);
|
|
51
|
+
border-right: var(--xh-resizable-border-width-px) solid var(--xh-resizable-border-color);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
39
55
|
&__mask-holder {
|
|
40
56
|
position: absolute;
|
|
41
57
|
top: 0;
|