@xh/hoist 71.0.0-SNAPSHOT.1735047359409 → 71.0.0-SNAPSHOT.1735061320692

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/admin/tabs/activity/tracking/ActivityTrackingPanel.ts +1 -1
  3. package/admin/tabs/cluster/ClusterTab.ts +1 -1
  4. package/admin/tabs/cluster/connpool/ConnPoolMonitorPanel.ts +1 -1
  5. package/admin/tabs/cluster/environment/ServerEnvPanel.ts +1 -1
  6. package/admin/tabs/cluster/logs/LogDisplay.ts +1 -1
  7. package/admin/tabs/cluster/logs/LogViewer.ts +1 -1
  8. package/admin/tabs/cluster/memory/MemoryMonitorPanel.ts +1 -1
  9. package/admin/tabs/cluster/services/DetailsPanel.ts +1 -1
  10. package/admin/tabs/cluster/websocket/WebSocketPanel.ts +1 -1
  11. package/admin/tabs/monitor/MonitorTab.ts +1 -1
  12. package/admin/tabs/userData/roles/RolePanel.ts +1 -1
  13. package/build/types/{desktop/cmp → cmp}/error/ErrorMessage.d.ts +4 -4
  14. package/build/types/cmp/error/index.d.ts +1 -0
  15. package/build/types/{desktop/cmp → cmp}/loadingindicator/LoadingIndicator.d.ts +0 -1
  16. package/build/types/{desktop/cmp → cmp}/mask/Mask.d.ts +1 -3
  17. package/build/types/{desktop/cmp → cmp}/treemap/SplitTreeMap.d.ts +0 -1
  18. package/build/types/{desktop/cmp → cmp}/treemap/SplitTreeMapModel.d.ts +0 -1
  19. package/build/types/{desktop/cmp → cmp}/treemap/TreeMap.d.ts +0 -1
  20. package/build/types/{desktop/cmp → cmp}/treemap/TreeMapModel.d.ts +0 -1
  21. package/build/types/desktop/cmp/error/impl/ErrorMessage.d.ts +7 -0
  22. package/build/types/desktop/cmp/mask/impl/Mask.d.ts +8 -0
  23. package/build/types/dynamics/desktop.d.ts +2 -1
  24. package/build/types/dynamics/mobile.d.ts +2 -1
  25. package/build/types/mobile/cmp/error/impl/ErrorMessage.d.ts +7 -0
  26. package/build/types/mobile/cmp/mask/impl/Mask.d.ts +8 -0
  27. package/build/types/security/authzero/AuthZeroClient.d.ts +16 -5
  28. package/cmp/error/ErrorBoundary.ts +2 -4
  29. package/{desktop/cmp → cmp}/error/ErrorMessage.scss +8 -1
  30. package/{desktop/cmp → cmp}/error/ErrorMessage.ts +24 -50
  31. package/cmp/error/index.ts +1 -0
  32. package/{desktop/cmp → cmp}/loadingindicator/LoadingIndicator.scss +4 -1
  33. package/{desktop/cmp → cmp}/loadingindicator/LoadingIndicator.ts +5 -9
  34. package/{desktop/cmp → cmp}/mask/Mask.ts +16 -25
  35. package/{desktop/cmp → cmp}/treemap/SplitTreeMap.scss +16 -0
  36. package/{desktop/cmp → cmp}/treemap/SplitTreeMap.ts +14 -6
  37. package/{desktop/cmp → cmp}/treemap/SplitTreeMapModel.ts +0 -1
  38. package/{desktop/cmp → cmp}/treemap/TreeMap.ts +2 -3
  39. package/{desktop/cmp → cmp}/treemap/TreeMapModel.ts +0 -1
  40. package/desktop/appcontainer/AppContainer.ts +5 -3
  41. package/desktop/cmp/dash/container/DashContainer.ts +1 -1
  42. package/desktop/cmp/error/impl/ErrorMessage.ts +65 -0
  43. package/desktop/cmp/mask/impl/Mask.ts +40 -0
  44. package/desktop/cmp/panel/Panel.ts +2 -2
  45. package/desktop/cmp/rest/RestGrid.ts +1 -1
  46. package/dynamics/desktop.ts +4 -2
  47. package/dynamics/mobile.ts +4 -2
  48. package/mobile/appcontainer/AppContainer.ts +5 -3
  49. package/mobile/appcontainer/OptionsDialog.ts +1 -1
  50. package/mobile/cmp/error/impl/ErrorMessage.ts +65 -0
  51. package/mobile/cmp/mask/impl/Mask.ts +34 -0
  52. package/mobile/cmp/panel/Panel.ts +2 -2
  53. package/package.json +1 -1
  54. package/security/authzero/AuthZeroClient.ts +38 -21
  55. package/tsconfig.tsbuildinfo +1 -1
  56. package/build/types/desktop/cmp/error/index.d.ts +0 -1
  57. package/build/types/desktop/cmp/treemap/impl/Splitter.d.ts +0 -6
  58. package/build/types/mobile/cmp/error/ErrorMessage.d.ts +0 -42
  59. package/build/types/mobile/cmp/error/index.d.ts +0 -1
  60. package/build/types/mobile/cmp/loadingindicator/LoadingIndicator.d.ts +0 -27
  61. package/build/types/mobile/cmp/loadingindicator/index.d.ts +0 -1
  62. package/build/types/mobile/cmp/mask/Mask.d.ts +0 -25
  63. package/build/types/mobile/cmp/mask/index.d.ts +0 -1
  64. package/desktop/cmp/error/index.ts +0 -1
  65. package/desktop/cmp/treemap/impl/Splitter.scss +0 -15
  66. package/desktop/cmp/treemap/impl/Splitter.ts +0 -28
  67. package/mobile/cmp/error/ErrorMessage.scss +0 -25
  68. package/mobile/cmp/error/ErrorMessage.ts +0 -140
  69. package/mobile/cmp/error/index.ts +0 -8
  70. package/mobile/cmp/loadingindicator/LoadingIndicator.scss +0 -81
  71. package/mobile/cmp/loadingindicator/LoadingIndicator.ts +0 -90
  72. package/mobile/cmp/loadingindicator/index.ts +0 -7
  73. package/mobile/cmp/mask/Mask.ts +0 -75
  74. package/mobile/cmp/mask/index.ts +0 -7
  75. /package/build/types/{desktop/cmp → cmp}/loadingindicator/index.d.ts +0 -0
  76. /package/build/types/{desktop/cmp → cmp}/mask/index.d.ts +0 -0
  77. /package/build/types/{desktop/cmp → cmp}/treemap/index.d.ts +0 -0
  78. /package/{desktop/cmp → cmp}/loadingindicator/index.ts +0 -0
  79. /package/{desktop/cmp → cmp}/mask/index.ts +0 -0
  80. /package/{desktop/cmp → cmp}/treemap/TreeMap.scss +0 -0
  81. /package/{desktop/cmp → cmp}/treemap/index.ts +0 -0
  82. /package/desktop/cmp/mask/{Mask.scss → impl/Mask.scss} +0 -0
  83. /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
