@mongodb-js/compass-web 0.26.0 → 0.26.1

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.
@@ -256,7 +256,7 @@ export declare const CompassExperimentationProvider: React_2.FC<{
256
256
  }>;
257
257
 
258
258
  /** @public */
259
- export declare const CompassWeb: ({ appName, orgId, projectId, darkMode, initialAutoconnectId, initialWorkspace, onActiveWorkspaceTabChange, initialPreferences, onLog, onDebug, onTrack, onOpenConnectViaModal, onFailToLoadConnections, }: CompassWebProps) => React_2.JSX.Element;
259
+ export declare const CompassWeb: ({ appName, orgId, projectId, darkMode, initialAutoconnectId, initialWorkspace, onActiveWorkspaceTabChange, initialPreferences, onLog, onDebug, onTrack, onOpenConnectViaModal, onFailToLoadConnections, onBeforeUnloadCallbackRequest, }: CompassWebProps) => React_2.JSX.Element;
260
260
 
261
261
  /** @public */
262
262
  export declare type CompassWebProps = {
@@ -296,9 +296,9 @@ export declare type CompassWebProps = {
296
296
  * communicate current workspace back to the parent component for example to
297
297
  * sync router with the current active workspace
298
298
  */
299
- onActiveWorkspaceTabChange<WS extends WorkspaceTab>(ws: WS | null, collectionInfo: WS extends {
299
+ onActiveWorkspaceTabChange: <WS extends WorkspaceTab>(ws: WS | null, collectionInfo: WS extends {
300
300
  type: 'Collection';
301
- } ? CollectionTabInfo | null : never): void;
301
+ } ? CollectionTabInfo | null : never) => void;
302
302
  /**
303
303
  * Set of initial preferences to override default values
304
304
  */
@@ -326,6 +326,12 @@ export declare type CompassWebProps = {
326
326
  * Callback prop called when connections fail to load
327
327
  */
328
328
  onFailToLoadConnections: (err: Error) => void;
329
+ /**
330
+ * Callback that will get passed another callback function that, when called,
331
+ * would return back true or false depending on whether or not tabs can be
332
+ * safely closed without losing any important unsaved changes
333
+ */
334
+ onBeforeUnloadCallbackRequest?: (canCloseCallback: () => boolean) => void;
329
335
  };
330
336
 
331
337
  /**