@xh/hoist 73.0.0-SNAPSHOT.1744145292985 → 73.0.0-SNAPSHOT.1744145524716

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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ### 🎁 New Features
6
6
 
7
- `ViewManagerConfig` takes new key `customViewMenuItem` to allow ViewManagers implementations to customize
7
+ `ViewManagerConfig` takes new optional key `customViewMenuItem` to allow ViewManagers implementations to customize
8
8
  the menu items for views in the view manager menu.
9
9
 
10
10
  ## v72.3.0 - 2025-04-08
@@ -87,11 +87,10 @@ export interface ViewManagerConfig {
87
87
  */
88
88
  globalDisplayName?: string;
89
89
  /**
90
- * Optional key used as route param for view tokens. Specify if you have customized your
91
- * ViewManager implementation to be routable, and you want users to be able to Ctrl+Click or
92
- * ContextMenu Click to open views from the view menu in new tabs or windows.
90
+ * Optional key to pass a method that returns customized BlueprintJS `menuItem` for listing
91
+ * views in the ViewManager menu.
93
92
  */
94
- customViewMenuItem?: (view: ViewInfo) => ReactNode;
93
+ customViewMenuItem?: (view: ViewInfo, model: ViewManagerModel) => ReactNode;
95
94
  }
96
95
  /**
97
96
  * ViewManagerModel coordinates the loading, saving, and management of user-defined bundles of
@@ -128,7 +127,7 @@ export declare class ViewManagerModel<T = PlainObject> extends HoistModel {
128
127
  readonly instance: string;
129
128
  readonly typeDisplayName: string;
130
129
  readonly globalDisplayName: string;
131
- readonly customViewMenuItem: (view: ViewInfo) => ReactNode;
130
+ readonly customViewMenuItem: (view: ViewInfo, model: ViewManagerModel) => ReactNode;
132
131
  readonly enableAutoSave: boolean;
133
132
  readonly enableDefault: boolean;
134
133
  readonly enableGlobal: boolean;
@@ -125,11 +125,10 @@ export interface ViewManagerConfig {
125
125
  globalDisplayName?: string;
126
126
 
127
127
  /**
128
- * Optional key used as route param for view tokens. Specify if you have customized your
129
- * ViewManager implementation to be routable, and you want users to be able to Ctrl+Click or
130
- * ContextMenu Click to open views from the view menu in new tabs or windows.
128
+ * Optional key to pass a method that returns customized BlueprintJS `menuItem` for listing
129
+ * views in the ViewManager menu.
131
130
  */
132
- customViewMenuItem?: (view: ViewInfo) => ReactNode;
131
+ customViewMenuItem?: (view: ViewInfo, model: ViewManagerModel) => ReactNode;
133
132
  }
134
133
 
135
134
  /**
@@ -172,7 +171,7 @@ export class ViewManagerModel<T = PlainObject> extends HoistModel {
172
171
  readonly instance: string;
173
172
  readonly typeDisplayName: string;
174
173
  readonly globalDisplayName: string;
175
- readonly customViewMenuItem: (view: ViewInfo) => ReactNode;
174
+ readonly customViewMenuItem: (view: ViewInfo, model: ViewManagerModel) => ReactNode;
176
175
  readonly enableAutoSave: boolean;
177
176
  readonly enableDefault: boolean;
178
177
  readonly enableGlobal: boolean;
@@ -163,7 +163,7 @@ function viewMenuItem(view: ViewInfo, model: ViewManagerModel): ReactNode {
163
163
  if (view.description) title.push(view.description);
164
164
 
165
165
  return model.customViewMenuItem
166
- ? model.customViewMenuItem(view)
166
+ ? model.customViewMenuItem(view, model)
167
167
  : menuItem({
168
168
  className: 'xh-view-manager__menu-item',
169
169
  key: view.token,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "73.0.0-SNAPSHOT.1744145292985",
3
+ "version": "73.0.0-SNAPSHOT.1744145524716",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",