@@ -12,6 +24,8 @@
12
24
  * Support for "global" views.
13
25
  * New `SessionStorageService` and associated persistence provider provides support for saving
14
26
  tab local data across reloads.
27
+ * Added support for `AuthZeroClientConfig.audience` to support improved configuration of Auth0 OAuth
28
+ clients requesting access tokens, covering cases when third-party cookies are blocked.
15
29
 
16
30
  ### ⚙️ Technical
17
31
 
@@ -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/desktop/cmp/error';
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/desktop/cmp/mask';
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/desktop/cmp/error';
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/desktop/cmp/error';
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/desktop/cmp/loadingindicator';
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/desktop/cmp/error';
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/desktop/cmp/error';
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/desktop/cmp/error';
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/desktop/cmp/error';
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/desktop/cmp/error';
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/desktop/cmp/error';
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/desktop/register';
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?: ButtonProps;
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?: ButtonProps;
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,2 +1,3 @@
1
1
  export * from './ErrorBoundary';
2
2
  export * from './ErrorBoundaryModel';
3
+ export * from './ErrorMessage';
@@ -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.
@@ -0,0 +1,7 @@
1
+ import { ErrorMessageProps } from '@xh/hoist/cmp/error';
2
+ import '@xh/hoist/desktop/register';
3
+ /**
4
+ * Desktop implementation of ErrorMessage.
5
+ * @internal
6
+ */
7
+ export declare const errorMessageImpl: import("@xh/hoist/core").ElementFactory<ErrorMessageProps>;
@@ -0,0 +1,8 @@
1
+ import { MaskProps } from '@xh/hoist/cmp/mask';
2
+ import '@xh/hoist/desktop/register';
3
+ import './Mask.scss';
4
+ /**
5
+ * Desktop implementation of Mask.
6
+ * @internal
7
+ */
8
+ export declare const maskImpl: import("@xh/hoist/core").ElementFactory<MaskProps>;
@@ -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
  *
