ShareFeature

This page is a reference to the ShareFeature used in the `embed-dossier-mstr-react` library.

Interface Definition

export interface ShareFeature {
  enabled?: boolean
  invite?: boolean
  link?: boolean
  email?: boolean
  export?: boolean
  download?: boolean
  shareDossier?: boolean
  subscribe?: boolean
}

Properties

NameTypeDefaultDescription
enabledbooleanundefinedMaster toggle to enable or disable the entire sharing functionality.
invitebooleanundefinedControls whether users can invite others to access the dossier.
linkbooleanundefinedControls whether users can generate and share links to the dossier.
emailbooleanundefinedControls whether users can share the dossier via email.
exportbooleanundefinedControls whether users can export the dossier content.
downloadbooleanundefinedControls whether users can download the dossier.
shareDossierbooleanundefinedControls whether users can share the entire dossier.
subscribebooleanundefinedControls whether users can subscribe to the dossier for updates.

Usage Example

Here's an example of how to configure the share feature options when embedding a dossier:

import { EmbedDossier } from 'embed-dossier-mstr-react';

function App() {
  return (
    <EmbedDossier
      url="https://your-microstrategy-server.com/app/library"
      customUi={{
        dossierConsumption: {
          navigationBar: {
            share: true // Enables the share button in the navigation bar
          }
        }
      }}
      shareFeature={{
        enabled: true,
        invite: true,
        link: true,
        email: true,
        export: false,
        download: true,
        shareDossier: true,
        subscribe: false
      }}
    />
  );
}

In this example, the share feature is enabled with most sharing options available, except for exporting and subscribing to the dossier.

  • NavigationBar - Controls visibility of navigation elements, including the share button
  • CustomUi - Contains configuration for UI elements across different consumption modes

Notes

  • If enabled is set to false, all other properties in this interface will be ignored.
  • For sharing options to work, you must also enable the share button in the navigation bar via the CustomUi configuration.