@@ -0,0 +1,7 @@
1
+ import { ErrorMessageProps } from '@xh/hoist/cmp/error';
2
+ import '@xh/hoist/mobile/register';
3
+ /**
4
+ * Mobile implementation of ErrorMessage.
5
+ * @internal
6
+ */
7
+ export declare const errorMessageImpl: import("@xh/hoist/core").ElementFactory<ErrorMessageProps>;
@@ -0,0 +1,8 @@
1
+ import { MaskProps } from '@xh/hoist/cmp/mask';
2
+ import '@xh/hoist/mobile/register';
3
+ import './Mask.scss';
4
+ /**
5
+ * Mobile implementation of Mask.
6
+ * @internal
7
+ */
8
+ export declare const maskImpl: import("@xh/hoist/core").ElementFactory<MaskProps>;
@@ -1,9 +1,22 @@
1
- import { Auth0ClientOptions } from '@auth0/auth0-spa-js';
1
+ import type { Auth0ClientOptions } from '@auth0/auth0-spa-js';
2
2
  import { Token, TokenMap } from '@xh/hoist/security/Token';
3
3
  import { BaseOAuthClient, BaseOAuthClientConfig } from '../BaseOAuthClient';
4
4
  export interface AuthZeroClientConfig extends BaseOAuthClientConfig<AuthZeroTokenSpec> {
5
- /** Domain of your app registered with Auth0 */
5
+ /** Domain of your app registered with Auth0. */
6
6
  domain: string;
7
+ /**
8
+ * Audience to pass to interactive login and ID token requests.
9
+ *
10
+ * If you are also requesting an *access* token for a single audience, pass that value here to
11
+ * ensure that the initial login/token request returns a ready-to-use access token (and refresh
12
+ * token) with a single request to the Auth0 API, instead of requiring two.
13
+ *
14
+ * This also avoids issues with browsers that block third party cookies when running on
15
+ * localhost or with an Auth0 domain that does not match the app's own domain. In those cases,
16
+ * Auth0 must use refresh tokens to obtain access tokens, and a single audience allows that
17
+ * exchange to work without extra user interaction that this class does not currently support.
18
+ */
19
+ audience?: string;
7
20
  /**
8
21
  * Additional options for the Auth0Client ctor. Will be deep merged with defaults, with options
9
22
  * supplied here taking precedence. Use with care, as overriding defaults may have unintended
@@ -16,9 +29,7 @@ export interface AuthZeroTokenSpec {
16
29
  scopes: string[];
17
30
  /**
18
31
  * Audience (i.e. API) identifier for AccessToken. Must be registered with Auth0.
19
- *
20
- * Note that this is required to ensure that issued token is a JWT and not
21
- * an opaque string.
32
+ * Note that this is required to ensure that issued token is a JWT and not an opaque string.
22
33
  */
23
34
  audience: string;
24
35
  }
@@ -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 as desktopErrorMessage} from '@xh/hoist/dynamics/desktop';
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
- const cmp = XH.isMobileApp ? mobileErrorMessage : desktopErrorMessage;
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 {div, filler, frame, hbox, p} from '@xh/hoist/cmp/layout';
8
- import {BoxProps, hoistCmp, HoistProps} from '@xh/hoist/core';
9
- import {button, ButtonProps} from '@xh/hoist/desktop/cmp/button';
10
- import '@xh/hoist/desktop/register';
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 {isValidElement, ReactNode} from 'react';
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?: ButtonProps;
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?: ButtonProps;
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: div({
108
- className: 'xh-error-message__inner',
109
- items: [titleCmp({title}), messageCmp({message, error}), buttonBar]
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
- });
@@ -1,2 +1,3 @@
1
1
  export * from './ErrorBoundary';
2
2
  export * from './ErrorBoundaryModel';
3
+ export * from './ErrorMessage';
@@ -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
- message,
55
- maxMessageLength = 30,
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 {box, vbox, vspacer} from '@xh/hoist/cmp/layout';
8
- import {spinner as spinnerCmp} from '@xh/hoist/cmp/spinner';
9
- import {hoistCmp, HoistModel, HoistProps, Some, TaskObserver, useLocalModel} from '@xh/hoist/core';
10
- import '@xh/hoist/desktop/register';
11
- import {Classes, overlay} from '@xh/hoist/kit/blueprint';
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 overlay({
52
- className: classNames(className, Classes.OVERLAY_SCROLL_CONTAINER),
53
- autoFocus: false,
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;