diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/404.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/404.html index 0a0f0c236..5b96b9b9e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/404.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/404.html @@ -4,13 +4,13 @@ Page Not Found | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ApplicationStructure/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ApplicationStructure/index.html index cfc8fd4f8..fdb132c55 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ApplicationStructure/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ApplicationStructure/index.html @@ -4,14 +4,14 @@ Application Structure | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Application Structure

Each UI Extension Application is a JavaScript application that extends the core functionality of the assocaited M-Files client. Each application can use the UI Extension API to interact with other areas of the UI, and the Vault API to interact with the vault structure and ocntents.

Application Package

The "Application Package" is a .zip file, e.g. Application.zip, which contains the Application Manifest ()appdef.xml), at least one module file, and all other associated resources such as HTML, CSS, images, or other files needed for the application to run.

Application.zip
├── appdef.xml
├── main.js
├── dashboard.html
└── public
├── logo.png
├── styles.css
└── dashboard.js

note

Application Packages typically have a .mfappx extension when distributed to differentiate them from the normal .zip files.

Application Manifest

The application manifest file - appdef.xml defines common attributes such as the application GUID, its name and version and also ties together the other files which are needed to make the application run. Each application manifest must refer to at least one module, and often also refer to one or more dashboards.

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>5EA29AF2-1EC9-4AB7-A0D1-FE1D586310D4</guid>
<name>Name of Application Extension</name>
<version>0.1</version>
<description>Description of the App</description>
<publisher>ACME Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
</application>

Modules

The modules define the entrypoint(s) for your application. These are defined by the <module /> element(s) in the application manifest. Each module must specify at least one JavaScript file (<file />) which defines the OnNewShellUI function which will be called when the application starts.

You can learn more about modules from the modules page.

    <!-- inside appdef.xml -->
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>

Dashboards

Dashboards are HTML pages that are shown within either a custom tab or within a popup dialog. These dashboards are not shown by default, but must be referenced by their dashboard id from within your code.

note

For a complete example see Sample for Popup Dashboard

Each dashboard has a Dashboard id defined in XML like <dashboard id="MySample">. The file that contains the HTML content is defined in the <content> element:

    <dashboards>
<dashboard id="MySample">
<content>index.html</content>
</dashboard>
</dashboards>

The dashboard id is used by the UI Extensions to open the Dashboard, for example when using ShowPopupDashboard method.

// opens Dashboard with id "MySample"
shellFrame.ShowPopupDashboard('MySample', {})

M-Files Extensibility Protocol Library in Dashboard HTML File

The HTML file (e.g. index.html, which is mentioned in the application manifest) loads the resources required to show the content of the dashboard. Here, we should include a special script resource called mfiles.extensibility.protocol.js. The actual content of the M-Files Extensibility Protocol library is served from M-Files Server when it loads Dashboard, which ensures that the content is aligned with M-Files Server.

The M-Files Extensibility Protocol library acts as a layer between your application and the M-Files UIX application framework.

dashboard.html
<!doctype html>
<html lang="en">
<head>
<title>Sample</title>

<!-- Load M-Files Extensibility Framework library file -->
<script src="mfiles.extensibility.protocol.js"></script>

<!-- Load styles and dashboard handler js file -->
<link href="style.css" rel="stylesheet" />
<script src="dashboard.js"></script>
</head>
<body>
<div id="content"></div>
</body>
</html>

Additional Resources

The Application Package can include images, CSS files or other resources needed by the UI Extension. These may include images, CSS files, or other such supporting content. These files are not referenced within the application manifest, but instead referenced from the dashboard where they are needed:

dashboard.html
<!doctype html>
<html lang="en">
<head>
<title>Sample</title>

<!-- Load M-Files Extensibility Framework library file -->
<script src="mfiles.extensibility.protocol.js"></script>

<!--
Load styles and dashboard handler js file. These are expected to be in the same directory as the dashboard file
-->
<link href="style.css" rel="stylesheet" />
<script src="dashboard.js"></script>
</head>
</html>
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Commands/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Commands/index.html index 04e4e8fc4..8662a6dd6 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Commands/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Commands/index.html @@ -4,13 +4,13 @@ Using Custom Commands | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Using Custom Commands

The Custom Commands interface provides a set of commands for customizing menus, creating custom commands, and managing their states in M-Files UI Extensions. The ICommands provides set of tools for developers to customize the user interface, manage commands, and control their visibility and availability within the application.

Managing Commands

note

ICommands is part of IShellFrame interface. To use this interface you have to first obtain instance of the IShellFrame.

Creating a Custom Command

The commands created by the ICommands interface are usually so called Custom Commands which are available only for your UI Extension application.

// Create a new custom command using IShellFrame instance.
const commandId = await shellFrame.Commands.CreateCustomCommand(name);

Controlling the Command visibility

Creating a command does not automatically add the command to the user interface. To do that the SetCommandState method must be used. This method defines the command state (hidden/visible) in specific parts of the user interface:

shellFrame.Commands.SetCommandState( 
commandId, // The ID of the command which state is to be changed
MFiles.CommandLocation.MainMenu, // The location in the UI where the command's state is being changed
MFiles.CommandState.CommandState_Hidden // New state of the command in specific location
);

Executing the Command manually

The Custom command can executed directly using ExecuteCommand, which accepts also optional data parameter.

The data must be serializeable using Structured Cloning Algorithm.

// Execute a new custom command with data parameter
await shellFrame.Commands.ExecuteCommand(commandId, {
someCustomData: 1234
});

Listening and Responding to Custom Commands

User can listen to cuostom command events using MFiles.Event.CustomCommand, which has a callback having parameters (commandId, data).

tip

It is generally recommended to have a single listener function for custom commands to avoid responding to the same command multiple times.


// Listen for the custom commands.
shellFrame.Commands.Events.Register(

// Listen for the CustomCommand events.
MFiles.Event.CustomCommand,

// Each command has ID and optional data provided with it.
( commandId, data ) => {
}
);

Command locations

tip

The commands sample includes practical examples of code that adds commands to different locations.

Commands can be shown in two primary locations: within the context menu (shown when the user right-clicks on something in a listing), and within the main menu.

The context menu

Commands can be added to the context menu which is shown when a user right-clicks on something in a listing. The command may be shown similarly to this:

The command shown in the context menu

// This code should be placed to run when the shell frame is started.

// Create the command.
const commandOneId = await shellFrame.Commands.CreateCustomCommand
(
"My First Command"
);

// Add the command to the bottom of the context menu.
await shellFrame.Commands.AddCustomCommandToMenu
(
commandOneId,
MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, // Note: context menu
1
);

// Show a message when the command is clicked.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// If something other than our command was clicked then die.
if(commandId !== commandOneId)
return;

// Our context menu command was clicked.
await shellFrame.ShowMessage( "My context menu command was clicked." );
}
);

The main menu

tip

The commands sample includes practical examples of code that adds commands to different locations.

Commands can be added to the "main menu", which is located at the top-right of the user interface, as a three-dot icon. Clicking this icon expands the menu and shows commands added to the menu.

note

The main menu is not shown until one or more UI Extensions add commands to this location.

// This code should be placed to run when the shell frame is started.

// Create the command.
const commandOneId = await shellFrame.Commands.CreateCustomCommand
(
"My First Command"
);

// Add the command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu
(
commandOneId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu, // Note: top pane menu
1
);

// Show a message when the command is clicked.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// If something other than our command was clicked then die.
if(commandId !== commandOneId)
return;

// Our context menu command was clicked.
await shellFrame.ShowMessage( "My top menu command was clicked." );
}
);

Child commands

The main menu supports commands with sub-menu commands. This functionality allows you to group commands logically by function within your application:

A main menu command with sub-menu commands

To do this, create the parent command and then call CreateSubMenuItem to create child commands:

// This code should be placed to run when the shell frame is started.

// Create the parent command.
const commandOneId = await shellFrame.Commands.CreateCustomCommand
(
"My First Command"
);

// Add the parent command to the main menu.
const parentMenuItemId = await shellFrame.Commands.AddCustomCommandToMenu
(
commandOneId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu, // Note: top pane menu
1
);

// Create child commands (buttons).
const commandChildOneId = await shellFrame.Commands.CreateCustomCommand
(
"My First Child Command"
);
const commandChildTwoId = await shellFrame.Commands.CreateCustomCommand
(
"My Second Child Command"
);

// Add the child commands to the parent.
await shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildOneId, 1 );
await shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildTwoId, 1 );


// Show a message when the command is clicked.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Only react when the child commands are clicked.
if(commandId !== commandChildOneId && commandId !== commandChildTwoId)
return;

// One of the two child commands was clicked.
await shellFrame.ShowMessage( "One of the child commands was clicked!" );
}
);
note

Context menus do not currently support child commands.

Icons

Commands support icons in all menu locations.

A main menu command with sub-menu commands

Adding an icon for command can be done using SetIcon method with IIconInformation configuration.

Example of setting an icon from a relative path for a custom command.

First, create a custom command ID. Next, add the necessary information to the icon information object to set the actual icon. Finally, add the command to any menu location. All current menu locations are supported, and the added icon will appear on the left side of the menu item.

// This code should be placed to run when the shell frame is started.

// Create custom command ID.
const customCommand = await shellFrame.Commands.CreateCustomCommand("Custom command");

// Create icon information.
const iconIdInformation = {
content: "assets/icons/customCommandIcon.svg",
iconContentType: "PATH",
alt: "Custom command icon alt",
extension: "svg"
};

// Set icon for created command ID.
await shellFrame.Commands.SetIcon(commandCheckoutId, iconIdInformation);

// Add command to the taskbar menu location.
await shellFrame.Commands.AddCustomCommandToMenu(commandCheckoutId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1);

IIconInformation configuration examples for other content types.

SVG string icon:

// Icon in SVG string format.
const svgStringIcon = "<svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'><rect x='1' y='14' width='14' height='1' rx='0.5' fill='#363A40'/><circle cx='3' cy='7' r='1.5' stroke='#363A40'/><path d='M5 8L6.5 10.5' stroke='#363A40'/><circle cx='8' cy='11' r='1.5' stroke='#363A40'/><circle cx='13' cy='3' r='1.5' stroke='#363A40'/><path d='M12.5 4L9 9.5' stroke='#363A40'/></svg>";

// Create iconInformation object.
const iconIdInformation = {
content: svgStringIcon,
iconContentType: "SVG",
alt: "Custom command SVG string icon alt",
extension: "svg"
};

Base64 string:

// Icon in base64 string format.
const base64StringIcon = "PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMSIgeT0iMTQiIHdpZHRoPSIxNCIgaGVpZ2h0PSIxIiByeD0iMC41IiBmaWxsPSIjMzYzQTQwIi8+CjxjaXJjbGUgY3g9IjMiIGN5PSI3IiByPSIxLjUiIHN0cm9rZT0iIzM2M0E0MCIvPgo8cGF0aCBkPSJNNSA4TDYuNSAxMC41IiBzdHJva2U9IiMzNjNBNDAiLz4KPGNpcmNsZSBjeD0iOCIgY3k9IjExIiByPSIxLjUiIHN0cm9rZT0iIzM2M0E0MCIvPgo8Y2lyY2xlIGN4PSIxMyIgY3k9IjMiIHI9IjEuNSIgc3Ryb2tlPSIjMzYzQTQwIi8+CjxwYXRoIGQ9Ik0xMi41IDRMOSA5LjUiIHN0cm9rZT0iIzM2M0E0MCIvPgo8L3N2Zz4K";

// Create iconInformation object.
const iconIdInformation = {
content: base64StringIcon,
iconContentType: "BASE64",
alt: "Custom command SVG base64 string icon alt",
extension: "svg"
};

Note: With Base64 string, extension information must be provided in order to handle icon information correctly.

Using built-in icons:

It is possible to use built-in icons for commands. See available built-in icon IDs from the BuiltInIcon enumeration in the IIconInformation interface.

    // Create iconInformation object for builtin Checkout icon.
const iconIdInformation = {
content: 0,
iconContentType: "BUILT_IN",
alt: `built-in icon alt`,
extension: ""
};
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Dashboards/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Dashboards/index.html index 498cf0777..5fa5e887d 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Dashboards/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Dashboards/index.html @@ -4,15 +4,15 @@ Dashboards | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Dashboards

Dashboards are custom HTML pages defined by the application and can reference typical web content such as JavaScript and CSS files. These custom HTML pages may be shown all the time in a custom tab, shown in a tab which is shown or hidden depending upon user interaction, or shown via code as a custom popup dialog. Each dashboard, when shown, is rendered within an <iframe /> element.

Dashboards must be defined within the application manifest and given a unique ID. In the example below the ID of the dashboard is defined to be my-dashboard, and the HTML for the dashboard is contained within index.html:

    <dashboards>
<dashboard id="my-dashboard">
<content>index.html</content>
</dashboard>
</dashboards>
note

Dashboard files are standard HTML files which will be rendered by the browser.

Bootstrapping the Dashboard

The Dashboard HTML file (e.g. index.html; the actual file name can be any valid filename) typically must contain code that reacts when the dashboard is shown, to gather data to render from either the supplied parameters (CustomData), or from elsewhere in the UI or vault.

When the dashboard is shown and ready to use, the framework will automatically locate and execute a function called OnNewDashboard. There must be only one function in the dashboard called this, but the function can be held within the HTML file directly or within a referenced JavaScript file. This method will be passed a single argument - named below as newDashboard - which is of type IDashboard:

// Dashboard bootstrap function
function OnNewDashboard(newDashboard) {
// TODO: React when the dashboard is shown.
}

Boostrapping the Dashboard in React Application

In a React + TypeScript application you can bootstrap the Dashboard using following pattern.

(window as any).OnNewDashboard = (newDashboard: IDashboard) => {
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<App dashboard={newDashboard} />
</React.StrictMode>
);
};

Showing a dashboard from within your application

Simply declaring a dashboard does not show it within the user interface. Instead: the dashboard must be rendered either by creating a new tab and rendering it within that tab, or by showing the dashboard within a popup dialog.

Open a new Dashboard using the Tab

Opening a new tab requires a Dashboard ID, which is defined in you Application Manifest -file. This will create a new instance of Dashboard which lives inside IFRAME as long as the Tab is finally removed.

note

Opening too many tabs can affect your application performance.

Open a Popup Dashboard

Opening the popup dashboard is done using the ShowPopupDashboard method, which accepts also third parameter, which is the title of the Dialog.

shellFrame.ShowPopupDashboard(
'my-dashboard',
{
message: 'Some Custom Data Here',
},
'Dashboard Title',
)

Passing data to and from dashboards

Passing Custom data to the Dashboard

The Dashboard can also be passed a custom data, which is visible in the Dashboards CustomData property.

myTab.ShowDashboard('my-dashboard', {
msg: 'Sample Message to the Dashboard',
})
myTab.Select()

The Dashboard which was opened using ShowDashboard can retrieve the data from CustomData property.

// Dashboard bootstrap function
function OnNewDashboard(newDashboard) {
const data = newDashboard.CustomData // has the data which is passed in ShowDashboard second param
}
tip

The Custom Data can include only data which can be serialized using the Structured Cloning Algorithm. This means that you can not pass callback functions inside that data to send responses from the new Dashboard back to the opener. However, you can send custom command ID values and custom commands can be given a data parameter.

Passing updated data to the Dashboard

It is also possible to pass updated data to the dashboard using the IDashboard.UpdateCustomData method. There is a detailed example of how to do this on the UpdateCustomData method page:

// Create the tab and show some default custom data.
const myTab = await shellFrame.RightPane.AddTab("my-test-tab", "My Dashboard", "_last");
const myDashboard = await myTab.ShowDashboard("mydb",
{
timeNow: "INITIAL_DATA, 5 second refresh interval!"
});

// Every 5 seconds call the UpdateCustomData method.
setInterval( () => {
myDashboard.UpdateCustomData({
timeNow: ( new Date() ).toISOString() // Pass the current time.
})
}, 5000)

Passing Custom data from the Dashboard to the opener

You can create a custom command which is used to send data back to the opener. As the command is not added to any menu structure it is not visible, but can be executed from code.

From the opener:

const callbackCommandId = await shellFrame.Commands.CreateCustomCommand(name)

// Listen for the custom commands.
shellFrame.Commands.Events.Register(
// Listen for the CustomCommand events.
MFiles.Event.CustomCommand,

// Each command has ID and optional data provided with it.
(commandId, data) => {
// Short-circuit if this is called for a command we don't care about.
if (commandId !== callbackCommandId) return

// Show something from the data.
alert('The name is: ' + data.name)
},
)

myTab.ShowDashboard('my-dashboard', {
callbackId: callbackCommandId,
})
myTab.Select()

From the dashboard we can then return data back to the caller using ExecuteCommand

// Dashboard bootstrap function
function OnNewDashboard( newDashboard ) {

// Get the command ID
const commandId = newDashboard.CustomData.callbackId;

// Send data back to the caller, in this case object { name: "ExampleObject" }
await shellFrame.Commands.ExecuteCommand(commandId, {
name: "Example Object"
});

}

Closing the Dashboard

You can close the Dashboard using the associated Window object which has Close method

newDashboard.Window.Close()
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Debugging/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Debugging/index.html index 7f1793c4d..f60e92c8c 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Debugging/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Debugging/index.html @@ -4,15 +4,15 @@ Testing and Developing | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Testing and Developing

Runtime Environment

The runtime environment of the UI Extension is inside sandboxed <iframe /> and communication between the M-Files Client and UI Extension is done internally using postMessage where the calls are serialized using Structured Clone algoritm.

When a call to an UI Extension Object is done, for example

const commandId = await shellFrame.Commands.CreateCustomCommand(name);

The call is serialized into a postMessage message using MESP protocol (M-Files Extension Sandbox Protocol). It is possible to enable logging of the postMessage calls if you want to observe exactly what is going on during execution of specific command.

The global variables, like Enumerations are binded into MFiles variable only after the initialization message.

Debugging from Developer Tools

From the browser developer tools you can select the IFRAME and observe the global variables installed there.

Calling ICommonFunctions

MFiles global variable includes enumerations and also the ICommonFunctions properties and methods.


// Call ICommonFunctions.GetAccentColor()
await MFiles.GetAccentColor() // returns "#006eef"

// Save a key into webstorage
await MFiles.WriteToWebStorage("key", "value")

Accessing the Dashboard object

In the Dashboard code you can access the dasboard object using _MESP global variable.


// retrieve the active dashboard object inside a Dashboard IFRAME
const dashboard = _MESP.ApplicationObjects.Dashboard;

// Create a popup dashboard with ID "my-dashboard"
await dashboard.ShellFrame.ShowPopupDashboard("my-dashboard", {});

Enable postMessage logging

If you want to enable logging of the postMessage commands into the Developer Tools console you can turn that on inside the UI Extension application using

// Enable logging of postMessage calls into console
window._MESP.logLevel = "all";
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Events/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Events/index.html index 6a96d86a3..613d4c890 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Events/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Events/index.html @@ -4,15 +4,15 @@ Events | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Events

The UI Extension Application has different kinds of event handlers:

  1. Module or Dashboard Startup handlers. These functions are called once when the module or dashboard starts and are considered entry points to your application.
  2. Interface events which are are specific to the UI Extension API Interfaces. For example: you can react to an event which is fired whenever the user selects an object in a listing.
  3. Custom Command events. These are raised when a custom command - such as a context-menu item - is clicked by the user.
  4. Built-in commands, which you can listen by registering to listen to MFiles.Event.BuiltinCommand for the IShellFrame.

Module Startup

Global function OnNewShellUI is the first function called inside the module. This function gets the new IShellUI as parameter

main.js

function OnNewShellUI( shellUI )
{
// Called during the initialization
}

For many Extension the most important object you can get from the IShellUI is the IShellFrame instance. For that you have to listen for two events:

  1. MFiles.Event.NewShellFrame event is fired by the IShellUI instance when the IShellFrame instance is available.
  2. MFiles.Event.Started event is fired by the IShellFrame instance when that instance is ready to be used.

Sample code to illustrate the event sequence in the module to get both IShellFrame and IShellUI instances.

main.js

// This function which handles UI Extension initialization phase.
function OnNewShellUI( shellUI )
{
// Wait for the ShellFrame to be created and started
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
shellFrame => {
shellFrame.Events.Register(
MFiles.Event.Started,
() => {
Start( shellUI, shellFrame )
});
});
}

// Main application
async function Start( shellUI, shellFrame ) {
// TODO: write the UI Extension code here.
}

Dashboard Startup

The startup events are fired only once per module. The function handlers must be named functions binded to the global window object inside the dashboard.

OnNewDashboard gets instance of IDashboard as a parameter. The most common Interfaces like IShellFrame and IShellUI are accessible through that interface.

// Dashboard bootstrap function
function OnNewDashboard( newDashboard ) {

}
tip

The argument of the OnNewDashboard function is instance of UIDashboard which has the ShellFrame property, which is one of the most important interfaces for the UI Extensions: IShellFrame.

ShellFrame has ShellUI property which links to the IShellUI, which is another very important interface, because it contains the Vault property, which allows you to access the Vault API

Interface Events

Each interface object has Event property which is instance of IEvents. This interface has two methods:

  • Register which is used to register a new event handler for a given Event. This function returns a handle, which can be used to unregister the event handler.
  • Unregister which takes the handler returned by the Register function as parameter.

Example of registering an event handler which listens to the IShellListing Selection Changed event.

// shellListing is of type IShellListing
const eventHandle = await shellListing.Events.Register(
MFiles.Event.SelectionChanged,
items => {
// When the event fires you get the IShellItems object
}
);
info

Notice that the Register methods return value is a Promise. You have to either await that in the async function or resolve the promise using .then( eventHandle => { ]})

To see which Interface events are available for each UI Extension Interface see the API Reference Guide for events

Unregistering an Event Handler

To unregister an event handler simply pass the handle returned by the Register method to the Unregister method.

shellListing.Events.Unregister(eventHandle);

Cancelling built-in events

Built-in events can be cancelled by returning false from the attached handler. This can be useful if the handler itself overrides the default behavior:

shellFrame.Commands.Events.Register(
MFiles.Event.BuiltinCommand,
(cmdId: number, objectType: number) => {
// If the user has clicked to create a document then override the behavior.
if (cmdId === MFiles.BuiltinCommand.NewObject && objectType === 0) {
shellFrame.ShowMessage("BuiltinCommand as Cancelled by Event handler");
return false;
}
}
)
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/InstallingApplications/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/InstallingApplications/index.html index 739b8688d..710cb30b6 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/InstallingApplications/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/InstallingApplications/index.html @@ -4,14 +4,14 @@ Installing Applications | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Installing Applications

M-Files UI Extensions are managed using the M-Files Admin tool.

Prerequisites

  1. You have created an Application Package by creating a ZIP archive from your development folder.
  2. You have access to M-Files Admin tool, whicn can connect to M-Files Server.
  3. You have configured the M-Files Web application, and can access this via a standard web browser.

Installing the UI Extension

  1. Open the M-Files Admin tool and connect to your M-Files server.
  2. Right-click on the vault name on the M-Files Admin and select the Applications from the Context menu.
  3. From the Applications window (See Image 1) click the Install button from the bottom of the window.
  4. Select the Application Package you have created previously and click 1Open1 button.

Image1: Applications window where you can Install and Remove UI Extensions  alt text

note

You may need to log out and back into the M-Files client to see the new application.

Updating the UI Extension

Applications are differentiated by their Application GUID and version number, which are defined in the Application Manifest. If the Application with same version number has already been installed Already Exists error message is shown.

To update a new version the version number field in the appdef.xml file must be increased above the previous version.

<version>0.2</version>

Alternatively you can remove the application and install it again.

note

You may need to log out and back into the M-Files client to see the changes.

Removing the UI Extension

You can remove the UI Extension application From the Applications window (See Image1)

  1. Select the application to uninstall.
  2. Click Uninstall button.
  3. Confirm the uninstall by answering Yes or No to the confirm dialog.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ListingView/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ListingView/index.html index 2d3b7a724..ecc17d523 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ListingView/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ListingView/index.html @@ -4,14 +4,14 @@ Working with the Shell Listing | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Working with the Shell Listing

The Shell Listing represents the list of files, objects, views, groupings, or other content shown within the current object listing. Changes in the listing view affect various parts of the client. For example: when objects are selected or deselected the Preview and Metadata tabs display information about the selected object(s).

The ActiveListing is a property of IShellFrame and there are two main events, which are fired when it changes:

  • MFiles.Event.NewShellListing is fired when a new listing is created, for example when user navigates to another view.
  • MFiles.Event.SelectionChanged is fired when user makes a new selection in the active view, for example by clicking the object with mouse.

All properties and methods of the listing are described in IShellListing and properties and methods of the selected items are described in IShellItems.

The ActiveListing has two properties which enumerate the items inside the Listing

  • items which is instance of IShellItems holds all items in the listing
  • CurrentSelection which is instance of IShellItems holds the user selected items

Observing the changes to Current Selection

Current selection represents the user selected items from the Listing View.

To observe the selection changes of the active selection you can listen to MFiles.Event.SelectionChanged event.


// hold the current values
const state = {
listing: null,
selectedItems: null,
selectionChangedEventId: 0
}

// Observe changes to the active view
shellListing.Events.Register(
MFiles.Event.NewShellListing,
async (listing) => {

// Before registering a new handler, unregister the previous event handler
if( state.selectionChangedEventId ) {
state.listing.Events.Unregister( currentSelection.selectionChangedEventId );
state.selectionChangedEventId = 0;
}

// Save the old listing item so that we can unregister the event handler.
state.listing = listing;

// save the event handler id so that we can unregister if if the view changes.
state.selectionChangedEventId = await listing.Events.Register(
MFiles.Event.SelectionChanged,
(items) => {
// items is IShellItems instance holding the current selection

// log number of selected items
console.log( items.Count );

// get the object verions and log the titles of the files
const list = items.ObjectVersions || [];
list.forEach( item => {
console.log( item.object_version?.title );
})
}
)

}
);

Add New File to Multi Document Object

Here is a React example of how to add new file into a multi document object. The Example assumes selectedItems has instance of IShellItems.

Replacing a File

Here is a React example of how to replace a file into a normal document object. The Example assumes selectedItems has instance of IShellItems.

Selecting Next Object

listing.SelectNextObject();

Selecting Previous Object

listing.SelectPrevObject();
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Messages/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Messages/index.html index 8bcb837b6..7ecffd8a6 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Messages/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Messages/index.html @@ -4,13 +4,13 @@ Dialogs and Messages | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Dialogs and Messages

UI Extension Applications can define a rich UI interface using HTML and JavaScript inside their own IFRAME. However, sometimes it is necessary to create modal dialogs which break the IFRAME boundary.

Simple and customized message boxes can be displayed in various interfaces by using ShowMessage method available on the IShellFrame instance. This method can take either single string or object as a parameter. If an object is passed, it defines the behavior of the message box.

Simple String Based Message Box

The simplest Message Box type is to call the ShowMessage with just a simple string parameter.

// Here the shellFrame refers to IShellFrame object.

// Wait for the dialog to close, assuming that we are running inside async function.
const res = await shellFrame.ShowMessage('Sample Message from the Extension')

// value of "res" will be
// {selectedButton: 1, checkboxChecked: false}

 alt text

The ShowMessage returns always the index of the selected button ( 1, 2 or 3 ) and checkboxChecked boolean.

{selectedButton: 1, checkboxChecked: false}

Customizing Text and the Buttons

Optionally, you can give messagebox an Object parametere, where you define the text of the Message Box in the message property.

You can also define texts for up to three buttons using button1_title, button2_title and button3_title properties.

const result = await shellFrame.ShowMessage({
message: 'Message Text comes Here',
button1_title: 'Button Text 1',
button2_title: 'Button Text 2',
button3_title: 'Button Text 3',
})

 alt text

Message with Checkbox

You can use checkbox_title to enable checkbox in the Message Box.

const result = await shellFrame.ShowMessage({
message: 'Do you want to save the Changes?',
button1_title: 'Yes',
button2_title: 'No',
checkbox_title: 'Do not ask this again',
})

// result.checkboxChecked holds the checkbox value

You can also give checkbox_checked: true in the parameter Object if you want to enable the checkbox by default.

Message with Timeout

You can use timeOutButton and timeOut to define which button will be selected after N seconds.

const result = await shellFrame.ShowMessage({
message: 'Do you want to save the Changes?',
checkbox_checked: true,
button1_title: 'Yes',
button2_title: 'No',
checkbox_title: 'Do not ask this again',
timeOutButton: 1,
timeOut: 15,
})

 alt text

Toasts

// Show a Success message
MFiles.ShowToast('Toast Title', 'Toast Message', 1)

 alt text

The third parameter is the type of the Toast having following variants:

NameValue
Info0
Success1
Warning2
Error3

Report Exception

The ReportException function is provided to facilitate showing error messages and exception to the end users in a MessegBox dialog. This function helps developers communicate issues effectively, ensuring users understand what went wrong.

The ReportException function accepts MFError object, JavaScript Error object or string as its parameter. The MFError class extends JavaScript Error class with some additional properties that enable UIX developers to provide more information about the error.

The following section illustrates usage of ReportException function.

1. Showing MFError object.

window.MFiles.ReportException({
name: 'name of the error',
message: 'error message',
errorCode: 100,
type: 'type of error',
source: 'source of error file/class or app',
stack: 'stack trace',
details: 'details of the error',
})

 alt text

  • The name and message properties are mandatory in MFError class.
  • The name property is shown as the title of the message box.
  • The errorCode must be number and other properties must be string.
  • The Copy link can be used to copy the details text to clipboard which make it easier for end user to report the error to the developer.
  • By default, the details section is hidden. The Show details/Hide details can be used for showing or hiding the details.

2. Showing JavaScript Error object

try {
// Codes which may throw exception
} catch (exp) {
window.MFiles.ReportException(exp)
}

 alt text

3. Showing simple string

window.MFiles.ReportException('Simple string error message')

 alt text

You can notice that the MessageBox is shown without any title as we do not have any "name" property in the last example.

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Modules/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Modules/index.html index f8c34fa66..11d021245 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Modules/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Modules/index.html @@ -4,8 +4,8 @@ Modules | M-Files User Interface Extensibility Framework - - + +
@@ -13,7 +13,7 @@ document defines the file name inside the Application Package to be executed.

    <!-- inside appdef.xml -->
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>

The module code itself must be a JavaScript application, which has a public entrypoint OnNewShellUI which is the function that will be called during the initialization of the UI Extension. The OnNewShellUI has one argument which is the instance of IShellUI. Please see the Sample Applications for examples of actual usage of the ShellUI.

main.js
// This function which handles UI Extension initialization phase.
function OnNewShellUI(shellUI) {
// Wait for the ShellFrame to be created and started
shellUI.Events.Register(MFiles.Event.NewShellFrame, (shellFrame) => {
shellFrame.Events.Register(MFiles.Event.Started, () => {
Start(shellUI, shellFrame)
})
})
}

// Main application
async function Start(shellUI, shellFrame) {
// TODO: write the UI Extension code here.
}
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Tabs/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Tabs/index.html index e2434f8fc..5ef571e36 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Tabs/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Tabs/index.html @@ -4,8 +4,8 @@ Tabs | M-Files User Interface Extensibility Framework - - + +
@@ -13,7 +13,7 @@ create a new instance of IDashboard which lives inside an <iframe /> until the tab is removed.

note

Opening too many tabs can affect your application performance.

myTab.ShowDashboard("my-dashboard", {});
myTab.Select();

Passing data into the dashboard

Custom information can also be passed into the dashboard by providing it as the second argument:

const customData = {
msg: "Sample Message to the Dashboard"
};
myTab.ShowDashboard("my-dashboard", customData);
myTab.Select();

The dashboard which was opened using ShowDashboard can retrieve the data from CustomData property.

// Dashboard bootstrap function
function OnNewDashboard( newDashboard ) {

const data = newDashboard.CustomData; // has the data which is passed in ShowDashboard second param
console.log(data.msg); // Logs "Sample Message to the Dashboard"

}
tip

The Custom Data can include only data which can be serialized using the Structured Cloning Algorithm. This means that you can not pass callback functions inside that data to send responses from the new dashboard back to the opener. However, you can send custom command ID values and custom commands can be given a data parameter.

Passing data the dashboard opener

You can create a custom command which is used to send data back to the opener.

From the opener:

// Create the command, but do not add it to any menu.
const customCommandId = await shellFrame.Commands.CreateCustomCommand(name);

// Listen for the custom commands.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
( commandId, data ) => {

// Disregard other commands.
if(commandId !== customCommandId)
return;

// Log out what we were given.
console.log(data.name); // Logs "ExampleObject"
}
);

// Show the dashboard and pass the command ID as part of the custom data.
myTab.ShowDashboard("my-dashboard", {
callbackId: customCommandId
});
myTab.Select();

From the dashboard we can then return data back to the caller by executing the appropriate command using ExecuteCommand

// Dashboard bootstrap function
async function OnNewDashboard( newDashboard ) {

// Get the command ID
const commandId = newDashboard.CustomData.callbackId;

// Send data back to the caller, in this case object { name: "ExampleObject" }
await shellFrame.Commands.ExecuteCommand(commandId, {
name: "Example Object"
});

}

Selecting a Tab

Selecting a tab will display the assosiated Dashboard for the tab.

myTab.Select();

Unselecting a Tab

Unselecting the tab will hide the assosiated dasboard and make the Tab selection status unselected.

myTab.Unselect();

Removing a Tab

Tab can be permanently removed using Remove method. For performance reasons it is recommended to remove tabs which are not actively needed.

myTab.Remove();
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/index.html index b145dc294..40833da43 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/index.html @@ -4,13 +4,13 @@ Overview | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Overview

User Interface Extensibility Framework applications are JavaScript applications that run within the M-Files Web client. The framework provides a set of objects that allow you to interact with the user interface by adding commands to various menus, to add your own tabs/dashboards, or to react when various events fire within the user interface. Applications can also use the M-Files Vault API to perform tasks within the vault such as searching or creating objects.

What can be done using the User Interface Extensibility Framework?

The User Interface Extensibility Framework allows third-party developers to extend the M-Files client interface in a number of ways:

  • By reacting when events fire within the user interface, such as reacting when a user selects an object of a known type.
  • By adding commands to either the main menu or context menu, and reacting when those commands are clicked.
  • By adding custom tabs to the user interface, allowing custom HTML pages ("dashboards") to be shown within M-Files.
  • By showing popup dashboards, for example when a command is clicked.
  • By interacting with other components of the user interface through the UIX API, or interacting with the vault via the Vault API.
  • Using any combination of the above.

How are UI applications structured?

note

More information on the application structure is available in the dedicated page.

UI applications are deployed as a .mfappx file, which is a renamed .zip file. This archive contains the files that the application needs to run, including:

  • A manifest file named appdef.xml which defines the application ID, name, modules, and dashboards.
  • At least one module file which declares the application entry point.
  • Zero, one, or more dashboard HTML file, along with any supporting files such as CSS, JavaScript, or images.

How do I deploy and test my UI applications?

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/AssignToMe/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/AssignToMe/index.html index d0e32f7cd..8e9d9cd1e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/AssignToMe/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/AssignToMe/index.html @@ -4,13 +4,13 @@ Creating assignments for selected objects | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Creating assignments for selected objects

Overview

This sample creates a basic User Interface Extensibility Framework application consisting of one ShellUI module which allows the user to select objects within the M-Files vault and assign them to themselves via a button in the main menu.

This sample does not show how to create a local development folder or to deploy the code to the M-Files server. It is assumed that a local development folder already exists, and that is the location in which the development is occurring.

Creating the application structure

Creating the application definition file

Into this folder we will create an application definition file. This file must be named appdef.xml. The application will use version 5 of the client schema (as we are only targeting newer M-Files versions). The application will declare a single Shell UI module (with its code in main.js), and no dashboards.

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>C311B570-40F4-4893-96C8-05110A30743C</guid>
<name>Assign to me UIX sample</name>
<version>0.1</version>
<description>A demonstration application for reacting to selected items and assigning them via a command.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
</application>

Ensure that your application has a unique GUID by using a GUID generator.

Creating the module

Next we will create a module file to contain our actual application logic. Initially:

  • We will declare a default entry point for the ShellUI module.
  • We will react to the NewShellFrame event and obtain a reference to the shell frame.
  • We will react to the shell frame’s Started event (as using the shell frame before this point will result in an exception).
  • Create a command (button, place it into the menu area, and hide it.
  • React to the shellFrame’s CustomCommand event and add some placeholder code to execute when the command is clicked.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>The entry point of ShellUI module.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The new shell UI object.</param>

// Register to be notified when a new normal shell frame (Event_NewShellFrame) is created.
// We use Event_NewShellFrame rather than Event_NewShellFrame as this won't fire for history (etc.) dialogs.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// Register to listen to the started event.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Gets a function to handle the Started event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnStarted">The event handler.</returns>

// Return the handler function for ShellFrame's Started event.
return async () => {
// Create a command for "assign to me".
const assignCommandId =
await shellFrame.Commands.CreateCustomCommand('Assign to me')

// Add the command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
assignCommandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)

// Hide the command. We will show it when the selected items change.
await shellFrame.Commands.SetCommandState(
assignCommandId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Hidden,
)

// Register to respond to commands being clicked.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async (command) => {
// We only care about our command.
// If the command being clicked is something else then return.
if (command !== assignCommandId) {
return
}

// TODO: Ensure we have items to process.

// TODO: Create the assignment object.
},
)
}
}

Reacting to shell listing selection changes

We must be able to react to selection changes in the listing.

We will:

  • Declare a global variable to hold the currently-selected items (currentlySelectedItems).
  • React to the shell frame’s NewShellListing event to attach event handlers to each shell listing.
  • Alter the visibility of the command depending on whether or not any objects are currently selected.
  • React to each shell listing’s SelectionChanged event, saving the currently-selected items.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

// The currently-selected items in the active listing.
let currentlySelectedItems = null

function OnNewShellUI(shellUI) {
/// <summary>The entry point of ShellUI module.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The new shell UI object.</param>

// Register to be notified when a new normal shell frame (Event_NewShellFrame) is created.
// We use Event_NewShellFrame rather than Event_NewShellFrame as this won't fire for history (etc.) dialogs.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// Register to listen to the started event.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Gets a function to handle the Started event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnStarted">The event handler.</returns>

// Return the handler function for ShellFrame's Started event.
return async () => {
// Create a command for "assign to me".
const assignCommandId =
await shellFrame.Commands.CreateCustomCommand('Assign to me')

// Add the command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
assignCommandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)

// Hide the command. We will show it when the selected items change.
await shellFrame.Commands.SetCommandState(
assignCommandId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Hidden,
)

// Register to listen to when new shell listings are created.
shellFrame.Events.Register(
MFiles.Event.NewShellListing,
getNewShellListingHandler(shellFrame, assignCommandId),
)

// Register to respond to commands being clicked.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async (command) => {
// We only care about our command.
// If the command being clicked is something else then return.
if (command !== assignCommandId) {
return
}

// Ensure we have items to process.
if (!currentlySelectedItems) {
return
}

// TODO: Create the assignment object.
},
)
}
}

function getNewShellListingHandler(shellFrame, assignCommandId) {
/// <summary>Gets a function to handle the NewShellListing event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnNewShellListing">The event handler.</returns>

// Return the handler function for NewShellListing event.
return (shellListing) => {
// Listen for selection change events on the listing.
shellListing.Events.Register(
MFiles.Event.SelectionChanged,
async (selectedItems) => {
// Sanity.
if (shellListing.IsActive === false) {
return false
}

// Set the currently-selected items to null (assume nothing selected).
currentlySelectedItems = null

// Has the user got any object versions selected?
if (selectedItems.ObjectVersions.length === 0) {
// Hide the menu item - there's nothing selected.
await shellFrame.Commands.SetCommandState(
assignCommandId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Hidden,
)
return false
}

// Show the menu item.
await shellFrame.Commands.SetCommandState(
assignCommandId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Active,
)

// Store the selected items.
currentlySelectedItems = selectedItems

// We succeeded; return true.
return true
},
)
}
}

Creating the assignment object

We will:

  • Create a function that creates the assignment object (createAssigmentObject). Specifically, it will:
    • Create property values for the built-in properties used by the Assignment object type:
      • Class.
      • Name or title.
      • Single file document.
      • Assigned to.
    • Create properties to establish relationships between the assignment object and the currently-selected items.
    • Create the object and check it in immediately.
  • Call the function when the command is clicked.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

// The currently-selected items in the active listing.
let currentlySelectedItems = null

// Built in property defs.
const BuiltInPropertyDefs = {
Class: 100,
NameOrTitle: 0,
SingleFlie: 22,
AssignedTo: 44,
}

// Built in object types.
const BuiltInObjectType = {
Assignment: 10,
}

// Null value of GUID.
const GUID_NULL = '{00000000-0000-0000-0000-000000000000}'

function OnNewShellUI(shellUI) {
/// <summary>The entry point of ShellUI module.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The new shell UI object.</param>

// Register to be notified when a new normal shell frame (Event_NewShellFrame) is created.
// We use Event_NewShellFrame rather than Event_NewShellFrame as this won't fire for history (etc.) dialogs.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// Register to listen to the started event.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Gets a function to handle the Started event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnStarted">The event handler.</returns>

// Return the handler function for ShellFrame's Started event.
return async () => {
// Create a command for "assign to me".
const assignCommandId =
await shellFrame.Commands.CreateCustomCommand('Assign to me')

// Add the command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
assignCommandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)

// Hide the command. We will show it when the selected items change.
await shellFrame.Commands.SetCommandState(
assignCommandId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Hidden,
)

// Register to listen to when new shell listings are created.
shellFrame.Events.Register(
MFiles.Event.NewShellListing,
getNewShellListingHandler(shellFrame, assignCommandId),
)

// Is there already a listing? If so then we need to hook into it as well.
if (shellFrame.Listing) {
getNewShellListingHandler(shellFrame, assignCommandId)(shellFrame.Listing)
}

// Register to respond to commands being clicked.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async (command) => {
// We only care about our command.
// If the command being clicked is something else then return.
if (command !== assignCommandId) {
return
}

// Ensure we have items to process.
if (!currentlySelectedItems) {
return
}

// Create the assignment object.
await createAssignmentObject(shellFrame)
},
)
}
}

function getNewShellListingHandler(shellFrame, assignCommandId) {
/// <summary>Gets a function to handle the NewShellListing event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnNewShellListing">The event handler.</returns>

// Return the handler function for NewShellListing event.
return (shellListing) => {
// Listen for selection change events on the listing.
shellListing.Events.Register(
MFiles.Event.SelectionChanged,
async (selectedItems) => {
// Sanity.
if (shellListing.IsActive === false) {
return false
}

// Set the currently-selected items to null (assume nothing selected).
currentlySelectedItems = null

// Has the user got any object versions selected?
if (selectedItems.ObjectVersions.length === 0) {
// Hide the menu item - there's nothing selected.
await shellFrame.Commands.SetCommandState(
assignCommandId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Hidden,
)
return false
}

// Show the menu item.
await shellFrame.Commands.SetCommandState(
assignCommandId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Active,
)

// Store the selected items.
currentlySelectedItems = selectedItems

// We succeeded; return true.
return true
},
)
}
}

async function retrieveRelationshipPropertyValues(shellFrame, selectedItems) {
/// <summary>Retrieves property values representing relationships to the selecteed items.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <param name="selectedItems" type="MFiles.IShellItems">The items that are selected.</param>
/// <param name="Promise">A promise to be resolved with the property values for the relationship.</param>

// Create an array to store the property values.
const relationshipPropertyValues = []

try {
// Get the vault reference.
const iVault = shellFrame.ShellUI.Vault

// Get all the object types.
const allObjectTypes = await iVault.ObjectTypesOperations.GetObjectTypes({
call_importance: 1, // CallImportance.CALL_IMPORTANCE_NORMAL
})

// Selected object types.
const selectedObjectTypes = []

// Iterate over the objects and populate the properties for the assignment.
for (let i = 0; i < selectedItems.ObjectVersions.length; i++) {
// Get the item.
const selectedItem = selectedItems.ObjectVersions[i]
const objectType = allObjectTypes.object_types.find(
(item) => item.id === selectedItem.object_info.obj_id.type,
)
selectedObjectTypes.push(objectType)
}

// Get the default property defs of the selected objects.
const defaultPropertyDefs = selectedObjectTypes.map(
(result) => result.default_property_def,
)

// Do we have a property value already?
// Will happen if they select two of the same object type.
for (let i = 0; i < defaultPropertyDefs.length; i++) {
const defaultPropertyDef = defaultPropertyDefs[i]
let propertyValue = relationshipPropertyValues.find(
(relationshipPropertyValue) =>
relationshipPropertyValue.property_def === defaultPropertyDef,
)

// If there isn't already a property value for this object type, we need to create it.
if (!propertyValue) {
propertyValue = {
property_def: defaultPropertyDef,
value: {
type: 10, // Datatype.DATATYPE_MULTI_SELECT_LOOKUP,
is_null_value: false,
data: {
multi_select_lookup: {
values: [],
},
},
},
}

// Push it to array.
relationshipPropertyValues.push(propertyValue)
}

// Add this item to the lookup.
const lookup = {
value_list_item_info: selectedItems.ObjectVersions[i].object_info,
version: selectedItems.ObjectVersions[i].version_info.version,
}
propertyValue.value.data.multi_select_lookup.values.push(lookup)
}

// Handle the error.
} catch (exception) {
console.error(exception)

// Return the prepared property values.
} finally {
return relationshipPropertyValues
}
}

async function preparePropertyValuesForNewAssignment(shellFrame) {
/// <summary>Prepares the property values with the hard coded values.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.PropertyValueArray">The property values array.</returns>

// Create the property values for the new object.
const propertyValues = []

// Get session info.
const sessionInfo = await MFiles.GetSessionInfo()

// Function to create the lookup value.
const lookupValue = (value) => {
return {
value_list_item_info: {
obj_id: {
type: -2,
item_id: {
internal_id: value,
external_repository_id: {
connection: '',
item: '',
},
},
},
name: null,
external_id_status: 0, // ExtIDStatus.EXT_IDSTATUS_UNKNOWN,
external_id: null,
guid: GUID_NULL,
options: {
// Note: Default value(true) enables is_deleted true and deleted flag added to prefilled value
// So to handle it false has been set.
all: true,
},
icon_id: null,
},
version: {
type: 1, // ObjVerVersionType.OBJ_VER_VERSION_TYPE_LATEST,
internal_version: -1,
external_repository_version: '',
external_repository_sort_key: 0,
},
}
}

// Class property value.
const classPropertyValue = {
property_def: BuiltInPropertyDefs.Class,
value: {
type: 9, // Datatype.DATATYPE_LOOKUP,
is_null_value: false,
data: {
lookup: lookupValue(-100),
},
},
}
propertyValues.push(classPropertyValue)

// Name or title property.
const nameOrTitlePropertyValue = {
property_def: BuiltInPropertyDefs.NameOrTitle,
value: {
type: 1, // Datatype.DATATYPE_TEXT,
is_null_value: false,
data: {
text: 'Assignment',
},
},
}
propertyValues.push(nameOrTitlePropertyValue)

// Single-file-document property.
const singleFileDocumentPropertyValue = {
property_def: BuiltInPropertyDefs.SingleFlie,
value: {
type: 8, // Datatype.DATATYPE_BOOLEAN,
is_null_value: false,
data: {
boolean: false,
},
},
}
propertyValues.push(singleFileDocumentPropertyValue)

// Assigned to property.
const assignedToPropertyValue = {
property_def: BuiltInPropertyDefs.AssignedTo,
value: {
type: 10, // Datatype.DATATYPE_MULTI_SELECT_LOOKUP,
is_null_value: false,
data: {
multi_select_lookup: {
values: [
lookupValue(sessionInfo.vault_data?.user_id), // Assigned to the current login user.
],
},
},
},
}
propertyValues.push(assignedToPropertyValue)

// Return the prepared property values.
return propertyValues
}

async function createAssignmentObject(shellFrame) {
/// <summary>Creates an assignment for the currently-selected items, assigning it to the current user.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.ObjectVersionAndProperties">The event handler.</returns>

try {
// Get the relationship property values array..
const relationshipPropertyValues = await retrieveRelationshipPropertyValues(
shellFrame,
currentlySelectedItems,
)

// Prepare the default property values for new assignment.
propertyValues = await preparePropertyValuesForNewAssignment(shellFrame)

// Add the relationship property values to the property values for the assignment.
propertyValues = propertyValues.concat(relationshipPropertyValues)

// Get the vault instance.
const iVault = shellFrame.ShellUI.Vault

// Create object request.
const createObjectRequest = {
object_type_id: BuiltInObjectType.Assignment,
properties: propertyValues,
acl: {},
object_flags: {
all: true,
},
check_in: true, // Checkin the object immediately.
}

// Create new object in the server.
await iVault.ObjectOperations.AddObjectWithFiles(createObjectRequest)
await shellFrame.ShowMessage('Assigned to you.')

// Handle the exception.
} catch (exception) {
console.error(exception)
}
}

Testing the application

The command/button appears in the menu area, and is shown/hidden as items are selected. Selecting items and clicking Assign to me shows a message that the operation was successful.

 alt text

Once the button has been clicked, an assignment is created for the current user and is related to the objects that were previously selected.

 alt text

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/BuiltInCommands/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/BuiltInCommands/index.html index 7cc22d0c8..2ff446058 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/BuiltInCommands/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/BuiltInCommands/index.html @@ -4,13 +4,13 @@ Built-in Command Demonstration | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Built-in Command Demonstration

Overview

This sample creates a basic User Interface Extensibility Framework application consisting of one ShellUI module which reacts when built-in commands are clicked. Also it shows how to execute a built in command.

This sample does not show how to create a local development folder or to deploy the code to the M-Files server. It is assumed that a local development folder already exists, and that is the location in which the development is occurring.

Creating the application structure

Creating the application definition file

Into this folder we will create an application definition file. This file must be named appdef.xml. The application will use version 5 of the client schema (as we are only targeting newer M-Files versions). The application will declare a single Shell UI module (with its code in main.js), and no dashboards.

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>D14E6DA7-E7A6-498E-B709-C682C75DC887</guid>
<name>Built-in Command Demonstration</name>
<version>0.1</version>
<description>Simple M-Files built-in command demonstration.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
</application>
Ensure that your application has a unique GUID by using a GUID generator.

Creating the module

Next we will create a module file to contain our actual application logic. At this point we will just register to be notified of main lifecycle events:

  • We will declare a default entry point for the ShellUI module.
  • We will react to the NewShellFrame event and obtain a reference to the shell frame.
  • We will react to the shell frame’s Started event (as using the shell frame before this point will result in an exception).
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {}
}

Reacting to built-in commands

Once the ShellFrame is available for use, our code can register to be notified when the BuiltinCommand event is raised. This event occurs whenever standard M-Files client functionality is used, such as clicking buttons to create new objects, or to log out.

To register, we provide a callback function which defines two parameters:

  • commandId (number) - one of the built-in commands from the BuiltinCommand enumeration.
  • param (number) - either:
    • If the commandId is MFiles.BuiltinCommand.NewObject then the ID of the object type being created (or -100 if not known), or
    • -2 otherwise.

In this sample we will simply show the values in a message box:

main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>The entry point of ShellUI module.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The new shell UI object.</param>

// Note: We want to hook into the built-in commands being executed in any shell frame,
// but we want our command to only be used in NORMAL shell frames (as the task pane etc. is not available in others).

// Register to be notified when a new shell frame is created.
// This will be used to hook into the built-in commands whereever they are executed.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewShellFrame event.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The new shell frame object.</param>

// Register to be notified of the started event.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Gets a function to handle the Started event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnStarted">The event handler.</returns>

// Return the handler function for Started event.
return async () => {
// Register to be notified when a built-in command is executed.
shellFrame.Commands.Events.Register(
MFiles.Event.BuiltinCommand,
async (commandId, param) => {
/// <summary>Executed whenever a built-in command is clicked.</summary>
/// <param name="commandId" type="BuiltinCommand">
/// One of the built-in commands from the BuiltinCommand enumeration.
/// </param>
/// <param name="param">
/// If the <paramref name="commandId"/> is MFiles.BuiltinCommand.NewObject then contains the object type id of the object to create (or -100 if not specified).
/// Otherwise, returns -2.
/// </param>

// Display every built-in command as message box.
await shellFrame.ShowMessage(
'Command ID: ' + commandId + ', param: ' + param,
)
},
)
}
}

Executing built-in command

Command can be executed using ExecuteCommand from ICommands interface. It has two parameters

  • commandId - The command id. It can be a built-in command enumerated value or custom command id.
  • args - Command argument or an arguments object, if the command requires arguments. Use null or empty value if the command does not require arguments.

In this example, it demonstrates how the builtin command Download File executed. It invovles four steps:

  • Creating a new ICommand using CreateCustomCommand.
  • Adding the command into the context menu using AddCustomCommandToMenu.
  • Handling NewShellListing event where enable the custom command state based on the current selected items.
  • Execute Download File command.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>The entry point of ShellUI module.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The new shell UI object.</param>

// Note: We want to hook into the built-in commands being executed in any shell frame,
// but we want our command to only be used in NORMAL shell frames (as the task pane etc. is not available in others).

// Register to be notified when a new shell frame is created.
// This will be used to hook into the built-in commands whereever they are executed.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewShellFrame event.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The new shell frame object.</param>

// Register to be notified of the started event.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Gets a function to handle the Started event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnStarted">The event handler.</returns>

// Return the handler function for Started event.
return async () => {
// Create a command (button). Note that it is not yet visible.
const commandDownloadId = await shellFrame.Commands.CreateCustomCommand(
'Download selected file(s)',
)

// Add the commands to the context menu.
await shellFrame.Commands.AddCustomCommandToMenu(
commandDownloadId,
MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom,
1,
)

// Hide the command. We will show it when the selected items change.
await shellFrame.Commands.SetCommandState(
commandDownloadId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Hidden,
)

// Register to listen when new shell listings are created.
shellFrame.Events.Register(
MFiles.Event.NewShellListing,
getNewShellListingHandler(shellFrame, commandDownloadId),
)

// Is there already a listing? If so then we need to hook into it as well.
if (shellFrame.Listing) {
getNewShellListingHandler(
shellFrame,
commandDownloadId,
)(shellFrame.Listing)
}

// Register to be notified when a built-in command is executed.
shellFrame.Commands.Events.Register(
MFiles.Event.BuiltinCommand,
async (commandId, param) => {
/// <summary>Executed whenever a built-in command is clicked.</summary>
/// <param name="commandId" type="BuiltinCommand">
/// One of the built-in commands from the BuiltinCommand enumeration.
/// </param>
/// <param name="param">
/// If the <paramref name="commandId"/> is MFiles.BuiltinCommand.NewObject then contains the object type id of the object to create (or -100 if not specified).
/// Otherwise, returns -2.
/// </param>
/// <returns>A boolean defining whether the action should continue (true) or be cancelled (false).</returns>

// Display every built-in command as message box.
await shellFrame.ShowMessage(
'Command ID: ' + commandId + ', param: ' + param,
)
},
)

// Register to be notified when a custom command is executed.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async (commandId) => {
/// <summary>Executed whenever a custom command is clicked.</summary>
/// <param name="commandId" type="CustomCommand">
/// One of the built-in commands from the CustomCommand enumeration.
/// </param>
if (commandId === commandDownloadId) {
await shellFrame.Commands.ExecuteCommand(
MFiles.BuiltinCommand.DownloadFile,
null,
)
}
},
)
}
}

function isObjectCanBeDownload(currentSelection) {
/// <summary>Gets the boolean flag whether the object can be download or not</summary>
/// <param name="currentSelection" type="MFiles.ShellItems">The current selection.</param>

let canDownload = true

// Nothing selected so nothing to download.
if (currentSelection.Count === 0) {
return false
}

// Skip the download option for folders/view.
if (currentSelection.Folders.length === 0) {
// Check all the objects in current selection in order to
// set the commands state properly.
if (currentSelection.ObjectVersions.length > 0) {
// Object version info.
const currentObjectVersions = currentSelection.ObjectVersions

for (const objIdx in currentObjectVersions) {
if (
Object.prototype.hasOwnProperty.call(currentObjectVersions, objIdx)
) {
// True, if the selected object has files.
canDownload =
currentSelection.ObjectVersions[objIdx].version_info.files?.length >
0

// No need to show 'Download this file' option for objects which doesnt have files (e.g., customer, projects).
if (!canDownload) {
break
}
}
}
}

// Single file.
if (currentSelection.ObjectFiles.length > 0) {
canDownload = true
}
} else {
canDownload = false
}

return canDownload
}

function getNewShellListingHandler(shellFrame, commandDownloadId) {
/// <summary>Gets a function to handle the NewShellListing event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnNewShellListing">The event handler.</returns>

// Return the handler function for NewShellListing event.
return async (shellListing) => {
// Listen for selection change events on the listing.
shellListing.Events.Register(
MFiles.Event.SelectionChanged,
async (selectedItems) => {
// Has the user got any object versions selected?
if (
shellListing.IsActive === false ||
!isObjectCanBeDownload(selectedItems)
) {
// Hide the menu item.
await shellFrame.Commands.SetCommandState(
commandDownloadId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Hidden,
)
return false
}

// Show the menu item.
await shellFrame.Commands.SetCommandState(
commandDownloadId,
MFiles.CommandLocation.All,
MFiles.CommandState.CommandState_Active,
)

// We succeeded; return true.
return true
},
)
}
}

Testing the application

On creating new assignment object, the following message should be shown on-screen:

 alt text

On context menu over the doument object, Download selected file(s) command can be seen. On clicking it, the selected file will be downloaded using the built-in command Download File.

 alt text

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/Commands/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/Commands/index.html index 862dccbcd..3195e31ce 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/Commands/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/Commands/index.html @@ -4,15 +4,15 @@ Commands | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Commands

Overview

This sample creates a basic User Interface Extensibility Framework application consisting of one ShellUI module which adds buttons to the main menu and context menu that are shown/hidden depending upon the user’s actions.

Creating the application structure

Creating the application definition file

Into this folder we will create an application definition file. This file must be named appdef.xml. The application will use version 4 of the client schema (as we are only targeting newer M-Files versions), and the supported platform will be set as newweb only. The application will declare a single Shell UI module (with its code in main.js), and no dashboards.

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>A50FF521-9167-4366-9CDE-6CB5C3BDDAFF</guid>
<name>Commands</name>
<version>0.1</version>
<description>A basic application showing how to work with commands.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
</application>
Ensure that your application has a unique GUID by using a GUID generator.

Creating the module

Next we will create a module file to contain our actual application logic. At this point we will just register to be notified of main lifecycle events:

  • We will declare a default entry point for the ShellUI module.
  • We will react to the NewShellFrame event and obtain a reference to the shell frame.
  • We will react to the shell frame’s Started event (as using the shell frame before this point will result in an exception).
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {};
}

Creating a button in the main menu

Adding a button into the main menu involves two steps:

  1. Creating a new ICommand using CreateCustomCommand.
  2. Adding the command into the menu using AddCustomCommandToMenu.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command (button). Note that it is not yet visible.
const commandOneId = await shellFrame.Commands.CreateCustomCommand( "My First Command" );

// Add the first command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
};
}

Logging into the M-Files vault should now show a button in the main menu (three dot menu near user icon) with the text My First Command:

 alt text

Reacting when the command is clicked

Reacting to a command being clicked involves three steps:

  • Register to be notified of the CustomCommand event.
  • Ensure that the command that was clicked was the one we want to handle.
  • Execute the required code.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command (button). Note that it is not yet visible.
const commandOneId = await shellFrame.Commands.CreateCustomCommand( "My First Command" );

// Add the first command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Branch depending on the Id of the command that was clicked.
switch (commandId) {
case commandOneId:

// Our first command was clicked.
await shellFrame.ShowMessage( "My first command clicked." );
break;
}
} );

};
}

 alt text

Adding a command to both the main menu and the context menu

To add a command created with CreateCustomCommand to the context menu, call AddCustomCommandToMenu. In the example below, it is the same command object added to both main menu and context menu, so our code to react when the button is clicked will be fired for the context menu item and the main menu item.

main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command (button). Note that it is not yet visible.
const commandOneId = await shellFrame.Commands.CreateCustomCommand( "My First Command" );

// Add the first command to the context menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );

// Add the first command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Branch depending on the Id of the command that was clicked.
switch (commandId) {
case commandOneId:

// Our first command was clicked.
await shellFrame.ShowMessage( "My first command clicked." );
break;
}
} );

};
}

 alt text

Adding child command to the main menu

Adding a child button into the main menu involves two steps:

  1. Creating a new ICommand using CreateCustomCommand.
  2. Adding the command into main menu using CreateSubMenuItem by giving the parent command id.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command (button). Note that it is not yet visible.
const commandOneId = await shellFrame.Commands.CreateCustomCommand( "My First Command" );

// Create a command (button). Note that it is not yet visible.
const commandTwoId = await shellFrame.Commands.CreateCustomCommand( "My Second Command" );

// Add the first command to the context menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );

// Add the first and second commands to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
const parentMenuItemId = await shellFrame.Commands.AddCustomCommandToMenu( commandTwoId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );

// Create child commands (buttons).
const commandChildOneId = await shellFrame.Commands.CreateCustomCommand( "My First Child Command" );
const commandChildTwoId = await shellFrame.Commands.CreateCustomCommand( "My Second Child Command" );

// Add created child comamnds to the parent.
await shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildOneId, 1 );
await shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildTwoId, 1 );

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Branch depending on the Id of the command that was clicked.
switch (commandId) {
case commandOneId:

// Our first command was clicked.
await shellFrame.ShowMessage( "My first command clicked." );
break;

case commandChildOneId:

// Our child command was clicked.
await shellFrame.ShowMessage( "My child command clicked." );
break;
}
} );
};
}

 alt text

Adding child command to the context menu

Adding child command to custom command

Adding a child button to custom command involves two steps:

  1. Creating a new ICommand using CreateCustomCommand.
  2. Adding the command into context menu using CreateSubMenuItem by giving the parent command id.

Adding child command to exist builtin submenu

Adding a child button to exist builtin submenu command involves three steps:

  1. Creating a new ICommand using CreateCustomCommand.
  2. Getting parent menu item id using GetMenuIdOfBuiltInCommand.
  3. Adding the command into context menu using CreateSubMenuItem by giving the parent menu item id.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command (button). Note that it is not yet visible.
const commandOneId = await shellFrame.Commands.CreateCustomCommand( "My First Command" );

// Create a command (button). Note that it is not yet visible.
const commandTwoId = await shellFrame.Commands.CreateCustomCommand( "My Second Command" );

// Add the first command to the context menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );

// Add the first and second commands to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
const parentMenuItemId = await shellFrame.Commands.AddCustomCommandToMenu( commandTwoId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );

// Create child commands (buttons).
const commandChildOneId = await shellFrame.Commands.CreateCustomCommand( "My First Child Command" );
const commandChildTwoId = await shellFrame.Commands.CreateCustomCommand( "My Second Child Command" );

// Add created child comamnds to the parent.
await shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildOneId, 1 );
await shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildTwoId, 1 );

// Create child command to add exist submenu in the listing context menu.
const commandChildThreeId = await shellFrame.Commands.CreateCustomCommand( "My Custom Convert Command" );

// Get built in parent command menu id. Ex. Convert.
const convertMenuId = await shellFrame.Commands.GetMenuIdOfBuiltInCommand( MFiles.BuiltinCommand.SubMenu_Convert, MFiles.CommandLocation.ContextMenu );

// Add child command to the exist convert menu.
await shellFrame.Commands.CreateSubMenuItem( convertMenuId, commandChildThreeId, 0 );

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Branch depending on the Id of the command that was clicked.
switch (commandId) {
case commandOneId:

// Our first command was clicked.
await shellFrame.ShowMessage( "My first command clicked." );
break;

case commandChildOneId:

// Our child command was clicked.
await shellFrame.ShowMessage( "My child command clicked." );
break;
}
} );
};
}

 alt text

Showing and hiding buttons

The visibility of commands can be controlled by calling SetCommandState. To show this, we will toggle the first command visibility on clicking the child command.

main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command (button). Note that it is not yet visible.
const commandOneId = await shellFrame.Commands.CreateCustomCommand( "My First Command" );

// Create a command (button). Note that it is not yet visible.
const commandTwoId = await shellFrame.Commands.CreateCustomCommand( "My Second Command" );

// Add the first command to the context menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );

// Add the first and second commands to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandOneId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
const parentMenuItemId = await shellFrame.Commands.AddCustomCommandToMenu( commandTwoId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );

// Create child commands (buttons).
const commandChildOneId = await shellFrame.Commands.CreateCustomCommand( "My First Child Command" );
const commandChildTwoId = await shellFrame.Commands.CreateCustomCommand( "My Second Child Command" );

// Add created child commands to the parent in the main menu.
await shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildOneId, 1 );
const childMenuItem = await shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildTwoId, 1 );

// Create nested child command and add to the parent in the main menu.
const toggleCommand = await shellFrame.Commands.CreateCustomCommand( "Toggle First Command Visibility" );
await shellFrame.Commands.CreateSubMenuItem( childMenuItem, toggleCommand, 1 );

// Create child command to add exist submenu in the listing context menu.
const commandChildThreeId = await shellFrame.Commands.CreateCustomCommand( "My Custom Convert Command" );

// Get built in parent command menu id. Ex. Convert.
const convertMenuId = await shellFrame.Commands.GetMenuIdOfBuiltInCommand( MFiles.BuiltinCommand.SubMenu_Convert, MFiles.CommandLocation.ContextMenu );

// Add child command to the exist convert menu.
await shellFrame.Commands.CreateSubMenuItem( convertMenuId, commandChildThreeId, 0 );

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Branch depending on the Id of the command that was clicked.
switch (commandId) {
case commandOneId:

// Our first command was clicked.
await shellFrame.ShowMessage( "My first command clicked." );
break;

case commandChildOneId:

// Our child command was clicked.
await shellFrame.ShowMessage( "My child command clicked." );
break;

case commandChildThreeId:

// Our child command was clicked.
await shellFrame.ShowMessage( "My convert child command clicked." );
break;

case toggleCommand:

// Get the first command state and toggle it.
let firstCommandState = await shellFrame.Commands.GetCommandState( commandOneId, MFiles.CommandLocation.MainMenu, false, false );
firstCommandState = firstCommandState === MFiles.CommandState.CommandState_Hidden
? MFiles.CommandState.CommandState_Active
: MFiles.CommandState.CommandState_Hidden;

// Toggle the command state and show message.
await shellFrame.Commands.SetCommandState( commandOneId, MFiles.CommandLocation.All, firstCommandState );

// Show the message.
const message = firstCommandState === MFiles.CommandState.CommandState_Active
? "First command visibility enabled"
: "First command visibility disabled"
await shellFrame.ShowMessage( message );
break;
}
} );
};
}

Testing the application

 alt text  alt text

Adding an icon

To set an command icon, call SetIcon(customCommand, iconInformation). The function validates the inputs, resolves the icon described by iconInformation, and — if resolution succeeds — updates the command's icon field. If the command id is not found, the function throws an invalid argument error; if icon resolution fails (network, parsing, etc.) the error is logged and the command is left unchanged.

Parameters

  • customCommand (number) – id of the custom command to update. Must be a command that exists in mFilesCommon.
  • iconInformation (IIconInformation) – description of the icon source and metadata (content type, content string or id, optional extension).

How it works

  1. Validates inputs. If customCommand or iconInformation is null/undefined, the call throws immediately.
  2. Looks up the command.
  3. Resolves the icon.
  4. If icon resolution returns a non-null value, assign it to command's icon.

Key notes

  • Signature: async SetIcon(customCommand: number, iconInformation: IIconInformation): Promise<void>
  • Stability: Experimental — API may change.
  • Inline SVG strings: if iconInformation contains raw SVG markup, the system treats it as SVG; the helper will default missing extension to svg and encode the content to a base64 data URI for reliable rendering.
  • PATH resources: the loader uses fetch then converts the response to a data URI. Same-origin/CORS restrictions apply.
  • Built-in icons: when using a built-in id, corresponding icon is being added to command and unknown built-in ids result in no icon being set.

Icon can be added to every menu location.

main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create custom commands.
const commandIconSVGPathId = await shellFrame.Commands.CreateCustomCommand( "Command icon SVG path" );
const commandIconSVGBase64Id = await shellFrame.Commands.CreateCustomCommand( "Command icon SVG base64" );
const commandIconSVGStringId = await shellFrame.Commands.CreateCustomCommand( "Command icon SVG string" );
const commandIconPNGPathId = await shellFrame.Commands.CreateCustomCommand( "Command icon PNG path" );
const commandIconICOId = await shellFrame.Commands.CreateCustomCommand( "Command icon (ICO)" );
const commandIconJPGPathId = await shellFrame.Commands.CreateCustomCommand( "Command icon JPG path" );
const commandIconJPEGPathId = await shellFrame.Commands.CreateCustomCommand( "Command icon JPEG path" );

// Create IIconInformation interface for each supported icon.
const SVGPathIdIconInformation = { content: "icons/analyze.svg", iconContentType: "PATH", alt: "SVG icon alt", extension: "svg" };
const SVGBase64IconInformation = { content: svgBase64, iconContentType: "BASE64", alt: "SVG base64 icon alt", extension: "svg" };
const SVGStringIconInformation = { content: svgString, iconContentType: "SVG", alt: "SVG string icon alt", extension: "svg" };
const PNGPathIdIconInformation = { content: "icons/vault.png", iconContentType: "PATH", alt: "PNG icon alt", extension: "png" };
const ICOPathIdIconInformation = { content: "icons/word.ico", iconContentType: "PATH", alt: "ICO icon alt", extension: "ico" };
const JPGPathIdIconInformation = { content: "icons/image_cropped.jpg", iconContentType: "PATH", alt: "JPG icon alt", extension: "jpg" };
const JPEGPathIdIconInformation = { content: "icons/image2_cropped.jpeg", iconContentType: "PATH", alt: "JPEG icon alt", extension: "jpeg" };

try {

// Set icons.
await shellFrame.Commands.SetIcon( commandIconSVGPathId, SVGPathIdIconInformation );
await shellFrame.Commands.SetIcon( commandIconSVGBase64Id, SVGBase64IconInformation );
await shellFrame.Commands.SetIcon( commandIconSVGStringId, SVGStringIconInformation );
await shellFrame.Commands.SetIcon( commandIconPNGPathId, PNGPathIdIconInformation );
await shellFrame.Commands.SetIcon( commandIconICOId, ICOPathIdIconInformation );
await shellFrame.Commands.SetIcon( commandIconJPGPathId, JPGPathIdIconInformation );
await shellFrame.Commands.SetIcon( commandIconJPEGPathId, JPEGPathIdIconInformation );
}
catch ( error ) {

// Log the error.
console.error( "Error setting icon:", error );
}

// Add commands to top pane menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGPathId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGBase64Id, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGStringId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconPNGPathId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconICOId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconJPGPathId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconJPEGPathId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1 );

// Add commands to context menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGPathId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGBase64Id, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGStringId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconPNGPathId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconICOId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconJPGPathId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconJPEGPathId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1 );

// Add commands to activity context menu.
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGPathId, MFiles.MenuLocation.MenuLocation_ActivityContextMenu_1, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGBase64Id, MFiles.MenuLocation.MenuLocation_ActivityContextMenu_1, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGStringId, MFiles.MenuLocation.MenuLocation_ActivityContextMenu_1, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconPNGPathId, MFiles.MenuLocation.MenuLocation_ActivityContextMenu_1, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconICOId, MFiles.MenuLocation.MenuLocation_ActivityContextMenu_1, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconJPGPathId, MFiles.MenuLocation.MenuLocation_ActivityContextMenu_1, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconJPEGPathId, MFiles.MenuLocation.MenuLocation_ActivityContextMenu_1, 1 );

// Add commands to taskbar.
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGPathId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGBase64Id, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconSVGStringId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconPNGPathId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconICOId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconJPGPathId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( commandIconJPEGPathId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1 );

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Handle command clicks.
} );
};
}

 alt text

Adding an builtin icon

An builtin icon for a command can be added similar way than normal icon by calling SetIcon with icon information interface. Builtin icon can be added to every menu location as well.

main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Some builtin icons and their values.
const builtInIcons = [
{ name: "CheckOut", value: 0 },
{ name: "CheckIn", value: 1 },
{ name: "Undo", value: 13 },
];

// Create commands and set built-in icons.
for (const bi of builtInIcons) {

// Create command for corresponding icon.
const cmdId = await shellFrame.Commands.CreateCustomCommand(`Built-in: ${bi.name}`);

// Construct icon information and set icon.
const iconInfo = { content: bi.value, iconContentType: "BUILT_IN", alt: `${bi.name} built-in icon`, extension: "" };
await shellFrame.Commands.SetIcon(cmdId, iconInfo);

// Add to a all menus so you can see it in different places.
await shellFrame.Commands.AddCustomCommandToMenu(cmdId, MFiles.MenuLocation.MenuLocation_TopPaneMenu, 1);
await shellFrame.Commands.AddCustomCommandToMenu(cmdId, MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, 1);
await shellFrame.Commands.AddCustomCommandToMenu(cmdId, MFiles.MenuLocation.MenuLocation_ActivityContextMenu_1, 1);
await shellFrame.Commands.AddCustomCommandToMenu(cmdId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1);
}

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Handle command clicks.
} );
};
}

 alt text

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/HelloWorld/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/HelloWorld/index.html index c1cb72085..e5fdd7ea8 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/HelloWorld/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/HelloWorld/index.html @@ -4,14 +4,14 @@ Hello, World | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Hello, World

Overview

This sample creates a basic User Interface Extensibility Framework application consisting of one ShellUI module which shows a dialog box to the user when the shell frame is available. The shell frame is a useful object as it allows us to interact with the shell listings and commands (such as buttons) within the user interface.

Creating a local development folder

Firstly, let’s create a local development folder for the application.

 alt text

Creating the application definition file

Into this folder we will create an application definition file. This file must be named appdef.xml. The application will use version 5 of the client schema (as we are only targeting newer M-Files versions). The application will declare a single Shell UI module (with its code in main.js), and no dashboards.

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>5EA29AF2-1EC9-4AB7-A0D1-FE1D586310D4</guid>
<name>Hello, World</name>
<version>0.1</version>
<description>A basic application showing how to react to the shell frame being available.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
</application>
Ensure that your application has a unique GUID by using a GUID generator.

Creating the module

Next we will create a module file to contain our actual application logic. The logic will be simple:

  • We will declare a default entry point for the ShellUI module.
  • We will react to the NewShellFrame event and obtain a reference to the shell frame.
  • We will react to the shell frame’s Started event (as using the shell frame before this point will result in an exception).
  • We will display a message to the user that the shell frame is ready for use.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new normal shell frame (MFiles.Event.NewShellFrame) is created.
// We use MFiles.Event.NewShellFrame rather than MFiles.Event.NewShellFrame as this won't fire for history (etc.) dialogs.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
// This time pass a reference to the function to call when the event is fired.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

return async () => {
// The shell frame is now started and can be used.
// Note: we need to use the global-scope variable.
await shellFrame.ShowMessage('A shell frame is available for use.')
}
}

Deploying the application

To deploy the application:

  1. Zip the contents of the local development folder (e.g. HelloWorld.zip).
  2. Open the M-Files Admin tool and connect to your M-Files server.
  3. Right-click on the vault to install the application to.
  4. Select Applications.
  5. Click Install... and select the zip file.
  6. Click Open and the application should be listed.

 alt text

The zipped file can be renamed to have a .mfappx extension if you wish to differentiate it from other zip files.

Testing the application

Open M-Files web and navigate to the vault. The following message should be shown on-screen:

 alt text

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/PopUpDashboardWithAccentColor/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/PopUpDashboardWithAccentColor/index.html index 1a5cb4c93..3652ef09b 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/PopUpDashboardWithAccentColor/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/PopUpDashboardWithAccentColor/index.html @@ -4,14 +4,14 @@ PopUp Dashboard | M-Files User Interface Extensibility Framework - - + +
Skip to main content

PopUp Dashboard

Overview

In this sample we use a Visual Studio 2022 template that is provided by M-Files to create a simple a basic User Interface Extensibility Framework application.

This sample consisting of one ShellUI module which adds one button to main menu and it will opens one dashboard to the popup. Also it shows how accent color option can be retrived and used in our UI extesion applicaton.

Downloading the Template

The UIX templates are part of the M-Files Online Visual Studio template package, which can be downloaded from the Visual Studio Marketplace.

The application structure

The application definition file

In the App folder there is a file named appdef.xml, the application manifest file, containing information such as the publisher details and the current version number. We modified existing manifest file according on our sample application. The application will use version 5 of the client schema (as we are only targeting newer M-Files versions). The application will declare a single Shell UI module (with its code in main.js).

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>83A5DD0A-E386-454E-B5AB-3D52AF13B7C3</guid>
<name>PopUp Dashboard</name>
<version>0.1</version>
<description>A basic application showing how to work with popup dashboards.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
<dashboards>
<dashboard id="MyPopUpDashboard">
<content>index.html</content>
</dashboard>
</dashboards>
</application>

Ensure that your application has a unique GUID by using a GUID generator.

Creating the module

Next we will create a module file to contain our actual application logic. At this point we will just register to be notified of main lifecycle events:

  • We will declare a default entry point for the ShellUI module.
  • We will react to the OnNewShellUI event and obtain a reference to the shell frame.
  • We will react to the shell frame’s onStarted event (as using the shell frame before this point will result in an exception).
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(MFiles.Event.NewShellFrame, onNewNormalShellFrame)
}

function onNewNormalShellFrame(shellFrame) {
// Add tab to right pane, when the shell frame is started.
shellFrame.Events.Register(MFiles.Event.Started, onStarted)

// NOTE: to be on the safe side, handle the callback in "async" function and await all the
// return values, because when the postMessage API is used, all return values will be async.
async function onStarted() {}
}

Creating a button in the main menu

Adding a button into the main menu involves two steps:

  1. Creating a new ICommand using CreateCustomCommand.
  2. Adding the command into the task area using AddCustomCommandToMenu.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(MFiles.Event.NewShellFrame, onNewNormalShellFrame)
}

function onNewNormalShellFrame(shellFrame) {
// Add tab to right pane, when the shell frame is started.
shellFrame.Events.Register(MFiles.Event.Started, onStarted)

// NOTE: to be on the safe side, handle the callback in "async" function and await all the
// return values, because when the postMessage API is used, all return values will be async.
async function onStarted() {
const myCommand = await shellFrame.Commands.CreateCustomCommand(
'Show my popup dashboard',
)
await shellFrame.Commands.AddCustomCommandToMenu(
myCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)
}
}

Logging into the M-Files vault should now show a button in the main menu (three dot menu near user icon) with the text Show my popup dashboard:

 alt text

Creating the dashboard

Next we will create a dashboard file that will be shown in the popup. It involves two steps:

  1. Modifying existing index.html file which will load styles and dashboard handler.
  2. Modifying existing dashboard.js file which will handle the dashboard.
index.html
<!doctype html>
<html lang="en">
<head>
<title>My Popup Dashboard</title>
<script src="mfiles.extensibility.protocol.js"></script>

<!-- Load styles and dashboard handler js file -->
<link href="style.css" rel="stylesheet" />
<script src="dashboard.js"></script>
</head>
<body>
<div id="content">
<h2>Welcome to M-Files!</h2>
</div>
</body>
</html>

Create dashboard handler using OnNewDashboard event.

dashboard.js
async function OnNewDashboard(dashboard) {}

Show the dashboard on clicking button

Showing dashboard while clicking a command clicked involves three steps:

  • Register to be notified of the CustomCommand event.
  • Ensure that the command that was clicked was the one we want to handle.
  • Call ShowPopupDashboard from shellframe instance. We will have three parameters for this ShowPopupDashboard
    1. Id of the dashboard which is mentioned in the appdef.xml. Ex. MyPopUpDashboard
    2. data - Custom data needs to be passed to dashboard.
    3. title - The title of the popup dashboard.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(MFiles.Event.NewShellFrame, onNewNormalShellFrame)
}

function onNewNormalShellFrame(shellFrame) {
// Add tab to right pane, when the shell frame is started.
shellFrame.Events.Register(MFiles.Event.Started, onStarted)

// NOTE: to be on the safe side, handle the callback in "async" function and await all the
// return values, because when the postMessage API is used, all return values will be async.
async function onStarted() {
const myCommand = await shellFrame.Commands.CreateCustomCommand(
'Show my popup dashboard',
)
await shellFrame.Commands.AddCustomCommandToMenu(
myCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)
await shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
(command) => {
// Execute only our custom command.
if (command === myCommand) {
shellFrame.ShowPopupDashboard(
'MyPopUpDashboard',
{},
'My popup dashboard',
)
}
},
)
}
}

 alt text

Using accent color

In the M-files Admin you can specify the accent color that you want to use in M-Files Web. The accent color has an effect, for example, on the header, the scrollbars, and some of the icons.

You can set the accent color value in Configurations -> Advanced Value Settings -> Configuration -> Client -> Web -> Appearance

 alt text

We can retrive the accent color value and use it in our custom extension application.

dashboard.js
async function OnNewDashboard(dashboard) {
const accentColor = await MFiles.GetAccentColor()
document
.querySelector(':root')
.style.setProperty('--scrollbar-thumb-color', accentColor)
document.getElementById('accentColorValue').innerHTML = accentColor
}
index.html
<!doctype html>
<html lang="en">
<head>
<title>My Popup Dashboard</title>
<script src="mfiles.extensibility.protocol.js"></script>

<!-- Load styles and dashboard handler js file -->
<link href="style.css" rel="stylesheet" />
<script src="dashboard.js"></script>
</head>
<body>
<div id="content">
<h2>A simple scrollable DIV</h2>
<div>Accent color: <span id="accentColorValue"></span></div>
<div id="scrollableDIV">
<h3>AI-Driven Automation</h3>
<p>
M-Files helps automate the entire knowledge work process from document
creation and management to workflow automation, external
collaboration, enterprise search, security, compliance, and audit
trail.
</p>
<p>
Powered by M-Files' generative AI technology, M-Files Aino, the
platform helps organize information, understand the context of
documents, and interact with their organization's knowledge using
natural language.
</p>

<h3>Organize your content</h3>
<p>
M-Files adapts to the document flow and content of any organization.
Classifying documents and extracting their meaning optimizes knowledge
worker productivity by automating routines and ensuring information
can be easily found and used in the proper business context.
</p>
</div>
</div>
</body>
</html>
style.css
html,
body {
font-family: Lato, 'Segoe UI', Sans-Serif;
margin: 0;
background: #fff;
height: 100%;
font-size: 14px;
padding: 0 10px;
}

:root {
--scrollbar-thumb-color: black;
}

div {
padding: 4px 0;
}

span {
font-weight: 500;
}

#scrollableDIV {
height: 200px;
overflow-y: scroll;
scrollbar-color: var(--scrollbar-thumb-color) lightgray;
}

Now we can see scrollbar has same color as the accent color that we have set on M-Files Admin.

 alt text

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/PopupDashboard/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/PopupDashboard/index.html index 3cb572de5..cfa6ed9fc 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/PopupDashboard/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/PopupDashboard/index.html @@ -4,14 +4,14 @@ PopUp Dashboard | M-Files User Interface Extensibility Framework - - + +
Skip to main content

PopUp Dashboard

Overview

This sample creates a basic User Interface Extensibility Framework application consisting of one ShellUI module which adds one button to main menu and it will opens one dashboard to the popup.

This sample does not show how to create a local development folder or to deploy the code to the M-Files server. It is assumed that a local development folder already exists, and that is the location in which the development is occurring.

Creating the application structure

Creating the application definition file

Into this folder we will create an application definition file. This file must be named appdef.xml. The application will use version 5 of the client schema (as we are only targeting newer M-Files versions). The application will declare a single Shell UI module (with its code in main.js), and no dashboards.

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>83A5DD0A-E386-454E-B5AB-3D52AF13B7C3</guid>
<name>PopUp Dashboard</name>
<version>0.1</version>
<description>A basic application showing how to work with dashboards.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
<dashboards>
<dashboard id="MySample">
<content>index.html</content>
</dashboard>
</dashboards>
</application>

Ensure that your application has a unique GUID by using a GUID generator.

Creating the module

Next we will create a module file to contain our actual application logic. At this point we will just register to be notified of main lifecycle events:

  • We will declare a default entry point for the ShellUI module.
  • We will react to the NewShellFrame event and obtain a reference to the shell frame.
  • We will react to the shell frame’s Started event (as using the shell frame before this point will result in an exception).
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {}
}

Creating a button in the main menu

Adding a button into the main menu involves two steps:

  1. Creating a new ICommand using CreateCustomCommand.
  2. Adding the command into the main menu using AddCustomCommandToMenu.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {
// Create a command (button). Note that it is not yet visible.
const showViewHistoryCmd =
await shellFrame.Commands.CreateCustomCommand('Show view history')

// Add the first command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
showViewHistoryCmd,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)

// Set command visility.
await shellFrame.Commands.SetCommandState(
showViewHistoryCmd,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active,
)
}
}

Logging into the M-Files vault should now show a button in the main menu (three dot menu near user icon) with the text Show view history:

 alt text

Creating the dashboard

Next we will create a dashboard file that will be shown in the popup. It involves two steps:

  1. Create a index.html file which will load styles and dashboard handler
  2. Create a dashboard.js file which will handle the dashboard.
index.html
<!doctype html>
<html lang="en">
<head>
<title>Sample</title>
<script src="mfiles.extensibility.protocol.js"></script>

<!-- Load styles and dashboard handler js file -->
<link href="style.css" rel="stylesheet" />
<script src="dashboard.js"></script>
</head>
<body>
<div id="content"></div>
</body>
</html>

Create dashboard handler file using OnNewDashboard event. Once the dashboard started, the html content will be loaded and the content will be updated.

dashboard.js
function OnNewDashboard(dashboard) {
/// <summary>Executed by the UIX when a dashboared is started.</summary>
/// <param name="dashboard" type="MFiles.Dashboard">The dashboard object which was created.</param>

// Register a handler to listen the started event.
dashboard.Events.Register(MFiles.Event.Started, () => {
// Get the element from the UI.
const contentElement = document.getElementById('content')

// Prepare the html content that to be updated.
const htmlContent = '<div> Hello world!</div>'

// Update the content.
contentElement.innerHTML = htmlContent
})
}

Show the dashboard on clicking button

Showing dashboard while clicking a command clicked involves three steps:

  • Register to be notified of the CustomCommand event.
  • Ensure that the command that was clicked was the one we want to handle.
  • Call ShowPopupDashboard from shellframe instance. We will have three parameters for this ShowPopupDashboard
    1. Id of the dashboard which is mentioned in the appdef.xml. Ex. MySample
    2. customData - Data needs to be passed to dashboard.
    3. title - The title for the dashboard.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {
// Create a command (button). Note that it is not yet visible.
const showViewHistoryCmd =
await shellFrame.Commands.CreateCustomCommand('Show view history')

// Add the first command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
showViewHistoryCmd,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)

// Set command visility.
await shellFrame.Commands.SetCommandState(
showViewHistoryCmd,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active,
)

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async (command) => {
// Execute only our custom command.
if (command === showViewHistoryCmd) {
// Show popup dashboard with custom data.
await shellFrame.ShowPopupDashboard('MySample', {}, 'Views Hisotry')
}
},
)
}
}

 alt text

Passing custom data to the dashboard

On each view location change, the current path is stored in an array which will be passed to the dashboard while clicking the button in the main menu. We must be able to react to view location change.

We will:

  • React to the ViewLocationChange event.
  • Store both view id and view path information to the array.
  • Store the history in the web storage
  • Pass the viewsHistory value to the dashboard as customData.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)

// Register to be notified when the view location changed.
shellFrame.Events.Register(
MFiles.Event.ViewLocationChanged,
getViewLocationChangedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {
// Create a command (button). Note that it is not yet visible.
const showViewHistoryCmd =
await shellFrame.Commands.CreateCustomCommand('Show view history')

// Add the first command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
showViewHistoryCmd,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)

// Set command visility.
await shellFrame.Commands.SetCommandState(
showViewHistoryCmd,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active,
)

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async (command) => {
// Execute only our custom command.
if (command === showViewHistoryCmd) {
// Get view history from the storage.
const viewHistoryString =
await MFiles.ReadFromWebStorage('viewsHistory')
let viewsHistory = []
if (viewHistoryString) {
viewsHistory = JSON.parse(viewHistoryString)
}

// Show popup dashboard with custom data.
await shellFrame.ShowPopupDashboard(
'MySample',
{
viewsHistory: viewsHistory,
},
'Views History',
)
}
},
)
}
}

function getViewLocationChangedHandler(shellFrame) {
/// <summary>Returns a function which handles the OnViewLocationChange event.</summary>

return async () => {
// Get the view history from storage.
const viewHistoryString = await MFiles.ReadFromWebStorage('viewsHistory')
let viewHistory = []

// Parse the view history from the string.
if (viewHistoryString) {
viewHistory = JSON.parse(viewHistoryString)
}

// Prepare the current view object.
viewHistory.push({
time: Date.now(),
viewUrl: shellFrame.CurrentUrl,
viewPath: shellFrame.CurrentPath || 'All',
})

// Write viewhistory to web storage.
await MFiles.WriteToWebStorage('viewsHistory', JSON.stringify(viewHistory))
}
}

Handling custom data in the dashboard handler

Custom data will be available in the dashboard instance.

dashboard.js
function OnNewDashboard(dashboard) {
/// <summary>Executed by the UIX when a dashboared is started.</summary>
/// <param name="dashboard" type="MFiles.Dashboard">The dashboard object which was created.</param>

// Get the viewshistory and sort items in descending order.
let viewsHistory = dashboard.CustomData.viewsHistory || []
viewsHistory = viewsHistory.sort((a, b) => b.time - a.time)

// Register a handler to listen the started event.
dashboard.Events.Register(MFiles.Event.Started, () => {
// Get the element from the UI.
const contentElement = document.getElementById('content')

// Prepare the html content that to be updated.
const htmlContent = `
<div class="label">Your view history</div>
${viewsHistory
.map((value) => {
return `<div class="history-item">
<div class="viewid">${value.viewUrl} </div>
<div class="viewpath">- ${value.viewPath} </div>
</div>`
})
.join('')}
`

// Update the content.
contentElement.innerHTML = htmlContent
})
}
style.css
html,
body {
font-family: Lato, 'Segoe UI', Sans-Serif;
margin: 0;
background: #fff;
height: 100%;
color: #363a40;
font-size: 14px;
padding: 0 10px;
}

div {
padding: 4px 0;
}

span {
font-size: 18px;
font-weight: 500;
}

.label {
font-size: 18px;
font-weight: 500;
color: #318ccc;
margin-top: 13px;
}

.history-item {
width: calc(100% - 30px);
height: 25px;
margin: 2px 0;
padding: 2px 15px;
background: #e7e6e6;
border-radius: 15px;
}

.viewid {
display: inline-block;
width: 30%;
}

.viewpath {
display: inline-block;
width: 69%;
}

Testing the application

Open M-Files web and navigate to the different views. Now click Show view history buttin from the main menu.

 alt text

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/SandboxAttributesSupport/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/SandboxAttributesSupport/index.html index 2433dff4a..2592e6050 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/SandboxAttributesSupport/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/SandboxAttributesSupport/index.html @@ -4,13 +4,13 @@ Creating Sanbox Attributes Support. | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Creating Sanbox Attributes Support.

Overview

This sample demonstrates how to support sandbox in your application.

Creating the application structure

Creating the application definition file

First we should create an application definition file. This file must be named appdef.xml. The application will use version 5 of the client schema (as we are only targeting newer M-Files versions). The application level sandbox attribute will declare in Shell UI module and dashboards.

Supported Attributes

  • "allow-downloads" // Allow downloading files
  • "allow-popups" // Allow the use of popups
  • "allow-modals" // Allow the use of modal dialogs
  • "allow-forms" // Allow the use of forms
  • "allow-popups-to-escape-sandbox" // Allow popups to escape the sandbox
appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>94A65B60-1BEC-4B85-A510-6C64A713A717</guid>
<name>Search Examples</name>
<version>0.1</version>
<description>A demonstration application for searches.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui" sandbox-attributes="allow-popups">
<file>main.js</file>
</module>
</modules>
<dashboards>
<dashboard id="TimeZone" sandbox-attributes="allow-popups">
<content>index.html</content>
</dashboard>
</dashboards>
</application>

Ensure that your application has a unique GUID by using a GUID generator.

Supporting for Dashboard.

"This example demonstrates how to open a new browser tab with JavaScript when a button is clicked."

index.html

<!DOCTYPE html>
<html>
<head>
<title>Window Open Example</title>
<script src="index.js" defer></script>
</head>
<body>
<h2>Open Documentation Example</h2>

<button id="openBtn">Open MDN Docs</button>
</body>
</html>


index.js

/**
* Opens a new tab with the given documentation URL.
*/
function openDoc() {
window.open(
"https://developer.mozilla.org/en-US/docs/Web/API/Window/open"
);
}

// Attach click event to the button
document.getElementById("openBtn").addEventListener("click", openDoc);

Supporting for Module.

"This example demonstrates how to open a new browser tab on New ShellUI"

main.js
function OnNewShellUI( shellUI ) {

// Custom command.
const customCommands = {};

/**
* Register event handler for the shellUI started event.
*
* @param Event_Started - Enum for the event.
* @param {Function} callback - Callback function.
*/
shellUI.Events.Register( MFiles.Event.Started,
() => {

/**
* Register event handler for the new normal shell frame created event.
*
* @param Event_NewNormalShellFrame - Enum for the event.
* @param {Function} callback - Callback function. Register the hanlder for shellFrame start event & New ShellListing.
*/
shellUI.Events.Register( MFiles.Event.NewNormalShellFrame,
( shellFrame ) => {

/**
* Register event handler for the shellFrame started event.
*
* @param Event_Started - Enum for the event.
* @param {Function} callback - Callback function.
*/
shellFrame.Events.Register( MFiles.Event.Started,
async() => {

// Create custom command.
customCommands.TestCommand1 = await shellFrame.Commands.CreateCustomCommand( "TestButton" );

// Add Commands to group.
shellFrame.Commands.AddCustomCommandToMenu( customCommands.TestCommand1,
26, // MenuLocation_ContextMenu_ObjectOperations
0 );

shellFrame.Commands.Events.Register( MFiles.Event.CustomCommand,
( commandID ) => {

// Test if the command id matches the TestCommand 1
if( commandID === customCommands.TestCommand1 ) {

// Construct alert message object.
const alertMessage = {
message: `TestButton is clicked! CommandID is: ${commandID} and customCommands.TestCommand1 is: ${customCommands.TestCommand1}`,
icon: "warning"
};
shellFrame.ShowMessage( alertMessage );

// Open New window to navigate with link.
window.open("https://developer.mozilla.org/en-US/docs/Web/API/Window/open");

} else {
const errorMessage = {
message: `TestButton error! CommandID does not match clicked message! ID: ${commandID} and customCommands.TestCommand1 is: ${customCommands.TestCommand1}`,
icon: "warning"
};
shellFrame.ShowMessage( errorMessage );

// Open New window to navigate with link.
window.open("https://developer.mozilla.org/en-US/docs/Web/API/Window/open");

}
} );
} );
} );
} );
}


- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/SearchFolderExamples/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/SearchFolderExamples/index.html index 3fc50abd5..84e40b3fe 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/SearchFolderExamples/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/SearchFolderExamples/index.html @@ -4,13 +4,13 @@ Creating search folders | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Creating search folders

Overview

This sample demonstrates how to perform searches using folders.

Creating the application structure

Creating the application definition file

First we should create an application definition file. This file must be named appdef.xml. The application will use version 5 of the client schema (as we are only targeting newer M-Files versions). The application will declare a single Shell UI module (with its code in main.js), and no dashboards.

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>94A65B60-1BEC-4B85-A510-6C64A713A717</guid>
<name>Search Examples</name>
<version>0.1</version>
<description>A demonstration application for searches.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
</application>

Ensure that your application has a unique GUID by using a GUID generator.

Creating the module

Next we will create a module file to contain our actual application logic. Initially:

  • We will declare a default entry point for the ShellUI module
  • We will react to the NewShellFrame event and obtain a reference to the shell frame
  • We will create 5 different command buttons and place them in a menu at the top area
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>The entry point of ShellUI module.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The new shell UI object.</param>

// Register to be notified when a new normal shell frame (Event_NewShellFrame) is created.
// We use Event_NewShellFrame rather than Event_NewShellFrame as this won't fire for history (etc.) dialogs.
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame)
}

function handleNewShellFrame(shellFrame) {
/// <summary>Handles the OnNewShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// Register to listen to the started event.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame),
)
}

function getShellFrameStartedHandler(shellFrame) {
/// <summary>Gets a function to handle the Started event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnStarted">The event handler.</returns>

// Return the handler function for ShellFrame's Started event.
return async () => {
// Create a command for Search: "estt".
const textSearchCommandId =
await shellFrame.Commands.CreateCustomCommand('Search: \"estt\"')

// Create a command for Search: 'Is template' = Yes.
const propertyTypeSearchCommandId =
await shellFrame.Commands.CreateCustomCommand('Search: \'Is template\' = Yes')

// Create a command for Search: Object type one of 'Document'.
const objectTypeSearchCommandId =
await shellFrame.Commands.CreateCustomCommand('Search: Object type one of \'Document\'')

// Create a command for Search: Object type one of 'Document; Document collection' with grouping levels.
const groupingLevelsSearchCommandId =
await shellFrame.Commands.CreateCustomCommand('Search: Object type one of \'Document; Document collection\' with grouping levels')

// Create a command for Latest Searches.
const latestSearchesCommandId =
await shellFrame.Commands.CreateCustomCommand('Latest Searches')

// Add the command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
textSearchCommandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)

// Add the command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
propertyTypeSearchCommandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
2,
)

// Add the command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
objectTypeSearchCommandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
3,
)

// Add the command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
groupingLevelsSearchCommandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
4,
)

// Add the command to the main menu.
await shellFrame.Commands.AddCustomCommandToMenu(
latestSearchesCommandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
5,
)

// Register to respond to commands being clicked.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async (commandId) => {

// Create an object ShellFrameFolders.
const shellFrameFolders = {
folders: []
};

// Check if the command is text search.
if (commandId === textSearchCommandId) {
// Add text search folder to ShellFrameFolders.
shellFrameFolders.folders.push(getTextSearchFolder());
}

// Check if the command is property type search.
if (commandId === propertyTypeSearchCommandId) {
// Add property type search folder to ShellFrameFolders.
shellFrameFolders.folders.push(getPropertyTypeSearchFolder());
}

// Check if the command is object type search.
if (commandId === objectTypeSearchCommandId) {
// Add object type search folder to ShellFrameFolders.
shellFrameFolders.folders.push(getObjectTypeSearchFolder());
}

// Check if the command is search with grouping levels.
if (commandId === groupingLevelsSearchCommandId) {
// Add search with grouping levels folder to ShellFrameFolders.
shellFrameFolders.folders.push(getGroupingLevelsSearchFolder());
}

// Check if the command is latest searches.
if (commandId === latestSearchesCommandId) {
// Add latest searches folder to ShellFrameFolders.
shellFrameFolders.folders.push(getLatestSearchesFolder());
}

// Check if some folder was added to the ShellFrameFolders.
if(shellFrameFolders.folders.length > 0) {
// Navigate to that folder.
await shellFrame.NavigateToFolder(shellFrameFolders);
}
},
)
}
}

Create a text search folder (Search: "estt")

We will create a function getTextSearchFolder to return a text search folder which will execute full text search with string estt.

Search folder data structure consists of:

  • Filter conditions array
  • Each condition has expression, condition type (operator) and value
  • Search options

This search folder will execute search with following filter:

  • Expression type is any field and in expression data we can set FTSFLAGS (full text search) options
  • As condition we use type contains
  • Value in this case is text type and data is "esst"
  • Search options includes unmanaged objects into search results
main.js
function getTextSearchFolder() {
/// <summary>Gets a function to return the search folder for text search.</summary>
/// <returns type="Folder">The search folder.</returns>

// Create a search folder for text "estt".
const folder = {
type: MFiles.VaultEnums.FolderType.FOLDER_TYPE_SEARCH_FOLDER,
data: {
search_folder: {
search_definition: {
filter_conditions: [
{
expression: {
data: {
any_field: {
options: {
all: false,
search_all_words: true,
search_filedata: true,
search_metadata: true,
use_stemming: true
}
}
},
type: MFiles.VaultEnums.ExpressionType.EXPRESSION_TYPE_ANY_FIELD
},
type: MFiles.VaultEnums.ConditionType.CONDITION_TYPE_CONTAINS,
value: {
data: {
text: "estt"
},
is_null_value: false,
type: MFiles.VaultEnums.Datatype.DATATYPE_TEXT
}
}
],
options: {
all: false,
include_unmanaged_objects: true,
separately_search_in_each_object_type: true
}
}
}
}
};

// Return the search folder object.
return folder;
};

Create a property type search folder (Search: 'Is template' = Yes)

We will create a function getPropertyTypeSearchFolder to return a property type search folder which will find all objects that have IsTemplate property set to Yes.

This search folder will execute search with following filter:

  • Expression type is property value and in expression data we can set property value to be 37 (Is template)
  • As condition we use type equals
  • Value in this case is boolean type and data is true
  • Search options is set to all
main.js
function getPropertyTypeSearchFolder() {
/// <summary>Gets a function to return the search folder for property type search.</summary>
/// <returns type="Folder">The search folder.</returns>

// Create a search folder for 'Is template' = true.
const folder = {
type: MFiles.VaultEnums.FolderType.FOLDER_TYPE_SEARCH_FOLDER,
data: {
search_folder: {
search_definition: {
filter_conditions: [
{
expression: {
data: {
property_value: {
data_function: {
data: {},
data_function: MFiles.VaultEnums.DataFunction.DATA_FUNCTION_NO_OP
},
parent_child_behavior: MFiles.VaultEnums.ParentChildBehavior.PARENT_CHILD_BEHAVIOR_NONE,
property_def: 37 // 'Is template'
}
},
type: MFiles.VaultEnums.ExpressionType.EXPRESSION_TYPE_PROPERTY_VALUE
},
type: MFiles.VaultEnums.ConditionType.CONDITION_TYPE_EQUAL,
value: {
data: {
boolean: true
},
is_null_value: false,
type: MFiles.VaultEnums.Datatype.DATATYPE_BOOLEAN
}
}
],
options: {
all: false
}
}
}
}
};

// Return the search folder object.
return folder;
};

Create a object type search folder (Search: Object type one of 'Document')

We will create a function getObjectTypeSearchFolder to return a object type search folder which will find all objects of type Document.

This search folder will execute search with following filter:

  • Expression type is status value and in expression data we can set object type as status query
  • As condition we use type equals
  • Value in this case is multi select lookup where different value list values can be added
    • Only one value list value with ID 0
  • Search options is set to all
main.js
function getObjectTypeSearchFolder() {
/// <summary>Gets a function to return the search folder for object type search.</summary>
/// <returns type="Folder">The search folder.</returns>

// Create a search folder for Object type one of 'Document'.
const folder = {
type: MFiles.VaultEnums.FolderType.FOLDER_TYPE_SEARCH_FOLDER,
data: {
search_folder: {
search_definition: {
filter_conditions: [
{
expression: {
data: {
status_value: {
data_function: {
data: {},
data_function: MFiles.VaultEnums.DataFunction.DATA_FUNCTION_NO_OP
},
type: MFiles.VaultEnums.StatusType.STATUS_TYPE_OBJECT_TYPE
}
},
type: MFiles.VaultEnums.ExpressionType.EXPRESSION_TYPE_STATUS_VALUE
},
type: MFiles.VaultEnums.ConditionType.CONDITION_TYPE_EQUAL,
value: {
data: {
multi_select_lookup: {
values: [
{
value_list_item_info: {
name: "Document",
obj_id: {
item_id: {
internal_id: 0 // Object type 'Document'.
},
type: -11
},
options: {
all: false
}
},
version: {
internal_version: -1,
type: MFiles.VaultEnums.ObjVerVersionType.OBJ_VER_VERSION_TYPE_LATEST
}
}
]
}
},
is_null_value: false,
type: MFiles.VaultEnums.Datatype.DATATYPE_MULTI_SELECT_LOOKUP
}
}
],
options: {
all: false
}
}
}
}
};

// Return the search folder object.
return folder;
};

Create a search folder with grouping levels (Search: Object type one of 'Document; Document collection' with grouping levels)

We will create a function getGroupingLevelsSearchFolder to return a object type search folder without deleted objects and there will be 2 grouping levels.

This search folder will execute search with following filter:

  • 1st expression type is status value and in expression data we can set type is deleted as status query
    • As condition we use type equals
    • Value is boolean false
  • 2nd expression type is status value and in expression data we can set object type as status query
    • As condition we use type equals
    • Value in this case is multi select lookup
      • 1st value ID is 0 (Document)
      • 2nd value ID is 9 (Document collection)
  • 2 grouping levels are defined
    • 1st level is group by object type ID 136 which is Customer in Sample Vault
    • 2nd level is group by object type ID 101 which is Project in Sample Vault
  • Search options is set to all
main.js
function getGroupingLevelsSearchFolder() {
/// <summary>Gets a function to return the search folder with grouping levels.</summary>
/// <returns type="Folder">The search folder.</returns>

// Create a search folder which has grouping levels.
const folder = {
type: MFiles.VaultEnums.FolderType.FOLDER_TYPE_SEARCH_FOLDER,
data: {
search_folder: {
search_definition: {
filter_conditions: [
{
expression: {
data: {
status_value: {
data_function: {
data: {},
data_function: MFiles.VaultEnums.DataFunction.DATA_FUNCTION_NO_OP
},
type: MFiles.VaultEnums.StatusType.STATUS_TYPE_IS_DELETED
}
},
type: MFiles.VaultEnums.ExpressionType.EXPRESSION_TYPE_STATUS_VALUE
},
type: MFiles.VaultEnums.ConditionType.CONDITION_TYPE_EQUAL,
value: {
data: {
boolean: false
},
is_null_value: false,
type: MFiles.VaultEnums.Datatype.DATATYPE_BOOLEAN
}
},
{
expression: {
data: {
status_value: {
data_function: {
data: {},
data_function: MFiles.VaultEnums.DataFunction.DATA_FUNCTION_NO_OP
},
type: MFiles.VaultEnums.StatusType.STATUS_TYPE_OBJECT_TYPE
}
},
type: MFiles.VaultEnums.ExpressionType.EXPRESSION_TYPE_STATUS_VALUE
},
type: MFiles.VaultEnums.ConditionType.CONDITION_TYPE_EQUAL,
value: {
data: {
multi_select_lookup: {
values: [
{
value_list_item_info: {
name: "Document",
obj_id: {
item_id: {
internal_id: 0 // Object type 'Document'.
},
type: -11
},
options: {
all: false
}
},
version: {
external_repository_sort_key: 0,
external_repository_version: "",
internal_version: -1,
type: MFiles.VaultEnums.ObjVerVersionType.OBJ_VER_VERSION_TYPE_LATEST
}
},
{
value_list_item_info: {
name: "Document collection",
obj_id: {
item_id: {
internal_id: 9 // Object type 'Document collection'.
},
type: -11
},
options: {
all: false
}
},
version: {
external_repository_sort_key: 0,
external_repository_version: "",
internal_version: -1,
type: MFiles.VaultEnums.ObjVerVersionType.OBJ_VER_VERSION_TYPE_LATEST
}
}
]
}
},
is_null_value: false,
type: MFiles.VaultEnums.Datatype.DATATYPE_MULTI_SELECT_LOOKUP
}
}
],
grouping_levels: [
{
empty_value_folder_name: "",
expression: {
data: {
typed_value: {
data_function: {
data: {},
data_function: MFiles.VaultEnums.DataFunction.DATA_FUNCTION_NO_OP
},
datatype: MFiles.VaultEnums.Datatype.DATATYPE_LOOKUP,
parent_child_behavior: MFiles.VaultEnums.ParentChildBehavior.PARENT_CHILD_BEHAVIOR_NONE,
value_list: 136 // Customer in Sample Vault.
}
},
type: MFiles.VaultEnums.ExpressionType.EXPRESSION_TYPE_TYPED_VALUE
},
expression_object_type: 136, // Customer in Sample Vault.
options: {
all: false,
allow_empty_folders_for_missing_object_permissions: true,
incompatible_with_full_text_search: false
},
options_obsolete: 1,
reference_direction: false,
show_empty_value_folder: false,
show_folders_without_objects: true,
show_matching_values_on_this_level: false,
show_objects_with_empty_value: false,
show_only_user_selected_folders: false,
subfolder_algorithm: MFiles.VaultEnums.FolderListingAlgorithm.FOLDER_LISTING_ALGORITHM_NONE
},
{
empty_value_folder_name: "",
expression: {
data: {
typed_value: {
data_function: {
data: {},
data_function: MFiles.VaultEnums.DataFunction.DATA_FUNCTION_NO_OP
},
datatype: MFiles.VaultEnums.Datatype.DATATYPE_LOOKUP,
parent_child_behavior: MFiles.VaultEnums.ParentChildBehavior.PARENT_CHILD_BEHAVIOR_NONE,
value_list: 101 // Project in Sample Vault.
}
},
type: MFiles.VaultEnums.ExpressionType.EXPRESSION_TYPE_TYPED_VALUE
},
expression_object_type: 101, // Project in Sample Vault.
options: {
all: false,
allow_empty_folders_for_missing_object_permissions: true,
incompatible_with_full_text_search: false
},
options_obsolete: 1,
reference_direction: false,
show_empty_value_folder: false,
show_folders_without_objects: false,
show_matching_values_on_this_level: false,
show_objects_with_empty_value: false,
show_only_user_selected_folders: false,
subfolder_algorithm: MFiles.VaultEnums.FolderListingAlgorithm.FOLDER_LISTING_ALGORITHM_NONE
}
],
options: {
all: false
}
}
}
}
};

// Return the search folder object.
return folder;
};

Create a view folder for latest searches Latest Searches

We will create a function getLatestSearchesFolder to return a latest searches view folder.

This view folder will return built-in view ID 11 (Latest Searches) content.

main.js
function getLatestSearchesFolder() {
/// <summary>Gets a function to return the latest searches folder.</summary>
/// <returns type="Folder">The latest searches folder.</returns>

// Create a view folder for latest searches.
const folder = {
type: MFiles.VaultEnums.FolderType.FOLDER_TYPE_VIEW_FOLDER,
data: {
view_folder: {
id: 11 // MFiles.MFBuiltInView.LatestSearches
}
}
};

// Return the search folder object.
return folder;
};

Testing the application

The command buttons appear in the menu area.

 alt text

Selecting a command will execute the selected search.

 alt text

Latest Searches view shows the executed searches.

 alt text

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/ShellFrameAndDashboard/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/ShellFrameAndDashboard/index.html index 0bb656030..a8ea3d9df 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/ShellFrameAndDashboard/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/ShellFrameAndDashboard/index.html @@ -4,13 +4,13 @@ ShellFrame & Dashboard | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShellFrame & Dashboard

Overview

This sample shows how we can create and show a simple dashboard. We display our own content in this dashboard and also allow users to restores the default content to the listing area. We will use React js framework for implementing the logic of the application.

Dashboard

Application Manifest file

First we should create Application Manifest file(appdef.xml) and specify our UI extension application data, such as the dashboard id which is required for creating it.

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>2c68aa24-4f5b-4d03-af09-0d1d8035746d</guid>
<name>Shellframe - dashboard</name>
<version>0.1</version>
<description>A basic application showing how to work with Shellframe.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>shellui.js</file>
</module>
</modules>
<dashboards>
<dashboard id="MyDashboard">
<content>index.html</content>
</dashboard>
</dashboards>
</application>

Ensure that your application has a unique GUID by using a GUID generator.

Creating main menu

Now we create a module file to contain our actual application logic(shellui.js). In this file we add our custom command which is used to open our dashboard. To open the dashboard we call ShowPopupDashboard from shellframe instance.

shellui.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {
/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(MFiles.Event.NewShellFrame, onNewNormalShellFrame)
}

function onNewNormalShellFrame(shellFrame) {
// Add tab to right pane, when the shell frame is started.
shellFrame.Events.Register(MFiles.Event.Started, onStarted)

// NOTE: to be on the safe side, handle the callback in "async" function and await all the
// return values, because when the postMessage API is used, all return values will be async.
async function onStarted() {
const dashboardCommand =
await shellFrame.Commands.CreateCustomCommand('Show my dashboard')
await shellFrame.Commands.AddCustomCommandToMenu(
dashboardCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1,
)
await shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
(command) => {
// Execute only our custom command.
if (command === dashboardCommand) {
shellFrame.ShowDashboard('MyDashboard')
}
},
)
}
}

Creating the dashboard file

Next we will create a dashboard file that will be shown in the listing view area. This is a simple html file that contains our own content.

index.html
<!doctype html>
<html lang="en">
<head>
<title>My Dashboard</title>
<meta charset="utf-8" />
<script src="mfiles.extensibility.protocol.js"></script>
</head>
<body>
<div id="root">
<h2>Welcome to M-Files!</h2>
</div>
</body>
</html>

After installing our application in M-Files via M-Files Admin and logging into the M-Files vault, we can see our custom command Show my dashboard. This custom command opens our dashbord in listing view area.

 alt text

Dashboard handler

Let's add some dynamic content to our dashboard. First we modifying index.html file to add styles file(style.css) and dashboard handler(index.js).

index.html
<!doctype html>
<html lang="en">
<head>
<title>Dashboard</title>
<script src="mfiles.extensibility.protocol.js"></script>
<link href="style.css" rel="stylesheet" />
</head>
<body>
<div id="root"></div>
<script src="bundle.js"></script>
</body>
</html>

In this simple example, we retrive the current path from CurrentPath of shellFrame object and display on our dashboard. Whenever our application is loaded, OnNewDashboard is called and the content of the dashboard is updated.

We use React JS framework to implement the dashboard handler in index.js file, then bundle it in bundle.js file. You can use your favorite tool for bundling.

index.js
import React from 'react'
import ReactDOM from 'react-dom'

function App(dashboard) {
const shellFrame = dashboard.ShellFrame

return (
<div>
<h1>My dashboard</h1>
<div>
Current path: <span class="label">{shellFrame.CurrentPath}</span>
</div>
</div>
)
}

window.OnNewDashboard = (newDashboard) => {
ReactDOM.createRoot(document.getElementById('root')).render(App(newDashboard))
}

Also we need to add our style file.

style.css
html,
body {
font-family: Lato, 'Segoe UI', Sans-Serif;
margin: 0;
background: #fff;
height: 100%;
font-size: 14px;
padding: 0 10px;
}

div {
padding: 2px 0;
}

button {
width: 150px;
height: 20px;
}

.label {
font-weight: 500;
color: mediumblue;
}

Now if you install the application you can see the result:

 alt text

As our last path, before opening our applicatin was Pinned, you can see that Current path value is Pinned.

Restoring default content

In some point maybe we want to restore the dashboard to the default content. In this we can call ShowDefaultContent of shellFrame object.

index.js
import React from 'react'
import ReactDOM from 'react-dom'

function App(dashboard) {
const shellFrame = dashboard.ShellFrame

const showDefaultContent = () => {
shellFrame.ShowDefaultContent()
}

return (
<div>
<h1>My dashboard</h1>
<div>
Current path: <span class="label">{shellFrame.CurrentPath}</span>
</div>
<button type="button" onClick={showDefaultContent}>
Show default Content
</button>
</div>
)
}

window.OnNewDashboard = (newDashboard) => {
ReactDOM.createRoot(document.getElementById('root')).render(App(newDashboard))
}

 alt text

If the button is cliked the default content is shown again.

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/ShowNewObjectWindow With Blank and UserDefined Template/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/ShowNewObjectWindow With Blank and UserDefined Template/index.html index 204696fd9..e1e533669 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/ShowNewObjectWindow With Blank and UserDefined Template/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/ShowNewObjectWindow With Blank and UserDefined Template/index.html @@ -4,13 +4,13 @@ ShowNewObjectWindow (Blank and UserDefined Template) | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowNewObjectWindow (Blank and UserDefined Template)

Overview

This sample creates a basic User Interface Extensibility Framework application consisting of one ShellUI module and dashboard which allow to create a new object with blank and user defined template.

This sample does not show how to create a local development folder or to deploy the code to the M-Files server. It is assumed that a local development folder already exists, and that is the location in which the development is occurring.

Creating the application structure

Creating the application definition file

Into this folder we will create an application definition file. This file must be named appdef.xml. The application will use version 5 of the client schema (as we are only targeting newer M-Files versions). The application will declare a single Shell UI module (with its code in main.js), and no dashboards.

appdef.xml

<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>4753229E-9382-4BCC-AEA9-9997E73D2370</guid>
<name>ShowNewObjectWindow</name>
<version>1.0</version>
<description>A demonstration application for the support of ShowNewObjectWindow. Covered Blank template and user defined template object creations.</description>
<publisher>M-Files Corporation</publisher>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
<dashboards>
<dashboard id="MyDashboard">
<content>index.html</content>
</dashboard>
</dashboards>
</application>

Ensure that your application has a unique GUID by using a GUID generator.

Creating the module

Next we will create a module file to contain our actual application logic. At this point we will just register to be notified of main lifecycle events:

  • We will declare a default entry point for the ShellUI module.
  • We will react to the NewShellFrame event and obtain a reference to the shell frame.
  • We will react to the shell frame’s Started event (as using the shell frame before this point will result in an exception).

main.js

// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {};
}

Adding a new right pane tab

Adding a right pane tab involves two steps:

  1. Creating a new tab using shellFrame.RightPane.AddTab.
  2. Set the dashboard and make the seletion.

main.js

// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// Register to listen to the started event.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Gets a function to handle the Started event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnStarted">The event handler.</returns>

// Return the handler function for ShellFrame's Started event.
return async () => {

// Show the tab for new object creation.
const newObjectTab = await shellFrame.RightPane.AddTab( "newObject", "New Object", "_last");
newObjectTab.ShowDashboard( "MyDashboard", {} );
newObjectTab.Select();
newObjectTab.SetVisible( true );
};
}

Creating the dashboard

Next we will create a dashboard file that will be shown in the popup. It involves two steps:

  1. Create a index.html file which will load styles and dashboard handler
  2. Create a dashboard.js file which will handle the dashboard.

index.html

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sample</title>
<script src="mfiles.extensibility.protocol.js"></script>
<!-- Load styles and dashboard handler js file -->
<link href="style.css" rel="stylesheet" />
<script src="dashboard.js"></script>
</head>
<body>
<div id="Main">
<div id="basicInfo"></div>
</div>
<button id="btnOpenNewObjectWindow">Open</button>
<span id="error_message" class="error-message"></span>
</body>
</html>

Create dashboard handler file using OnNewDashboard event. Once the dashboard started, the html content will be loaded and the content will be updated.

dashboard.js

function OnNewDashboard( dashboard ) {

/// <summary>Executed by the UIX when a dashboared is started.</summary>
/// <param name="dashboard" type="MFiles.Dashboard">The dashboard object which was created.</param>

// Register a handler to listen the started event.
dashboard.Events.Register(
MFiles.Event.Started,
() => {

// Prepare the html content that to be updated.
const htmlContent = getDashBoardContent();

// Show and Update the dashboard content.
mainContent = document.getElementById( "Main" );
mainContent.innerHTML = htmlContent;
mainContent.style.display = "block";

// Bind the events.
bindEvents();
}
);
}

function getDashBoardContent() {
return `
<div>
<div class="method-container">
<div class="method-title">Show New Object Window (Blank template and User defined template)</div>
<div><div class="label">Object Type Id</div>: <input id="objectType" /></div>
<div><div class="label">Extension (Blank Template)</div>: <input id="extension" type="text" /></div>
<div><div class="label">Metadata card title</div>: <input id="mdCardTitle" type="text" /></div>
<div><div class="label">Object Title </div>: <input id="objectTitle" type="text" /></div>
<div><div class="label">Check in immediately</div>: <input id="checkin" class="checkbox" type="checkbox" /></div>
<div id="Sourcefile"><div><div>Source file (User defined template info) </div><textarea id="srcfile" spellcheck="false">{}</textarea><div></div></div></div>
<div>Currently we are supporting only default blank template formats such as .bmp, .accdb, .xlsx, .pptx, .pub, .vsdx, .docx, .txt. For other formats, MFD will be created by default.</div>
</div>
</div>
`;
}

Show the Create object window on clicking button

  • First bind the click event in dashboard to call the ShowNewObjectWindow from right pane content.

    • We will have 4 parameters for this ShowPopupDashboard

      1. objectType - Target Object type
      2. objectCreationInfo - Holds creation information, e.g., MD card button visibility, file source information, etc.,.
      3. prefillPropertyValues - List of properties which can be prefilled.
      4. accessControlList - ACL

Creating Blank template

For document type we need to pass the extension or else it will create multifile document by default. Other then document type, no need to pass the extension information.

Currently we are supporting only default blank template formats such as .bmp, .accdb, .xlsx, .pptx, .pub, .vsdx, .docx, .txt. For other formats, MFD will be created by default.

 alt text

Creating User defined template

For User defined template we need to pass the template object information.

 alt text

main.js

// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>The entry point of ShellUI module.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The new shell UI object.</param>

// Register to be notified when a new normal shell frame (Event_NewShellFrame) is created.
// We use Event_NewShellFrame rather than Event_NewShellFrame as this won't fire for history (etc.) dialogs.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// Register to listen to the started event.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Gets a function to handle the Started event for shell frame.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The current shell frame object.</param>
/// <returns type="MFiles.Events.OnStarted">The event handler.</returns>

// Return the handler function for ShellFrame's Started event.
return async () => {

// Show the tab for new object creation.
const newObjectTab = await shellFrame.RightPane.AddTab( "newObject", "New Object", "_last");
newObjectTab.ShowDashboard( "MyDashboard", {} );
newObjectTab.Select();
newObjectTab.SetVisible( true );
};
}

dashboard.js

function getDashBoardContent() {
return `
<div>
<div class="method-container">
<div class="method-title">Show New Object Window (Blank template and User defined template)</div>
<div><div class="label">Object Type Id</div>: <input id="objectType" /></div>
<div><div class="label">Extension (Blank Template)</div>: <input id="extension" type="text" /></div>
<div><div class="label">Metadata card title</div>: <input id="mdCardTitle" type="text" /></div>
<div><div class="label">Object Title </div>: <input id="objectTitle" type="text" /></div>
<div><div class="label">Check in immediately</div>: <input id="checkin" class="checkbox" type="checkbox" /></div>
<div id="Sourcefile"><div><div>Source file (User defined template info) </div><textarea id="srcfile" spellcheck="false">{}</textarea><div></div></div></div>
<div>Currently we are supporting only default blank template formats such as .bmp, .accdb, .xlsx, .pptx, .pub, .vsdx, .docx, .txt. For other formats, MFD will be created by default.</div>
</div>
</div>
`;
}

// Show new object window.
async function showNewObjectWindow() {

// Read object type id value.
const objectTypeID = document.getElementById( "objectType" );
const objectType = Number( objectTypeID?.value );

// Read extension value.
const extensionType = document.getElementById( "extension" );
const extension = extensionType.value;

// Read metadata card title value.
const mdCardTitle = document.getElementById( "mdCardTitle" );
const mdTitle = mdCardTitle.value || "Untitled";

// Read object title value.
const objectTitleInfo = document.getElementById( "objectTitle" );
let objectTitle = objectTitleInfo.value;

// Read Check in immediately.
const checkin = document.getElementById( "checkin" );
const isCheckin = Boolean( checkin.checked );

// Read source files info.
const srcFile = document.getElementById( "srcfile" );
let srcfile = srcFile.value;

// Validate source file.
try {
srcfile = typeof srcfile === 'object' ? srcfile : JSON.parse( srcfile );
} catch( exception ) {
console.error( exception );
return;
}

// Clear all the error messages.
showErrorMessage( "" );
let objFileSourceType = -1;

// Validate source file.
if( srcfile && Object.keys( srcfile ).length > 0 ) {
objFileSourceType = srcfile.type;
}

// Show error message for invalid object type.
if( isNaN( objectType ) || objectTypeID?.value === "" ) {
showErrorMessage( "Invalid object type id" );
return;
}

// In this example, we allowed only BLANK_TEMPLATE and USER_DEFINED_TEMPLATE.
if( objFileSourceType != 2 && objFileSourceType >=0 ) {
showErrorMessage( "Invalid ObjFileSource type. Use Type '2' for user defined template." );
return;
}

// Create object creation info.
let objectCreationInfo = null;
objectCreationInfo = {
title: objectTitle || "",
metadata_card_title: mdTitle || "",
extension: extension,
object_type: objectType,
source_files: srcfile,
check_in_immediately_enabled: isCheckin,
disallow_template_selection: true,
single_file_document: extension ? true : null
};

// Show new object window.
const resultFromCreationWindow = await MFiles.ShowNewObjectWindow(
objectType, // ObjectType
objectCreationInfo, // ObjectCreationInfo
[], // PrefilledPropertyValues
[] // AccessControlList
);

// Log the results from new object creation window.
console.log( resultFromCreationWindow );
}

// Show error message for given method.
function showErrorMessage( errorMessage ) {
const errorMessageElement = document.getElementById( "error_message" );
errorMessageElement.innerHTML = errorMessage;
}

function OnNewDashboard( dashboard ) {

/// <summary>Executed by the UIX when a dashboared is started.</summary>
/// <param name="dashboard" type="MFiles.Dashboard">The dashboard object which was created.</param>

// Register a handler to listen the started event.
dashboard.Events.Register(
MFiles.Event.Started,
() => {

// Prepare the html content that to be updated.
const htmlContent = getDashBoardContent();

// Show and Update the dashboard content.
mainContent = document.getElementById( "Main" );
mainContent.innerHTML = htmlContent;
mainContent.style.display = "block";

// Bind the events.
// For opening a prefilled object creation window.
const btnOpenNewObjectWindow = document.getElementById( "btnOpenNewObjectWindow" );
btnOpenNewObjectWindow.addEventListener( "click", showNewObjectWindow );
}
);
}

style.css

html, body {
font-family: Lato, "Segoe UI", Sans-Serif;
margin: 0;
background: #FFF;
height: 100%;
color: #0a1541;
font-size: 14px;
padding: 0 10px;
}

div {
padding: 4px 0;
}

.method-title {
font-size: 16px;
font-weight: 500;
color: #0a1541;
}

.method-container {
background: #F2F4F9;
border-radius: 14px;
padding: 10px 20px;
margin-bottom: 15px;
}

button {
width: 70px;
box-sizing: border-box;
border-width: 1px;
border-radius: 16px;
height: 26px;
cursor: pointer;
font-size: 14px;
border-color: #006eef;
background-color: #006eef;
color: #fff;
}

input {
height: 22px;
padding: 2px 10px;
font-size: 14px;
line-height: 1.428571429;
color: #0a1541;
background-color: #fff;
background-image: none;
border: 1px solid #9da1b3;
border-radius: 8px;
}

input:focus {
border-color: #006eef;
outline: 0;
}

.error-message {
color: red;
}

.label {
width: 200px;
display: inline-block;
}

textarea {
height: 250px;
padding: 2px 5px;
font-size: 14px;
color: rgb(10, 21, 65);
border: 1px solid rgb(157, 161, 179);
border-radius: 8px;
width: calc(100% - 20px);
}

.checkbox {
height: 13px;
padding: 0;
margin: 0;
}

Testing the application

Pass different object type, extensions and user defined template object info to test object creation with blank template and user defined templates.

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/TaskbarCommands/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/TaskbarCommands/index.html index b22bff467..5b3290c57 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/TaskbarCommands/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/TaskbarCommands/index.html @@ -4,14 +4,14 @@ Taskbar Commands | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Taskbar Commands

Overview

This sample creates a basic User Interface Extensibility Framework application consisting of one module which adds a new command group to the taskbar and commands to it. It also adds commands to pre-defined command groups in taskbar.

Creating the application structure

Creating the application definition file

Into this folder we will create an application definition file. This file must be named appdef.xml. The application will use version 5 of the client schema (as we are only targeting newer M-Files versions). The application will declare a single Shell UI module (with its code in main.js), and no dashboards.

appdef.xml
<?xml version="1.0"?>
<application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.m-files.com/schemas/appdef-client-v5.xsd">
<guid>99EEA8CD-B990-4379-AFF9-D9DF2E2147E4</guid>
<name>TaskBar Commands</name>
<version>0.1</version>
<description>A basic application showing how to work with commands in taskbar.</description>
<publisher>M-Files Corporation</publisher>
<enabled-by-default>true</enabled-by-default>
<modules>
<module environment="shellui">
<file>main.js</file>
</module>
</modules>
</application>
Ensure that your application has a unique GUID by using a GUID generator.

Creating the module

Next we will create a module file to contain our actual application logic. At this point we will just register to be notified of main lifecycle events:

  • We will declare a default entry point for the ShellUI module.
  • We will react to the NewShellFrame event and obtain a reference to the shell frame.
  • We will react to the shell frame’s Started event (as using the shell frame before this point will result in an exception).
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {};
}

Adding button to a taskbar group

Command buttons are divided into groups on the taskbar.

Adding a button into existing taskbar group involves two steps:

  1. Creating a new ICommand using CreateCustomCommand.
  2. Adding the command into the taskbar group using AddCustomCommandToMenu.

Note: The AddCustomCommandToMenu function takes three parameters: the command ID, the MenuLocation, and the order priority.

MenuLocation specifies where the button will be added. If the button is added to a menu location associated with a built-in taskbar group, such as MenuLocation_TaskBar_MainActions, it will appear in the corresponding group on the taskbar (for example, the 'Main actions' group).

Order priority determines the button's position within the group; buttons with lower priority values are shown first.

main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command (button). Note that it is not yet visible.
const helloCommandId = await shellFrame.Commands.CreateCustomCommand( "Hello World" );

// Add the command to the 'Main actions' command group in taskbar.
await shellFrame.Commands.AddCustomCommandToMenu( helloCommandId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 99 );
};
}

Logging into the M-Files vault should now show a button in the taskbar 'Main actions' group with the text Hello World:

 alt text

Note that the 'Main actions' group also includes other built-in commands, which may vary depending on the current selection.

Reacting when the command is clicked

Reacting to a command being clicked involves three steps:

  • Register to be notified of the CustomCommand event.
  • Ensure that the command that was clicked was the one we want to handle.
  • Execute the required code.
main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command (button). Note that it is not yet visible.
const helloCommandId = await shellFrame.Commands.CreateCustomCommand( "Hello World" );

// Add the command to the 'Main actions' command group in taskbar.
await shellFrame.Commands.AddCustomCommandToMenu( helloCommandId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 99 );

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Branch depending on the Id of the command that was clicked.
switch (commandId) {
case helloCommandId:

// Hello command was clicked.
await shellFrame.ShowMessage( "Hello, World!" );
break;
}
} );

};
}

Creating a custom taskbar command group and adding commands to it

To create a new taskbar command group, call the CreateTaskbarGroup function. It returns a new MenuLocation that can be used in the AddCustomCommandToMenu call. In the example below, a new command group is created in the taskbar, and three commands ("Open", "Apply", and "Print") are added to it.

The CreateTaskbarGroup function takes three parameters: the group name, the group’s location within the taskbar, and the ordering priority.

The group location defines where in the taskbar the new group will appear. For example, it can be the leftmost group (MenuLocation_TaskBar_First), after the 'Main actions' built-in group (MenuLocation_TaskBar_MainActions), or the rightmost group (MenuLocation_TaskBar_Last).

The ordering priority determines the order of groups within the same taskbar menu location; groups with the smallest priority values appear on the left.

Note that empty command groups are not displayed. You must add commands to the group for it to become visible.

main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI( shellUI ) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame );
}

function handleNewShellFrame( shellFrame ) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler( shellFrame ) );
}

function getShellFrameStartedHandler( shellFrame ) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command group in taskbar. Note that it is not yet visible.
const myGroupId = await shellFrame.Commands.CreateTaskbarGroup( "My App", MFiles.MenuLocation.MenuLocation_TaskBar_Last, 1 );

// Create commands to be added to the taskbar command group.
const openCmdId = await shellFrame.Commands.CreateCustomCommand( "Open" );
const applyCmdId = await shellFrame.Commands.CreateCustomCommand( "Apply" );
const printCmdId = await shellFrame.Commands.CreateCustomCommand( "Print" );

// Add the commands to the custom command group. Commands are displayed in priority order.
await shellFrame.Commands.AddCustomCommandToMenu( openCmdId, myGroupId, 1 );
await shellFrame.Commands.AddCustomCommandToMenu( applyCmdId, myGroupId, 2 );
await shellFrame.Commands.AddCustomCommandToMenu( printCmdId, myGroupId, 3 );

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async ( commandId ) => {

// Branch depending on the Id of the command that was clicked.
switch (commandId) {
case openCmdId:

// Open command was clicked.
await shellFrame.ShowMessage( "Open command" );
break;

case applyCmdId:

// Apply command was clicked.
await shellFrame.ShowMessage( "Apply command" );
break;

case printCmdId:

// Print command was clicked.
await shellFrame.ShowMessage( "Print command" );
break;
}
} );

};
}

Logging into the M-Files vault should now show a My App command group in taskbar and the three commands in it:

 alt text

Creating a submenu in the taskbar and adding commands to it

Taskbar commands can be organized into submenus. A submenu can contain menu items (i.e. commands) as well as other, more deeply nested submenus.

Creating a menu item that opens a submenu involves several steps:

  1. Create a new ICommand using CreateCustomCommand.
  2. Add the command to the taskbar group using AddCustomCommandToMenu.
  3. For each submenu command:

Example code below creates a taskbar group called "My App", and adds a menu item "Menu" to it. This menu item opens a submenu containing one command "Greet" and a nested submenu "SubMenu". The nested submenu includes two commands: "Hello" and "World".

main.js
// NOTE! This code is for demonstration purposes only and does not contain any kind of
// error handling. MUST be revised before using in production.

function OnNewShellUI(shellUI) {

/// <summary>Executed by the UIX when a ShellUI module is started.</summary>
/// <param name="shellUI" type="MFiles.ShellUI">The shell UI object which was created.</param>

// This is the start point of a ShellUI module.

// Register to be notified when a new shell frame (MFiles.Event.NewShellFrame) is created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
handleNewShellFrame);
}

function handleNewShellFrame(shellFrame) {

/// <summary>Handles the OnNewNormalShellFrame event for an IShellUI.</summary>
/// <param name="shellFrame" type="MFiles.ShellFrame">The shell frame object which was created.</param>

// The shell frame was created but it cannot be used yet.
// The following line would throw an exception ("The object cannot be accessed, because it is not ready."):
// shellFrame.ShowMessage("A shell frame was created");

// Register to be notified when the shell frame is started.
shellFrame.Events.Register(
MFiles.Event.Started,
getShellFrameStartedHandler(shellFrame));
}

function getShellFrameStartedHandler(shellFrame) {

/// <summary>Returns a function which handles the OnStarted event for an IShellFrame.</summary>

// The shell frame is now started and can be used.

return async () => {

// Create a command group in taskbar. Note that it is not yet visible.
const myGroupId = await shellFrame.Commands.CreateTaskbarGroup("My App", MFiles.MenuLocation.MenuLocation_TaskBar_Last, 1);

// Create a custom command to be added to the taskbar command group.
// It contains menu when submenu items are added into it.
const mainMenuCmd = await shellFrame.Commands.CreateCustomCommand("Menu");
const mainMenuId = await shellFrame.Commands.AddCustomCommandToMenu(mainMenuCmd, myGroupId, 1);

// Create "Greet" command and add it to the main menu.
const commandGreetId = await shellFrame.Commands.CreateCustomCommand("Greet");
const commandGreetMenuId = await shellFrame.Commands.CreateSubMenuItem(mainMenuId, commandGreetId, 1);

// Create "SubMenu" command and add it to the main menu.
const subMenuCmd = await shellFrame.Commands.CreateCustomCommand("SubMenu");
const subMenuId = await shellFrame.Commands.CreateSubMenuItem(mainMenuId, subMenuCmd, 2);

// Create "Hello" command and add it to the nested menu.
const helloCommandId = await shellFrame.Commands.CreateCustomCommand("Hello");
const helloMenuId = await shellFrame.Commands.CreateSubMenuItem(subMenuId, helloCommandId, 1);

// Create "World" command and add it to the nested menu.
const worldCommandId = await shellFrame.Commands.CreateCustomCommand("World");
const worldMenuId = await shellFrame.Commands.CreateSubMenuItem(subMenuId, worldCommandId, 2);

// Register to be notified when a custom command is clicked.
// Note: this will fire for ALL custom commands, so we need to filter out others.
shellFrame.Commands.Events.Register(
MFiles.Event.CustomCommand,
async (commandId) => {

// Branch depending on the Id of the command that was clicked.
switch (commandId) {
case commandGreetId:

// Greet command was clicked.
await shellFrame.ShowMessage("Hello, World!");
break;

case helloCommandId:

// Hello command was clicked.
await shellFrame.ShowMessage("Hello");
break;

case worldCommandId:

// World command was clicked.
await shellFrame.ShowMessage("World");
break;
}
});
};
}

Logging into the M-Files vault should now show a My App command group in taskbar and the commands with submenus in it:

 alt text

Hiding and displaying commands in taskbar

The command can be hidden from the taskbar using the SetCommandState function.

SetCommandState function takes three parameters:

  1. The command id.
  2. The command location (i.e. where the command state should be changed).
  3. The new command state.

To hide or show commands in the taskbar, use the CommandLocation.TaskBar command location.

Use the following command states:

  • CommandState_Active to show the command.
  • CommandState_Hidden to hide the command.
// Example: show or hide the command with commandId in taskbar.
const newState = isCommandAvailable ? CommandState.CommandState_Active : CommandState.CommandState_Hidden;
await shellFrame.Commands.SetCommandState( commandId, MFiles.CommandLocation.TaskBar, newState );

When a new command is created and added to the taskbar, its command state is CommandState_Active by default.

Adding an icon

To set an icon for an existing custom taskbar group, call SetTaskbarGroupIcon(groupId, iconInformation) to update the icon shown for a taskbar group created by your application. The function verifies feature availability and ownership, resolves the icon using the same helpers as SetIcon, applies the icon to the group, and refreshes the taskbar so the new icon is visible.

Parameters

  • groupId (number) – id of the taskbar group to update. The group must be created by your app and owned by its Application GUID.
  • iconInformation (IIconInformation) – description of the icon (inline SVG, base64, path, built-in id, etc.).

How it works

  1. Validates inputs; throws on null/undefined parameters.
  2. Reads the application GUID and verifies ownership; throws if the group is missing or not owned by the app.
  3. Resolves the icon and sets group.icon.
  4. Refreshes taskbar commands, so the UI updates.

Key notes

  • Signature: async SetTaskbarGroupIcon(groupId: number, iconInformation: IIconInformation): Promise<void>
  • Stability: Experimental — API may change.
  • Ownership required: the call uses the application GUID; you must own the taskbar group to modify it.
  • Icon resolution: same rules as SetIcon (inline SVG default extension svg, PATH requires fetch/CORS, built-in ids map to icon helpers).
  • Errors: throws when parameters are missing, when appGUID is not available, or when the group does not exist / ownership verification fails. If getIcon throws, the error is wrapped and re-thrown with a failure message.
// Base64-encoded SVG icon for the group
const groupIconBase64 = 'PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTggMTRBNiA2IDAgMSAwIDggMmE2IDYgMCAwIDAgMCAxMloiIGZpbGw9IiM0RkJBRjciLz4KUGF0aCBkPSJtNS45MyA4LjM4IDEuMDYgMS4wNmEuNzUuNzUgMCAwIDAgMS4wNiAwbDMuOC0zLjhhLjc1Ljc1IDAgMCAwLTEuMDYtMS4wNkw4IDcuMzJsLS43OS0uNzlhLjc1Ljc1IDAgMCAwLTEuMDYgMS4wNmwtLjIyLjIxeiIgZmlsbD0iI2ZmZiIvPgo8L3N2Zz4=';
function OnNewShellUI(shellUI) {
shellUI.Events.Register(MFiles.Event.NewShellFrame, handleNewShellFrame);
}

function handleNewShellFrame(shellFrame) {
shellFrame.Events.Register(MFiles.Event.Started, getShellFrameStartedHandler(shellFrame));
}

function getShellFrameStartedHandler(shellFrame) {
return async () => {
// Create a taskbar group with icon
const reportingGroup = await shellFrame.Commands.CreateTaskbarGroup(
"Reporting Tools",
MFiles.MenuLocation.MenuLocation_TaskBar_MainActions,
1
);

// Create commands for the group
const generateReportCommand = await shellFrame.Commands.CreateCustomCommand("Generate Report");
const viewAnalyticsCommand = await shellFrame.Commands.CreateCustomCommand("View Analytics");

// Add commands to the group
await shellFrame.Commands.AddCustomCommandToMenu(generateReportCommand, reportingGroup, 1);
await shellFrame.Commands.AddCustomCommandToMenu(viewAnalyticsCommand, reportingGroup, 2);

// Set icon for the group
const groupIconInfo = {
content: groupIconBase64,
iconContentType: "BASE64",
alt: "Reporting tools group icon",
extension: "svg"
};

await shellFrame.Commands.SetTaskbarGroupIcon(reportingGroup, groupIconInfo);
};
}

 alt text

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/index.html index b670a206d..561dd81e3 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/Samples/index.html @@ -4,13 +4,13 @@ Samples | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Samples

note

Please note that these samples are provided “as-is” and with no warranty, explicit or otherwise. You should ensure that the functionality of these samples meet your requirements, and thoroughly test them, prior to using in any production scenarios. The items linked below are designed as teaching tools and may not be fully complete.

Please refer to Installing Applications on how to install UI Extensions into your M-Files environment.

Hello world

Hello World is a simple application demonstrating how to create the most basic UI Extension which only displays a dialog box after the UI Extension has been succesfully started.

Commands

The Commands sample creates a basic User Interface Extensibility Framework application consisting of one ShellUI module which adds buttons to the main menu and context menu that are shown/hidden depending upon the user's actions.

Built-in commands

The Built-in commands sample creates a basic User Interface Extensibility Framework application consisting of one module which reacts when built-in commands are clicked. Also it shows how to execute a built in command.

Taskbar commands

The Taskbar commands sample creates a basic User Interface Extensibility Framework application consisting of one module which adds a new command group to the taskbar and commands to it. It also adds commands to pre-defined command groups in taskbar.

The Popup dashboard sample creates a User Interface Extensibility Framework application that shows a popup dashboard when a custom command is clicked. The dashboard is provided with details about the views that the user has navigated into.

The Popup dashboard with accent color sample extends the above application by also showing how to use the accent color that has been defined for this vault.

ShellFrame and dashboard

The ShellFrame and dashboard sample shows how to replace the default listing area with a custom dashboard (and how to revert it). The sample shows how a ReactJS component could be used within the UIXv2 framework for this.

Assign to me

The Assign to me sample creates a more complex UI Extension that allows users to select object(s) and create assignments that refer to them. This example interacts with the vault to both query vault structure and also create new objects.

Search folder examples

The Search folder examples sample demonstrates how search folders can be used.

Sandbox Attribute support examples

The Sandbox Attributes support examples sample demonstrates how sandbox attributes can be used.

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltInIcon/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltInIcon/index.html index 1a92efb10..319e7c6d2 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltInIcon/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltInIcon/index.html @@ -4,14 +4,13 @@ BuiltInIcon | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

BuiltInIcon

Enum representing built-in icons.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any -future release. Use of this feature is not recommended for production environments.

NameValueDescription
BuiltInIcon_CheckOut0
BuiltInIcon_CheckIn1
BuiltInIcon_History2
BuiltInIcon_MakeCopy3
BuiltInIcon_View4
BuiltInIcon_Workflow5
BuiltInIcon_Assignment6
BuiltInIcon_MarkComplete7
BuiltInIcon_TraditionalFolder8
BuiltInIcon_ChangeState9
BuiltInIcon_DocumentCollection10
BuiltInIcon_DefaultFile11
BuiltInIcon_Property12
BuiltInIcon_Undo13
BuiltInIcon_User14
BuiltInIcon_Group15
BuiltInIcon_NewItem16
BuiltInIcon_ContactPerson17
BuiltInIcon_StatusBlue18
BuiltInIcon_CircleBlue19
BuiltInIcon_Favorite20
BuiltInIcon_Idea21
BuiltInIcon_Bubble22
BuiltInIcon_Delete23
- - +
Skip to main content

BuiltInIcon

Enum representing built-in icons.

NameValueDescription
BuiltInIcon_CheckOut0
BuiltInIcon_CheckIn1
BuiltInIcon_History2
BuiltInIcon_MakeCopy3
BuiltInIcon_View4
BuiltInIcon_Workflow5
BuiltInIcon_Assignment6
BuiltInIcon_MarkComplete7
BuiltInIcon_TraditionalFolder8
BuiltInIcon_ChangeState9
BuiltInIcon_DocumentCollection10
BuiltInIcon_DefaultFile11
BuiltInIcon_Property12
BuiltInIcon_Undo13
BuiltInIcon_User14
BuiltInIcon_Group15
BuiltInIcon_NewItem16
BuiltInIcon_ContactPerson17
BuiltInIcon_StatusBlue18
BuiltInIcon_CircleBlue19
BuiltInIcon_Favorite20
BuiltInIcon_Idea21
BuiltInIcon_Bubble22
BuiltInIcon_Delete23
BuiltInIcon_ConflictResolution_KeepChanges24
BuiltInIcon_ConflictResolution_DiscardChanges25
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltinCommand/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltinCommand/index.html index 69a75ac3b..252c70fea 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltinCommand/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltinCommand/index.html @@ -4,14 +4,14 @@ BuiltinCommand | M-Files User Interface Extensibility Framework - - + +
Skip to main content

BuiltinCommand

The BuiltinCommand enumeration contains all the ids of the builtin commands that can be hidden, -shown, disabled or enabled from the menus. This enumeration is used in conjunction with the SetCommandState method.

NameValueDescription
MakeCopy9Make a copy of the selected object.
CheckOut10Checkout the active selection.
CheckIn11Checkin the active selection.
UndoCheckOut13Undo the checkout for the selected object.
ConvertToSFD31Converts the selection into single-file document.
ConvertToMFD32Converts the selection into multi-file document. This commands works for only one selected object.
ReplaceWithFile33Triggers the file selection dialog for the currenly selected object and replaces that file with the selected file.
ConvertToSearchablePDF46Convert to searchable pdf command.
SaveAsPDF50Save the selected object as PDF.
Delete76Delete the current selected object. Shows a modal dialog for confirmation.
Export79Exports the content of the current view to a CSV file.
ConvertToSingleFilePDF81Converts the selection into single-file PDF.
ConvertToMultiFilePDF82Converts the selection into multi-file PDF.
NewObject87Creates a new Object.
Refresh88Refresh the listing.
RollBack89Rollback command. The rollbacked object is either command argument provided as ObjVer or the current selection in the Listing View.
SubMenu_NewObject101New object command which has the different object type child commands.
CheckOutForCoauthoring129Checks out the object for co-authoring.
ViewInMFDesktop174Open the selected file in the desktop application.
DownloadFile175Downloads the selected file.
OpenFile176Open the selected file.
AddPersonalTab180Add personal tab and send request to server to store related information.
RemovePersonalTab181Remove personal tab and send request to server to store related information.
RemoveFromThisView182Remove object from recent tab and send request to server to update related information.
OpenInDesktopApp183Open file in Native Desktop application using web Companion.
OpenInBrowser184Opens the currently selected object via online office editor.
Follow185Starts following the specified object. While the object is being followed, the current user will be notified if the object changes.
Unfollow186Stop following the specified object.
LaunchDefaultApp187Open the file in associated application in desktop environment (DesktopNext).
SubMenu_Convert188Convert command which has the different convert child commands.
SubMenu_Show_More189Show more commands.
AddFile190Add File command.
CopyInternalLink201Copies the link of the object to the pointed out version.
SendCheckInRequest202Sends check in request to the user who has checked out a object.
CreateView203Creates a view.
OpenInExternalEditor204Opens the file in the back-end specific external editing system.
OpenFileForWeb205Opens the file based on the available options in a specific order for web.
Order
1. Web companion
2. Office for the web
3. Download the document
BrowseRelatedObjects206Browses related objects.
SaveNewVersion208Save new version of the file
CopyWebLink209Copies the web link of the object.
SPERead210Opens the currently selected object with a native desktop application in read-only mode
ExclusiveEdit211Edit command for exclusive editing (Edit alone).
AddToDocumentCollection213Adds the selected object to the document collection.
OpenSharingCenter214Opens Sharing Center Dialog with the selected object.
- - +shown, disabled or enabled from the menus. This enumeration is used in conjunction with the SetCommandState method.

NameValueDescription
MakeCopy9Make a copy of the selected object.
CheckOut10Checkout the active selection.
CheckIn11Checkin the active selection.
UndoCheckOut13Undo the checkout for the selected object.
ConvertToSFD31Converts the selection into single-file document.
ConvertToMFD32Converts the selection into multi-file document. This commands works for only one selected object.
ReplaceWithFile33Triggers the file selection dialog for the currenly selected object and replaces that file with the selected file.
ConvertToSearchablePDF46Convert to searchable pdf command.
SaveAsPDF50Save the selected object as PDF.
Delete76Delete the current selected object. Shows a modal dialog for confirmation.
Export79Exports the content of the current view to a CSV file.
ConvertToSingleFilePDF81Converts the selection into single-file PDF.
ConvertToMultiFilePDF82Converts the selection into multi-file PDF.
NewObject87Creates a new Object.
Refresh88Refresh the listing.
RollBack89Rollback command. The rollbacked object is either command argument provided as ObjVer or the current selection in the Listing View.
SubMenu_NewObject101New object command which has the different object type child commands.
CheckOutForCoauthoring129Checks out the object for co-authoring.
ResolveConflictKeepThis134Resolves a version conflict by keeping the changes made in the selected version.
ResolveConflictDiscardThis135Resolves a version conflict by discarding the changes made in the selected version.
ViewInMFDesktop174Open the selected file in the desktop application.
DownloadFile175Downloads the selected file.
OpenFile176Open the selected file.
AddPersonalTab180Add personal tab and send request to server to store related information.
RemovePersonalTab181Remove personal tab and send request to server to store related information.
RemoveFromThisView182Remove object from recent tab and send request to server to update related information.
OpenInDesktopApp183Open file in Native Desktop application using web Companion.
OpenInBrowser184Opens the currently selected object via online office editor.
Follow185Starts following the specified object. While the object is being followed, the current user will be notified if the object changes.
Unfollow186Stop following the specified object.
LaunchDefaultApp187Open the file in associated application in desktop environment (DesktopNext).
SubMenu_Convert188Convert command which has the different convert child commands.
SubMenu_Show_More189Show more commands.
AddFile190Add File command.
CopyInternalLink201Copies the link of the object to the pointed out version.
SendCheckInRequest202Sends check in request to the user who has checked out a object.
CreateView203Creates a view.
OpenInExternalEditor204Opens the file in the back-end specific external editing system.
OpenFileForWeb205Opens the file based on the available options in a specific order for web.
Order
1. Web companion
2. Office for the web
3. Download the document
BrowseRelatedObjects206Browses related objects.
SaveNewVersion208Save new version of the file
CopyWebLink209Copies the web link of the object.
SPERead210Opens the currently selected object with a native desktop application in read-only mode
ExclusiveEdit211Edit command for exclusive editing (Edit alone).
AddToDocumentCollection213Adds the selected object to the document collection.
OpenSharingCenter214Opens Sharing Center Dialog with the selected object.
OpenInExternalEditorWeb215Opens the file in the back-end specific web editing system.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandLocation/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandLocation/index.html index c9875c904..c64af3c97 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandLocation/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandLocation/index.html @@ -4,15 +4,15 @@ CommandLocation | M-Files User Interface Extensibility Framework - - + +
Skip to main content

CommandLocation

The CommandLocation enumeration specifies the location for the M-Files command when it is displayed in the user interface. This enumeration is used in -conjunction with the SetCommandState method.

NameValueDescription
Undefined0Undefined value.
MainMenu1Specifies the command appearance in the main menus, such as top menu and command bars.
ContextMenu2Specifies the command appearance in the context menu.
ActivityContextMenu6Specifies the command appearance in the activity context menu.
TaskBar7Specifies the command appearance on task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
All268435455Refers to all command locations.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
- - +conjunction with the SetCommandState method.

NameValueDescription
Undefined0Undefined value.
MainMenu1Specifies the command appearance in the main menus, such as top menu and command bars.
ContextMenu2Specifies the command appearance in the context menu.
ActivityContextMenu6Specifies the command appearance in the activity context menu.
TaskBar7Specifies the command appearance on task bar.
All268435455Refers to all command locations.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandState/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandState/index.html index 36a6445b9..84092e9f8 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandState/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandState/index.html @@ -4,15 +4,15 @@ CommandState | M-Files User Interface Extensibility Framework - - + +
Skip to main content

CommandState

The CommandState enumeration specifies the visibility state for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.

NameValueDescription
CommandState_Undefined0Undefined value.
CommandState_Active1The command is visible and enabled.
CommandState_Hidden3The command is not visible.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/Event/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/Event/index.html index 9c57ece61..2d71a80bf 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/Event/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/Event/index.html @@ -4,13 +4,13 @@ Event | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Event

The Event enumeration lists collectively all events.

NameValueDescription
Started2OnStarted Event.
Stop3OnStop Event.
NewShellFrame7OnNewShellFrame Event.
NewNormalShellFrame8OnNewNormalShellFrame Event.
NewRightPane14OnNewRightPane Event.
NewShellListing15OnNewShellListing Event.
NewCommands16OnNewCommands Event.
ActiveListingChanged17OnActiveListingChanged Event.
TabSelected19OnTabSelected Event (ShellPaneContainer),OnTabSelected Event (ShellPaneTab).
TabUnselected20OnTabUnselected Event (ShellPaneContainer),OnTabUnselected Event (ShellPaneTab).
BuiltinCommand22This event is triggered when built-in command is fired. To cancel the event the UI Extension can return "false" in asyncronous event handler.
CustomCommand23OnCustomCommand Event.
SelectionChanged24OnSelectionChanged Event.
SelectedItemsChanged25OnSelectedItemsChanged Event.
ContentChanged26OnContentChanged Event.
ShowContextMenu27OnShowContextMenu Event.
ListingActivated29OnListingActivated Event.
ListingDeactivated30OnListingDeactivated Event.
CloseWindow33OnCloseWindow Event.
ListItemAdded152ListItemAdded Event.
ListItemModified153ListItemModified Event.
ListItemRemoved154ListItemRemoved Event.
FacetValuesReady162FacetValuesReady Event.
CrossApplicationNotification168CrossApplicationNotification Event.
NewLeftPane170OnNewLeftPane Event.
SelectNextObject174OnSelectNextObject Event.
SelectPreviousObject175OnSelectPreviousObject Event.
SelectNextObjectFile176OnSelectNextObjectFile Event.
SelectPreviousObjectFile177OnSelectPreviousObjectFile Event.
SelectNextFolder178OnSelectNextFolder Event.
SelectPreviousFolder179OnSelectPreviousFolder Event.
ViewPageChanged180OnViewPageChanged Event.
StartPageChange181OnStartPageChange Event.
ListingPageChanged182OnListingPageChanged Event.
Refresh185OnRefresh Event.
ColumnGlobalSortingChanged187ColumnGlobalSortingChanged event.
ViewLocationChanged188ViewLocationChanged event.
ViewLocationChangedAsync189ViewLocationChangedAsync event.
ViewCreationStarted190ViewCreationStarted event.
CustomDataChanged199Custom data has changed in Dashboard.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetRangeType/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetRangeType/index.html index b59ac9331..ebe2fbc34 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetRangeType/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetRangeType/index.html @@ -4,13 +4,13 @@ FacetRangeType | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetTransformation/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetTransformation/index.html index b1b2843b9..94f15fbb5 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetTransformation/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetTransformation/index.html @@ -4,13 +4,13 @@ FacetTransformation | M-Files User Interface Extensibility Framework - - + +
Skip to main content

FacetTransformation

Facet transformation type.

NameValueDescription
yearyearSpecific year from timestamp / date.
monthmonthSpecific month from timestamp / date. Typically used in combination with year.
rangerangeIDOL only, facet represents a certain range, specified by rangeType,.
nonenoneDefault, no transformations.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetType/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetType/index.html index 166b7c489..7cfd54272 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetType/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetType/index.html @@ -4,13 +4,13 @@ FacetType | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetValueType/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetValueType/index.html index c45f41fd3..09ea9c44f 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetValueType/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetValueType/index.html @@ -4,13 +4,13 @@ FacetValueType | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/IconContentType/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/IconContentType/index.html index 7161bd314..5f46c77b8 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/IconContentType/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/IconContentType/index.html @@ -4,14 +4,13 @@ IconContentType | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

IconContentType

Enum representing possible icon types.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any -future release. Use of this feature is not recommended for production environments.

NameValueDescription
SVGsvgSVG in string format "<svg>...<svg>".
BASE64base64Base64 part of file without mimetype part, e.g. "iVBORw0KGgoAAAANSUhEUgAA...".
Note: Extension information must be provided when using this icon content type.
PATHpathRelative path to icon file, e.g. assets/icon/icon.svg
BUILT_INbuilt_inBuilt-in icon representation.
- - +
Skip to main content

IconContentType

Enum representing possible icon types.

NameValueDescription
SVGsvgSVG in string format "<svg>...<svg>".
BASE64base64Base64 part of file without mimetype part, e.g. "iVBORw0KGgoAAAANSUhEUgAA...".
Note: Extension information must be provided when using this icon content type.
PATHpathRelative path to icon file, e.g. assets/icon/icon.svg
BUILT_INbuilt_inBuilt-in icon representation.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInObjectType/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInObjectType/index.html index ea0a6adae..e778fd973 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInObjectType/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInObjectType/index.html @@ -4,13 +4,13 @@ MFBuiltInObjectType | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInPropertyDef/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInPropertyDef/index.html index c5b9d6b4f..6470ad639 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInPropertyDef/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInPropertyDef/index.html @@ -4,13 +4,13 @@ MFBuiltInPropertyDef | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInValueList/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInValueList/index.html index d0b920788..3834061be 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInValueList/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInValueList/index.html @@ -4,13 +4,13 @@ MFBuiltInValueList | M-Files User Interface Extensibility Framework - - + +
Skip to main content

MFBuiltInValueList

List of built-in value lists.

NameValueDescription
Documents0Documents.
Classes1Classes.
ClassGroups2Class groups.
VersionLabels3Version labels.
TraditionalFolders4Traditional folders.
ExternalLocations5External locations.
Users6Users.
Workflows7Workflows.
States8States.
Collections9Collections.
UserGroups16User groups.
StateTransitions17State transitions.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInView/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInView/index.html index 4a4568238..b19626da4 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInView/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInView/index.html @@ -4,13 +4,13 @@ MFBuiltInView | M-Files User Interface Extensibility Framework - - + +
Skip to main content

MFBuiltInView

List of built-in views.

NameValueDescription
CheckedOutToCurrentUser5Checked out to current user.
Offline6Offline.
RecentlyModifiedByMe7Recently modified by me.
Templates8Templates.
AssignedToMe9Assigned to me.
LatestSearches11Latest searches.
ByID12By id.
BuiltIn13Built-in.
RecentlyAccessedByMe14Recently accessed by me.
Favorites15Favorites.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MenuLocation/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MenuLocation/index.html index ec6bd05ba..795beca40 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MenuLocation/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MenuLocation/index.html @@ -4,13 +4,13 @@ MenuLocation | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

MenuLocation

The MenuLocation enumeration contains all context menu locations into which the custom commands can be added.

NameValueDescription
MenuLocation_TopPaneMenu47TopPane Menu, typically used for the UI Extension applications.
MenuLocation_ActivityContextMenu_148Menu location for the Activity view Context menu group 1.
MenuLocation_ActivityContextMenu_249Menu location for the Activity view Context menu group 2.
MenuLocation_ActivityContextMenu_350Menu location for the Activity view Context menu group 3.
MenuLocation_ContextMenu_Open51Menu location for the context menu position for the open commands.
MenuLocation_ContextMenu_Checkout52Menu location for the context menu position for the checkout commands.
MenuLocation_ContextMenu_Share53Menu location for the context menu position for the share commands.
MenuLocation_ContextMenu_ObjectOperations26Menu location for the position of object operations in the context menu.
MenuLocation_ContextMenu_DocumentConversions41Menu location for the context menu position for document conversions.
MenuLocation_ContextMenu_WorkflowActions54Menu location for the context menu position for the workflow action commands.
MenuLocation_ContextMenu_Organize55Menu location for the context menu position for the organize commands.
MenuLocation_ContextMenu_VersionControl56Menu location for the context menu position for the version control commands.
MenuLocation_ContextMenu_Create57Menu location for the context menu position for the create commands.
MenuLocation_ContextMenu_ViewOptions58Menu location for the context menu position for the view options commands.
MenuLocation_ContextMenu_Group59Menu location for the context menu position for the grouping commands.
MenuLocation_ContextMenu_DisplayOptions60Menu location for the context menu position for the display options commands.
MenuLocation_ContextMenu_Edit37Menu location for the context menu position for Edit commands.
MenuLocation_ContextMenu_Bottom43Menu location for the bottom of the context menu.
MenuLocation_ContextMenu_More99Menu location for the context menu position for more commands.
MenuLocation_TaskBar_First200Menu location for the first command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Workspace205Menu location for the "Workspace" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_MainActions210Menu location for the "Main Actions" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Assignments220Menu location for the "Assignments" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_DocumentCollections230Menu location for the "Document Collections" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_CheckIn240Menu location for the "Check In" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_WorkflowStates250Menu location for the "Workflow States" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Last399Menu location for the last command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
- - +
Skip to main content

MenuLocation

The MenuLocation enumeration contains all context menu locations into which the custom commands can be added.

NameValueDescription
MenuLocation_TopPaneMenu47TopPane Menu, typically used for the UI Extension applications.
MenuLocation_ActivityContextMenu_148Menu location for the Activity view Context menu group 1.
MenuLocation_ActivityContextMenu_249Menu location for the Activity view Context menu group 2.
MenuLocation_ActivityContextMenu_350Menu location for the Activity view Context menu group 3.
MenuLocation_ContextMenu_Open51Menu location for the context menu position for the open commands.
MenuLocation_ContextMenu_Checkout52Menu location for the context menu position for the checkout commands.
MenuLocation_ContextMenu_Share53Menu location for the context menu position for the share commands.
MenuLocation_ContextMenu_ObjectOperations26Menu location for the position of object operations in the context menu.
MenuLocation_ContextMenu_ConflictResolution40Menu location for the position of conflict resolution commands in the context menu.
MenuLocation_ContextMenu_DocumentConversions41Menu location for the context menu position for document conversions.
MenuLocation_ContextMenu_WorkflowActions54Menu location for the context menu position for the workflow action commands.
MenuLocation_ContextMenu_Organize55Menu location for the context menu position for the organize commands.
MenuLocation_ContextMenu_VersionControl56Menu location for the context menu position for the version control commands.
MenuLocation_ContextMenu_Create57Menu location for the context menu position for the create commands.
MenuLocation_ContextMenu_ViewOptions58Menu location for the context menu position for the view options commands.
MenuLocation_ContextMenu_Group59Menu location for the context menu position for the grouping commands.
MenuLocation_ContextMenu_DisplayOptions60Menu location for the context menu position for the display options commands.
MenuLocation_ContextMenu_Edit37Menu location for the context menu position for Edit commands.
MenuLocation_ContextMenu_Bottom43Menu location for the bottom of the context menu.
MenuLocation_ContextMenu_More99Menu location for the context menu position for more commands.
MenuLocation_TaskBar_First200Menu location for the first command group in the task bar.
MenuLocation_TaskBar_Workspace205Menu location for the "Workspace" command group in the task bar.
MenuLocation_TaskBar_MainActions210Menu location for the "Main Actions" command group in the task bar.
MenuLocation_TaskBar_Assignments220Menu location for the "Assignments" command group in the task bar.
MenuLocation_TaskBar_DocumentCollections230Menu location for the "Document Collections" command group in the task bar.
MenuLocation_TaskBar_CheckIn240Menu location for the "Check In" command group in the task bar.
MenuLocation_TaskBar_WorkflowStates250Menu location for the "Workflow States" command group in the task bar.
MenuLocation_TaskBar_ConflictResolution260Menu location for the "Conflict Resolution" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Last399Menu location for the last command group in the task bar.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/ObjectWindowResultCode/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/ObjectWindowResultCode/index.html index fff302040..64b08254e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/ObjectWindowResultCode/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/ObjectWindowResultCode/index.html @@ -4,13 +4,13 @@ ObjectWindowResultCode | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ObjectWindowResultCode

The ObjectWindowResultCode enumerates the defined object window modes.

NameValueDescription
MFObjectWindowResultCodeOk0The user applied the changes.
MFObjectWindowResultCodeCancel1The user cancelled the operation.
MFObjectWindowResultCodeOkToAll2The user applied the changes to all objects.
MFObjectWindowResultCodeSkipThis3The user skipped a single object.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/SearchEngine/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/SearchEngine/index.html index e703dc81d..1f44a4217 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/SearchEngine/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/SearchEngine/index.html @@ -4,13 +4,13 @@ SearchEngine | M-Files User Interface Extensibility Framework - - + +
Skip to main content

SearchEngine

Enumeration of supported search engines.

NameValueDescription
SEARCH_ENGINE_UNSPECIFIED0Unspecified.
SEARCH_ENGINE_DT_SEARCH1dtSearch.
SEARCH_ENGINE_IDOL2IDOL.
SEARCH_ENGINE_AZURE_SEARCH3Azure search.
SEARCH_ENGINE_SMART_SEARCH4Smart search
SEARCH_ENGINE_AINO_SEARCH5Aino search
SEARCH_ENGINE_GOLDFISH6Goldfish - stateless reference indexer. Indexes everything, finds nothing. For testing and performance measurement purposes.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/ToastType/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/ToastType/index.html index 230e07999..cfa18510a 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/ToastType/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/ToastType/index.html @@ -4,14 +4,14 @@ ToastType | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/index.html index 9388ecb25..30ff0ce5a 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/index.html @@ -4,13 +4,13 @@ Enums | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

Enums

NameDescription
BuiltinCommandThe BuiltinCommand enumeration contains all the ids of the builtin commands that can be hidden, shown, disabled or enabled from the menus. This enumeration is used in conjunction with the SetCommandState method.
CommandLocationThe CommandLocation enumeration specifies the location for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.
CommandStateThe CommandState enumeration specifies the visibility state for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.
EventThe Event enumeration lists collectively all events.
MenuLocationThe MenuLocation enumeration contains all context menu locations into which the custom commands can be added.
ObjectWindowResultCodeThe ObjectWindowResultCode enumerates the defined object window modes.
ToastTypeThe ToastType enumeration specifies the different types of toast notifications available.
FacetRangeTypeFacet Range Type.
FacetTransformationFacet transformation type.
FacetTypeFacet Type.
FacetValueTypeFacet Value Type.
IconContentTypeEnum representing possible icon types. NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments.
BuiltInIconEnum representing built-in icons. NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments.
MFBuiltInPropertyDefList of built-in properties.
MFBuiltInObjectTypeList of built-in object types.
MFBuiltInViewList of built-in views.
MFBuiltInValueListList of built-in value lists.
- - +
Skip to main content

Enums

NameDescription
BuiltinCommandThe BuiltinCommand enumeration contains all the ids of the builtin commands that can be hidden, shown, disabled or enabled from the menus. This enumeration is used in conjunction with the SetCommandState method.
CommandLocationThe CommandLocation enumeration specifies the location for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.
CommandStateThe CommandState enumeration specifies the visibility state for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.
EventThe Event enumeration lists collectively all events.
MenuLocationThe MenuLocation enumeration contains all context menu locations into which the custom commands can be added.
ObjectWindowResultCodeThe ObjectWindowResultCode enumerates the defined object window modes.
ToastTypeThe ToastType enumeration specifies the different types of toast notifications available.
FacetRangeTypeFacet Range Type.
FacetTransformationFacet transformation type.
FacetTypeFacet Type.
FacetValueTypeFacet Value Type.
IconContentTypeEnum representing possible icon types.
BuiltInIconEnum representing built-in icons.
MFBuiltInPropertyDefList of built-in properties.
MFBuiltInObjectTypeList of built-in object types.
MFBuiltInViewList of built-in views.
MFBuiltInValueListList of built-in value lists.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Events/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Events/index.html index f33ac6d67..b1018f163 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Events/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Events/index.html @@ -4,13 +4,13 @@ Events | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Events

IDashboardEvents

The IDashboard interface has Events property, which provides access to the IDashboardEvents interface. This interface provides two methods:

  • Register( event, callback ): Registers an event handler for the specified event and returns the event handler ID.
  • Unregister( eventId ): Unregisters the event handler with the specified ID.

One of the use cases for events in IDashboard is to listen for custom data changes provided by UpdateCustomData method.

Here is a JavaScript example of how to use the IDashboardEvents interface to listen for custom data changes using globally defined events.

// Register event handler for the custom data changes.
const eventId = await dashboard.Events.Register(
MFiles.Event.CustomDataChanged,
(data) => {
console.log("Custom data changed: ", data);
},
);
EventDescriptionArguments
RefreshTriggered when the Dashboard data is refreshed.
StartedSent when the Dashboard turns to started state.
StopSent before the Dashboard is stopped.
CustomDataChangedThis event is triggered, when custom data on dashboard has changed. The event can be
used to update the dashboard based on the new data. This event will fire at least
once when the dashboard is started and initialized.
data New custom data for the dashboard

ISearchPaneEvents

Interface for the Search pane events. The interface provides two methods:

  • Register( event, callback ): Registers an event handler for the specified event.
  • Unregister( eventId ): Unregisters the event handler with the specified ID.
EventDescriptionArguments
StopSent before the Searchpane is closed.
StartedRegisters event handler for the Search pane started event, which means that the Search pane
is ready to be used.

IShellFrameEvents

IShellFrameEvents interface provides means to manage shell frame events. The interface provides two methods:

  • Register( event, callback ): Registers an event handler for the specified event.
  • Unregister( eventId ): Unregisters the event handler with the specified ID.
EventDescriptionArguments
StopSent before the IShellFrame is stopped.
StartedRegisters event handler for the IShellFrame started event, which means that the IShellFrame
is ready to be used. This event will trigger at least once for each registered callback
if the IShellFrame is already started and not yet stopped.
ViewLocationChangedRegisters event handler for the IShellFrame ViewLocationChanged event, which means that the view location has changed.
ViewLocationChangedAsyncRegisters event handler for the IShellFrame ViewLocationChangedAsync event, which means that the view location has changed.
NewCommandsRegisters event handler for the IShellFrame NewCommands event, which means that a new ICommands interface has been created and is ready to be used.
NewRightPaneRegisters event handler for the IShellFrame NewRightPane event, which means that a shell pane container is created for right shell pane.
NewShellListingRegisters event handler for the IShellFrame NewShellListing event, which means that a new shell listing object is created.newShellisting The new IShellListing object.

IShellListingEvents

IShellListingEvents interface provides means to manage shell listing events. The interface provides two methods:

  • Register( event, callback ): Registers an event handler for the specified event.
  • Unregister( eventId ): Unregisters the event handler with the specified ID.
EventDescriptionArguments
StartedRegisters event handler for the IShellListingEvents started event.
StopRegisters event handler for the IShellListingEvents stopped event.
SelectionChangedRegisters event handler for the IShellListingEvents SelectionChanged event.
This event is triggered when the selection in the listing view is set, changed or removed.
shellItems Contains the selected items.
SelectNextObjectRegisters event handler for the IShellListingEvents SelectNextObject event. This event is triggered when the next object in the listing is selected.
SelectPreviousObjectRegisters event handler for the IShellListingEvents SelectPreviousObject event. This event is triggered when the previous object in the listing is selected.
SelectNextFolderRegisters event handler for the IShellListingEvents SelectNextFolder event. This event is triggered when the next folder in the listing is selected.folderType type of the folder, which have been selected.
SelectPreviousFolderRegisters event handler for the IShellListingEvents SelectPreviousFolder event. This event is triggered when the previous folder in the listing is selected.folderType type of the folder, which have been selected.
ListingDeactivatedRegisters event handler for the IShellListingEvents ListingDeactivated event.
This event is triggered when the listing object becomes inactive and loses the input focus.
shellListing The next active shell listing object. Can be null.
ListingActivatedRegisters event handler for the IShellListingEvents ListingActivated event.
This event is triggered when the listing object becomes active and receives the input focus.
shellListing The previous active shell listing object. Can be null.
ContentChangedRegisters event handler for the IShellListingEvents ContentChanged event.
This event is triggered when the current listing content is changed, or listed items are modified.
shellItems Contains all items in the listing.
ListItemAddedRegisters event handler for the IShellListingEvents ListItemAdded event. This event is triggered when one or more items are added to the listing.objectVersion Object
ListItemRemovedRegisters event handler for the IShellListingEvents ListItemRemoved event. This event is triggered when one or more items are removed from the listing.listItem Either an array of ObjectVersionEx if non-folder objects are removed or a single ObjectVersionEx, in case folder is removed.
removedExternalFolder In case folder was removed, include information about the old external folder item being removed in case of
ListItemModifiedRegisters event handler for the IShellListingEvents ListItemModified event.
This event is triggered when one or more of the items that are currently selected are modified.
oldServerObjVer Array of old object versions.
newObjVer Array of new objects.
SelectedItemsChangedRegisters event handler for the IShellListingEvents SelectedItemsChanged event.
This event is triggered when one or more of the items that are currently selected are modified.
shellItems Contains the selected items.

IShellPaneContainerEvents

Interface for the Shell pane container events. The interface provides two methods:

  • Register( event, callback ): Registers an event handler for the specified event.
  • Unregister( eventId ): Unregisters the event handler with the specified ID.
EventDescriptionArguments
StopSent when the object turns to stopped state.
StartedSent when the object turns to started state.

IShellPaneTabEvents

Interface for the Shell pane tab events. The interface provides two methods:

  • Register( event, callback ): Registers an event handler for the specified event.
  • Unregister( eventId ): Unregisters the event handler with the specified ID.
EventDescriptionArguments
StartedSent when the object turns to started state.
StopSent before the object is stopped.

IWindowEvents

Interface for the Window events. The interface provides two methods:

  • Register( event, callback ): Registers an event handler for the specified event.
  • Unregister( eventId ): Unregisters the event handler with the specified ID.
EventDescriptionArguments
CloseWindowSent when the window is requested to closed.

ICommandsEvents

Ths ICommandEvents interface provides methods to register and unregister event handlers for custom commands:

  • Register( event, callback ): Registers an event handler for the specified event and returns the event handler ID.
  • Unregister( eventId ): Unregisters the event handler with the specified ID.

The ICommands interface has Events property, which provides access to the ICommandsEvents interface.

Here is a JavaScript example of how to use the ICommandsEvents interface to listen for custom command events and their data:

const commandsEvents = shellFrame.Commands.Events;
// Register event handler for the custom command
const eventId = await commandsEvents.Register(
Event.CustomCommand,
(commandID, data) => {
console.log("Custom command invoked: ", commandID);
console.log("Data: ", data);
},
);
EventDescriptionArguments
CustomCommandTriggered when a custom command is invoked.commandID The ID of the custom command to be used.
data The data passed to the custom command.
BuiltinCommandCallback handler for Builtin commands.commandId The ID of the built-in command to be used.
param Some of the commands use parameters. For instance, when the dialog for creating a new object is shown, the object type ID is defined here.

IShellUIEvents

Interface for the Shell UI events. The interface provides two methods:

  • Register( event, callback ): Registers an event handler for the specified event.
  • Unregister( eventId ): Unregisters the event handler with the specified ID.
EventDescriptionArguments
StartedSent when the object turns to started state.
StopRegister event to listen for the stop event.
NewShellFrameRegister event handler for the NewShellFrame event. This event is triggered when any shell frame object is created,
including normal shell frames, common dialogs, and embedded or special shell frames.
shellFrame
NewNormalShellFrameRegister event handler for the NewNormalShellFrame event. This event is triggered when a normal shell frame object is created.
Note that this event is not triggered for common dialogs, or embedded or special shell frames.
shellFrame The new shell frame object.
CrossApplicationNotificationBroadcasted message to multiple applications.appGUID GUID of the target application, or null if broadcasted to all applications
msgId ID of the message which is sent to the other applications.
data Custom data to be sent.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/AddCustomCommandToMenu/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/AddCustomCommandToMenu/index.html index 2a2dc0100..c3424a569 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/AddCustomCommandToMenu/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/AddCustomCommandToMenu/index.html @@ -4,13 +4,13 @@ AddCustomCommandToMenu | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

AddCustomCommandToMenu

Description

The AddCustomCommandToMenu function is a part of the M-Files UI Extension framework and is used to include a custom command in a specific location within the M-Files user interface menu. It allows developers to define the position and priority of the custom command in the menu structure. This function typically takes parameters such as the ID of the custom command, the menu location where the command should appear, and a priority value to determine its order within the menu. This enables customization of the user interface by seamlessly integrating custom functionality into the M-Files application's menu system.

The Command to be added must be first created using CreateCustomCommand method.

Syntax


// AddCustomCommandToMenu is part of ICommands is part of the IShellFrame interface
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
customCommandId, // ID of the custom command, created using CreateCustomCommand
MFiles.MenuLocation.MenuLocation_TopPaneMenu, // MenuLocation using MFiles.MenuLocation enumeration
1 // Order priority of the menuitem
);

Parameters

NameOptionalityTypeDescription
customCommandRequirednumberThe command identifier. Use CreateCustomCommand method to create a command.
locationRequiredMenuLocationDetailed menu location where to add the existing custom command.
Possible locations are enumerated.
orderPriorityRequirednumberThe order indication for the command. Smallest priority goes top.

Possible values for the location parameter are

NameValueDescription
MenuLocation_TopPaneMenu47TopPane Menu, typically used for the UI Extension applications.
MenuLocation_ActivityContextMenu_148Menu location for the Activity view Context menu group 1.
MenuLocation_ActivityContextMenu_249Menu location for the Activity view Context menu group 2.
MenuLocation_ActivityContextMenu_350Menu location for the Activity view Context menu group 3.
MenuLocation_ContextMenu_Open51Menu location for the context menu position for the open commands.
MenuLocation_ContextMenu_Checkout52Menu location for the context menu position for the checkout commands.
MenuLocation_ContextMenu_Share53Menu location for the context menu position for the share commands.
MenuLocation_ContextMenu_ObjectOperations26Menu location for the position of object operations in the context menu.
MenuLocation_ContextMenu_DocumentConversions41Menu location for the context menu position for document conversions.
MenuLocation_ContextMenu_WorkflowActions54Menu location for the context menu position for the workflow action commands.
MenuLocation_ContextMenu_Organize55Menu location for the context menu position for the organize commands.
MenuLocation_ContextMenu_VersionControl56Menu location for the context menu position for the version control commands.
MenuLocation_ContextMenu_Create57Menu location for the context menu position for the create commands.
MenuLocation_ContextMenu_ViewOptions58Menu location for the context menu position for the view options commands.
MenuLocation_ContextMenu_Group59Menu location for the context menu position for the grouping commands.
MenuLocation_ContextMenu_DisplayOptions60Menu location for the context menu position for the display options commands.
MenuLocation_ContextMenu_Edit37Menu location for the context menu position for Edit commands.
MenuLocation_ContextMenu_Bottom43Menu location for the bottom of the context menu.
MenuLocation_ContextMenu_More99Menu location for the context menu position for more commands.
MenuLocation_TaskBar_First200Menu location for the first command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Workspace205Menu location for the "Workspace" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_MainActions210Menu location for the "Main Actions" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Assignments220Menu location for the "Assignments" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_DocumentCollections230Menu location for the "Document Collections" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_CheckIn240Menu location for the "Check In" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_WorkflowStates250Menu location for the "Workflow States" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Last399Menu location for the last command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.

Return type

TypeDescription
Promise < number >Returns the Menu item ID.

Example

This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.


// Called when the UI Extension starts
function OnNewShellUI(shellUI) {

// Wait for the ShellFrame to be created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
async (shellFrame) => {

// Wait for the shellframe to start
shellFrame.Events.Register(
MFiles.Event.Started,
async () => {

// Create a new custom command and menu item for the command
const createCommand = async ( name: string ) => {

// Create a new custom command
const commandId = await shellFrame.Commands.CreateCustomCommand(name);

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
// Command ID
commands.exampleCommand,
// Menulocation
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
// Priority of the command
1
);

// Return a data structure containing essential information about the commands
return {
id: commandId, // ID of the command
menuItemId // Menu item ID, can be used to add sub menus to this menu item.
}
}

// Create an Example command and a set of sample commands to control it's visibility
const commands = {
// This is the sample command
exampleCommand : await createCommand("Hello World"),

// These commands control the state of the example command
addCommand: await createCommand("Add Command To Menu"),
deleteCustomCommand: await createCommand("Delete Command")
hideCommand: await createCommand("Hide Command"),
showCommand: await createCommand("Activate Command"),
executeCommand: await createCommand("Execute Command"),
getCommandName: await createCommand("Get Name"),
getCommandState: await createCommand("Get Command State"),
removeCommandFromMenu: await createCommand("Remove From Menu"),
removeCommand: await createCommand("Remove Command")
}

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);

// Listen for the custom commands.
shellFrame.Commands.Events.Register(

// Listen for the CustomCommand events.
MFiles.Event.CustomCommand,

// Each command has ID and optional data provided with it.
( commandId, data ) => {
// Respond to the command if custom command sent by the application
switch( commandId ) {

// Run the Example command
case commands.exampleCommand.id:
shellFrame.ShowMessage( "Hello World!" );
break;

// Add the new menuitem which runs the example command
case commands.addCommand.id:
await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);
break;

// Removes the command from particular menu
case commands.removeCommandFromMenu.id:
await shellFrame.Commands.RemoveCustomCommandFromMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu
);
break;

// Deletes the command permanently
case commands.deleteCommand.id:
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Hiddes all command instances for specific command ID
case commands.hideCommand.id:
// Hide the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Hidden
);
break;

// Activates (makes visible) all command instances for specific command ID
case commands.showCommand.id:
// Show the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Get the command name
case commands.getCommandName.id:
const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);
shellFrame.ShowMessage( name );
break;

// Get the Command State
case commands.getCommandState.id:

// NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu
const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );
shellFrame.ShowMessage( `Command state: ${commandState}` );
break;

}
}
);
}
)
}
)
}

This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions.

- - +
Skip to main content

AddCustomCommandToMenu

Description

The AddCustomCommandToMenu function is a part of the M-Files UI Extension framework and is used to include a custom command in a specific location within the M-Files user interface menu. It allows developers to define the position and priority of the custom command in the menu structure. This function typically takes parameters such as the ID of the custom command, the menu location where the command should appear, and a priority value to determine its order within the menu. This enables customization of the user interface by seamlessly integrating custom functionality into the M-Files application's menu system.

The Command to be added must be first created using CreateCustomCommand method.

Syntax


// AddCustomCommandToMenu is part of ICommands is part of the IShellFrame interface
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
customCommandId, // ID of the custom command, created using CreateCustomCommand
MFiles.MenuLocation.MenuLocation_TopPaneMenu, // MenuLocation using MFiles.MenuLocation enumeration
1 // Order priority of the menuitem
);

Parameters

NameOptionalityTypeDescription
customCommandRequirednumberThe command identifier. Use CreateCustomCommand method to create a command.
locationRequiredMenuLocationDetailed menu location where to add the existing custom command.
Possible locations are enumerated.
orderPriorityRequirednumberThe order indication for the command. Smallest priority goes top.

Possible values for the location parameter are

NameValueDescription
MenuLocation_TopPaneMenu47TopPane Menu, typically used for the UI Extension applications.
MenuLocation_ActivityContextMenu_148Menu location for the Activity view Context menu group 1.
MenuLocation_ActivityContextMenu_249Menu location for the Activity view Context menu group 2.
MenuLocation_ActivityContextMenu_350Menu location for the Activity view Context menu group 3.
MenuLocation_ContextMenu_Open51Menu location for the context menu position for the open commands.
MenuLocation_ContextMenu_Checkout52Menu location for the context menu position for the checkout commands.
MenuLocation_ContextMenu_Share53Menu location for the context menu position for the share commands.
MenuLocation_ContextMenu_ObjectOperations26Menu location for the position of object operations in the context menu.
MenuLocation_ContextMenu_ConflictResolution40Menu location for the position of conflict resolution commands in the context menu.
MenuLocation_ContextMenu_DocumentConversions41Menu location for the context menu position for document conversions.
MenuLocation_ContextMenu_WorkflowActions54Menu location for the context menu position for the workflow action commands.
MenuLocation_ContextMenu_Organize55Menu location for the context menu position for the organize commands.
MenuLocation_ContextMenu_VersionControl56Menu location for the context menu position for the version control commands.
MenuLocation_ContextMenu_Create57Menu location for the context menu position for the create commands.
MenuLocation_ContextMenu_ViewOptions58Menu location for the context menu position for the view options commands.
MenuLocation_ContextMenu_Group59Menu location for the context menu position for the grouping commands.
MenuLocation_ContextMenu_DisplayOptions60Menu location for the context menu position for the display options commands.
MenuLocation_ContextMenu_Edit37Menu location for the context menu position for Edit commands.
MenuLocation_ContextMenu_Bottom43Menu location for the bottom of the context menu.
MenuLocation_ContextMenu_More99Menu location for the context menu position for more commands.
MenuLocation_TaskBar_First200Menu location for the first command group in the task bar.
MenuLocation_TaskBar_Workspace205Menu location for the "Workspace" command group in the task bar.
MenuLocation_TaskBar_MainActions210Menu location for the "Main Actions" command group in the task bar.
MenuLocation_TaskBar_Assignments220Menu location for the "Assignments" command group in the task bar.
MenuLocation_TaskBar_DocumentCollections230Menu location for the "Document Collections" command group in the task bar.
MenuLocation_TaskBar_CheckIn240Menu location for the "Check In" command group in the task bar.
MenuLocation_TaskBar_WorkflowStates250Menu location for the "Workflow States" command group in the task bar.
MenuLocation_TaskBar_ConflictResolution260Menu location for the "Conflict Resolution" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Last399Menu location for the last command group in the task bar.

Return type

TypeDescription
Promise < number >Returns the Menu item ID.

Example

This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.


// Called when the UI Extension starts
function OnNewShellUI(shellUI) {

// Wait for the ShellFrame to be created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
async (shellFrame) => {

// Wait for the shellframe to start
shellFrame.Events.Register(
MFiles.Event.Started,
async () => {

// Create a new custom command and menu item for the command
const createCommand = async ( name: string ) => {

// Create a new custom command
const commandId = await shellFrame.Commands.CreateCustomCommand(name);

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
// Command ID
commands.exampleCommand,
// Menulocation
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
// Priority of the command
1
);

// Return a data structure containing essential information about the commands
return {
id: commandId, // ID of the command
menuItemId // Menu item ID, can be used to add sub menus to this menu item.
}
}

// Create an Example command and a set of sample commands to control it's visibility
const commands = {
// This is the sample command
exampleCommand : await createCommand("Hello World"),

// These commands control the state of the example command
addCommand: await createCommand("Add Command To Menu"),
deleteCustomCommand: await createCommand("Delete Command")
hideCommand: await createCommand("Hide Command"),
showCommand: await createCommand("Activate Command"),
executeCommand: await createCommand("Execute Command"),
getCommandName: await createCommand("Get Name"),
getCommandState: await createCommand("Get Command State"),
removeCommandFromMenu: await createCommand("Remove From Menu"),
removeCommand: await createCommand("Remove Command")
}

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);

// Listen for the custom commands.
shellFrame.Commands.Events.Register(

// Listen for the CustomCommand events.
MFiles.Event.CustomCommand,

// Each command has ID and optional data provided with it.
( commandId, data ) => {
// Respond to the command if custom command sent by the application
switch( commandId ) {

// Run the Example command
case commands.exampleCommand.id:
shellFrame.ShowMessage( "Hello World!" );
break;

// Add the new menuitem which runs the example command
case commands.addCommand.id:
await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);
break;

// Removes the command from particular menu
case commands.removeCommandFromMenu.id:
await shellFrame.Commands.RemoveCustomCommandFromMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu
);
break;

// Deletes the command permanently
case commands.deleteCommand.id:
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Hiddes all command instances for specific command ID
case commands.hideCommand.id:
// Hide the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Hidden
);
break;

// Activates (makes visible) all command instances for specific command ID
case commands.showCommand.id:
// Show the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Get the command name
case commands.getCommandName.id:
const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);
shellFrame.ShowMessage( name );
break;

// Get the Command State
case commands.getCommandState.id:

// NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu
const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );
shellFrame.ShowMessage( `Command state: ${commandState}` );
break;

}
}
);
}
)
}
)
}

This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions.

+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateCustomCommand/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateCustomCommand/index.html index 4844c41b4..2020715e8 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateCustomCommand/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateCustomCommand/index.html @@ -4,15 +4,15 @@ CreateCustomCommand | M-Files User Interface Extensibility Framework - - + +
Skip to main content

CreateCustomCommand

Description

The CreateCustomCommand function is a functionality within the M-Files UI Extension framework designed for creating custom commands dynamically. This function enables developers to define and generate new custom commands programmatically. It accepts the name of the command as a parameter, and it returns a unique identifier (ID) associated with the newly created command.

The created command ID can then be consumed for example by

You can control the visibility of the command in M-Files menus using SetCommandState.

Command can be removed using DeleteCustomCommand.

Syntax

// Create a new custom command using IShellFrame instance.
const commandId = await shellFrame.Commands.CreateCustomCommand(name);

Parameters

NameOptionalityTypeDescription
commandNameRequiredstringThe custom command's name.

Return type

TypeDescription
Promise < number >Returns the command id of the created custom command.

Example

This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.


// Called when the UI Extension starts
function OnNewShellUI(shellUI) {

// Wait for the ShellFrame to be created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
async (shellFrame) => {

// Wait for the shellframe to start
shellFrame.Events.Register(
MFiles.Event.Started,
async () => {

// Create a new custom command and menu item for the command
const createCommand = async ( name: string ) => {

// Create a new custom command
const commandId = await shellFrame.Commands.CreateCustomCommand(name);

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
// Command ID
commands.exampleCommand,
// Menulocation
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
// Priority of the command
1
);

// Return a data structure containing essential information about the commands
return {
id: commandId, // ID of the command
menuItemId // Menu item ID, can be used to add sub menus to this menu item.
}
}

// Create an Example command and a set of sample commands to control it's visibility
const commands = {
// This is the sample command
exampleCommand : await createCommand("Hello World"),

// These commands control the state of the example command
addCommand: await createCommand("Add Command To Menu"),
deleteCustomCommand: await createCommand("Delete Command")
hideCommand: await createCommand("Hide Command"),
showCommand: await createCommand("Activate Command"),
executeCommand: await createCommand("Execute Command"),
getCommandName: await createCommand("Get Name"),
getCommandState: await createCommand("Get Command State"),
removeCommandFromMenu: await createCommand("Remove From Menu"),
removeCommand: await createCommand("Remove Command")
}

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);

// Listen for the custom commands.
shellFrame.Commands.Events.Register(

// Listen for the CustomCommand events.
MFiles.Event.CustomCommand,

// Each command has ID and optional data provided with it.
( commandId, data ) => {
// Respond to the command if custom command sent by the application
switch( commandId ) {

// Run the Example command
case commands.exampleCommand.id:
shellFrame.ShowMessage( "Hello World!" );
break;

// Add the new menuitem which runs the example command
case commands.addCommand.id:
await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);
break;

// Removes the command from particular menu
case commands.removeCommandFromMenu.id:
await shellFrame.Commands.RemoveCustomCommandFromMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu
);
break;

// Deletes the command permanently
case commands.deleteCommand.id:
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Hiddes all command instances for specific command ID
case commands.hideCommand.id:
// Hide the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Hidden
);
break;

// Activates (makes visible) all command instances for specific command ID
case commands.showCommand.id:
// Show the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Get the command name
case commands.getCommandName.id:
const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);
shellFrame.ShowMessage( name );
break;

// Get the Command State
case commands.getCommandState.id:

// NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu
const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );
shellFrame.ShowMessage( `Command state: ${commandState}` );
break;

}
}
);
}
)
}
)
}

This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions.

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateSubMenuItem/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateSubMenuItem/index.html index 80deae245..9c3048904 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateSubMenuItem/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateSubMenuItem/index.html @@ -4,13 +4,13 @@ CreateSubMenuItem | M-Files User Interface Extensibility Framework - - + +
Skip to main content

CreateSubMenuItem

Description

Creates a new SubMenu for already created Menu.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.CreateSubMenuItem(
parentMenuItemId,
customCommand,
orderPriority,
);

Parameters

NameOptionalityTypeDescription
parentMenuItemIdRequirednumberID of the Parent MenuItem.
customCommandRequirednumberCommand to execute when the MenuItem is selected.
orderPriorityRequirednumberPriority to assign to the new item.

Return type

TypeDescription
Promise < number >ID of the newly created MenuItem.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateTaskbarGroup/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateTaskbarGroup/index.html index 68531ebb0..30615fa40 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateTaskbarGroup/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/CreateTaskbarGroup/index.html @@ -4,20 +4,19 @@ CreateTaskbarGroup | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

CreateTaskbarGroup

Description

Creates new custom task bar group for custom commands.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any -future release. Use of this feature is not recommended for production environments.

NOTE: If multiple task bar groups are created for the same MenuLocation with the same +

CreateTaskbarGroup

Description

Creates new custom task bar group for custom commands.

NOTE: If multiple task bar groups are created for the same MenuLocation with the same orderPriority, their relative ordering is unspecified and may vary between runs, sessions or versions. Do not rely on a particular order for groups with equal priority — assign distinct orderPriority values to guarantee a deterministic ordering (lower values are shown first).

The CreateTaskbarGroup function allows developers to create custom taskbar groups dynamically. Custom commands (created using the CreateCustomCommand function) can then be added to these groups using the AddCustomCommandToMenu function.

Location parameter specifies where in the taskbar the new group will appear. It can be:
  • MenuLocation_TaskBar_First: places the group as the first (leftmost) item in the taskbar.
  • Any pre-defined taskbar location (e.g., MenuLocation_TaskBar_MainActions or MenuLocation_TaskBar_Assignments): places the new group next to the speficied location.
  • MenuLocation_TaskBar_Last: places the group as the last (rightmost) item in the taskbar.

The function returns a new location ID that can be used as MenuLocation parameter in the AddCustomCommandToMenu function.

Empty groups are not visible. A group will appear in the taskbar only after at least one command has been added to it.

To remove a custom group, use the RemoveTaskbarGroup function.

See Taskbar Commands sample for example code.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.CreateTaskbarGroup(
name,
location,
orderPriority,
);

Parameters

NameOptionalityTypeDescription
nameRequiredstringName of the new task bar group.
locationRequiredMenuLocationThe taskbar location where the new group will be created. It can be one of
the MenuLocationTaskBar* values. MenuLocation_TaskBar_First and MenuLocation_TaskBar_Last are used to create
the group at the beginning or end of the taskbar. Other values place the group next to the corresponding
built-in command group. The recommended value is MenuLocation_TaskBar_Last to create the group at the end of the taskbar.
orderPriorityRequirednumberOrder priority of the new group. Lower priority groups are shown first.

Return type

TypeDescription
Promise < number >Id for the new task bar group.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/DeleteCustomCommand/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/DeleteCustomCommand/index.html index 6ddd137b3..d17d471e2 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/DeleteCustomCommand/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/DeleteCustomCommand/index.html @@ -4,13 +4,13 @@ DeleteCustomCommand | M-Files User Interface Extensibility Framework - - + +

DeleteCustomCommand

Description

Deletes a custom command. The command is automatically removed.

Syntax

// shellFrame points here into the IShellFrame interface
await shellFrame.Commands.DeleteCustomCommand(customCommand);

Parameters

NameOptionalityTypeDescription
customCommandRequirednumberThe command id to delete. The command must be a custom command.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/ExecuteCommand/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/ExecuteCommand/index.html index 1c5b9535b..50618b0d2 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/ExecuteCommand/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/ExecuteCommand/index.html @@ -4,13 +4,13 @@ ExecuteCommand | M-Files User Interface Extensibility Framework - - + +

ExecuteCommand

Description

Executes a user command.

Syntax

// Execute a new custom command with data parameter
await shellFrame.Commands.ExecuteCommand(commandId, {
someCustomData: 1234
});

Parameters

NameOptionalityTypeDescription
commandIdRequirednumberThe command id. Can be a built-in command enumerated value or custom command id.
argsOptionalanyCommand argument or an arguments object, if the command requires arguments.
TODO: Any type should be replaced with the actual type of the argument.
Use null or empty value if the command does not require arguments.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandName/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandName/index.html index 63312baf5..4bdfb1bb5 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandName/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandName/index.html @@ -4,13 +4,13 @@ GetCommandName | M-Files User Interface Extensibility Framework - - + +

GetCommandName

Description

Resolves the name that has been associated with the given command id.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.GetCommandName(commandId);

Parameters

NameOptionalityTypeDescription
commandIdRequirednumberThe command id. Can be a builtin command, enumerated value or custom command id.

Return type

TypeDescription
Promise < string >Returns the name of the command.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandState/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandState/index.html index a5ea1363b..48fc7a761 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandState/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandState/index.html @@ -4,13 +4,13 @@ GetCommandState | M-Files User Interface Extensibility Framework - - + +
-

GetCommandState

Description

Gets the command state for builtin or custom command in specified location.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.GetCommandState(
command,
location,
includeBuiltInState,
includeScriptSpecifiedState,
);

Parameters

NameOptionalityTypeDescription
commandRequirednumberThe command id. Can be a builtin command enumerated value or custom command id.
locationRequiredCommandLocationDetailed command location to examine. Possible locations are enumerated.
includeBuiltInStateRequiredbooleanIf true, takes the built-in state of the command into account.
includeScriptSpecifiedStateRequiredbooleanIf true, accounts for the script-specified state of the command.

Possible values for the command location are:

NameValueDescription
Undefined0Undefined value.
MainMenu1Specifies the command appearance in the main menus, such as top menu and command bars.
ContextMenu2Specifies the command appearance in the context menu.
ActivityContextMenu6Specifies the command appearance in the activity context menu.
TaskBar7Specifies the command appearance on task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
All268435455Refers to all command locations.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.

Return type

TypeDescription
Promise < CommandState >The command state.
- - +

GetCommandState

Description

Gets the command state for builtin or custom command in specified location.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.GetCommandState(
command,
location,
includeBuiltInState,
includeScriptSpecifiedState,
);

Parameters

NameOptionalityTypeDescription
commandRequirednumberThe command id. Can be a builtin command enumerated value or custom command id.
locationRequiredCommandLocationDetailed command location to examine. Possible locations are enumerated.
includeBuiltInStateRequiredbooleanIf true, takes the built-in state of the command into account.
includeScriptSpecifiedStateRequiredbooleanIf true, accounts for the script-specified state of the command.

Possible values for the command location are:

NameValueDescription
Undefined0Undefined value.
MainMenu1Specifies the command appearance in the main menus, such as top menu and command bars.
ContextMenu2Specifies the command appearance in the context menu.
ActivityContextMenu6Specifies the command appearance in the activity context menu.
TaskBar7Specifies the command appearance on task bar.
All268435455Refers to all command locations.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.

Return type

TypeDescription
Promise < CommandState >The command state.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetMenuIdOfBuiltInCommand/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetMenuIdOfBuiltInCommand/index.html index 4d523fc72..dd730766a 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetMenuIdOfBuiltInCommand/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetMenuIdOfBuiltInCommand/index.html @@ -4,13 +4,13 @@ GetMenuIdOfBuiltInCommand | M-Files User Interface Extensibility Framework - - + +

GetMenuIdOfBuiltInCommand

Description

Gets the MenuItem ID of a built-in command by its command ID and location.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.GetMenuIdOfBuiltInCommand(
commandId,
commandLocation,
);

Parameters

NameOptionalityTypeDescription
commandIdRequirednumberThe unique identifier for the command.
commandLocationRequiredCommandLocationThe location where the command is placed.

Return type

TypeDescription
Promise < number >The UI ID of the built-in command if found, otherwise throw 'Not Found' error.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveCustomCommandFromMenu/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveCustomCommandFromMenu/index.html index 7a27cb0f3..2ce9ba2e1 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveCustomCommandFromMenu/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveCustomCommandFromMenu/index.html @@ -4,13 +4,13 @@ RemoveCustomCommandFromMenu | M-Files User Interface Extensibility Framework - - + +
-

RemoveCustomCommandFromMenu

Description

Removes a custom command from the specified menu location.

Syntax

await shellFrame.Commands.RemoveCustomCommandFromMenu(
commandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu
);

Parameters

NameOptionalityTypeDescription
customCommandRequirednumberThe custom command id.
locationRequiredMenuLocationMenu location where the command is removed. Possible locations are enumerated.
appGuidRequiredstringApplication guid if application specific command is added to application toolbar.
dashboardIdRequiredstringDashboard id if application specific command added to application toolbar.

Possible values for the location parameter are

NameValueDescription
MenuLocation_TopPaneMenu47TopPane Menu, typically used for the UI Extension applications.
MenuLocation_ActivityContextMenu_148Menu location for the Activity view Context menu group 1.
MenuLocation_ActivityContextMenu_249Menu location for the Activity view Context menu group 2.
MenuLocation_ActivityContextMenu_350Menu location for the Activity view Context menu group 3.
MenuLocation_ContextMenu_Open51Menu location for the context menu position for the open commands.
MenuLocation_ContextMenu_Checkout52Menu location for the context menu position for the checkout commands.
MenuLocation_ContextMenu_Share53Menu location for the context menu position for the share commands.
MenuLocation_ContextMenu_ObjectOperations26Menu location for the position of object operations in the context menu.
MenuLocation_ContextMenu_DocumentConversions41Menu location for the context menu position for document conversions.
MenuLocation_ContextMenu_WorkflowActions54Menu location for the context menu position for the workflow action commands.
MenuLocation_ContextMenu_Organize55Menu location for the context menu position for the organize commands.
MenuLocation_ContextMenu_VersionControl56Menu location for the context menu position for the version control commands.
MenuLocation_ContextMenu_Create57Menu location for the context menu position for the create commands.
MenuLocation_ContextMenu_ViewOptions58Menu location for the context menu position for the view options commands.
MenuLocation_ContextMenu_Group59Menu location for the context menu position for the grouping commands.
MenuLocation_ContextMenu_DisplayOptions60Menu location for the context menu position for the display options commands.
MenuLocation_ContextMenu_Edit37Menu location for the context menu position for Edit commands.
MenuLocation_ContextMenu_Bottom43Menu location for the bottom of the context menu.
MenuLocation_ContextMenu_More99Menu location for the context menu position for more commands.
MenuLocation_TaskBar_First200Menu location for the first command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Workspace205Menu location for the "Workspace" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_MainActions210Menu location for the "Main Actions" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Assignments220Menu location for the "Assignments" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_DocumentCollections230Menu location for the "Document Collections" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_CheckIn240Menu location for the "Check In" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_WorkflowStates250Menu location for the "Workflow States" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Last399Menu location for the last command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.

Return type

TypeDescription
Promise < void >Method does not return a value

Example

This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.


// Called when the UI Extension starts
function OnNewShellUI(shellUI) {

// Wait for the ShellFrame to be created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
async (shellFrame) => {

// Wait for the shellframe to start
shellFrame.Events.Register(
MFiles.Event.Started,
async () => {

// Create a new custom command and menu item for the command
const createCommand = async ( name: string ) => {

// Create a new custom command
const commandId = await shellFrame.Commands.CreateCustomCommand(name);

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
// Command ID
commands.exampleCommand,
// Menulocation
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
// Priority of the command
1
);

// Return a data structure containing essential information about the commands
return {
id: commandId, // ID of the command
menuItemId // Menu item ID, can be used to add sub menus to this menu item.
}
}

// Create an Example command and a set of sample commands to control it's visibility
const commands = {
// This is the sample command
exampleCommand : await createCommand("Hello World"),

// These commands control the state of the example command
addCommand: await createCommand("Add Command To Menu"),
deleteCustomCommand: await createCommand("Delete Command")
hideCommand: await createCommand("Hide Command"),
showCommand: await createCommand("Activate Command"),
executeCommand: await createCommand("Execute Command"),
getCommandName: await createCommand("Get Name"),
getCommandState: await createCommand("Get Command State"),
removeCommandFromMenu: await createCommand("Remove From Menu"),
removeCommand: await createCommand("Remove Command")
}

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);

// Listen for the custom commands.
shellFrame.Commands.Events.Register(

// Listen for the CustomCommand events.
MFiles.Event.CustomCommand,

// Each command has ID and optional data provided with it.
( commandId, data ) => {
// Respond to the command if custom command sent by the application
switch( commandId ) {

// Run the Example command
case commands.exampleCommand.id:
shellFrame.ShowMessage( "Hello World!" );
break;

// Add the new menuitem which runs the example command
case commands.addCommand.id:
await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);
break;

// Removes the command from particular menu
case commands.removeCommandFromMenu.id:
await shellFrame.Commands.RemoveCustomCommandFromMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu
);
break;

// Deletes the command permanently
case commands.deleteCommand.id:
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Hiddes all command instances for specific command ID
case commands.hideCommand.id:
// Hide the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Hidden
);
break;

// Activates (makes visible) all command instances for specific command ID
case commands.showCommand.id:
// Show the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Get the command name
case commands.getCommandName.id:
const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);
shellFrame.ShowMessage( name );
break;

// Get the Command State
case commands.getCommandState.id:

// NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu
const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );
shellFrame.ShowMessage( `Command state: ${commandState}` );
break;

}
}
);
}
)
}
)
}

This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions.

- - +

RemoveCustomCommandFromMenu

Description

Removes a custom command from the specified menu location.

Syntax

await shellFrame.Commands.RemoveCustomCommandFromMenu(
commandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu
);

Parameters

NameOptionalityTypeDescription
customCommandRequirednumberThe custom command id.
locationRequiredMenuLocationMenu location where the command is removed. Possible locations are enumerated.
appGuidRequiredstringApplication guid if application specific command is added to application toolbar.
dashboardIdRequiredstringDashboard id if application specific command added to application toolbar.

Possible values for the location parameter are

NameValueDescription
MenuLocation_TopPaneMenu47TopPane Menu, typically used for the UI Extension applications.
MenuLocation_ActivityContextMenu_148Menu location for the Activity view Context menu group 1.
MenuLocation_ActivityContextMenu_249Menu location for the Activity view Context menu group 2.
MenuLocation_ActivityContextMenu_350Menu location for the Activity view Context menu group 3.
MenuLocation_ContextMenu_Open51Menu location for the context menu position for the open commands.
MenuLocation_ContextMenu_Checkout52Menu location for the context menu position for the checkout commands.
MenuLocation_ContextMenu_Share53Menu location for the context menu position for the share commands.
MenuLocation_ContextMenu_ObjectOperations26Menu location for the position of object operations in the context menu.
MenuLocation_ContextMenu_ConflictResolution40Menu location for the position of conflict resolution commands in the context menu.
MenuLocation_ContextMenu_DocumentConversions41Menu location for the context menu position for document conversions.
MenuLocation_ContextMenu_WorkflowActions54Menu location for the context menu position for the workflow action commands.
MenuLocation_ContextMenu_Organize55Menu location for the context menu position for the organize commands.
MenuLocation_ContextMenu_VersionControl56Menu location for the context menu position for the version control commands.
MenuLocation_ContextMenu_Create57Menu location for the context menu position for the create commands.
MenuLocation_ContextMenu_ViewOptions58Menu location for the context menu position for the view options commands.
MenuLocation_ContextMenu_Group59Menu location for the context menu position for the grouping commands.
MenuLocation_ContextMenu_DisplayOptions60Menu location for the context menu position for the display options commands.
MenuLocation_ContextMenu_Edit37Menu location for the context menu position for Edit commands.
MenuLocation_ContextMenu_Bottom43Menu location for the bottom of the context menu.
MenuLocation_ContextMenu_More99Menu location for the context menu position for more commands.
MenuLocation_TaskBar_First200Menu location for the first command group in the task bar.
MenuLocation_TaskBar_Workspace205Menu location for the "Workspace" command group in the task bar.
MenuLocation_TaskBar_MainActions210Menu location for the "Main Actions" command group in the task bar.
MenuLocation_TaskBar_Assignments220Menu location for the "Assignments" command group in the task bar.
MenuLocation_TaskBar_DocumentCollections230Menu location for the "Document Collections" command group in the task bar.
MenuLocation_TaskBar_CheckIn240Menu location for the "Check In" command group in the task bar.
MenuLocation_TaskBar_WorkflowStates250Menu location for the "Workflow States" command group in the task bar.
MenuLocation_TaskBar_ConflictResolution260Menu location for the "Conflict Resolution" command group in the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
MenuLocation_TaskBar_Last399Menu location for the last command group in the task bar.

Return type

TypeDescription
Promise < void >Method does not return a value

Example

This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.


// Called when the UI Extension starts
function OnNewShellUI(shellUI) {

// Wait for the ShellFrame to be created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
async (shellFrame) => {

// Wait for the shellframe to start
shellFrame.Events.Register(
MFiles.Event.Started,
async () => {

// Create a new custom command and menu item for the command
const createCommand = async ( name: string ) => {

// Create a new custom command
const commandId = await shellFrame.Commands.CreateCustomCommand(name);

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
// Command ID
commands.exampleCommand,
// Menulocation
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
// Priority of the command
1
);

// Return a data structure containing essential information about the commands
return {
id: commandId, // ID of the command
menuItemId // Menu item ID, can be used to add sub menus to this menu item.
}
}

// Create an Example command and a set of sample commands to control it's visibility
const commands = {
// This is the sample command
exampleCommand : await createCommand("Hello World"),

// These commands control the state of the example command
addCommand: await createCommand("Add Command To Menu"),
deleteCustomCommand: await createCommand("Delete Command")
hideCommand: await createCommand("Hide Command"),
showCommand: await createCommand("Activate Command"),
executeCommand: await createCommand("Execute Command"),
getCommandName: await createCommand("Get Name"),
getCommandState: await createCommand("Get Command State"),
removeCommandFromMenu: await createCommand("Remove From Menu"),
removeCommand: await createCommand("Remove Command")
}

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);

// Listen for the custom commands.
shellFrame.Commands.Events.Register(

// Listen for the CustomCommand events.
MFiles.Event.CustomCommand,

// Each command has ID and optional data provided with it.
( commandId, data ) => {
// Respond to the command if custom command sent by the application
switch( commandId ) {

// Run the Example command
case commands.exampleCommand.id:
shellFrame.ShowMessage( "Hello World!" );
break;

// Add the new menuitem which runs the example command
case commands.addCommand.id:
await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);
break;

// Removes the command from particular menu
case commands.removeCommandFromMenu.id:
await shellFrame.Commands.RemoveCustomCommandFromMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu
);
break;

// Deletes the command permanently
case commands.deleteCommand.id:
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Hiddes all command instances for specific command ID
case commands.hideCommand.id:
// Hide the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Hidden
);
break;

// Activates (makes visible) all command instances for specific command ID
case commands.showCommand.id:
// Show the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Get the command name
case commands.getCommandName.id:
const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);
shellFrame.ShowMessage( name );
break;

// Get the Command State
case commands.getCommandState.id:

// NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu
const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );
shellFrame.ShowMessage( `Command state: ${commandState}` );
break;

}
}
);
}
)
}
)
}

This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions.

+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveMenuItem/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveMenuItem/index.html index 8c1aaa936..22f0f9ae3 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveMenuItem/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveMenuItem/index.html @@ -4,13 +4,13 @@ RemoveMenuItem | M-Files User Interface Extensibility Framework - - + + - - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index.html index e441af618..0ef8a4892 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index.html @@ -4,14 +4,13 @@ RemoveTaskbarGroup | M-Files User Interface Extensibility Framework - - + +
-

RemoveTaskbarGroup

Description

Removes custom task bar group from the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any -future release. Use of this feature is not recommended for production environments.

Syntax

// shellFrame points here into the IShellFrame interface
await shellFrame.Commands.RemoveTaskbarGroup(groupId);

Parameters

NameOptionalityTypeDescription
groupIdRequirednumberThe task bar location id to remove.

Return type

TypeDescription
Promise < void >Method does not return a value
- - +
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetCommandState/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetCommandState/index.html index 4662f0ff7..155e7face 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetCommandState/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetCommandState/index.html @@ -4,14 +4,14 @@ SetCommandState | M-Files User Interface Extensibility Framework - - + +

SetCommandState

Description

Sets the command's state to be hidden, visible, enabled or disabled. Calling -this method may affect context menu, application toolbar, menus or all of them.

Syntax

shellFrame.Commands.SetCommandState( 
commandId, // The ID of the command which state is to be changed
MFiles.CommandLocation.MainMenu, // The location in the UI where the command's state is being changed
MFiles.CommandState.CommandState_Hidden // New state of the command in specific location
);

Parameters

NameOptionalityTypeDescription
commandIdRequirednumberThe id of the target command. The id can represent either a
custom or a builtincommand. The builtin commands are enumerated by BuiltinCommand.
locationRequiredCommandLocationMenu location where the command state change takes place.
Use All to affect in all locations.
stateRequiredCommandStateThe new command state.

CommandLocation

Values for the location are

NameValueDescription
Undefined0Undefined value.
MainMenu1Specifies the command appearance in the main menus, such as top menu and command bars.
ContextMenu2Specifies the command appearance in the context menu.
ActivityContextMenu6Specifies the command appearance in the activity context menu.
TaskBar7Specifies the command appearance on task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
All268435455Refers to all command locations.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.

CommandState

Values for the state are

NameValueDescription
CommandState_Undefined0Undefined value.
CommandState_Active1The command is visible and enabled.
CommandState_Hidden3The command is not visible.

Return type

TypeDescription
Promise < void >Method does not return a value

Example

This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.


// Called when the UI Extension starts
function OnNewShellUI(shellUI) {

// Wait for the ShellFrame to be created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
async (shellFrame) => {

// Wait for the shellframe to start
shellFrame.Events.Register(
MFiles.Event.Started,
async () => {

// Create a new custom command and menu item for the command
const createCommand = async ( name: string ) => {

// Create a new custom command
const commandId = await shellFrame.Commands.CreateCustomCommand(name);

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
// Command ID
commands.exampleCommand,
// Menulocation
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
// Priority of the command
1
);

// Return a data structure containing essential information about the commands
return {
id: commandId, // ID of the command
menuItemId // Menu item ID, can be used to add sub menus to this menu item.
}
}

// Create an Example command and a set of sample commands to control it's visibility
const commands = {
// This is the sample command
exampleCommand : await createCommand("Hello World"),

// These commands control the state of the example command
addCommand: await createCommand("Add Command To Menu"),
deleteCustomCommand: await createCommand("Delete Command")
hideCommand: await createCommand("Hide Command"),
showCommand: await createCommand("Activate Command"),
executeCommand: await createCommand("Execute Command"),
getCommandName: await createCommand("Get Name"),
getCommandState: await createCommand("Get Command State"),
removeCommandFromMenu: await createCommand("Remove From Menu"),
removeCommand: await createCommand("Remove Command")
}

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);

// Listen for the custom commands.
shellFrame.Commands.Events.Register(

// Listen for the CustomCommand events.
MFiles.Event.CustomCommand,

// Each command has ID and optional data provided with it.
( commandId, data ) => {
// Respond to the command if custom command sent by the application
switch( commandId ) {

// Run the Example command
case commands.exampleCommand.id:
shellFrame.ShowMessage( "Hello World!" );
break;

// Add the new menuitem which runs the example command
case commands.addCommand.id:
await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);
break;

// Removes the command from particular menu
case commands.removeCommandFromMenu.id:
await shellFrame.Commands.RemoveCustomCommandFromMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu
);
break;

// Deletes the command permanently
case commands.deleteCommand.id:
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Hiddes all command instances for specific command ID
case commands.hideCommand.id:
// Hide the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Hidden
);
break;

// Activates (makes visible) all command instances for specific command ID
case commands.showCommand.id:
// Show the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Get the command name
case commands.getCommandName.id:
const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);
shellFrame.ShowMessage( name );
break;

// Get the Command State
case commands.getCommandState.id:

// NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu
const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );
shellFrame.ShowMessage( `Command state: ${commandState}` );
break;

}
}
);
}
)
}
)
}

This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions.

- - +this method may affect context menu, application toolbar, menus or all of them.

Syntax

shellFrame.Commands.SetCommandState( 
commandId, // The ID of the command which state is to be changed
MFiles.CommandLocation.MainMenu, // The location in the UI where the command's state is being changed
MFiles.CommandState.CommandState_Hidden // New state of the command in specific location
);

Parameters

NameOptionalityTypeDescription
commandIdRequirednumberThe id of the target command. The id can represent either a
custom or a builtincommand. The builtin commands are enumerated by BuiltinCommand.
locationRequiredCommandLocationMenu location where the command state change takes place.
Use All to affect in all locations.
stateRequiredCommandStateThe new command state.

CommandLocation

Values for the location are

NameValueDescription
Undefined0Undefined value.
MainMenu1Specifies the command appearance in the main menus, such as top menu and command bars.
ContextMenu2Specifies the command appearance in the context menu.
ActivityContextMenu6Specifies the command appearance in the activity context menu.
TaskBar7Specifies the command appearance on task bar.
All268435455Refers to all command locations.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.

CommandState

Values for the state are

NameValueDescription
CommandState_Undefined0Undefined value.
CommandState_Active1The command is visible and enabled.
CommandState_Hidden3The command is not visible.

Return type

TypeDescription
Promise < void >Method does not return a value

Example

This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.


// Called when the UI Extension starts
function OnNewShellUI(shellUI) {

// Wait for the ShellFrame to be created.
shellUI.Events.Register(
MFiles.Event.NewShellFrame,
async (shellFrame) => {

// Wait for the shellframe to start
shellFrame.Events.Register(
MFiles.Event.Started,
async () => {

// Create a new custom command and menu item for the command
const createCommand = async ( name: string ) => {

// Create a new custom command
const commandId = await shellFrame.Commands.CreateCustomCommand(name);

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
// Command ID
commands.exampleCommand,
// Menulocation
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
// Priority of the command
1
);

// Return a data structure containing essential information about the commands
return {
id: commandId, // ID of the command
menuItemId // Menu item ID, can be used to add sub menus to this menu item.
}
}

// Create an Example command and a set of sample commands to control it's visibility
const commands = {
// This is the sample command
exampleCommand : await createCommand("Hello World"),

// These commands control the state of the example command
addCommand: await createCommand("Add Command To Menu"),
deleteCustomCommand: await createCommand("Delete Command")
hideCommand: await createCommand("Hide Command"),
showCommand: await createCommand("Activate Command"),
executeCommand: await createCommand("Execute Command"),
getCommandName: await createCommand("Get Name"),
getCommandState: await createCommand("Get Command State"),
removeCommandFromMenu: await createCommand("Remove From Menu"),
removeCommand: await createCommand("Remove Command")
}

// Add the command to the top menu
const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);

// Listen for the custom commands.
shellFrame.Commands.Events.Register(

// Listen for the CustomCommand events.
MFiles.Event.CustomCommand,

// Each command has ID and optional data provided with it.
( commandId, data ) => {
// Respond to the command if custom command sent by the application
switch( commandId ) {

// Run the Example command
case commands.exampleCommand.id:
shellFrame.ShowMessage( "Hello World!" );
break;

// Add the new menuitem which runs the example command
case commands.addCommand.id:
await shellFrame.Commands.AddCustomCommandToMenu(
commands.exampleCommand,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
1 // Priority of the command
);
break;

// Removes the command from particular menu
case commands.removeCommandFromMenu.id:
await shellFrame.Commands.RemoveCustomCommandFromMenu(
commands.exampleCommand,,
MFiles.MenuLocation.MenuLocation_TopPaneMenu
);
break;

// Deletes the command permanently
case commands.deleteCommand.id:
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Hiddes all command instances for specific command ID
case commands.hideCommand.id:
// Hide the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.CommandLocation.MainMenu,
MFiles.CommandState.CommandState_Hidden
);
break;

// Activates (makes visible) all command instances for specific command ID
case commands.showCommand.id:
// Show the command
shellFrame.Commands.SetCommandState(
commandId,
MFiles.MenuLocation.MenuLocation_TopPaneMenu,
MFiles.CommandState.CommandState_Active
);
break;

// Get the command name
case commands.getCommandName.id:
const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);
shellFrame.ShowMessage( name );
break;

// Get the Command State
case commands.getCommandState.id:

// NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu
const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );
shellFrame.ShowMessage( `Command state: ${commandState}` );
break;

}
}
);
}
)
}
)
}

This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions.

+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetIcon/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetIcon/index.html index e8705eb1f..2dc788259 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetIcon/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetIcon/index.html @@ -4,14 +4,13 @@ SetIcon | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

SetIcon

Description

Sets the icon for a custom command.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any -future release. Use of this feature is not recommended for production environments.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.SetIcon(
customCommand,
iconInformation,
);

Parameters

NameOptionalityTypeDescription
customCommandRequirednumberThe custom command id.
iconInformationRequiredIIconInformationThe icon information.

Return type

TypeDescription
Promise < void >
- - +
Skip to main content

SetIcon

Description

Sets the icon for a custom command.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.SetIcon(
customCommand,
iconInformation,
);

Parameters

NameOptionalityTypeDescription
customCommandRequirednumberThe custom command id.
iconInformationRequiredIIconInformationThe icon information.

Return type

TypeDescription
Promise < void >
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetMenuItemState/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetMenuItemState/index.html index 18a7fcee5..9c292da80 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetMenuItemState/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetMenuItemState/index.html @@ -4,13 +4,13 @@ SetMenuItemState | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index.html index f1dd26deb..5cafd2a1d 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index.html @@ -4,14 +4,13 @@ SetTaskbarGroupIcon | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

SetTaskbarGroupIcon

Description

Sets the icon for a custom task bar group.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any -future release. Use of this feature is not recommended for production environments.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.SetTaskbarGroupIcon(
groupId,
iconInformation,
);

Parameters

NameOptionalityTypeDescription
groupIdRequirednumberThe task bar group id.
iconInformationRequiredIIconInformationThe icon information.

Return type

TypeDescription
Promise < void >
- - +
Skip to main content

SetTaskbarGroupIcon

Description

Sets the icon for a custom task bar group.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.SetTaskbarGroupIcon(
groupId,
iconInformation,
);

Parameters

NameOptionalityTypeDescription
groupIdRequirednumberThe task bar group id.
iconInformationRequiredIIconInformationThe icon information.

Return type

TypeDescription
Promise < void >
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/index.html index 0bc87ef36..7f16cb317 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/index.html @@ -4,13 +4,13 @@ ICommands | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

ICommands

The Commands API includes functionality for creating Custom Commands and menus.

See the Samples for more examples of how to create custom commands and menus.

Properties

NameTypeDescription
EventsICommandsEventsReturns the event registering interface of the ICommands interface.

Methods

NameDescription
AddCustomCommandToMenuAdds existing custom command to the specified context menu location.
CreateCustomCommandCreates a custom command that can be added to the application toolbar or to the contextmenu.
CreateSubMenuItemCreates a new SubMenu for already created Menu.
CreateTaskbarGroupCreates new custom task bar group for custom commands.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.

NOTE: If multiple task bar groups are created for the same MenuLocation with the same
orderPriority, their relative ordering is unspecified and may vary between runs, sessions or
versions. Do not rely on a particular order for groups with equal priority — assign distinct
orderPriority values to guarantee a deterministic ordering (lower values are shown first).
DeleteCustomCommandDeletes a custom command. The command is automatically removed.
ExecuteCommandExecutes a user command.
GetCommandNameResolves the name that has been associated with the given command id.
GetCommandStateGets the command state for builtin or custom command in specified location.
GetMenuIdOfBuiltInCommandGets the MenuItem ID of a built-in command by its command ID and location.
RemoveCustomCommandFromMenuRemoves a custom command from the specified menu location.
RemoveMenuItemRemoves menuitem from the menu.
RemoveTaskbarGroupRemoves custom task bar group from the task bar.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
SetCommandStateSets the command's state to be hidden, visible, enabled or disabled. Calling
this method may affect context menu, application toolbar, menus or all of them.
SetIconSets the icon for a custom command.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
SetMenuItemStateSets the MenuItem state individually.
SetTaskbarGroupIconSets the icon for a custom task bar group.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any
future release. Use of this feature is not recommended for production environments.
- - +
Skip to main content

ICommands

The Commands API includes functionality for creating Custom Commands and menus.

See the Samples for more examples of how to create custom commands and menus.

Properties

NameTypeDescription
EventsICommandsEventsReturns the event registering interface of the ICommands interface.

Methods

NameDescription
AddCustomCommandToMenuAdds existing custom command to the specified context menu location.
CreateCustomCommandCreates a custom command that can be added to the application toolbar or to the contextmenu.
CreateSubMenuItemCreates a new SubMenu for already created Menu.
CreateTaskbarGroupCreates new custom task bar group for custom commands.

NOTE: If multiple task bar groups are created for the same MenuLocation with the same
orderPriority, their relative ordering is unspecified and may vary between runs, sessions or
versions. Do not rely on a particular order for groups with equal priority — assign distinct
orderPriority values to guarantee a deterministic ordering (lower values are shown first).
DeleteCustomCommandDeletes a custom command. The command is automatically removed.
ExecuteCommandExecutes a user command.
GetCommandNameResolves the name that has been associated with the given command id.
GetCommandStateGets the command state for builtin or custom command in specified location.
GetMenuIdOfBuiltInCommandGets the MenuItem ID of a built-in command by its command ID and location.
RemoveCustomCommandFromMenuRemoves a custom command from the specified menu location.
RemoveMenuItemRemoves menuitem from the menu.
RemoveTaskbarGroupRemoves custom task bar group from the task bar.
SetCommandStateSets the command's state to be hidden, visible, enabled or disabled. Calling
this method may affect context menu, application toolbar, menus or all of them.
SetIconSets the icon for a custom command.
SetMenuItemStateSets the MenuItem state individually.
SetTaskbarGroupIconSets the icon for a custom task bar group.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DeleteFromWebStorage/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DeleteFromWebStorage/index.html index a49651039..6ecebcbd0 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DeleteFromWebStorage/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DeleteFromWebStorage/index.html @@ -4,13 +4,13 @@ DeleteFromWebStorage | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

DeleteFromWebStorage

Description

Deletes the key value pair stored in the browser web storage for the given key.

Syntax

// Deletes a key from application specific storage.
MFiles.DeleteFromWebStorage(keyName);

Parameters

NameOptionalityTypeDescription
keyRequiredstringThe web storage key.

Return type

TypeDescription
Promise < void >Method does not return a value

Example

This sample demonstrates the use of M-Files API functions to interact with web storage: it writes "Sample Value" to storage with the key "testKey", reads it back, logs the value to the console, and finally deletes the entry from web storage.

note

Values written to web storage must be string values, because they are internally serialized into string values.


// Called when the UI Extension starts
async function OnNewShellUI(shellUI) {

// Write to web storage some value
await MFiles.WriteToWebStorage( "testKey", "Sample Value" );

// Read the value from the web storage
const storedValue = await MFiles.ReadFromWebStorage( "testKey" );

// Outputs: "Sample Value"
console.log( storedValue );

// Remove key from the storage.
await MFiles.DeleteFromWebStorage( "testKey" );

}
- - +
Skip to main content

DeleteFromWebStorage

Description

Deletes the key value pair stored in the browser web storage for the given key.

Syntax

// Deletes a key from application specific storage.
MFiles.DeleteFromWebStorage(keyName);

Parameters

NameOptionalityTypeDescription
keyRequiredstringThe web storage key.

Return type

TypeDescription
Promise < void >Method does not return a value

Example

This sample demonstrates the use of M-Files API functions to interact with web storage: it writes "Sample Value" to storage with the key "testKey", reads it back, logs the value to the console, and finally deletes the entry from web storage.

note

Values written to web storage must be string values, because they are internally serialized into string values.


// Called when the UI Extension starts
async function OnNewShellUI(shellUI) {

// Write to web storage some value
await MFiles.WriteToWebStorage( "testKey", "Sample Value" );

// Read the value from the web storage
const storedValue = await MFiles.ReadFromWebStorage( "testKey" );

// Outputs: "Sample Value"
console.log( storedValue );

// Remove key from the storage.
await MFiles.DeleteFromWebStorage( "testKey" );

}
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri/index.html new file mode 100644 index 000000000..ccfca7118 --- /dev/null +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri/index.html @@ -0,0 +1,18 @@ + + + + + +DownloadFileAsDataUri | M-Files User Interface Extensibility Framework + + + + +
+
Skip to main content

DownloadFileAsDataUri

Description

Downloads a file from an object as a base64-encoded data URI.

Retrieves the content of a specific file version from a vault object and returns it +as a data URI string with base64 encoding. This is useful for embedding file content +directly in HTML or passing file data as strings.

Files larger than 64MB are rejected to prevent memory exhaustion.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.DownloadFileAsDataUri(objVer, fileVer);

Parameters

NameOptionalityTypeDescription
objVerRequiredObjVerThe object version containing the file.
fileVerRequiredFileVerThe specific file version to download.

Return type

TypeDescription
Promise < string >Promise resolving to a data URI string (data:mime/type;base64,encodeddata).
+ + + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index.html index 0bbfc4ca0..fbb9bce07 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index.html @@ -4,13 +4,13 @@ GetAccentColor | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content
- - +
Skip to main content

GetAccentColor

Description

Gets accent color.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.GetAccentColor();

Return type

TypeDescription
Promise < string >The accent color configured by user.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLanguage/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLanguage/index.html index f2647f0a5..950e10562 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLanguage/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLanguage/index.html @@ -4,13 +4,13 @@ GetClientLanguage | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content
- - +
Skip to main content

GetClientLanguage

Description

Returns language code of current client language.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.GetClientLanguage();

Return type

TypeDescription
Promise < string >The language code of current client language.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLocale/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLocale/index.html index 260a245bd..f5976a21e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLocale/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLocale/index.html @@ -4,13 +4,13 @@ GetClientLocale | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content
- - +
Skip to main content

GetClientLocale

Description

Returns language code of current client locale.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.GetClientLocale();

Return type

TypeDescription
Promise < string >The language code of current client language.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetSessionInfo/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetSessionInfo/index.html index 6fc422c77..ff773ea7f 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetSessionInfo/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetSessionInfo/index.html @@ -4,13 +4,13 @@ GetSessionInfo | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetUTCOffset/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetUTCOffset/index.html index b7c4ae578..ac090b50e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetUTCOffset/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetUTCOffset/index.html @@ -4,13 +4,13 @@ GetUTCOffset | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content
- - +
Skip to main content

GetUTCOffset

Description

Gets server based UTC offset in minutes

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.GetUTCOffset();

Return type

TypeDescription
Promise < number >UTC offset in minutes
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetVaultInfo/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetVaultInfo/index.html index 3e865b773..af3f29197 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetVaultInfo/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetVaultInfo/index.html @@ -4,13 +4,13 @@ GetVaultInfo | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content
- - +
Skip to main content
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetWebLink/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetWebLink/index.html index 010f4236a..aaba44aa3 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetWebLink/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetWebLink/index.html @@ -4,13 +4,13 @@ GetWebLink | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

GetWebLink

Description

Get web link for an object.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.GetWebLink(
objId,
objGUID,
fileGUID,
fileID,
isLatestVersion,
version,
);

Parameters

NameOptionalityTypeDescription
objIdRequiredIObjIDThe target object to prepare link.
objGUIDRequiredstringObject GUID.
fileGUIDRequiredundefined | stringObject File GUID. - Optional
fileIDRequiredundefined | stringObject File GUID. - Optional
isLatestVersionRequiredbooleanIs the object to be viewed should be of the latest version.
versionRequirednumberIf it is not requested for latest version then specify the version no here.

Return type

TypeDescription
Promise < string >Navigation URL.
- - +
Skip to main content

GetWebLink

Description

Get web link for an object.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.GetWebLink(
objId,
objGUID,
fileGUID,
fileID,
isLatestVersion,
version,
);

Parameters

NameOptionalityTypeDescription
objIdRequiredIObjIDThe target object to prepare link.
objGUIDRequiredstringObject GUID.
fileGUIDRequiredundefined | stringObject File GUID. - Optional
fileIDRequiredundefined | stringObject File GUID. - Optional
isLatestVersionRequiredbooleanIs the object to be viewed should be of the latest version.
versionRequirednumberIf it is not requested for latest version then specify the version no here.

Return type

TypeDescription
Promise < string >Navigation URL.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/OpenExternalWebLink/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/OpenExternalWebLink/index.html index 285052916..d2913b7ce 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/OpenExternalWebLink/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/OpenExternalWebLink/index.html @@ -4,14 +4,14 @@ OpenExternalWebLink | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

OpenExternalWebLink

Description

Open external web link in a tab. +

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ReadFromWebStorage/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ReadFromWebStorage/index.html index a2fe3af52..9c13ece68 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ReadFromWebStorage/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ReadFromWebStorage/index.html @@ -4,13 +4,13 @@ ReadFromWebStorage | M-Files User Interface Extensibility Framework - - + +
-

ReadFromWebStorage

Description

Retrieves the value stored in the browser web storage for the given key.

Syntax

// Reads a key from application specific storage.
const value = await MFiles.ReadFromWebStorage(keyName);

Parameters

NameOptionalityTypeDescription
keyRequiredstringThe web storage key.

Return type

TypeDescription
Promise < string >The value as string stored in web storage for the given key.

Example

This sample demonstrates the use of M-Files API functions to interact with web storage: it writes "Sample Value" to storage with the key "testKey", reads it back, logs the value to the console, and finally deletes the entry from web storage.

note

Values written to web storage must be string values, because they are internally serialized into string values.


// Called when the UI Extension starts
async function OnNewShellUI(shellUI) {

// Write to web storage some value
await MFiles.WriteToWebStorage( "testKey", "Sample Value" );

// Read the value from the web storage
const storedValue = await MFiles.ReadFromWebStorage( "testKey" );

// Outputs: "Sample Value"
console.log( storedValue );

// Remove key from the storage.
await MFiles.DeleteFromWebStorage( "testKey" );

}
- - +

ReadFromWebStorage

Description

Retrieves the value stored in the browser web storage for the given key.

Syntax

// Reads a key from application specific storage.
const value = await MFiles.ReadFromWebStorage(keyName);

Parameters

NameOptionalityTypeDescription
keyRequiredstringThe web storage key.

Return type

TypeDescription
Promise < string >The value as string stored in web storage for the given key.

Example

This sample demonstrates the use of M-Files API functions to interact with web storage: it writes "Sample Value" to storage with the key "testKey", reads it back, logs the value to the console, and finally deletes the entry from web storage.

note

Values written to web storage must be string values, because they are internally serialized into string values.


// Called when the UI Extension starts
async function OnNewShellUI(shellUI) {

// Write to web storage some value
await MFiles.WriteToWebStorage( "testKey", "Sample Value" );

// Read the value from the web storage
const storedValue = await MFiles.ReadFromWebStorage( "testKey" );

// Outputs: "Sample Value"
console.log( storedValue );

// Remove key from the storage.
await MFiles.DeleteFromWebStorage( "testKey" );

}
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ReportException/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ReportException/index.html index ce810bdc7..bb877afc1 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ReportException/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ReportException/index.html @@ -4,13 +4,13 @@ ReportException | M-Files User Interface Extensibility Framework - - + +
-
- - +
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowEditObjectWindow/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowEditObjectWindow/index.html index 159463418..eea481e42 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowEditObjectWindow/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowEditObjectWindow/index.html @@ -4,13 +4,13 @@ ShowEditObjectWindow | M-Files User Interface Extensibility Framework - - + +
-

ShowEditObjectWindow

Description

Show object popup window to edit exist object.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.ShowEditObjectWindow(objVer, options);

Parameters

NameOptionalityTypeDescription
objVerRequiredObjVerThe ObjVer information which needs to be edited.
optionsRequiredDialogUIParamsTitle and UI options of the dashboard [Eg: title/isModal/isResizable/isDraggable].

Return type

TypeDescription
Promise < ObjectWindowResult >Promise which will resolve the object window result.
- - +

ShowEditObjectWindow

Description

Show object popup window to edit exist object.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.ShowEditObjectWindow(objVer, options);

Parameters

NameOptionalityTypeDescription
objVerRequiredObjVerThe ObjVer information which needs to be edited.
optionsRequiredDialogUIParamsTitle and UI options of the dashboard [Eg: title/isModal/isResizable/isDraggable].

Return type

TypeDescription
Promise < ObjectWindowResult >Promise which will resolve the object window result.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index.html index d2ea56189..3a8933a2f 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index.html @@ -4,13 +4,13 @@ ShowNewObjectWindow | M-Files User Interface Extensibility Framework - - + +
-

ShowNewObjectWindow

Description

Show new object creation window to create new object. New object can be created using prefil properties as well.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.ShowNewObjectWindow(
objectType,
objectCreationInfo,
prefillPropertyValues,
accessControlList,
options,
);

Parameters

NameOptionalityTypeDescription
objectTypeRequirednumberObject type id.
objectCreationInfoRequiredObjectCreationInfoThe ObjectCreationInfo specifying the initial state of the new metadata card.
prefillPropertyValuesRequiredArray < PropertyValue >PrefillPropertyValues is a collection of PropertyValue objects.
TODO: AccessControlList length is checked in the implementation, so should it be changed to array. Needs verifying. unit test breaks if changed to array.
accessControlListRequiredAccessControlListThe accessControlList represents an access control list (ACL).
optionsRequiredDialogUIParamsTitle and UI options of the dashboard [Eg: title/isModal/isResizable/isDraggable].

Return type

TypeDescription
Promise < ObjectWindowResult >Promise which will resolve the object window result.
- - +

ShowNewObjectWindow

Description

Show new object creation window to create new object. New object can be created using prefil properties as well.

Note: Multiple files are not supported in ObjectCreationInfo.source_files.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.ShowNewObjectWindow(
objectType,
objectCreationInfo,
prefillPropertyValues,
accessControlList,
options,
);

Parameters

NameOptionalityTypeDescription
objectTypeRequirednumberObject type id.
objectCreationInfoRequiredObjectCreationInfoThe ObjectCreationInfo specifying the initial state of the new metadata card.
prefillPropertyValuesRequiredArray < PropertyValue >PrefillPropertyValues is a collection of PropertyValue objects.
accessControlListRequiredAccessControlListThe accessControlList represents an access control list (ACL).
optionsRequiredDialogUIParamsTitle and UI options of the dashboard [Eg: title/isModal/isResizable/isDraggable].

Return type

TypeDescription
Promise < ObjectWindowResult >Promise which will resolve the object window result.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowToast/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowToast/index.html index cec60bebb..b5436ed7b 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowToast/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowToast/index.html @@ -4,13 +4,13 @@ ShowToast | M-Files User Interface Extensibility Framework - - + + - - +
Skip to main content
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles/index.html new file mode 100644 index 000000000..8e49c634b --- /dev/null +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles/index.html @@ -0,0 +1,21 @@ + + + + + +UploadTemporaryFiles | M-Files User Interface Extensibility Framework + + + + +
+
Skip to main content

UploadTemporaryFiles

Description

Uploads temporary files to the server and returns a file source which other operations +can use to access the uploaded files.

The uploaded files are temporary and will be automatically removed from the server +after a certain period of time. The caller should use the returned file source to +perform further operations with the uploaded files before they expire.

The method also handles duplicate detection and searchable PDF conversion if the features +are enabled. A user must interact with the dialogs and may cancel the upload process during these steps, +causing an error to be thrown.

Syntax

// ICommonFunctions is binded into the MFiles global object
const result = await MFiles.UploadTemporaryFiles(files);

Parameters

NameOptionalityTypeDescription
filesRequiredFileListThe files to upload.

Return type

TypeDescription
Promise < IObjFileSource >Source information of the uploaded temporary files.
+ + + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index.html index ca57ad67d..edce69e3c 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index.html @@ -4,13 +4,13 @@ WriteToWebStorage | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

WriteToWebStorage

Description

Writes the value in the browser web storage.

Syntax

// Writes a value for key "keyName" from application specific storage.
await MFiles.WriteToWebStorage( keyName, value );

Parameters

NameOptionalityTypeDescription
keyRequiredstringThe web storage key.
valueRequiredstringThe value.

Return type

TypeDescription
Promise < boolean >True / false based on the status.

Example

This sample demonstrates the use of M-Files API functions to interact with web storage: it writes "Sample Value" to storage with the key "testKey", reads it back, logs the value to the console, and finally deletes the entry from web storage.

note

Values written to web storage must be string values, because they are internally serialized into string values.


// Called when the UI Extension starts
async function OnNewShellUI(shellUI) {

// Write to web storage some value
await MFiles.WriteToWebStorage( "testKey", "Sample Value" );

// Read the value from the web storage
const storedValue = await MFiles.ReadFromWebStorage( "testKey" );

// Outputs: "Sample Value"
console.log( storedValue );

// Remove key from the storage.
await MFiles.DeleteFromWebStorage( "testKey" );

}
- - +
Skip to main content

WriteToWebStorage

Description

Writes the value in the browser web storage.

Syntax

// Writes a value for key "keyName" from application specific storage.
await MFiles.WriteToWebStorage( keyName, value );

Parameters

NameOptionalityTypeDescription
keyRequiredstringThe web storage key.
valueRequiredstringThe value.

Return type

TypeDescription
Promise < boolean >True / false based on the status.

Example

This sample demonstrates the use of M-Files API functions to interact with web storage: it writes "Sample Value" to storage with the key "testKey", reads it back, logs the value to the console, and finally deletes the entry from web storage.

note

Values written to web storage must be string values, because they are internally serialized into string values.


// Called when the UI Extension starts
async function OnNewShellUI(shellUI) {

// Write to web storage some value
await MFiles.WriteToWebStorage( "testKey", "Sample Value" );

// Read the value from the web storage
const storedValue = await MFiles.ReadFromWebStorage( "testKey" );

// Outputs: "Sample Value"
console.log( storedValue );

// Remove key from the storage.
await MFiles.DeleteFromWebStorage( "testKey" );

}
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/index.html index 8a133ea6e..0e3a04522 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/index.html @@ -4,13 +4,13 @@ ICommonFunctions | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

ICommonFunctions

Provides set of common functions for interacting with the environment. This interfaces is binded to the global MFiles object.

Example

// Save a key into webstorage
await MFiles.WriteToWebStorage("key", "value")

Properties

NameTypeDescription
AnonymousUserboolean
CurrentApplicationPlatformstring

Methods

NameDescription
DeleteFromWebStorageDeletes the key value pair stored in the browser web storage for the given key.
GetAccentColorGets accent color.
GetClientLanguageReturns language code of current client language.
GetClientLocaleReturns language code of current client locale.
GetSessionInfoGets the current NonSensitiveSessionData information.
GetUTCOffsetGets server based UTC offset in minutes
GetVaultInfoGets the current vault information.
GetWebLinkGet web link for an object.
OpenExternalWebLinkOpen external web link in a tab.
Note: This method only supports "http", "https" and "mailto" protocols.
ReadFromWebStorageRetrieves the value stored in the browser web storage for the given key.
ReportExceptionReports an exception. The exception can be displayed to the user or written to the event log.
ShowEditObjectWindowShow object popup window to edit exist object.
ShowNewObjectWindowShow new object creation window to create new object. New object can be created using prefil properties as well.
ShowToastShow toast message.
WriteToWebStorageWrites the value in the browser web storage.
- - +
Skip to main content

ICommonFunctions

Provides set of common functions for interacting with the environment. This interfaces is binded to the global MFiles object.

Example

// Save a key into webstorage
await MFiles.WriteToWebStorage("key", "value")

Properties

NameTypeDescription
AnonymousUserboolean
CurrentApplicationPlatformstring

Methods

NameDescription
DeleteFromWebStorageDeletes the key value pair stored in the browser web storage for the given key.
DownloadFileAsDataUriDownloads a file from an object as a base64-encoded data URI.

Retrieves the content of a specific file version from a vault object and returns it
as a data URI string with base64 encoding. This is useful for embedding file content
directly in HTML or passing file data as strings.

Files larger than 64MB are rejected to prevent memory exhaustion.
GetAccentColorGets accent color.
GetClientLanguageReturns language code of current client language.
GetClientLocaleReturns language code of current client locale.
GetSessionInfoGets the current NonSensitiveSessionData information.
GetUTCOffsetGets server based UTC offset in minutes
GetVaultInfoGets the current vault information.
GetWebLinkGet web link for an object.
OpenExternalWebLinkOpen external web link in a tab.
Note: This method only supports "http", "https" and "mailto" protocols.
ReadFromWebStorageRetrieves the value stored in the browser web storage for the given key.
ReportExceptionReports an exception. The exception can be displayed to the user or written to the event log.
ShowEditObjectWindowShow object popup window to edit exist object.
ShowNewObjectWindowShow new object creation window to create new object. New object can be created using prefil properties as well.

Note: Multiple files are not supported in ObjectCreationInfo.source_files.
ShowToastShow toast message.
UploadTemporaryFilesUploads temporary files to the server and returns a file source which other operations
can use to access the uploaded files.

The uploaded files are temporary and will be automatically removed from the server
after a certain period of time. The caller should use the returned file source to
perform further operations with the uploaded files before they expire.

The method also handles duplicate detection and searchable PDF conversion if the features
are enabled. A user must interact with the dialogs and may cancel the upload process during these steps,
causing an error to be thrown.
WriteToWebStorageWrites the value in the browser web storage.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/GetSandboxAttributes/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/GetSandboxAttributes/index.html index 87fbad2c1..14487b7b7 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/GetSandboxAttributes/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/GetSandboxAttributes/index.html @@ -4,13 +4,13 @@ GetSandboxAttributes | M-Files User Interface Extensibility Framework - - + +
Skip to main content

GetSandboxAttributes

Description

Gets the sandbox attributes for the specified dashboard.

Syntax

// The dashboard variable here points to instance of IDashboard
const result = await dashboard.GetSandboxAttributes(dashboardId);

Parameters

NameOptionalityTypeDescription
dashboardIdRequiredstring | numberThe ID of the dashboard.

Return type

TypeDescription
Promise < string >The sandbox attributes or undefined if not found.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/ShowMessage/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/ShowMessage/index.html index 169ccc569..7f5d3b748 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/ShowMessage/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/ShowMessage/index.html @@ -4,13 +4,13 @@ ShowMessage | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowMessage

Description

Shows the default M-Files message box with the specified content and appearance.

Syntax

// The dashboard variable here points to instance of IDashboard
const result = await dashboard.ShowMessage(message);

Parameters

NameOptionalityTypeDescription
messageRequiredstring | ShowMessageParamsMessage content to show.
String Type: The message to display. The message box contains single Ok button.
Object Type: Defines the message box content and buttons. See the M-Files UI Extensibility
framework User's Guide for more details.

Return type

TypeDescription
Promise < ShowMessageReturnValue >Structure indication which button was clicked.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/ShowPopupDashboard/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/ShowPopupDashboard/index.html index cd06e2195..b0528a27a 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/ShowPopupDashboard/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/ShowPopupDashboard/index.html @@ -4,13 +4,13 @@ ShowPopupDashboard | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowPopupDashboard

Description

Shows a dashboard in popup window.

Syntax

// The dashboard variable here points to instance of IDashboard
const result = await dashboard.ShowPopupDashboard(
dashboardID,
data,
titleOrOptions,
);

Parameters

NameOptionalityTypeDescription
dashboardIDRequiredstringThe dashboard ID as defined
in Application Definition File (appdef file).
dataRequiredanyThe custom data that is passed for dashboard.
Can be accessed with CustomDataProperty of IDashboard Interface.
titleOrOptionsRequiredstring | DialogUIParamsTitle and UI options of the dashboard.
String Type: Defines the title of the dashboard.
Object Type: Defines the title and other UI options [Eg: title/isModal/isResizable/isDraggable].

Return type

TypeDescription
Promise < IDashboard >The popup dashboard.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/UpdateCustomData/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/UpdateCustomData/index.html index 93a0ecf8a..c0d4002d0 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/UpdateCustomData/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/UpdateCustomData/index.html @@ -4,13 +4,13 @@ UpdateCustomData | M-Files User Interface Extensibility Framework - - + +
Skip to main content

UpdateCustomData

Description

Refreshes React metadata card content.

Syntax

// The dashboard variable here points to instance of IDashboard
await dashboard.UpdateCustomData(customData);

Parameters

NameOptionalityTypeDescription
customDataRequiredanyThe dashboard object's custom data.

Return type

TypeDescription
Promise < void >Method does not return a value

Example

The UpdateCustomData method can be used to send new custom data to an existing dashboard, without the dashboard needing to be completely reinitialized.

For this to work your dashboard must listen for the CustomDataChanged event:

function OnNewDashboard(dashboard) {
dashboard.Events.Register( MFiles.Event.CustomDataChanged, data => {
// Render the "timeNow" property from the custom data.
// Will be called automatically when the dashboard first renders, then
// every time the CustomDataChanged event is fired.
document.body.innerHTML = `<h1>${data.timeNow}</h1>`;
})
}

This event can then be raised from within another part of your code, for example from within a module:

"use strict";
async function OnNewShellUI(shellUI) {

// Wait for shell frames to be created.
await shellUI.Events.Register(MFiles.Event.NewNormalShellFrame, OnNewNormalShellFrame);

// Handler for shell frame created event.
async function OnNewNormalShellFrame(shellFrame)
{
await shellFrame.Events.Register(MFiles.Event.Started, OnStarted);
async function OnStarted()
{
const myTab = await shellFrame.RightPane.AddTab("my-test-tab", "My Dashboard", "_last");
const myDashboard = await myTab.ShowDashboard("mydb",
{
timeNow: "INITIAL_DATA, 5 second refresh interval!"
});

// Every 5 seconds call the UpdateCustomData method
// to raise the event that the dashboard subscribes to.
setInterval( () => {
myDashboard.UpdateCustomData({
timeNow: ( new Date() ).toISOString() // Pass the current time.
})
}, 5000)

myTab.Select();
}
}
}
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/WaitForClose/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/WaitForClose/index.html index 987385146..7ed95440d 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/WaitForClose/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/WaitForClose/index.html @@ -4,13 +4,13 @@ WaitForClose | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/index.html index 1ea13fbe3..c915e6485 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/index.html @@ -4,13 +4,13 @@ IDashboard | M-Files User Interface Extensibility Framework - - + +
Skip to main content

IDashboard

This is the programmatic interface of the Dashboard. It is created during the dashboard initialization phase.

Properties

NameTypeDescription
CustomDataanyReturns the dashboard object's custom data that was specified when the dashboard was opened.
EventsIDashboardEventsReturns the event registering interface of the IDashboard interface.
IsPopupDashboardbooleanIndicates whether the dashboard is opened in an own dialog
instead of the embedded panes (right pane or listing pane).
ShellFrameIShellFrameThe Shellframe for the dashboard.
Windowundefined | null | IWindowReturns the dashboard's underlying window object.

Methods

NameDescription
GetSandboxAttributesGets the sandbox attributes for the specified dashboard.
ShowMessageShows the default M-Files message box with the specified content and appearance.
ShowPopupDashboardShows a dashboard in popup window.
UpdateCustomDataRefreshes React metadata card content.
WaitForCloseWait for close dashboard.

Events

EventDescriptionArguments
RefreshTriggered when the Dashboard data is refreshed.
StartedSent when the Dashboard turns to started state.
StopSent before the Dashboard is stopped.
CustomDataChangedThis event is triggered, when custom data on dashboard has changed. The event can be
used to update the dashboard based on the new data. This event will fire at least
once when the dashboard is started and initialized.
data New custom data for the dashboard

Here is example of using the CustomDataChanged event:

dashboard.Events.Register(Event.CustomDataChanged, (data: any) => {
console.log("Custom data changed: ", data);
});
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/Register/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/Register/index.html index c13b85acc..ffbaaa18d 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/Register/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/Register/index.html @@ -4,13 +4,13 @@ Register | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Register

Description

Registers a handler object/function for handling the specified type of events.

Syntax

// The events interface is available under most objects
const result = await shellFrame.Events.Register(eventToListen, eventSink);

Parameters

NameOptionalityTypeDescription
eventToListenRequiredEventThe event type to handle.
eventSinkRequiredFunctionThe event sink to register.

Return type

TypeDescription
Promise < null | number >Returns handle to the registered event handler.
This handle can be used later to unregister the handler.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/Unregister/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/Unregister/index.html index 37c5a76f5..db4748182 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/Unregister/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/Unregister/index.html @@ -4,13 +4,13 @@ Unregister | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Unregister

Description

Unregisters the event handler.

Syntax

// The events interface is available under most objects
const result = await shellFrame.Events.Unregister(sinkHandle);

Parameters

NameOptionalityTypeDescription
sinkHandleRequirednumberThe handle that specifies the handler to unregister.
The handle is returned by Register method.

Return type

TypeDescription
Promise < boolean >This method returns nothing.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/index.html index d70aa5826..8c3d572db 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IEvents/index.html @@ -4,13 +4,13 @@ IEvents | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/GetOptions/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/GetOptions/index.html index b011d96dc..883e1f2c0 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/GetOptions/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/GetOptions/index.html @@ -4,13 +4,13 @@ GetOptions | M-Files User Interface Extensibility Framework - - + +
Skip to main content

GetOptions

Description

Gets the list of options to show in a specific section of the search UI.

Syntax

// searchPane points to instance of ISearchPane
const result = await searchPane.GetOptions(SectionID, useShortList);

Parameters

NameOptionalityTypeDescription
SectionIDRequiredstringThe ID of the section the items of which should be returned.
useShortListRequiredbooleanSpecifies if the list items should be returned in "short list" mode,
including only about five items.

Return type

TypeDescription
Promise < { options?: any; more?: boolean; controlDisabled?: boolean; controlExpanded?: boolean; useFullList?: boolean; items?: any; } >Receives an object with the properties "options" (array) and "more" (Boolean).
Each option object in the array has properties such as "name" (string) and "selected" (Boolean).
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/GetSearchCriteria/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/GetSearchCriteria/index.html index 777345dd5..da4854977 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/GetSearchCriteria/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/GetSearchCriteria/index.html @@ -4,13 +4,13 @@ GetSearchCriteria | M-Files User Interface Extensibility Framework - - + +
Skip to main content

GetSearchCriteria

Description

Get search criteria as Search conditions.

Syntax

// searchPane points to instance of ISearchPane
const result = await searchPane.GetSearchCriteria();

Return type

TypeDescription
Promise < SearchCriteria >Returns search conditions and facet filter if current view is Search View.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/IsSearchView/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/IsSearchView/index.html index 3a5910c91..8847e3725 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/IsSearchView/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/IsSearchView/index.html @@ -4,13 +4,13 @@ IsSearchView | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/SetOptionState/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/SetOptionState/index.html index ed2ddbab4..b64d73bb7 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/SetOptionState/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/SetOptionState/index.html @@ -4,13 +4,13 @@ SetOptionState | M-Files User Interface Extensibility Framework - - + +
Skip to main content

SetOptionState

Description

Sets the state of the specified option.

Syntax

// searchPane points to instance of ISearchPane
await searchPane.SetOptionState(SectionID, OptionID, state);

Parameters

NameOptionalityTypeDescription
SectionIDRequiredstringThe ID of the section.
OptionIDRequiredstringThe ID of the option to select/deselect.
Note that this is the ID of the option (as specified in the "id" property of the option), and NOT the array index of the option.
stateRequiredbooleanSpecifies the new state of the option (selected/deselected).

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/SetSearchCriteria/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/SetSearchCriteria/index.html index d3db6493c..b185c4271 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/SetSearchCriteria/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/SetSearchCriteria/index.html @@ -4,13 +4,13 @@ SetSearchCriteria | M-Files User Interface Extensibility Framework - - + +
Skip to main content

SetSearchCriteria

Description

Get search criteria as Search conditions.

Syntax

// searchPane points to instance of ISearchPane
await searchPane.SetSearchCriteria(criteria);

Parameters

NameOptionalityTypeDescription
criteriaRequiredSearchCriteriaSearch criteria containing conditions and facet filter.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/index.html index 2ace1bb81..a7fb8c0b6 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ISearchPane/index.html @@ -4,13 +4,13 @@ ISearchPane | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ISearchPane

Represents the area reserved for the Search component and is a property of IShellFrame

Properties

NameTypeDescription
AvailablebooleanResolves if the bar is available.Receives true if the side bar is available.
EventsISearchPaneEventsReturns the event registering interface for theISearchPane interface.
SearchWithinViewOptionVisibleboolean

Methods

NameDescription
GetOptionsGets the list of options to show in a specific section of the search UI.
GetSearchCriteriaGet search criteria as Search conditions.
IsSearchViewIs user is in search View.
SetOptionStateSets the state of the specified option.
SetSearchCriteriaGet search criteria as Search conditions.

Events

EventDescriptionArguments
StopSent before the Searchpane is closed.
StartedRegisters event handler for the Search pane started event, which means that the Search pane
is ready to be used.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/GetSandboxAttributes/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/GetSandboxAttributes/index.html index 8ee3f5408..ff9a06def 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/GetSandboxAttributes/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/GetSandboxAttributes/index.html @@ -4,13 +4,13 @@ GetSandboxAttributes | M-Files User Interface Extensibility Framework - - + +
Skip to main content

GetSandboxAttributes

Description

Gets the sandbox attributes for the specified Module.

Syntax

// shellFrame points to instance of IShellFrame
const result = await shellFrame.GetSandboxAttributes(dashboardId);

Parameters

NameOptionalityTypeDescription
dashboardIdRequiredstring | numberThe ID of the dashboard.

Return type

TypeDescription
Promise < string >The sandbox attributes or undefined if not found.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/GetViewsById/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/GetViewsById/index.html index b39bbbdef..c016774a3 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/GetViewsById/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/GetViewsById/index.html @@ -4,13 +4,13 @@ GetViewsById | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/IsFolderLocation/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/IsFolderLocation/index.html index 6f5f4f0ff..306454839 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/IsFolderLocation/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/IsFolderLocation/index.html @@ -4,15 +4,15 @@ IsFolderLocation | M-Files User Interface Extensibility Framework - - + +
Skip to main content

IsFolderLocation

Description

Resolves if the shell frame represents a normal folder location. For example it is a search folder or view, a property folder or traditional folder, but not an object folder.

Syntax

// shellFrame points to instance of IShellFrame
const result = await shellFrame.IsFolderLocation();

Return type

TypeDescription
Promise < boolean >The return value is true if the location represents a normal folder.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/IsObjectLocation/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/IsObjectLocation/index.html index f9e8d3f89..00dc436de 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/IsObjectLocation/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/IsObjectLocation/index.html @@ -4,13 +4,13 @@ IsObjectLocation | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToFolder/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToFolder/index.html index b561bc310..a1d91dc87 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToFolder/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToFolder/index.html @@ -4,13 +4,13 @@ NavigateToFolder | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToObject/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToObject/index.html index 555cbd4e9..6f5c37672 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToObject/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToObject/index.html @@ -4,13 +4,13 @@ NavigateToObject | M-Files User Interface Extensibility Framework - - + +
Skip to main content

NavigateToObject

Description

Navigate to the given object.

Syntax

// shellFrame points to instance of IShellFrame
await shellFrame.NavigateToObject(objId, newWindow, isLatestVersion, version);

Parameters

NameOptionalityTypeDescription
objIdRequiredObjIDThe object to be navigated to.
newWindowRequiredbooleanFlag to indicate if the navigation should happen in new window/tab.
isLatestVersionOptionalbooleanFlag to indicate if the latest version of the object should be navigated. Default is true.
versionOptionalnumberThe version of the object to be navigated. Default is -1.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToParent/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToParent/index.html index 3e180f3fd..35d8ad041 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToParent/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/NavigateToParent/index.html @@ -4,13 +4,13 @@ NavigateToParent | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowDashboard/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowDashboard/index.html index 969253a23..c13fd3866 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowDashboard/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowDashboard/index.html @@ -4,13 +4,13 @@ ShowDashboard | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowDashboard

Description

Changes the listing area to show a dashboard.

Syntax

// shellFrame points to instance of IShellFrame
const result = await shellFrame.ShowDashboard(dashboardID, data);

Parameters

NameOptionalityTypeDescription
dashboardIDRequiredstringThe ID of the dashboard to show.
dataRequiredanyCustom data passed to the dashboard.

Return type

TypeDescription
Promise < IDashboard >The dashboard shown in the listing area.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowDefaultContent/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowDefaultContent/index.html index 32c7fbc56..56502e127 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowDefaultContent/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowDefaultContent/index.html @@ -4,13 +4,13 @@ ShowDefaultContent | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowMessage/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowMessage/index.html index fd53b20f0..c2dc2677c 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowMessage/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowMessage/index.html @@ -4,13 +4,13 @@ ShowMessage | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowMessage

Description

Displays a modal message box.

Syntax

// shellFrame points to instance of IShellFrame
const result = await shellFrame.ShowMessage(message);

Parameters

NameOptionalityTypeDescription
messageRequiredstring | ShowMessageParamsString Type - The message to display. The message box contains single Ok button.
Object - Defines the message box content and buttons. Defines the message box content and buttons.

Return type

TypeDescription
Promise < ShowMessageReturnValue >Interface to indicate if checkbox was selected and which button was clicked.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowPopupDashboard/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowPopupDashboard/index.html index 5a3bf7f93..a01287729 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowPopupDashboard/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/ShowPopupDashboard/index.html @@ -4,13 +4,13 @@ ShowPopupDashboard | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowPopupDashboard

Description

Shows a dashboard in popup window.

Syntax

// shellFrame points to instance of IShellFrame
const result = await shellFrame.ShowPopupDashboard(
dashboardID,
data,
titleOrOptions,
);

Parameters

NameOptionalityTypeDescription
dashboardIDRequiredstringThe dashboard ID as defined in Application Definition File (appdef file).
dataRequiredanyThe custom data that is passed for dashboard.
Can be accessed with CustomDataProperty of IDashboard Interface.
titleOrOptionsOptionalundefined | string | DialogUIParamsTitle and UI options of the dashboard.
String Type: Defines the title of the dashboard.
Object Type: Defines the title and other UI options [Eg: title/isModal/isResizable/isDraggable].

Return type

TypeDescription
Promise < IDashboard >The popup dashboard.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/index.html index 5d75c7517..e72a58172 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellFrame/index.html @@ -4,13 +4,13 @@ IShellFrame | M-Files User Interface Extensibility Framework - - + +
Skip to main content

IShellFrame

The IShellFrame is a property of IDashboard.

It can also be retrieved from the IShellUI using the NewNormalShellFrame event.

shellUI.Events.Register(
MFiles.Event.NewNormalShellFrame,
(shellFrame) => {

}
)

Properties

NameTypeDescription
ActiveListingIShellListing
CommandsICommandsAccesses the commands of the shell frame.
CurrentFolderArray < Folder >
CurrentPathstring
CurrentUrlstring
EventsIShellFrameEventsReturns the event registering interface for the IShellFrame interface.
LeftPaneIShellPaneContainerAccesses the left panes of the shell frame.
ListingIShellListingAccesses the main listing object of the shell frame.
ParentFolderArray < Folder >
RightPaneIShellPaneContainerAccesses the right panes of the shell frame.
SearchPaneISearchPaneAccesses the search pane of the shell frame.
ShellUIIShellUIAccesses the parent shell UI object.

Methods

NameDescription
GetSandboxAttributesGets the sandbox attributes for the specified Module.
GetViewsByIdGets known views details as key pair value of <ViewID,View Details.>
IsFolderLocationResolves if the shell frame represents a normal folder location. For example it is
a search folder or view, a property folder or traditional folder, but not an
object folder.
IsObjectLocationResolves if the shell frame represents a object folder location.
NavigateToFolderNavigate to the given folder defs.
NavigateToObjectNavigate to the given object.
NavigateToParentPerforms navigation to the parent folder.
ShowDashboardChanges the listing area to show a dashboard.
ShowDefaultContentRestores the normal listing to the listing area.
ShowMessageDisplays a modal message box.
ShowPopupDashboardShows a dashboard in popup window.

Events

EventDescriptionArguments
StopSent before the IShellFrame is stopped.
StartedRegisters event handler for the IShellFrame started event, which means that the IShellFrame
is ready to be used. This event will trigger at least once for each registered callback
if the IShellFrame is already started and not yet stopped.
ViewLocationChangedRegisters event handler for the IShellFrame ViewLocationChanged event, which means that the view location has changed.
ViewLocationChangedAsyncRegisters event handler for the IShellFrame ViewLocationChangedAsync event, which means that the view location has changed.
NewCommandsRegisters event handler for the IShellFrame NewCommands event, which means that a new ICommands interface has been created and is ready to be used.
NewRightPaneRegisters event handler for the IShellFrame NewRightPane event, which means that a shell pane container is created for right shell pane.
NewShellListingRegisters event handler for the IShellFrame NewShellListing event, which means that a new shell listing object is created.newShellisting The new IShellListing object.
shellFrame.Events.Register(
Event.NewShellListing,
(newShellisting: IShellListing) => {
// Do something with the new shell listing object
},
);
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetFoldersCount/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetFoldersCount/index.html index e89e7ee0a..65ddc9655 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetFoldersCount/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetFoldersCount/index.html @@ -4,13 +4,13 @@ GetFoldersCount | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsAndProperties/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsAndProperties/index.html index 18ac65dc7..56f590d6d 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsAndProperties/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsAndProperties/index.html @@ -4,13 +4,13 @@ GetObjectVersionsAndProperties | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsCount/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsCount/index.html index 3add7127e..20350c883 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsCount/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsCount/index.html @@ -4,13 +4,13 @@ GetObjectVersionsCount | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/index.html index 3280ef41a..adeeeef28 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/index.html @@ -4,13 +4,13 @@ IShellItems | M-Files User Interface Extensibility Framework - - + +
Skip to main content

IShellItems

IShellItems represent a list of Objects in IShellListing, usually the current selection or list of all items in the view.

See the Overview chapter Listing View for more details how to operate the Listing View.

The ObjectVersions type is ObjectVersionEx.

Properties

NameTypeDescription
Countnumber
FoldersArray < IFolder >List of selected Folders
ObjectFilesArray < IObjectFile >List of selected Object Files
ObjectVersionsArray < IObjectVersionEx >List of selected Object Versions

Methods

NameDescription
GetFoldersCountGets the number of folders.
GetObjectVersionsAndPropertiesGets the object versions and properties for objects in listing.
GetObjectVersionsCountGets the number of object versions.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateListing/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateListing/index.html index 18c2692e8..ccadbf069 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateListing/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateListing/index.html @@ -4,13 +4,13 @@ ActivateListing | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateSelected/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateSelected/index.html index 57116634f..3eb3bab4c 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateSelected/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateSelected/index.html @@ -4,13 +4,13 @@ ActivateSelected | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddListingItem/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddListingItem/index.html index 6aeecf21b..c83ed15e2 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddListingItem/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddListingItem/index.html @@ -4,14 +4,14 @@ AddListingItem | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddObjectFile/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddObjectFile/index.html index 2123c42c3..02caa5167 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddObjectFile/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddObjectFile/index.html @@ -4,13 +4,16 @@ AddObjectFile | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

AddObjectFile

Description

Perform add file for MFD.

Syntax

// shellListing points to instance of IShellListing
await shellListing.AddObjectFile(
selectedObject,
fileToBeAdded,
dataURL,
dataURLName,
);

Parameters

NameOptionalityTypeDescription
selectedObjectRequiredISelectedFileSelected object info.
fileToBeAddedRequirednull | FileListInfo of file to be added. See
FileList from MDN
dataURLOptionalnull | stringData URL of the file to be added.
Only base64-encoded data URLs are supported and MIME-type is not optional.
Syntax should be: "data:[<media-type>][;base64],<data>".
dataURLNameOptionalnull | stringName of the file with the extension represented by the data URL.

Return type

TypeDescription
Promise < void >Method does not return a value
- - +
Skip to main content

AddObjectFile

Description

Perform add file for MFD.

If a data URL is provided it takes precedence and will be used as the added file +(overriding fileToBeAdded). Data URLs must be base64-encoded, include a MIME type and +the decoded payload must not exceed 64 MiB (67,108,864 bytes). When using a data URL you +must also provide dataURLName (filename for the decoded file).

Syntax

// shellListing points to instance of IShellListing
await shellListing.AddObjectFile(
selectedObject,
fileToBeAdded,
dataURL,
dataURLName,
);

Parameters

NameOptionalityTypeDescription
selectedObjectRequiredISelectedFileSelected object info.
fileToBeAddedRequirednull | FileListFile to add (ignored if dataURL provided). See
FileList from MDN
dataURLOptionalnull | stringOptional data URL (base64 + mime); overrides fileToBeAdded.
dataURLNameOptionalnull | stringFilename to use when dataURL is supplied (required with dataURL).

Return type

TypeDescription
Promise < void >Method does not return a value
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/GetFolderName/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/GetFolderName/index.html index c4956c58a..5d56676b1 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/GetFolderName/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/GetFolderName/index.html @@ -4,13 +4,13 @@ GetFolderName | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RefreshListing/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RefreshListing/index.html index 73df6811a..9d92cfb8e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RefreshListing/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RefreshListing/index.html @@ -4,13 +4,13 @@ RefreshListing | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RefreshObject/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RefreshObject/index.html index c02e3944f..bb0763100 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RefreshObject/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RefreshObject/index.html @@ -4,13 +4,13 @@ RefreshObject | M-Files User Interface Extensibility Framework - - + +
Skip to main content

RefreshObject

Description

Refreshes the specified object in the listing.

Syntax

// shellListing points to instance of IShellListing
const result = await shellListing.RefreshObject(
objID,
refreshFromServer,
updateRelatedObjects,
);

Parameters

NameOptionalityTypeDescription
objIDRequiredObjIDThe object to refresh.
refreshFromServerRequiredbooleanIf true, refreshes the data of the object from the server.
updateRelatedObjectsRequiredbooleanIf true, the related objects of the specified object are also updated.

Return type

TypeDescription
Promise < void >This method returns a promise that resolves when the refresh is complete.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RemoveListingItem/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RemoveListingItem/index.html index 2a950505e..02f22899e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RemoveListingItem/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RemoveListingItem/index.html @@ -4,14 +4,14 @@ RemoveListingItem | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ReplaceFile/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ReplaceFile/index.html index 8ede4bea1..6d919842d 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ReplaceFile/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ReplaceFile/index.html @@ -4,13 +4,16 @@ ReplaceFile | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

ReplaceFile

Description

Perform file replace.

Syntax

// shellListing points to instance of IShellListing
await shellListing.ReplaceFile(
selectedFileID,
selectedObject,
fileToBeReplaced,
dataURL,
dataURLName,
);

Parameters

NameOptionalityTypeDescription
selectedFileIDRequirednumberSelected file's ID.
selectedObjectRequiredISelectedFileSelected object info.
fileToBeReplacedRequirednull | FileListInfo of file to be replaced. See
https://developer.mozilla.org/en-US/docs/Web/API/FileList
dataURLOptionalnull | stringData URL of the file to be replaced.
Only base64-encoded data URLs are supported and MIME-type is not optional.
Syntax should be: "data:[<media-type>][;base64],<data>".
dataURLNameOptionalnull | stringName of the file with the extension represented by the data URL.

Return type

TypeDescription
Promise < void >Method does not return a value
- - +
Skip to main content

ReplaceFile

Description

Perform file replace.

If a data URL is provided it takes precedence and will be used as the replacement file +(overriding fileToBeReplaced). Data URLs must be base64-encoded, include a MIME type and +the decoded payload must not exceed 64 MiB (67,108,864 bytes). When using a data URL you +must also provide dataURLName (filename for the decoded file).

Syntax

// shellListing points to instance of IShellListing
await shellListing.ReplaceFile(
selectedFileID,
selectedObject,
fileToBeReplaced,
dataURL,
dataURLName,
);

Parameters

NameOptionalityTypeDescription
selectedFileIDRequirednumberSelected file's ID.
selectedObjectRequiredISelectedFileSelected object info.
fileToBeReplacedRequirednull | FileListFile to replace (ignored if dataURL provided). See
FileList from MDN
dataURLOptionalnull | stringOptional data URL (base64 + mime); overrides fileToBeReplaced.
dataURLNameOptionalnull | stringFilename to use when dataURL is supplied (required with dataURL).

Return type

TypeDescription
Promise < void >Method does not return a value
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectFolder/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectFolder/index.html index 97ffc23e4..533bc1ded 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectFolder/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectFolder/index.html @@ -4,13 +4,13 @@ SelectFolder | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextFolder/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextFolder/index.html index ff8bcb540..bee052a77 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextFolder/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextFolder/index.html @@ -4,13 +4,13 @@ SelectNextFolder | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextObject/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextObject/index.html index 0e5bd697f..4c512c5f9 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextObject/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextObject/index.html @@ -4,13 +4,13 @@ SelectNextObject | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextObjectFile/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextObjectFile/index.html index 7712c1e9f..f129f6101 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextObjectFile/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectNextObjectFile/index.html @@ -4,13 +4,13 @@ SelectNextObjectFile | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectFile/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectFile/index.html index 9ccd6ee11..c6584e986 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectFile/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectFile/index.html @@ -4,13 +4,13 @@ SelectObjectFile | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectOrObjectFileVersion/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectOrObjectFileVersion/index.html index 8cbad4a16..cfa0a31e1 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectOrObjectFileVersion/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectOrObjectFileVersion/index.html @@ -4,13 +4,13 @@ SelectObjectOrObjectFileVersion | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectVersion/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectVersion/index.html index 06f485ae4..c080f198e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectVersion/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectObjectVersion/index.html @@ -4,13 +4,13 @@ SelectObjectVersion | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevFolder/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevFolder/index.html index c670d4c27..93d719bb0 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevFolder/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevFolder/index.html @@ -4,13 +4,13 @@ SelectPrevFolder | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevObject/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevObject/index.html index fb545d9b9..ef3c22b31 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevObject/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevObject/index.html @@ -4,13 +4,13 @@ SelectPrevObject | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevObjectFile/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevObjectFile/index.html index 1073a5bcd..fd0259b28 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevObjectFile/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectPrevObjectFile/index.html @@ -4,13 +4,13 @@ SelectPrevObjectFile | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetFolderOrObjectVersionSelectionStates/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetFolderOrObjectVersionSelectionStates/index.html index 9f40980ee..8fb72f6bb 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetFolderOrObjectVersionSelectionStates/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetFolderOrObjectVersionSelectionStates/index.html @@ -4,13 +4,13 @@ SetFolderOrObjectVersionSelectionStates | M-Files User Interface Extensibility Framework - - + +
Skip to main content

SetFolderOrObjectVersionSelectionStates

Description

Selects or unselects both property folders and object versions.

Syntax

// shellListing points to instance of IShellListing
await shellListing.SetFolderOrObjectVersionSelectionStates(
folders,
objVers,
files,
select,
);

Parameters

NameOptionalityTypeDescription
foldersRequiredArray < Folder >FolderCollection to identify the property folders
to select or unselect.
objVersRequiredArray < ObjVer >Object versions to select or unselect.
filesRequiredArray < IObjectFile >Files to select or unselect.
selectRequiredbooleanTrue to select, false to unselect.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetFolderSelectionStates/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetFolderSelectionStates/index.html index 1fcdbbb88..172b6d8b2 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetFolderSelectionStates/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetFolderSelectionStates/index.html @@ -4,13 +4,13 @@ SetFolderSelectionStates | M-Files User Interface Extensibility Framework - - + +
Skip to main content

SetFolderSelectionStates

Description

Selects or unselects property folders.

Syntax

// shellListing points to instance of IShellListing
await shellListing.SetFolderSelectionStates(folders, select);

Parameters

NameOptionalityTypeDescription
foldersRequiredArray < IFolder >FolderCollection to identify the property folders
to select or unselect. Note:the array contains one IFolderDef item for each property
folder to select or unselect. It is not a path to single property folder.
selectRequiredbooleanTrue to select, false to unselect.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetObjectOrObjectFileVersionSelectionStates/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetObjectOrObjectFileVersionSelectionStates/index.html index 18c98da2e..e5fadd446 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetObjectOrObjectFileVersionSelectionStates/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetObjectOrObjectFileVersionSelectionStates/index.html @@ -4,13 +4,13 @@ SetObjectOrObjectFileVersionSelectionStates | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetObjectVersionSelectionStates/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetObjectVersionSelectionStates/index.html index db0e0d093..443010acc 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetObjectVersionSelectionStates/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetObjectVersionSelectionStates/index.html @@ -4,13 +4,13 @@ SetObjectVersionSelectionStates | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetVirtualSelection/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetVirtualSelection/index.html index 26ecdb380..b3817e9b2 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetVirtualSelection/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SetVirtualSelection/index.html @@ -4,14 +4,14 @@ SetVirtualSelection | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/UnselectAll/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/UnselectAll/index.html index e2e9145cd..f3bcfbd4e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/UnselectAll/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/UnselectAll/index.html @@ -4,13 +4,13 @@ UnselectAll | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/UpdateListingItem/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/UpdateListingItem/index.html index f1db01669..5479e6f9f 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/UpdateListingItem/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/UpdateListingItem/index.html @@ -4,14 +4,14 @@ UpdateListingItem | M-Files User Interface Extensibility Framework - - + +
Skip to main content

UpdateListingItem

Description

Update the items in the listing. It is a new method added for vNext.

Syntax

// shellListing points to instance of IShellListing
const result = await shellListing.UpdateListingItem(
oldObjVers,
newObjVers,
triggerCurrentSelection,
);

Parameters

NameOptionalityTypeDescription
oldObjVersRequiredArray < IObjectVersionEx > | Array < ObjVer >The old object versions.
newObjVersRequiredArray < IObjectVersionEx > | Array < ObjVer >The new object versions.
triggerCurrentSelectionOptionalbooleanTrue to trigger current selection event
without any condition. By default specify false or do not pass anything for this parameter.
Only for special cases like Follow/Unfollow object actions this parameter
should be passed as true.

Return type

TypeDescription
Promise < boolean >Return "true" if the action succeeds, otherwise "false".
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/index.html index 496d465be..95742c43a 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/index.html @@ -4,14 +4,14 @@ IShellListing | M-Files User Interface Extensibility Framework - - + +
Skip to main content

IShellListing

Instances of IShellListing represent the Objects inside the Listing View tree in the M-Files Client application UI. The interface -is available for example from ActiveListing property of IShellFrame.

See the Overview chapter Listing View for more details how to operate the object.

Properties

NameTypeDescription
CurrentPathstringGets the current location as a path.
CurrentSelectionIShellItems
EventsIShellListingEventsReturns the event registering interface of the IShellListing interface.
IsActivebooleanChecks if this listing window is currently the active listing window.
ItemsIShellItems

Methods

NameDescription
ActivateListingMakes this listing window the active listing in the shell frame.
ActivateSelectedPerforms the default action for currently selected item.
AddListingItemAdds a new item to the relevant listings.
It is a new method added for vNext.
AddObjectFilePerform add file for MFD.
RefreshListingRefreshes the current listing.
RefreshObjectRefreshes the specified object in the listing.
RemoveListingItemRemoves an item or items in an array from the listing.
It is a new method added for vNext.
ReplaceFilePerform file replace.
SelectFolderMoves the selection to the folder item.
SelectNextFolderMoves the current selection to the next folder item.
SelectNextObjectMoves the current selection to the next object (object version) item.
SelectNextObjectFileMoves the current selection to the next object file.
SelectObjectFileSelects the object (object version) item.
SelectObjectOrObjectFileVersionSelects object or file version in the listing window.
SelectObjectVersionSelects the object file item.
SelectPrevFolderMoves the current selection to the previous folder.
SelectPrevObjectMoves the current selection to the previous object (object version) item.
SelectPrevObjectFileMoves the current selection to the previous object file item.
SetFolderOrObjectVersionSelectionStatesSelects or unselects both property folders and object versions.
SetFolderSelectionStatesSelects or unselects property folders.
SetObjectOrObjectFileVersionSelectionStatesSelects or unselects objects or object files.
SetObjectVersionSelectionStatesSelects or unselects object versions.
SetVirtualSelectionOverrides the items selection with a virtual selection. Items should be valid objects, otherwise the method will throw an exception
and selection will not be changed.
UnselectAllUnselects the current selection.
UpdateListingItemUpdate the items in the listing.
It is a new method added for vNext.

Events

EventDescriptionArguments
StartedRegisters event handler for the IShellListingEvents started event.
StopRegisters event handler for the IShellListingEvents stopped event.
SelectionChangedRegisters event handler for the IShellListingEvents SelectionChanged event.
This event is triggered when the selection in the listing view is set, changed or removed.
shellItems Contains the selected items.
SelectNextObjectRegisters event handler for the IShellListingEvents SelectNextObject event. This event is triggered when the next object in the listing is selected.
SelectPreviousObjectRegisters event handler for the IShellListingEvents SelectPreviousObject event. This event is triggered when the previous object in the listing is selected.
SelectNextFolderRegisters event handler for the IShellListingEvents SelectNextFolder event. This event is triggered when the next folder in the listing is selected.folderType type of the folder, which have been selected.
SelectPreviousFolderRegisters event handler for the IShellListingEvents SelectPreviousFolder event. This event is triggered when the previous folder in the listing is selected.folderType type of the folder, which have been selected.
ListingDeactivatedRegisters event handler for the IShellListingEvents ListingDeactivated event.
This event is triggered when the listing object becomes inactive and loses the input focus.
shellListing The next active shell listing object. Can be null.
ListingActivatedRegisters event handler for the IShellListingEvents ListingActivated event.
This event is triggered when the listing object becomes active and receives the input focus.
shellListing The previous active shell listing object. Can be null.
ContentChangedRegisters event handler for the IShellListingEvents ContentChanged event.
This event is triggered when the current listing content is changed, or listed items are modified.
shellItems Contains all items in the listing.
ListItemAddedRegisters event handler for the IShellListingEvents ListItemAdded event. This event is triggered when one or more items are added to the listing.objectVersion Object
ListItemRemovedRegisters event handler for the IShellListingEvents ListItemRemoved event. This event is triggered when one or more items are removed from the listing.listItem Either an array of ObjectVersionEx if non-folder objects are removed or a single ObjectVersionEx, in case folder is removed.
removedExternalFolder In case folder was removed, include information about the old external folder item being removed in case of
ListItemModifiedRegisters event handler for the IShellListingEvents ListItemModified event.
This event is triggered when one or more of the items that are currently selected are modified.
oldServerObjVer Array of old object versions.
newObjVer Array of new objects.
SelectedItemsChangedRegisters event handler for the IShellListingEvents SelectedItemsChanged event.
This event is triggered when one or more of the items that are currently selected are modified.
shellItems Contains the selected items.
- - +is available for example from ActiveListing property of IShellFrame.

See the Overview chapter Listing View for more details how to operate the object.

Properties

NameTypeDescription
CurrentPathstringGets the current location as a path.
CurrentSelectionIShellItems
EventsIShellListingEventsReturns the event registering interface of the IShellListing interface.
IsActivebooleanChecks if this listing window is currently the active listing window.
ItemsIShellItems

Methods

NameDescription
ActivateListingMakes this listing window the active listing in the shell frame.
ActivateSelectedPerforms the default action for currently selected item.
AddListingItemAdds a new item to the relevant listings.
It is a new method added for vNext.
AddObjectFilePerform add file for MFD.

If a data URL is provided it takes precedence and will be used as the added file
(overriding fileToBeAdded). Data URLs must be base64-encoded, include a MIME type and
the decoded payload must not exceed 64 MiB (67,108,864 bytes). When using a data URL you
must also provide dataURLName (filename for the decoded file).
RefreshListingRefreshes the current listing.
RefreshObjectRefreshes the specified object in the listing.
RemoveListingItemRemoves an item or items in an array from the listing.
It is a new method added for vNext.
ReplaceFilePerform file replace.

If a data URL is provided it takes precedence and will be used as the replacement file
(overriding fileToBeReplaced). Data URLs must be base64-encoded, include a MIME type and
the decoded payload must not exceed 64 MiB (67,108,864 bytes). When using a data URL you
must also provide dataURLName (filename for the decoded file).
SelectFolderMoves the selection to the folder item.
SelectNextFolderMoves the current selection to the next folder item.
SelectNextObjectMoves the current selection to the next object (object version) item.
SelectNextObjectFileMoves the current selection to the next object file.
SelectObjectFileSelects the object (object version) item.
SelectObjectOrObjectFileVersionSelects object or file version in the listing window.
SelectObjectVersionSelects the object file item.
SelectPrevFolderMoves the current selection to the previous folder.
SelectPrevObjectMoves the current selection to the previous object (object version) item.
SelectPrevObjectFileMoves the current selection to the previous object file item.
SetFolderOrObjectVersionSelectionStatesSelects or unselects both property folders and object versions.
SetFolderSelectionStatesSelects or unselects property folders.
SetObjectOrObjectFileVersionSelectionStatesSelects or unselects objects or object files.
SetObjectVersionSelectionStatesSelects or unselects object versions.
SetVirtualSelectionOverrides the items selection with a virtual selection. Items should be valid objects, otherwise the method will throw an exception
and selection will not be changed.
UnselectAllUnselects the current selection.
UpdateListingItemUpdate the items in the listing.
It is a new method added for vNext.

Events

EventDescriptionArguments
StartedRegisters event handler for the IShellListingEvents started event.
StopRegisters event handler for the IShellListingEvents stopped event.
SelectionChangedRegisters event handler for the IShellListingEvents SelectionChanged event.
This event is triggered when the selection in the listing view is set, changed or removed.
shellItems Contains the selected items.
SelectNextObjectRegisters event handler for the IShellListingEvents SelectNextObject event. This event is triggered when the next object in the listing is selected.
SelectPreviousObjectRegisters event handler for the IShellListingEvents SelectPreviousObject event. This event is triggered when the previous object in the listing is selected.
SelectNextFolderRegisters event handler for the IShellListingEvents SelectNextFolder event. This event is triggered when the next folder in the listing is selected.folderType type of the folder, which have been selected.
SelectPreviousFolderRegisters event handler for the IShellListingEvents SelectPreviousFolder event. This event is triggered when the previous folder in the listing is selected.folderType type of the folder, which have been selected.
ListingDeactivatedRegisters event handler for the IShellListingEvents ListingDeactivated event.
This event is triggered when the listing object becomes inactive and loses the input focus.
shellListing The next active shell listing object. Can be null.
ListingActivatedRegisters event handler for the IShellListingEvents ListingActivated event.
This event is triggered when the listing object becomes active and receives the input focus.
shellListing The previous active shell listing object. Can be null.
ContentChangedRegisters event handler for the IShellListingEvents ContentChanged event.
This event is triggered when the current listing content is changed, or listed items are modified.
shellItems Contains all items in the listing.
ListItemAddedRegisters event handler for the IShellListingEvents ListItemAdded event. This event is triggered when one or more items are added to the listing.objectVersion Object
ListItemRemovedRegisters event handler for the IShellListingEvents ListItemRemoved event. This event is triggered when one or more items are removed from the listing.listItem Either an array of ObjectVersionEx if non-folder objects are removed or a single ObjectVersionEx, in case folder is removed.
removedExternalFolder In case folder was removed, include information about the old external folder item being removed in case of
ListItemModifiedRegisters event handler for the IShellListingEvents ListItemModified event.
This event is triggered when one or more of the items that are currently selected are modified.
oldServerObjVer Array of old object versions.
newObjVer Array of new objects.
SelectedItemsChangedRegisters event handler for the IShellListingEvents SelectedItemsChanged event.
This event is triggered when one or more of the items that are currently selected are modified.
shellItems Contains the selected items.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/AddTab/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/AddTab/index.html index 7546f428a..50f5141ee 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/AddTab/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/AddTab/index.html @@ -4,13 +4,13 @@ AddTab | M-Files User Interface Extensibility Framework - - + +
Skip to main content

AddTab

Description

Creates a new tab and adds it to the collection of tabs.

Syntax

// shellPaneContainer points to instance of IShellPaneContainer
const result = await shellPaneContainer.AddTab(
TabId,
tabTitle,
insertBeforeTabId,
icon,
);

Parameters

NameOptionalityTypeDescription
TabIdRequiredstringThe id of the new tab.
tabTitleRequiredstringThe title of the new tab.
insertBeforeTabIdRequiredstringThe id of the tab before which the new tab should be inserted.
iconRequiredstringHeader tab image name.
Can refer to built-in tab or another custom-created tab. See Using Tabs
in Shell Frame Side Pane Tabs for a list of built-in tab identifiers.

Return type

TypeDescription
Promise < null | IShellPaneTab >Returns the newly created tab, which is IShellPaneTab instance.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/GetSelectedTabs/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/GetSelectedTabs/index.html index 16a5f4c00..50a323ee2 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/GetSelectedTabs/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/GetSelectedTabs/index.html @@ -4,13 +4,13 @@ GetSelectedTabs | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/GetTab/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/GetTab/index.html index 63afa2d94..9483977b8 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/GetTab/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/GetTab/index.html @@ -4,13 +4,13 @@ GetTab | M-Files User Interface Extensibility Framework - - + +
Skip to main content

GetTab

Description

Gets the tab with the specified tab id.

Syntax

// shellPaneContainer points to instance of IShellPaneContainer
const result = await shellPaneContainer.GetTab(TabId);

Parameters

NameOptionalityTypeDescription
TabIdRequiredstringThe id of the tab to get. Can refer to built-in tab or another custom-created tab.
See Using Tabs in Shell Frame Side Pane Tabs for a list of built-in tab identifiers.

Return type

TypeDescription
Promise < IShellPaneTab >Returns the tab with the specified tab id.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/index.html index f12bf82c3..13a0de83c 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneContainer/index.html @@ -4,13 +4,13 @@ IShellPaneContainer | M-Files User Interface Extensibility Framework - - + +
Skip to main content

IShellPaneContainer

Represents an area of the screen which is reserved for displaying the dashboards. Usually a property of IShellFrame

Properties

NameTypeDescription
AvailablebooleanReturns a True / False if the panel is available.
EventsIShellPaneContainerEventsReturns the event registering interface for theIShellPaneContainer interface.
Minimizedboolean
ShellFrameIShellFrameReturns a reference to the IShellFrame which owns this IShellPaneContainer.
Sizenumber
Visibleboolean

Methods

NameDescription
AddTabCreates a new tab and adds it to the collection of tabs.
GetSelectedTabsGets the selected (active) tabs.
GetTabGets the tab with the specified tab id.

Events

EventDescriptionArguments
StopSent when the object turns to stopped state.
StartedSent when the object turns to started state.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Remove/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Remove/index.html index fd7b37e14..02a1d70fb 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Remove/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Remove/index.html @@ -4,13 +4,13 @@ Remove | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Select/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Select/index.html index 688110fb0..cdc540721 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Select/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Select/index.html @@ -4,13 +4,13 @@ Select | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/SetVisible/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/SetVisible/index.html index c058c981e..e65b9e42e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/SetVisible/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/SetVisible/index.html @@ -4,13 +4,13 @@ SetVisible | M-Files User Interface Extensibility Framework - - + +
Skip to main content

SetVisible

Description

Set the tab visibility

Syntax

// shellPaneTab points to instance of IShellPaneTab
await shellPaneTab.SetVisible(value);

Parameters

NameOptionalityTypeDescription
valueRequiredbooleanVisibility value

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/ShowDashboard/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/ShowDashboard/index.html index 831fdecc0..8d71aa184 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/ShowDashboard/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/ShowDashboard/index.html @@ -4,13 +4,13 @@ ShowDashboard | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowDashboard

Description

Shows the specified dashboard in the tab.

Syntax

// shellPaneTab points to instance of IShellPaneTab
const result = await shellPaneTab.ShowDashboard(dashboardID, data);

Parameters

NameOptionalityTypeDescription
dashboardIDRequiredstringThe dashboard ID. The dashboard ID is
specified in the application definition file (appdef file).
dataRequiredanyData object to pass for the HTML code. The data object
shows as CustomDataProperty of the dashboard object.

Return type

TypeDescription
Promise < null | IDashboard >Reference to the dashboard.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/ShowEmptyContent/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/ShowEmptyContent/index.html index 2bb747c76..9d83387c6 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/ShowEmptyContent/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/ShowEmptyContent/index.html @@ -4,13 +4,13 @@ ShowEmptyContent | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Unselect/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Unselect/index.html index d3f2d69f4..73360b3aa 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Unselect/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/Unselect/index.html @@ -4,13 +4,13 @@ Unselect | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/index.html index c8bd9cb70..7192fe288 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellPaneTab/index.html @@ -4,14 +4,14 @@ IShellPaneTab | M-Files User Interface Extensibility Framework - - + +
Skip to main content

IShellPaneTab

Tabs can be accessed using IShellPaneContainer methods like AddTab or GetTab. Usually Tab is used to open a Dashboard

Properties

NameTypeDescription
EventsIShellPaneTabEvents
IsBuiltInboolean
Selectedboolean
TabIdstring
Titlestring
Visibleboolean

Methods

NameDescription
RemoveRemoves the tab.
SelectRequests the tab to be selected.
SetVisibleSet the tab visibility
ShowDashboardShows the specified dashboard in the tab.
ShowEmptyContentClears the tab content area.
UnselectRequests the tab to be unselected.

Events

EventDescriptionArguments
StartedSent when the object turns to started state.
StopSent before the object is stopped.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/BroadcastMessage/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/BroadcastMessage/index.html index b2ddcecad..c84195055 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/BroadcastMessage/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/BroadcastMessage/index.html @@ -4,13 +4,13 @@ BroadcastMessage | M-Files User Interface Extensibility Framework - - + +
Skip to main content

BroadcastMessage

Description

Sends a synchronous broadcast message to all shellUI modules of all applications running in the current shellUI (main-window).

Syntax

// shellUI points to instance of IShellUI
await shellUI.BroadcastMessage(msgID, data);

Parameters

NameOptionalityTypeDescription
msgIDRequiredstringThe broadcast message ID for the listeners.
dataRequiredanyThe broadcast payload data.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetFileTypeIconURL/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetFileTypeIconURL/index.html index 3845acb63..aecc1b313 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetFileTypeIconURL/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetFileTypeIconURL/index.html @@ -4,13 +4,13 @@ GetFileTypeIconURL | M-Files User Interface Extensibility Framework - - + +
Skip to main content

GetFileTypeIconURL

Description

Returns the file type icon from the filename extension as data url.

Syntax

// shellUI points to instance of IShellUI
const result = await shellUI.GetFileTypeIconURL(fileName);

Parameters

NameOptionalityTypeDescription
fileNameRequiredstringName or extension of the file.

Return type

TypeDescription
Promise < string >URL of the icon.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetObjectTypeIconURL/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetObjectTypeIconURL/index.html index e7d569dab..595bd05a3 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetObjectTypeIconURL/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetObjectTypeIconURL/index.html @@ -4,13 +4,13 @@ GetObjectTypeIconURL | M-Files User Interface Extensibility Framework - - + +
Skip to main content

GetObjectTypeIconURL

Description

Gets the URL of the icon for the specified object type.

Syntax

// shellUI points to instance of IShellUI
const result = await shellUI.GetObjectTypeIconURL(objtype);

Parameters

NameOptionalityTypeDescription
objtypeRequirednumberObject type ID.

Return type

TypeDescription
Promise < string >the icon URL.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetValueListItemIconURL/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetValueListItemIconURL/index.html index f583d6d05..8ce67607d 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetValueListItemIconURL/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/GetValueListItemIconURL/index.html @@ -4,13 +4,13 @@ GetValueListItemIconURL | M-Files User Interface Extensibility Framework - - + +
Skip to main content

GetValueListItemIconURL

Description

Retrieves the URL of the icon associated with a specific value list item.

Syntax

// shellUI points to instance of IShellUI
const result = await shellUI.GetValueListItemIconURL(valuelist, valuelistItem);

Parameters

NameOptionalityTypeDescription
valuelistRequirednumberThe ID of the value list.
valuelistItemRequirednumberThe ID of the value list item.

Return type

TypeDescription
Promise < string >A promise that resolves to the icon URL if the item has an icon; otherwise, an empty string.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/NotifyApplication/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/NotifyApplication/index.html index cdd6d98d9..2d13a519b 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/NotifyApplication/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/NotifyApplication/index.html @@ -4,13 +4,13 @@ NotifyApplication | M-Files User Interface Extensibility Framework - - + +
Skip to main content

NotifyApplication

Description

Sends a synchronous notification message to all shellUI modules of a specific application running in the current shellUI (main-window).

Syntax

// shellUI points to instance of IShellUI
await shellUI.NotifyApplication(appGUID, msgID, data);

Parameters

NameOptionalityTypeDescription
appGUIDRequiredstringThe target application to broadcast the message to
msgIDRequiredstringThe broadcast message ID for the listeners.
dataRequiredanyThe broadcast payload data.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/ShowMessage/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/ShowMessage/index.html index 3969dc599..3c5e9ceca 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/ShowMessage/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/ShowMessage/index.html @@ -4,13 +4,13 @@ ShowMessage | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowMessage

Description

Shows the default M-Files message box with the specified content and appearance.

Syntax

// shellUI points to instance of IShellUI
const result = await shellUI.ShowMessage(message);

Parameters

NameOptionalityTypeDescription
messageRequiredstring | ShowMessageParamsMessage content to show.
String Type: The message to display. The message box contains single Ok button.
Object Type: - Defines the message box content and buttons.

Return type

TypeDescription
Promise < ShowMessageReturnValue >Returns the result of the button clicked by the user.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/ShowPopupDashboard/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/ShowPopupDashboard/index.html index 6235c6ddc..330e39aa7 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/ShowPopupDashboard/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/ShowPopupDashboard/index.html @@ -4,13 +4,13 @@ ShowPopupDashboard | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowPopupDashboard

Description

Shows a dashboard in a separate window.

Syntax

// shellUI points to instance of IShellUI
const result = await shellUI.ShowPopupDashboard(
dashboardID,
data,
titleOrOptions,
);

Parameters

NameOptionalityTypeDescription
dashboardIDRequiredstringThe id of the dashboard to show. The string id must match to one of the
dashboard ids in the application definition file (appdef file).
dataRequiredanyUser-defined data item that is passed to the new dashboard.
titleOrOptionsRequiredstring | DialogUIParamsTitle and UI options of the dashboard.
String Type: Defines the title of the dashboard.
Object Type: Defines the title and other UI options [Eg: title/isModal/isResizable/isDraggable].

Return type

TypeDescription
Promise < IDashboard >The popup dashboard.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/index.html index 6a7dcdf0c..fc4833631 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellUI/index.html @@ -4,13 +4,13 @@ IShellUI | M-Files User Interface Extensibility Framework - - + +
Skip to main content

IShellUI

The IShellUI is available for the Modules on the module startup event

The IShellUI is available for the Dashboards from the ShellFrame property of the IDashboard.

Properties

NameTypeDescription
EventsIShellUIEventsReturns the event registering interface of the IShellUI interface.
VaultIVaultReturns the logged-in M-Files server connection.

Methods

NameDescription
BroadcastMessageSends a synchronous broadcast message to all shellUI modules of all applications running in the current shellUI (main-window).
GetFileTypeIconURLReturns the file type icon from the filename extension as data url.
GetObjectTypeIconURLGets the URL of the icon for the specified object type.
GetValueListItemIconURLRetrieves the URL of the icon associated with a specific value list item.
NotifyApplicationSends a synchronous notification message to all shellUI modules of a specific application running in the current shellUI (main-window).
ShowMessageShows the default M-Files message box with the specified content and appearance.
ShowPopupDashboardShows a dashboard in a separate window.

Events

EventDescriptionArguments
StartedSent when the object turns to started state.
StopRegister event to listen for the stop event.
NewShellFrameRegister event handler for the NewShellFrame event. This event is triggered when any shell frame object is created,
including normal shell frames, common dialogs, and embedded or special shell frames.
shellFrame
NewNormalShellFrameRegister event handler for the NewNormalShellFrame event. This event is triggered when a normal shell frame object is created.
Note that this event is not triggered for common dialogs, or embedded or special shell frames.
shellFrame The new shell frame object.
CrossApplicationNotificationBroadcasted message to multiple applications.appGUID GUID of the target application, or null if broadcasted to all applications
msgId ID of the message which is sent to the other applications.
data Custom data to be sent.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/Close/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/Close/index.html index 79517b56f..8f47e566b 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/Close/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/Close/index.html @@ -4,13 +4,13 @@ Close | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/ResizeToDefaultSize/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/ResizeToDefaultSize/index.html index 03f292dd9..d5a151507 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/ResizeToDefaultSize/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/ResizeToDefaultSize/index.html @@ -4,13 +4,13 @@ ResizeToDefaultSize | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetCloseIconVisibility/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetCloseIconVisibility/index.html index fbf5ddcf1..348ccbf14 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetCloseIconVisibility/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetCloseIconVisibility/index.html @@ -4,13 +4,13 @@ SetCloseIconVisibility | M-Files User Interface Extensibility Framework - - + +
Skip to main content

SetCloseIconVisibility

Description

Sets the visibility of the Close button in the Window.

Syntax

// window points to instance of IWindow
await window.SetCloseIconVisibility(visible);

Parameters

NameOptionalityTypeDescription
visibleRequiredbooleanThe visibility of the close icon.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetDefaultSize/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetDefaultSize/index.html index 247d594c2..4cdc56542 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetDefaultSize/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetDefaultSize/index.html @@ -4,13 +4,13 @@ SetDefaultSize | M-Files User Interface Extensibility Framework - - + +
Skip to main content

SetDefaultSize

Description

Sets the default size of the window.

Syntax

// window points to instance of IWindow
await window.SetDefaultSize(width, height, resizeToDefault);

Parameters

NameOptionalityTypeDescription
widthRequirednumberThe default width size of the dialog.
heightRequirednumberThe default height dialog.
resizeToDefaultRequiredbooleanSpecify true to resize the window to the given default size.
If false, the default width and height are kept but resizing to these value is not done. By calling
ResizeToDefaultSize(), the window is resized to default width and height values.

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetSize/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetSize/index.html index 77a46eb3f..f3a32997b 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetSize/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetSize/index.html @@ -4,13 +4,13 @@ SetSize | M-Files User Interface Extensibility Framework - - + +
Skip to main content

SetSize

Description

Sets width and height of window

Syntax

// window points to instance of IWindow
await window.SetSize(width, height);

Parameters

NameOptionalityTypeDescription
widthRequirednumberNew width of window
heightRequirednumberNew height of window

Return type

TypeDescription
Promise < void >Method does not return a value
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetTitle/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetTitle/index.html index fb972395a..4ab42ae9a 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetTitle/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/SetTitle/index.html @@ -4,13 +4,13 @@ SetTitle | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/index.html index 3b90078a0..602d0540f 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IWindow/index.html @@ -4,13 +4,13 @@ IWindow | M-Files User Interface Extensibility Framework - - + +
Skip to main content

IWindow

Instance of IWindow is found from Window property of IDashboard when the Dashboard is created as a popup dashboard

Properties

NameTypeDescription
EventsIWindowEventsReturns the event registering interface for the IWindow interface.

Methods

NameDescription
CloseCloses the window. The close event is sent before the window is closed.
ResizeToDefaultSizeResize the window to the default size.
SetCloseIconVisibilitySets the visibility of the Close button in the Window.
SetDefaultSizeSets the default size of the window.
SetSizeSets width and height of window
SetTitleSets title of window

Events

EventDescriptionArguments
CloseWindowSent when the window is requested to closed.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/index.html index 2b24b3826..dd1eee80e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/index.html @@ -4,13 +4,13 @@ Interfaces | M-Files User Interface Extensibility Framework - - + +
Skip to main content

Interfaces

NameDescription
ICommandsICommands interface provides methods for managing user defined (custom) commands.
ICommonFunctionsICommonFunctions interface provides helper methods for M-Files API object creation, error handling and data persistency. This interface is accessible directly through the MFiles variable.
IDashboardIDashboard interface can be used from the dashboard's implementation. It enables access to the parent object and the underlying window. Also the access to the custom data that was passed to the dashboard when it was opened is provided.
IEventsIEvents interface allows explicit event handler registrations to be made. The alternative is to use the implicit mechanism by implementing the event handlers with pre-defined names e.g. Started -> OnStarted, Stop -> OnStop etc.
ISearchPaneISearchPane interface provides means to manage search pane visibility and to query its availability.
IShellFrameThe IShellFrame is the central interface that models the whole M-Files Shell. It provides access to all the other UI parts: listing, side panes, and search pane. It enables access to the custom commands creation interface.
IShellItemsIShellItems is an interface for accessing the content of M-Files Shell listing items. The set of all items currently visible in the listing are represented as an IShellItems as well as the set of currently selected items.
IShellListingThe IShellListing interface enables managing the listing in M-Files Shell. The items in the listing as well as the selection can be tracked and modified.
IShellPaneContainerIShellPaneContainer is a common interface for the embedded bottom pane and rightpane. The interface enables managing the pane content, size and visibility.
IShellPaneTabAn interface for managing a shell pane tab.
IShellUIThe IShellUI interface corresponds to the Windows Explorer window. It outlives the IShellFrame instances that get destroyed and re-created every time the folder or view is changed. IShellUI makes it possible to control the Windows explorer window, to show message boxes and dashboards so that the dashboards' parent object is not invalidated when navigating to a different view in the M-Files.
IWindowIWindow interface makes it possible to control dashboard's outer window objectwhen it has been opened as a popup.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/DialogUIParams/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/DialogUIParams/index.html index a623832ae..0d80df993 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/DialogUIParams/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/DialogUIParams/index.html @@ -4,13 +4,13 @@ DialogUIParams | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/Facet/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/Facet/index.html index 54cf3c1ab..af11ea2bd 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/Facet/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/Facet/index.html @@ -4,13 +4,13 @@ Facet | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetDefinition/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetDefinition/index.html index d160d435e..9e8ed35a2 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetDefinition/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetDefinition/index.html @@ -4,13 +4,13 @@ FacetDefinition | M-Files User Interface Extensibility Framework - - + +
Skip to main content

FacetDefinition

Description

Definition of Facet.

Properties

NameTypeDescription
aliasstringAlias for property definitions and object types.
exclude{ ids: number[]; }IDs to be excluded (valid for lookup values only).
idnumberID of property def, object type or value list.
objectTypenumberObject type, if type = VLOT.
ordinalnumberFacet ordinal. Order of the facet in UI.
rangeTypeFacetRangeTypeType of range facet ( applies for range facets only ).
rangeValuesstringValues of range.
showMorebooleanTrue to allow "Show more" link.
sortFieldstringFacet value sort field.
sortModestringFacet value sort mode.
transformationFacetTransformationFacet value transformation.
typeFacetTypeFacet type.
valueListnumberValue list ID, if type = VL.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetLookupValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetLookupValue/index.html index bc4df0a90..019cbb93a 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetLookupValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetLookupValue/index.html @@ -4,13 +4,13 @@ FacetLookupValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetNumericRangeValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetNumericRangeValue/index.html index 47f21837e..d15bf0075 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetNumericRangeValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetNumericRangeValue/index.html @@ -4,13 +4,13 @@ FacetNumericRangeValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetNumericValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetNumericValue/index.html index 7a5267a3a..ad69c2228 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetNumericValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetNumericValue/index.html @@ -4,13 +4,13 @@ FacetNumericValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetStringValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetStringValue/index.html index 5b7d0e8db..27d318961 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetStringValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetStringValue/index.html @@ -4,13 +4,13 @@ FacetStringValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetValue/index.html index 552814f6f..29f85aad1 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FacetValue/index.html @@ -4,13 +4,13 @@ FacetValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FtsScope/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FtsScope/index.html index 84ee032f7..37359d3a8 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FtsScope/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FtsScope/index.html @@ -4,14 +4,14 @@ FtsScope | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IIconInformation/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IIconInformation/index.html index 08843c648..2981958b9 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IIconInformation/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IIconInformation/index.html @@ -4,14 +4,13 @@ IIconInformation | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

IIconInformation

Description

Represents icon information for command icons.

NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any -future release. Use of this feature is not recommended for production environments.

Properties

NameTypeDescription
altstringAlt text for accessibility.
contentstring | BuiltInIconContent of the icon.
extensionstringExtension of the icon file ("svg", "png", "jpg", "jpeg", "ico").
This information must be provided if using BASE64 icon content type.
iconContentTypeIconContentTypeType of the icon content.
- - +
Skip to main content

IIconInformation

Description

Represents icon information for command icons.

Properties

NameTypeDescription
altstringAlt text for accessibility.
contentstring | BuiltInIconContent of the icon.
extensionstringExtension of the icon file ("svg", "png", "jpg", "jpeg", "ico").
This information must be provided if using BASE64 icon content type.
iconContentTypeIconContentTypeType of the icon content.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/INonSensitiveVaultData/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/INonSensitiveVaultData/index.html index 25e592b02..f470d8332 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/INonSensitiveVaultData/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/INonSensitiveVaultData/index.html @@ -4,13 +4,13 @@ INonSensitiveVaultData | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ISelectedFile/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ISelectedFile/index.html index c9f6bfcf4..996517380 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ISelectedFile/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ISelectedFile/index.html @@ -4,13 +4,13 @@ ISelectedFile | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IVaultInfo/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IVaultInfo/index.html index 1daba0d20..b1eb7e08f 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IVaultInfo/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IVaultInfo/index.html @@ -4,14 +4,14 @@ IVaultInfo | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IVaultInfoReturnValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IVaultInfoReturnValue/index.html index 7a9119e0a..799c0a802 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IVaultInfoReturnValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IVaultInfoReturnValue/index.html @@ -4,13 +4,13 @@ IVaultInfoReturnValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/LookupValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/LookupValue/index.html index ae244ec1f..ebdc3e607 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/LookupValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/LookupValue/index.html @@ -4,13 +4,13 @@ LookupValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/MFError/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/MFError/index.html index 16a1c646b..51a7280b3 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/MFError/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/MFError/index.html @@ -4,13 +4,13 @@ MFError | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NonSensitiveSessionData/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NonSensitiveSessionData/index.html index 2338fa63c..34c2bf381 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NonSensitiveSessionData/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NonSensitiveSessionData/index.html @@ -4,13 +4,13 @@ NonSensitiveSessionData | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NumericRangeValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NumericRangeValue/index.html index 917b057f9..cba7884f7 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NumericRangeValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NumericRangeValue/index.html @@ -4,13 +4,13 @@ NumericRangeValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NumericValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NumericValue/index.html index 0075c7939..68f5ddfba 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NumericValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/NumericValue/index.html @@ -4,13 +4,13 @@ NumericValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectCreationInfo/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectCreationInfo/index.html index 20e70231e..72819c42f 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectCreationInfo/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectCreationInfo/index.html @@ -4,13 +4,13 @@ ObjectCreationInfo | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ObjectCreationInfo

Description

The ObjectCreationInfo class is used for specifying the initial state of the new metadata card.

Properties

NameTypeDescription
check_in_immediately_enabledbooleanCheck-in immediately while object creation.
disallow_template_selectionbooleanSpecifies whether the template selection user interface can be shown.
extensionstringThe extension of the new object.
metadata_card_titlestringThe title for the metadata card.
object_typenull | numberThe object type for the new object
ok_to_all_button_visiblebooleanOK button visibility in the metadata card.
single_file_documentbooleanThe single file document creation.
skip_this_button_visiblebooleanSKIP button visiblity in the metadata card.
source_filesObjFileSourceInput files for object creation. It Can be object source files or template (blank/user defined).
titlestringAn initial object title.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFile/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFile/index.html index 74fb614e4..a2ab5d1b9 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFile/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFile/index.html @@ -4,13 +4,13 @@ ObjectFile | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ObjectFile

Description

The ObjectFile class extends the file and adds the parent information.

Properties

NameTypeDescription
accessed_at_utc{seconds: number nanos: number }
changed_at_utc{seconds: number nanos: number }
created_at_utc{seconds: number nanos: number }
extensionstring
file_verIFileVer
flagsIOBJECTFILEFLAGS
guidstring
is_content_volatileboolean
is_missingboolean
master_storage_file_refstring
md5_checksumstring
parentObjectVersionExThe parent object version info.
sizenumber
size_precisionFileSizePrecision
titlestring
written_at_utc{seconds: number nanos: number }
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFileVersionArgumentValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFileVersionArgumentValue/index.html index a1ebaa6e9..770b525ae 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFileVersionArgumentValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFileVersionArgumentValue/index.html @@ -4,13 +4,13 @@ ObjectFileVersionArgumentValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFileVersionParams/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFileVersionParams/index.html index 20fe894dc..bcd104b1d 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFileVersionParams/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectFileVersionParams/index.html @@ -4,13 +4,13 @@ ObjectFileVersionParams | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectWindowResult/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectWindowResult/index.html index 273953350..c2754bda7 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectWindowResult/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ObjectWindowResult/index.html @@ -4,13 +4,13 @@ ObjectWindowResult | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ObjectWindowResult

Description

The ObjectWindowResult class encapsulates the return values of showing the metadata card.

Properties

NameTypeDescription
aclAccessControlListReceives the access control list of the object.
object_versionnull | ObjectVersionExReceives the object version of the object after displaying the metadata card.
propertiesArray < IPropertyValue >Current property values of the object displayed in the metadata card.
result_codeanyThe dialog box result code.
visiblebooleanSpecifies whether the object is still visible for the current user.
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/SearchCriteria/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/SearchCriteria/index.html index 91f18a534..852cbdeae 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/SearchCriteria/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/SearchCriteria/index.html @@ -4,13 +4,13 @@ SearchCriteria | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShellframeFolders/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShellframeFolders/index.html index 2487528c6..2920be6d7 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShellframeFolders/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShellframeFolders/index.html @@ -4,13 +4,13 @@ ShellframeFolders | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageArgumentValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageArgumentValue/index.html index b9abeffbe..41ecfe03b 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageArgumentValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageArgumentValue/index.html @@ -4,13 +4,13 @@ ShowMessageArgumentValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowMessageArgumentValue

Description

Data structure returned by the ShowMessage call.

Properties

NameTypeDescription
button1_titlestringTitle for the button 1
button2_titlestringTitle for the button 2
button3_titlestringTitle for the button 3
checkbox_checkedbooleanShould the checkbox be initialized as checked ( default = false)
checkbox_titlestringLabel for the checkbox.
messagestringMessage to show
timeOutnumberTimeout for the dialog.
timeOutButtonnumberButton to select (1-3) after the timeout

Methods

NameDescription
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageParams/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageParams/index.html index a7ede19ba..38f3a52a8 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageParams/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageParams/index.html @@ -4,13 +4,13 @@ ShowMessageParams | M-Files User Interface Extensibility Framework - - + +
Skip to main content

ShowMessageParams

Description

Data structure returned by the ShowMessage call.

Properties

NameTypeDescription
button1_titlestringTitle for the button 1
button2_titlestringTitle for the button 2
button3_titlestringTitle for the button 3
checkbox_checkedbooleanShould the checkbox be initialized as checked ( default = false)
checkbox_titlestringLabel for the checkbox.
defaultButtonnumberDefault button to select (1-3).
messagestringMessage to show
timeOutnumberTimeout for the dialog.
timeOutButtonnumberButton to select (1-3) after the timeout
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageReturnValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageReturnValue/index.html index d245d78cd..6c3384a7e 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageReturnValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/ShowMessageReturnValue/index.html @@ -4,13 +4,13 @@ ShowMessageReturnValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/StringValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/StringValue/index.html index cab7e3472..b010b40a8 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/StringValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/StringValue/index.html @@ -4,13 +4,13 @@ StringValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/VaultInfoReturnValue/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/VaultInfoReturnValue/index.html index f0da48d47..036ca2248 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/VaultInfoReturnValue/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/VaultInfoReturnValue/index.html @@ -4,13 +4,13 @@ VaultInfoReturnValue | M-Files User Interface Extensibility Framework - - + +
Skip to main content
- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/index.html index 127079ce8..6ac726a0a 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/index.html @@ -4,13 +4,13 @@ Models | M-Files User Interface Extensibility Framework - - + +
-
Skip to main content

Models

NameDescription
ObjectCreationInfoThe ObjectCreationInfo class is used for specifying the initial state of the new metadata card.
ObjectFileThe ObjectFile class extends the file and adds the parent information.
ObjectWindowResultThe ObjectWindowResult class encapsulates the return values of showing the metadata card.
DialogUIParamsData structure for show popup dashboard UI params.
FacetSearch Facet.
FacetDefinitionDefinition of Facet.
FacetStringValueString Value type for Facet Value.
FacetNumericRangeValueNumeric Range Value for Facet Value.
FacetNumericValueFacet Numeric Value.
FacetLookupValueFacet Lookup based Value.
FacetValueFacet value.
FtsScopeFull text search scope interface. Metadata or file contents.
IIconInformationRepresents icon information for command icons. NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments.
ISelectedFileRepresents a selected file.
IVaultInfoIVaultInfo interface represents basic information about a vault. Includes the vault's name and GUID.
MFErrorDesktopError class that extends the Error class. this class is used for ReportException function.
INonSensitiveVaultDataData structure for the session information that does not contain sensitive data.
NonSensitiveSessionDataData structure for custom session data.
ObjectFileVersionParamsArgument for function SelectObjectOrObjectFileVersion
SearchCriteriaRepresents Search Criteria.
ShellframeFoldersArgument for the IShellFrame NavigateToFolder
ShowMessageParamsData structure returned by the ShowMessage call.
ShowMessageReturnValueData structure returned by the ShowMessage call.
- - +
Skip to main content

Models

NameDescription
ObjectCreationInfoThe ObjectCreationInfo class is used for specifying the initial state of the new metadata card.
ObjectFileThe ObjectFile class extends the file and adds the parent information.
ObjectWindowResultThe ObjectWindowResult class encapsulates the return values of showing the metadata card.
DialogUIParamsData structure for show popup dashboard UI params.
FacetSearch Facet.
FacetDefinitionDefinition of Facet.
FacetStringValueString Value type for Facet Value.
FacetNumericRangeValueNumeric Range Value for Facet Value.
FacetNumericValueFacet Numeric Value.
FacetLookupValueFacet Lookup based Value.
FacetValueFacet value.
FtsScopeFull text search scope interface. Metadata or file contents.
IIconInformationRepresents icon information for command icons.
ISelectedFileRepresents a selected file.
IVaultInfoIVaultInfo interface represents basic information about a vault. Includes the vault's name and GUID.
MFErrorDesktopError class that extends the Error class. this class is used for ReportException function.
INonSensitiveVaultDataData structure for the session information that does not contain sensitive data.
NonSensitiveSessionDataData structure for custom session data.
ObjectFileVersionParamsArgument for function SelectObjectOrObjectFileVersion
SearchCriteriaRepresents Search Criteria.
ShellframeFoldersArgument for the IShellFrame NavigateToFolder
ShowMessageParamsData structure returned by the ShowMessage call.
ShowMessageReturnValueData structure returned by the ShowMessage call.
+ + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/index.html b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/index.html index a368d4c17..7f5ab01c6 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/index.html +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/index.html @@ -4,13 +4,13 @@ API Reference Guide | M-Files User Interface Extensibility Framework - - + +
Skip to main content

API Reference Guide

The M-Files User Interface Extensibility Framework exposes a number of items that are used to interact with the user interface. Use the navigation on the left to view the various interfaces, enumerations, and events that are available to you.

The easiest way to use this section is to start from the pages under the Overview section on the left. These pages include links to the appropriate interfaces or other references that you need. As an example: the Modules page states that the "OnNewShellUI" method will be passed one argument which is an instance of IShellUI; clicking on the interface name will take you to a section which defines which properties or methods are available within that instance.

Note that many methods within the User Interface Extensibility Framework 2.0 are asynchronous. This is a change from the older User Interface Extensibility Framework approach. You can choose whether to use async functions (and the await keyword), or whether to use a Promise-style syntax, when calling these functions. Examples on this website typically use async functions.

- - + + \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0a4ea76a.f427f2f3.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0a4ea76a.f4f16340.js similarity index 92% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0a4ea76a.f427f2f3.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0a4ea76a.f4f16340.js index e3e93580f..126fc8034 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0a4ea76a.f427f2f3.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0a4ea76a.f4f16340.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[8975],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),i=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},c=function(e){var t=i(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,s=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),p=i(a),d=n,f=p["".concat(s,".").concat(d)]||p[d]||m[d]||l;return a?r.createElement(f,o(o({ref:t},c),{},{components:a})):r.createElement(f,o({ref:t},c))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,o=new Array(l);o[0]=d;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u[p]="string"==typeof e?e:n,o[1]=u;for(var i=2;i{a.d(t,{Z:()=>o});var r=a(67294),n=a(86010);const l={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:a,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,o),hidden:a},t)}},73992:(e,t,a)=>{a.d(t,{Z:()=>I});var r=a(87462),n=a(67294),l=a(86010),o=a(72957),u=a(16550),s=a(75238),i=a(33609),c=a(92560);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:r,default:n}}=e;return{value:t,label:a,attributes:r,default:n}}))}function m(e){const{values:t,children:a}=e;return(0,n.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,i.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const r=(0,u.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function y(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,l=m(e),[o,u]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=a.find((e=>e.default))??a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[s,i]=f({queryString:a,groupId:r}),[p,y]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(a);return[r,(0,n.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:r}),b=(()=>{const e=s??p;return d({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{b&&u(b)}),[b]);return{selectedValue:o,selectValue:(0,n.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);u(e),i(e),y(e)}),[i,y,l]),tabValues:l}}var b=a(51048);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function g(e){let{className:t,block:a,selectedValue:u,selectValue:s,tabValues:i}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),m=e=>{const t=e.currentTarget,a=c.indexOf(t),r=i[a].value;r!==u&&(p(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},i.map((e=>{let{value:t,label:a,attributes:o}=e;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},o,{className:(0,l.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":u===t})}),a??t)})))}function k(e){let{lazy:t,children:a,selectedValue:r}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=y(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},n.createElement(g,(0,r.Z)({},e,t)),n.createElement(k,(0,r.Z)({},e,t)))}function I(e){const t=(0,b.Z)();return n.createElement(v,(0,r.Z)({key:String(t)},e))}},36603:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>I,contentTitle:()=>k,default:()=>O,frontMatter:()=>g,metadata:()=>v,toc:()=>w});var r=a(87462),n=(a(67294),a(3905));const l={toc:[{value:"Example",id:"example",level:3}]},o="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(o,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Name"),(0,n.kt)("th",{parentName:"tr",align:null},"Description"),(0,n.kt)("th",{parentName:"tr",align:null},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"id")),(0,n.kt)("td",{parentName:"tr",align:null},"Receives the ID, or -1 if a match is not found or if more than one item uses the specified alias. For named ACLs, -1000 is returned if a match is not found or if more than one item uses the specified alias."),(0,n.kt)("td",{parentName:"tr",align:null},"number")))),(0,n.kt)("h3",{id:"example"},"Example"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-json"},'{\n "id": 0\n}\n')))}u.isMDXComponent=!0;const s={toc:[]},i="wrapper";function c(e){let{components:t,...a}=e;return(0,n.kt)(i,(0,r.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Name"),(0,n.kt)("th",{parentName:"tr",align:null},"Description"),(0,n.kt)("th",{parentName:"tr",align:null},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"item_type")),(0,n.kt)("td",{parentName:"tr",align:null},"Metadata structure item type."),(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("a",{parentName:"td",href:"/gRPC/Enums/MetadataStructureItem"},"MetadataStructureItem"))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"alias")),(0,n.kt)("td",{parentName:"tr",align:null},"Alias to look for (without any ';')."),(0,n.kt)("td",{parentName:"tr",align:null},"string")))))}c.isMDXComponent=!0;a(73992);var p=a(18679);const m={toc:[]},d="wrapper";function f(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"// Assumes shellUI has been initialized with IShellUI instance\nconst results =\n await shellUI.Vault.VaultOperations.GetMetadataStructureItemIdByAlias({\n item_type: 10000 /* Enum: MetadataStructureItem */,\n alias: \"\",\n });\n"))))}f.isMDXComponent=!0;const y={toc:[]},b="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(b,(0,r.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Gets metadata structure item ID by alias."))}h.isMDXComponent=!0;const g={},k="GetMetadataStructureItemIdByAlias",v={unversionedId:"gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/index",id:"gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/index",title:"GetMetadataStructureItemIdByAlias",description:"Syntax",source:"@site/docs/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/index.mdx",sourceDirName:"gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias",slug:"/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"VaultOperations",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/"},next:{title:"ViewsOperations",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/ViewsOperations/"}},I={},w=[{value:"Syntax",id:"syntax",level:2},{value:"Message",id:"message",level:2},{value:"Return type",id:"return-type",level:2}],N={toc:w},x="wrapper";function O(e){let{components:t,...a}=e;return(0,n.kt)(x,(0,r.Z)({},N,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"getmetadatastructureitemidbyalias"},"GetMetadataStructureItemIdByAlias"),(0,n.kt)(h,{components:a.components,mdxType:"Description"}),(0,n.kt)("h2",{id:"syntax"},"Syntax"),(0,n.kt)(f,{components:a.components,mdxType:"Syntax"}),(0,n.kt)("h2",{id:"message"},"Message"),(0,n.kt)(c,{components:a.components,mdxType:"Message"}),(0,n.kt)("h2",{id:"return-type"},"Return type"),(0,n.kt)(u,{components:a.components,mdxType:"Returns"}))}O.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[8975],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function o(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s=r.createContext({}),i=function(e){var t=r.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):o(o({},t),e)),a},c=function(e){var t=i(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,s=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),p=i(a),d=n,f=p["".concat(s,".").concat(d)]||p[d]||m[d]||l;return a?r.createElement(f,o(o({ref:t},c),{},{components:a})):r.createElement(f,o({ref:t},c))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,o=new Array(l);o[0]=d;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u[p]="string"==typeof e?e:n,o[1]=u;for(var i=2;i{a.d(t,{Z:()=>o});var r=a(67294),n=a(86010);const l={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:a,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,o),hidden:a},t)}},73992:(e,t,a)=>{a.d(t,{Z:()=>I});var r=a(87462),n=a(67294),l=a(86010),o=a(72957),u=a(16550),s=a(75238),i=a(33609),c=a(92560);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:r,default:n}}=e;return{value:t,label:a,attributes:r,default:n}}))}function m(e){const{values:t,children:a}=e;return(0,n.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,i.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const r=(0,u.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,s._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function y(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,l=m(e),[o,u]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=a.find((e=>e.default))??a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[s,i]=f({queryString:a,groupId:r}),[p,y]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(a);return[r,(0,n.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:r}),b=(()=>{const e=s??p;return d({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{b&&u(b)}),[b]);return{selectedValue:o,selectValue:(0,n.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);u(e),i(e),y(e)}),[i,y,l]),tabValues:l}}var b=a(51048);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function g(e){let{className:t,block:a,selectedValue:u,selectValue:s,tabValues:i}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),m=e=>{const t=e.currentTarget,a=c.indexOf(t),r=i[a].value;r!==u&&(p(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},i.map((e=>{let{value:t,label:a,attributes:o}=e;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},o,{className:(0,l.Z)("tabs__item",h.tabItem,o?.className,{"tabs__item--active":u===t})}),a??t)})))}function k(e){let{lazy:t,children:a,selectedValue:r}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=y(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",h.tabList)},n.createElement(g,(0,r.Z)({},e,t)),n.createElement(k,(0,r.Z)({},e,t)))}function I(e){const t=(0,b.Z)();return n.createElement(v,(0,r.Z)({key:String(t)},e))}},36603:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>I,contentTitle:()=>k,default:()=>O,frontMatter:()=>g,metadata:()=>v,toc:()=>w});var r=a(87462),n=(a(67294),a(3905));const l={toc:[{value:"Example",id:"example",level:3}]},o="wrapper";function u(e){let{components:t,...a}=e;return(0,n.kt)(o,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Name"),(0,n.kt)("th",{parentName:"tr",align:null},"Description"),(0,n.kt)("th",{parentName:"tr",align:null},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"id")),(0,n.kt)("td",{parentName:"tr",align:null},"Receives the ID, or -1 if a match is not found or if more than one item uses the specified alias. For named ACLs, -1000 is returned if a match is not found or if more than one item uses the specified alias."),(0,n.kt)("td",{parentName:"tr",align:null},"number")))),(0,n.kt)("h3",{id:"example"},"Example"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-json"},'{\n "id": 0\n}\n')))}u.isMDXComponent=!0;const s={toc:[]},i="wrapper";function c(e){let{components:t,...a}=e;return(0,n.kt)(i,(0,r.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Name"),(0,n.kt)("th",{parentName:"tr",align:null},"Description"),(0,n.kt)("th",{parentName:"tr",align:null},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"item_type")),(0,n.kt)("td",{parentName:"tr",align:null},"Metadata structure item type."),(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("a",{parentName:"td",href:"/gRPC/Enums/MetadataStructureItem"},"MetadataStructureItem"))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"alias")),(0,n.kt)("td",{parentName:"tr",align:null},"Alias to look for (without any ';')."),(0,n.kt)("td",{parentName:"tr",align:null},"string")))))}c.isMDXComponent=!0;a(73992);var p=a(18679);const m={toc:[]},d="wrapper";function f(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},"// Assumes shellUI has been initialized with IShellUI instance\nconst results =\n await shellUI.Vault.VaultOperations.GetMetadataStructureItemIdByAlias({\n item_type: 10000 /* Enum: MetadataStructureItem */,\n alias: \"\",\n });\n"))))}f.isMDXComponent=!0;const y={toc:[]},b="wrapper";function h(e){let{components:t,...a}=e;return(0,n.kt)(b,(0,r.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Gets metadata structure item ID by alias."))}h.isMDXComponent=!0;const g={},k="GetMetadataStructureItemIdByAlias",v={unversionedId:"gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/index",id:"gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/index",title:"GetMetadataStructureItemIdByAlias",description:"Syntax",source:"@site/docs/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/index.mdx",sourceDirName:"gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias",slug:"/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"VaultOperations",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/"},next:{title:"GetMetadataStructureItemIdByGUID",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByGUID/"}},I={},w=[{value:"Syntax",id:"syntax",level:2},{value:"Message",id:"message",level:2},{value:"Return type",id:"return-type",level:2}],N={toc:w},x="wrapper";function O(e){let{components:t,...a}=e;return(0,n.kt)(x,(0,r.Z)({},N,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"getmetadatastructureitemidbyalias"},"GetMetadataStructureItemIdByAlias"),(0,n.kt)(h,{components:a.components,mdxType:"Description"}),(0,n.kt)("h2",{id:"syntax"},"Syntax"),(0,n.kt)(f,{components:a.components,mdxType:"Syntax"}),(0,n.kt)("h2",{id:"message"},"Message"),(0,n.kt)(c,{components:a.components,mdxType:"Message"}),(0,n.kt)("h2",{id:"return-type"},"Return type"),(0,n.kt)(u,{components:a.components,mdxType:"Returns"}))}O.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0fbff9bf.0314ead7.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0fbff9bf.83766ccf.js similarity index 67% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0fbff9bf.0314ead7.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0fbff9bf.83766ccf.js index b472d3385..dc0e1e8cd 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0fbff9bf.0314ead7.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/0fbff9bf.83766ccf.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[3240],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=s(n),m=a,f=d["".concat(u,".").concat(m)]||d[m]||p[m]||l;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[d]="string"==typeof e?e:a,o[1]=i;for(var s=2;s{n.d(t,{Z:()=>o});var r=n(67294),a=n(86010);const l={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,o),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(87462),a=n(67294),l=n(86010),o=n(72957),i=n(16550),u=n(75238),s=n(33609),c=n(92560);function d(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,l=p(e),[o,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[u,s]=f({queryString:n,groupId:r}),[d,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:r}),y=(()=>{const e=u??d;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{y&&i(y)}),[y]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),s(e),b(e)}),[s,b,l]),tabValues:l}}var y=n(51048);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),r=s[n].value;r!==i&&(d(t),u(r))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:o}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},o,{className:(0,l.Z)("tabs__item",k.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function g(e){let{lazy:t,children:n,selectedValue:r}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",k.tabList)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(g,(0,r.Z)({},e,t)))}function N(e){const t=(0,y.Z)();return a.createElement(v,(0,r.Z)({key:String(t)},e))}},21285:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>N,contentTitle:()=>g,default:()=>O,frontMatter:()=>h,metadata:()=>v,toc:()=>I});var r=n(87462),a=(n(67294),n(3905));const l={toc:[]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(o,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < void >"),(0,a.kt)("td",{parentName:"tr",align:null},"Method does not return a value")))))}i.isMDXComponent=!0;const u={toc:[]},s="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"selectedObject"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/ISelectedFile/"},"ISelectedFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Selected object info.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"fileToBeAdded"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," FileList"),(0,a.kt)("td",{parentName:"tr",align:null},"Info of file to be added. See ",(0,a.kt)("br",null),(0,a.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/API/FileList"},"FileList from MDN"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"dataURL"),(0,a.kt)("td",{parentName:"tr",align:null},"Optional"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Data URL of the file to be added. ",(0,a.kt)("br",null),"Only base64-encoded data URLs are supported and MIME-type is not optional. ",(0,a.kt)("br",null),"Syntax should be: ",'"',"data:","[<","media-type",">][;base64]",",","<","data",">",'"',".")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"dataURLName"),(0,a.kt)("td",{parentName:"tr",align:null},"Optional"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Name of the file with the extension represented by the data URL.")))))}c.isMDXComponent=!0;n(73992);var d=n(18679);const p={toc:[]},m="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(d.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellListing points to instance of IShellListing\nawait shellListing.AddObjectFile(\n selectedObject,\n fileToBeAdded,\n dataURL,\n dataURLName,\n);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function k(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Perform add file for MFD."))}k.isMDXComponent=!0;const h={},g="AddObjectFile",v={unversionedId:"UIExt2/Interfaces/IShellListing/AddObjectFile/index",id:"UIExt2/Interfaces/IShellListing/AddObjectFile/index",title:"AddObjectFile",description:"Description",source:"@site/docs/UIExt2/Interfaces/IShellListing/AddObjectFile/index.mdx",sourceDirName:"UIExt2/Interfaces/IShellListing/AddObjectFile",slug:"/UIExt2/Interfaces/IShellListing/AddObjectFile/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddObjectFile/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"AddListingItem",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddListingItem/"},next:{title:"GetFolderName",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/GetFolderName/"}},N={},I=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],x={toc:I},w="wrapper";function O(e){let{components:t,...n}=e;return(0,a.kt)(w,(0,r.Z)({},x,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"addobjectfile"},"AddObjectFile"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(k,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(i,{components:n.components,mdxType:"Returns"}))}O.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[3240],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),d=s(n),m=a,f=d["".concat(u,".").concat(m)]||d[m]||p[m]||l;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[d]="string"==typeof e?e:a,o[1]=i;for(var s=2;s{n.d(t,{Z:()=>o});var r=n(67294),a=n(86010);const l={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,o),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(87462),a=n(67294),l=n(86010),o=n(72957),i=n(16550),u=n(75238),s=n(33609),c=n(92560);function d(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??d(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,l=p(e),[o,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[u,s]=f({queryString:n,groupId:r}),[d,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:r}),y=(()=>{const e=u??d;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{y&&i(y)}),[y]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),s(e),b(e)}),[s,b,l]),tabValues:l}}var y=n(51048);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function g(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),r=s[n].value;r!==i&&(d(t),u(r))},m=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:o}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:p},o,{className:(0,l.Z)("tabs__item",k.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function h(e){let{lazy:t,children:n,selectedValue:r}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",k.tabList)},a.createElement(g,(0,r.Z)({},e,t)),a.createElement(h,(0,r.Z)({},e,t)))}function N(e){const t=(0,y.Z)();return a.createElement(v,(0,r.Z)({key:String(t)},e))}},21285:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>N,contentTitle:()=>h,default:()=>O,frontMatter:()=>g,metadata:()=>v,toc:()=>I});var r=n(87462),a=(n(67294),n(3905));const l={toc:[]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(o,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < void >"),(0,a.kt)("td",{parentName:"tr",align:null},"Method does not return a value")))))}i.isMDXComponent=!0;const u={toc:[]},s="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"selectedObject"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/ISelectedFile/"},"ISelectedFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Selected object info.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"fileToBeAdded"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," FileList"),(0,a.kt)("td",{parentName:"tr",align:null},"File to add (ignored if dataURL provided). See ",(0,a.kt)("br",null),(0,a.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/API/FileList"},"FileList from MDN"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"dataURL"),(0,a.kt)("td",{parentName:"tr",align:null},"Optional"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Optional data URL (base64 + mime); overrides fileToBeAdded.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"dataURLName"),(0,a.kt)("td",{parentName:"tr",align:null},"Optional"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Filename to use when dataURL is supplied (required with dataURL).")))))}c.isMDXComponent=!0;n(73992);var d=n(18679);const p={toc:[]},m="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(d.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellListing points to instance of IShellListing\nawait shellListing.AddObjectFile(\n selectedObject,\n fileToBeAdded,\n dataURL,\n dataURLName,\n);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function k(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Perform add file for MFD."),(0,a.kt)("p",null,"If a data URL is provided it takes precedence and will be used as the added file\n(overriding fileToBeAdded). Data URLs must be base64-encoded, include a MIME type and\nthe decoded payload must not exceed 64 MiB (67,108,864 bytes). When using a data URL you\nmust also provide dataURLName (filename for the decoded file)."))}k.isMDXComponent=!0;const g={},h="AddObjectFile",v={unversionedId:"UIExt2/Interfaces/IShellListing/AddObjectFile/index",id:"UIExt2/Interfaces/IShellListing/AddObjectFile/index",title:"AddObjectFile",description:"Description",source:"@site/docs/UIExt2/Interfaces/IShellListing/AddObjectFile/index.mdx",sourceDirName:"UIExt2/Interfaces/IShellListing/AddObjectFile",slug:"/UIExt2/Interfaces/IShellListing/AddObjectFile/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddObjectFile/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"AddListingItem",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/AddListingItem/"},next:{title:"GetFolderName",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/GetFolderName/"}},N={},I=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],w={toc:I},x="wrapper";function O(e){let{components:t,...n}=e;return(0,a.kt)(x,(0,r.Z)({},w,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"addobjectfile"},"AddObjectFile"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(k,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(i,{components:n.components,mdxType:"Returns"}))}O.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/16c03ecb.fb8f09ef.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/16c03ecb.361ad3a6.js similarity index 62% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/16c03ecb.fb8f09ef.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/16c03ecb.361ad3a6.js index ba4e09b90..6477a5527 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/16c03ecb.fb8f09ef.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/16c03ecb.361ad3a6.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[9739],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var m=r.createContext({}),c=function(e){var t=r.useContext(m),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(m.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},s=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,m=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),s=a,f=u["".concat(m,".").concat(s)]||u[s]||d[s]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=s;var l={};for(var m in t)hasOwnProperty.call(t,m)&&(l[m]=t[m]);l.originalType=e,l[u]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.d(t,{ZP:()=>l});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,a.kt)(i,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Value"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Undefined")),(0,a.kt)("td",{parentName:"tr",align:null},"0"),(0,a.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"MainMenu")),(0,a.kt)("td",{parentName:"tr",align:null},"1"),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the main menus, such as top menu and command bars.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"ContextMenu")),(0,a.kt)("td",{parentName:"tr",align:null},"2"),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the context menu.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"ActivityContextMenu")),(0,a.kt)("td",{parentName:"tr",align:null},"6"),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the activity context menu.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"TaskBar")),(0,a.kt)("td",{parentName:"tr",align:null},"7"),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance on task bar. ",(0,a.kt)("br",null)," ",(0,a.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,a.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"All")),(0,a.kt)("td",{parentName:"tr",align:null},"268435455"),(0,a.kt)("td",{parentName:"tr",align:null},"Refers to all command locations. ",(0,a.kt)("br",null)," ",(0,a.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,a.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")))))}l.isMDXComponent=!0},43209:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>u,toc:()=>s});var r=n(87462),a=(n(67294),n(3905)),o=n(93986);const i={toc:[]},l="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The CommandLocation enumeration specifies the location for the M-Files command\nwhen it is displayed in the user interface. This enumeration is used in\nconjunction with the SetCommandState method."))}m.isMDXComponent=!0;const c={},p="CommandLocation",u={unversionedId:"UIExt2/Enums/CommandLocation/index",id:"UIExt2/Enums/CommandLocation/index",title:"CommandLocation",description:"",source:"@site/docs/UIExt2/Enums/CommandLocation/index.mdx",sourceDirName:"UIExt2/Enums/CommandLocation",slug:"/UIExt2/Enums/CommandLocation/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandLocation/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"BuiltinCommand",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltinCommand/"},next:{title:"CommandState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandState/"}},d={},s=[],f={toc:s},k="wrapper";function y(e){let{components:t,...n}=e;return(0,a.kt)(k,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"commandlocation"},"CommandLocation"),(0,a.kt)(m,{components:n.components,mdxType:"Description"}),(0,a.kt)(o.ZP,{components:n.components,mdxType:"Values"}))}y.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[9739],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var m=r.createContext({}),c=function(e){var t=r.useContext(m),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(m.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},s=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,m=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(n),s=a,f=u["".concat(m,".").concat(s)]||u[s]||d[s]||o;return n?r.createElement(f,i(i({ref:t},p),{},{components:n})):r.createElement(f,i({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=s;var l={};for(var m in t)hasOwnProperty.call(t,m)&&(l[m]=t[m]);l.originalType=e,l[u]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.d(t,{ZP:()=>l});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,a.kt)(i,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Value"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Undefined")),(0,a.kt)("td",{parentName:"tr",align:null},"0"),(0,a.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"MainMenu")),(0,a.kt)("td",{parentName:"tr",align:null},"1"),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the main menus, such as top menu and command bars.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"ContextMenu")),(0,a.kt)("td",{parentName:"tr",align:null},"2"),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the context menu.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"ActivityContextMenu")),(0,a.kt)("td",{parentName:"tr",align:null},"6"),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the activity context menu.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"TaskBar")),(0,a.kt)("td",{parentName:"tr",align:null},"7"),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance on task bar.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"All")),(0,a.kt)("td",{parentName:"tr",align:null},"268435455"),(0,a.kt)("td",{parentName:"tr",align:null},"Refers to all command locations. ",(0,a.kt)("br",null)," ",(0,a.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,a.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")))))}l.isMDXComponent=!0},43209:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>u,toc:()=>s});var r=n(87462),a=(n(67294),n(3905)),o=n(93986);const i={toc:[]},l="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"The CommandLocation enumeration specifies the location for the M-Files command\nwhen it is displayed in the user interface. This enumeration is used in\nconjunction with the SetCommandState method."))}m.isMDXComponent=!0;const c={},p="CommandLocation",u={unversionedId:"UIExt2/Enums/CommandLocation/index",id:"UIExt2/Enums/CommandLocation/index",title:"CommandLocation",description:"",source:"@site/docs/UIExt2/Enums/CommandLocation/index.mdx",sourceDirName:"UIExt2/Enums/CommandLocation",slug:"/UIExt2/Enums/CommandLocation/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandLocation/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"BuiltinCommand",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltinCommand/"},next:{title:"CommandState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/CommandState/"}},d={},s=[],f={toc:s},k="wrapper";function y(e){let{components:t,...n}=e;return(0,a.kt)(k,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"commandlocation"},"CommandLocation"),(0,a.kt)(m,{components:n.components,mdxType:"Description"}),(0,a.kt)(o.ZP,{components:n.components,mdxType:"Values"}))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/178dc7e6.0882943e.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/178dc7e6.c0f59aff.js similarity index 72% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/178dc7e6.0882943e.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/178dc7e6.c0f59aff.js index bc354a1ff..cf025008b 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/178dc7e6.0882943e.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/178dc7e6.c0f59aff.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[4149],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function m(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):m(m({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),c=s(n),p=o,h=c["".concat(l,".").concat(p)]||c[p]||u[p]||r;return n?a.createElement(h,m(m({ref:t},d),{},{components:n})):a.createElement(h,m({ref:t},d))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,m=new Array(r);m[0]=p;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:o,m[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>m,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>s});var a=n(87462),o=(n(67294),n(3905));n(47713),n(9826),n(45274);const r={sidebar_position:6},m="Working with the Shell Listing",i={unversionedId:"Overview/ListingView",id:"Overview/ListingView",title:"Working with the Shell Listing",description:"The Shell Listing represents the list of files, objects, views, groupings, or other content shown within the current object listing. Changes in the listing view affect various parts of the client. For example: when objects are selected or deselected the Preview and Metadata tabs display information about the selected object(s).",source:"@site/docs/Overview/ListingView.mdx",sourceDirName:"Overview",slug:"/Overview/ListingView",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ListingView",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"Using Custom Commands",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Commands"},next:{title:"Tabs",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Tabs"}},l={},s=[{value:"Observing the changes to Current Selection",id:"observing-the-changes-to-current-selection",level:3},{value:"Add New File to Multi Document Object",id:"add-new-file-to-multi-document-object",level:3},{value:"Replacing a File",id:"replacing-a-file",level:3},{value:"Selecting Next Object",id:"selecting-next-object",level:3},{value:"Selecting Previous Object",id:"selecting-previous-object",level:3}],d={toc:s},c="wrapper";function u(e){let{components:t,...n}=e;return(0,o.kt)(c,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"working-with-the-shell-listing"},"Working with the Shell Listing"),(0,o.kt)("p",null,"The ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/IShellListing/"},"Shell Listing")," represents the list of files, objects, views, groupings, or other content shown within the current object listing. Changes in the listing view affect various parts of the client. For example: when objects are selected or deselected the Preview and Metadata tabs display information about the selected object(s)."),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"ActiveListing")," is a property of ",(0,o.kt)("inlineCode",{parentName:"p"},"IShellFrame")," and there are two main events, which are fired when it changes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"MFiles.Event.NewShellListing")," is fired when a new listing is created, for example when user navigates to another view."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"MFiles.Event.SelectionChanged")," is fired when user makes a new selection in the active view, for example by clicking the object with mouse.")),(0,o.kt)("p",null,"All properties and methods of the listing are described in ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/IShellListing"},"IShellListing")," and properties and methods of the\nselected items are described in ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/IShellItems"},"IShellItems"),"."),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"ActiveListing")," has two properties which enumerate the items inside the Listing"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"items")," which is instance of ",(0,o.kt)("a",{parentName:"li",href:"../../UIExt2/Interfaces/IShellItems"},"IShellItems")," holds all items in the listing"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"CurrentSelection")," which is instance of ",(0,o.kt)("a",{parentName:"li",href:"../../UIExt2/Interfaces/IShellItems"},"IShellItems")," holds the user selected items")),(0,o.kt)("h3",{id:"observing-the-changes-to-current-selection"},"Observing the changes to Current Selection"),(0,o.kt)("p",null,"Current selection represents the user selected items from the Listing View."),(0,o.kt)("p",null,"To observe the selection changes of the active selection you can listen to ",(0,o.kt)("inlineCode",{parentName:"p"},"MFiles.Event.SelectionChanged")," event."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"\n// hold the current values \nconst state = {\n listing: null,\n selectedItems: null,\n selectionChangedEventId: 0\n}\n\n// Observe changes to the active view\nshellListing.Events.Register( \n MFiles.Event.NewShellListing,\n async (listing) => {\n\n // Before registering a new handler, unregister the previous event handler\n if( state.selectionChangedEventId ) {\n state.listing.Events.Unregister( currentSelection.selectionChangedEventId );\n state.selectionChangedEventId = 0;\n }\n\n // Save the old listing item so that we can unregister the event handler.\n state.listing = listing;\n\n // save the event handler id so that we can unregister if if the view changes.\n state.selectionChangedEventId = await listing.Events.Register(\n MFiles.Event.SelectionChanged,\n (items) => {\n // items is IShellItems instance holding the current selection\n\n // log number of selected items\n console.log( items.Count );\n\n // get the object verions and log the titles of the files\n const list = items.ObjectVersions || [];\n list.forEach( item => {\n console.log( item.object_version?.title );\n })\n }\n )\n\n }\n);\n\n")),(0,o.kt)("h3",{id:"add-new-file-to-multi-document-object"},"Add New File to Multi Document Object"),(0,o.kt)("p",null,"Here is a React example of how to add new file into a multi document object. The Example assumes ",(0,o.kt)("inlineCode",{parentName:"p"},"selectedItems")," has instance of IShellItems."),(0,o.kt)("h3",{id:"replacing-a-file"},"Replacing a File"),(0,o.kt)("p",null,"Here is a React example of how to replace a file into a normal document object. The Example assumes ",(0,o.kt)("inlineCode",{parentName:"p"},"selectedItems")," has instance of IShellItems."),(0,o.kt)("h3",{id:"selecting-next-object"},"Selecting Next Object"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"listing.SelectNextObject();\n")),(0,o.kt)("h3",{id:"selecting-previous-object"},"Selecting Previous Object"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"listing.SelectPrevObject();\n")))}u.isMDXComponent=!0},47713:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Value"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Undefined")),(0,o.kt)("td",{parentName:"tr",align:null},"0"),(0,o.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Active")),(0,o.kt)("td",{parentName:"tr",align:null},"1"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is visible and enabled.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Hidden")),(0,o.kt)("td",{parentName:"tr",align:null},"3"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is not visible.")))))}i.isMDXComponent=!0},9826:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"shellFrame.Commands.SetCommandState( \n commandId, // The ID of the command which state is to be changed\n MFiles.CommandLocation.MainMenu, // The location in the UI where the command's state is being changed\n MFiles.CommandState.CommandState_Hidden // New state of the command in specific location\n);\n")))}i.isMDXComponent=!0},45274:(e,t,n)=>{n(87462),n(67294),n(3905),n(7606),n(94642),n(37415),n(47713),n(9826)},37415:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,'This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.'),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'\n// Called when the UI Extension starts\nfunction OnNewShellUI(shellUI) {\n\n // Wait for the ShellFrame to be created.\n shellUI.Events.Register(\n MFiles.Event.NewShellFrame,\n async (shellFrame) => {\n\n // Wait for the shellframe to start\n shellFrame.Events.Register( \n MFiles.Event.Started,\n async () => {\n\n // Create a new custom command and menu item for the command\n const createCommand = async ( name: string ) => {\n\n // Create a new custom command\n const commandId = await shellFrame.Commands.CreateCustomCommand(name);\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n // Command ID\n commands.exampleCommand,\n // Menulocation\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n // Priority of the command\n 1 \n );\n\n // Return a data structure containing essential information about the commands\n return {\n id: commandId, // ID of the command\n menuItemId // Menu item ID, can be used to add sub menus to this menu item.\n }\n }\n\n // Create an Example command and a set of sample commands to control it\'s visibility\n const commands = {\n // This is the sample command\n exampleCommand : await createCommand("Hello World"),\n\n // These commands control the state of the example command\n addCommand: await createCommand("Add Command To Menu"),\n deleteCustomCommand: await createCommand("Delete Command")\n hideCommand: await createCommand("Hide Command"),\n showCommand: await createCommand("Activate Command"),\n executeCommand: await createCommand("Execute Command"),\n getCommandName: await createCommand("Get Name"),\n getCommandState: await createCommand("Get Command State"),\n removeCommandFromMenu: await createCommand("Remove From Menu"), \n removeCommand: await createCommand("Remove Command")\n }\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n\n // Listen for the custom commands.\n shellFrame.Commands.Events.Register(\n\n // Listen for the CustomCommand events.\n MFiles.Event.CustomCommand,\n\n // Each command has ID and optional data provided with it.\n ( commandId, data ) => {\n // Respond to the command if custom command sent by the application \n switch( commandId ) {\n\n // Run the Example command\n case commands.exampleCommand.id:\n shellFrame.ShowMessage( "Hello World!" );\n break;\n\n // Add the new menuitem which runs the example command\n case commands.addCommand.id:\n await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n break;\n\n // Removes the command from particular menu\n case commands.removeCommandFromMenu.id:\n await shellFrame.Commands.RemoveCustomCommandFromMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu\n );\n break;\n\n // Deletes the command permanently\n case commands.deleteCommand.id:\n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Hiddes all command instances for specific command ID\n case commands.hideCommand.id:\n // Hide the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Hidden\n );\n break;\n\n // Activates (makes visible) all command instances for specific command ID\n case commands.showCommand.id:\n // Show the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Get the command name\n case commands.getCommandName.id:\n const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);\n shellFrame.ShowMessage( name );\n break;\n\n // Get the Command State\n case commands.getCommandState.id:\n\n // NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu\n const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );\n shellFrame.ShowMessage( `Command state: ${commandState}` );\n break;\n\n }\n }\n );\n }\n )\n }\n )\n}\n')),(0,o.kt)("p",null,"This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions."))}i.isMDXComponent=!0},7606:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./AddCustomCommandToMenu/"},"AddCustomCommandToMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Adds existing custom command to the specified context menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateCustomCommand/"},"CreateCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a custom command that can be added to the application toolbar or to the contextmenu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateSubMenuItem/"},"CreateSubMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a new SubMenu for already created Menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateTaskbarGroup/"},"CreateTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates new custom task bar group for custom commands. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: If multiple task bar groups are created for the same MenuLocation with the same ",(0,o.kt)("br",null),"orderPriority, their relative ordering is unspecified and may vary between runs, sessions or ",(0,o.kt)("br",null),"versions. Do not rely on a particular order for groups with equal priority \u2014 assign distinct ",(0,o.kt)("br",null),"orderPriority values to guarantee a deterministic ordering (lower values are shown first).")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./DeleteCustomCommand/"},"DeleteCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Deletes a custom command. The command is automatically removed.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./ExecuteCommand/"},"ExecuteCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Executes a user command.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandName/"},"GetCommandName")),(0,o.kt)("td",{parentName:"tr",align:null},"Resolves the name that has been associated with the given command id.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandState/"},"GetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the command state for builtin or custom command in specified location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetMenuIdOfBuiltInCommand/"},"GetMenuIdOfBuiltInCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the MenuItem ID of a built-in command by its command ID and location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveCustomCommandFromMenu/"},"RemoveCustomCommandFromMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes a custom command from the specified menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveMenuItem/"},"RemoveMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes menuitem from the menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveTaskbarGroup/"},"RemoveTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes custom task bar group from the task bar. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetCommandState/"},"SetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the command's state to be hidden, visible, enabled or disabled. Calling ",(0,o.kt)("br",null),"this method may affect context menu, application toolbar, menus or all of them.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetIcon/"},"SetIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom command. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetMenuItemState/"},"SetMenuItemState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the MenuItem state individually.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetTaskbarGroupIcon/"},"SetTaskbarGroupIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom task bar group. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")))))}i.isMDXComponent=!0},94642:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Events"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"/UIExt2/Events/#icommandsevents"},"ICommandsEvents")),(0,o.kt)("td",{parentName:"tr",align:null},"Returns the event registering interface of the ICommands interface.")))))}i.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[4149],{3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>h});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function r(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),s=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):r(r({},t),e)),n},d=function(e){var t=s(e.components);return a.createElement(l.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,m=e.originalType,l=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),c=s(n),p=o,h=c["".concat(l,".").concat(p)]||c[p]||u[p]||m;return n?a.createElement(h,r(r({ref:t},d),{},{components:n})):a.createElement(h,r({ref:t},d))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var m=n.length,r=new Array(m);r[0]=p;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:o,r[1]=i;for(var s=2;s{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>u,frontMatter:()=>m,metadata:()=>i,toc:()=>s});var a=n(87462),o=(n(67294),n(3905));n(47713),n(9826),n(45274);const m={sidebar_position:6},r="Working with the Shell Listing",i={unversionedId:"Overview/ListingView",id:"Overview/ListingView",title:"Working with the Shell Listing",description:"The Shell Listing represents the list of files, objects, views, groupings, or other content shown within the current object listing. Changes in the listing view affect various parts of the client. For example: when objects are selected or deselected the Preview and Metadata tabs display information about the selected object(s).",source:"@site/docs/Overview/ListingView.mdx",sourceDirName:"Overview",slug:"/Overview/ListingView",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ListingView",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"Using Custom Commands",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Commands"},next:{title:"Tabs",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Tabs"}},l={},s=[{value:"Observing the changes to Current Selection",id:"observing-the-changes-to-current-selection",level:3},{value:"Add New File to Multi Document Object",id:"add-new-file-to-multi-document-object",level:3},{value:"Replacing a File",id:"replacing-a-file",level:3},{value:"Selecting Next Object",id:"selecting-next-object",level:3},{value:"Selecting Previous Object",id:"selecting-previous-object",level:3}],d={toc:s},c="wrapper";function u(e){let{components:t,...n}=e;return(0,o.kt)(c,(0,a.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"working-with-the-shell-listing"},"Working with the Shell Listing"),(0,o.kt)("p",null,"The ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/IShellListing/"},"Shell Listing")," represents the list of files, objects, views, groupings, or other content shown within the current object listing. Changes in the listing view affect various parts of the client. For example: when objects are selected or deselected the Preview and Metadata tabs display information about the selected object(s)."),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"ActiveListing")," is a property of ",(0,o.kt)("inlineCode",{parentName:"p"},"IShellFrame")," and there are two main events, which are fired when it changes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"MFiles.Event.NewShellListing")," is fired when a new listing is created, for example when user navigates to another view."),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"MFiles.Event.SelectionChanged")," is fired when user makes a new selection in the active view, for example by clicking the object with mouse.")),(0,o.kt)("p",null,"All properties and methods of the listing are described in ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/IShellListing"},"IShellListing")," and properties and methods of the\nselected items are described in ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/IShellItems"},"IShellItems"),"."),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"ActiveListing")," has two properties which enumerate the items inside the Listing"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"items")," which is instance of ",(0,o.kt)("a",{parentName:"li",href:"../../UIExt2/Interfaces/IShellItems"},"IShellItems")," holds all items in the listing"),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"CurrentSelection")," which is instance of ",(0,o.kt)("a",{parentName:"li",href:"../../UIExt2/Interfaces/IShellItems"},"IShellItems")," holds the user selected items")),(0,o.kt)("h3",{id:"observing-the-changes-to-current-selection"},"Observing the changes to Current Selection"),(0,o.kt)("p",null,"Current selection represents the user selected items from the Listing View."),(0,o.kt)("p",null,"To observe the selection changes of the active selection you can listen to ",(0,o.kt)("inlineCode",{parentName:"p"},"MFiles.Event.SelectionChanged")," event."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"\n// hold the current values \nconst state = {\n listing: null,\n selectedItems: null,\n selectionChangedEventId: 0\n}\n\n// Observe changes to the active view\nshellListing.Events.Register( \n MFiles.Event.NewShellListing,\n async (listing) => {\n\n // Before registering a new handler, unregister the previous event handler\n if( state.selectionChangedEventId ) {\n state.listing.Events.Unregister( currentSelection.selectionChangedEventId );\n state.selectionChangedEventId = 0;\n }\n\n // Save the old listing item so that we can unregister the event handler.\n state.listing = listing;\n\n // save the event handler id so that we can unregister if if the view changes.\n state.selectionChangedEventId = await listing.Events.Register(\n MFiles.Event.SelectionChanged,\n (items) => {\n // items is IShellItems instance holding the current selection\n\n // log number of selected items\n console.log( items.Count );\n\n // get the object verions and log the titles of the files\n const list = items.ObjectVersions || [];\n list.forEach( item => {\n console.log( item.object_version?.title );\n })\n }\n )\n\n }\n);\n\n")),(0,o.kt)("h3",{id:"add-new-file-to-multi-document-object"},"Add New File to Multi Document Object"),(0,o.kt)("p",null,"Here is a React example of how to add new file into a multi document object. The Example assumes ",(0,o.kt)("inlineCode",{parentName:"p"},"selectedItems")," has instance of IShellItems."),(0,o.kt)("h3",{id:"replacing-a-file"},"Replacing a File"),(0,o.kt)("p",null,"Here is a React example of how to replace a file into a normal document object. The Example assumes ",(0,o.kt)("inlineCode",{parentName:"p"},"selectedItems")," has instance of IShellItems."),(0,o.kt)("h3",{id:"selecting-next-object"},"Selecting Next Object"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"listing.SelectNextObject();\n")),(0,o.kt)("h3",{id:"selecting-previous-object"},"Selecting Previous Object"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"listing.SelectPrevObject();\n")))}u.isMDXComponent=!0},47713:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const m={toc:[]},r="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(r,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Value"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Undefined")),(0,o.kt)("td",{parentName:"tr",align:null},"0"),(0,o.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Active")),(0,o.kt)("td",{parentName:"tr",align:null},"1"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is visible and enabled.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Hidden")),(0,o.kt)("td",{parentName:"tr",align:null},"3"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is not visible.")))))}i.isMDXComponent=!0},9826:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const m={toc:[]},r="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(r,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"shellFrame.Commands.SetCommandState( \n commandId, // The ID of the command which state is to be changed\n MFiles.CommandLocation.MainMenu, // The location in the UI where the command's state is being changed\n MFiles.CommandState.CommandState_Hidden // New state of the command in specific location\n);\n")))}i.isMDXComponent=!0},45274:(e,t,n)=>{n(87462),n(67294),n(3905),n(7606),n(94642),n(37415),n(47713),n(9826)},37415:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const m={toc:[]},r="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(r,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,'This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.'),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'\n// Called when the UI Extension starts\nfunction OnNewShellUI(shellUI) {\n\n // Wait for the ShellFrame to be created.\n shellUI.Events.Register(\n MFiles.Event.NewShellFrame,\n async (shellFrame) => {\n\n // Wait for the shellframe to start\n shellFrame.Events.Register( \n MFiles.Event.Started,\n async () => {\n\n // Create a new custom command and menu item for the command\n const createCommand = async ( name: string ) => {\n\n // Create a new custom command\n const commandId = await shellFrame.Commands.CreateCustomCommand(name);\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n // Command ID\n commands.exampleCommand,\n // Menulocation\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n // Priority of the command\n 1 \n );\n\n // Return a data structure containing essential information about the commands\n return {\n id: commandId, // ID of the command\n menuItemId // Menu item ID, can be used to add sub menus to this menu item.\n }\n }\n\n // Create an Example command and a set of sample commands to control it\'s visibility\n const commands = {\n // This is the sample command\n exampleCommand : await createCommand("Hello World"),\n\n // These commands control the state of the example command\n addCommand: await createCommand("Add Command To Menu"),\n deleteCustomCommand: await createCommand("Delete Command")\n hideCommand: await createCommand("Hide Command"),\n showCommand: await createCommand("Activate Command"),\n executeCommand: await createCommand("Execute Command"),\n getCommandName: await createCommand("Get Name"),\n getCommandState: await createCommand("Get Command State"),\n removeCommandFromMenu: await createCommand("Remove From Menu"), \n removeCommand: await createCommand("Remove Command")\n }\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n\n // Listen for the custom commands.\n shellFrame.Commands.Events.Register(\n\n // Listen for the CustomCommand events.\n MFiles.Event.CustomCommand,\n\n // Each command has ID and optional data provided with it.\n ( commandId, data ) => {\n // Respond to the command if custom command sent by the application \n switch( commandId ) {\n\n // Run the Example command\n case commands.exampleCommand.id:\n shellFrame.ShowMessage( "Hello World!" );\n break;\n\n // Add the new menuitem which runs the example command\n case commands.addCommand.id:\n await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n break;\n\n // Removes the command from particular menu\n case commands.removeCommandFromMenu.id:\n await shellFrame.Commands.RemoveCustomCommandFromMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu\n );\n break;\n\n // Deletes the command permanently\n case commands.deleteCommand.id:\n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Hiddes all command instances for specific command ID\n case commands.hideCommand.id:\n // Hide the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Hidden\n );\n break;\n\n // Activates (makes visible) all command instances for specific command ID\n case commands.showCommand.id:\n // Show the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Get the command name\n case commands.getCommandName.id:\n const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);\n shellFrame.ShowMessage( name );\n break;\n\n // Get the Command State\n case commands.getCommandState.id:\n\n // NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu\n const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );\n shellFrame.ShowMessage( `Command state: ${commandState}` );\n break;\n\n }\n }\n );\n }\n )\n }\n )\n}\n')),(0,o.kt)("p",null,"This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions."))}i.isMDXComponent=!0},7606:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const m={toc:[]},r="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(r,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./AddCustomCommandToMenu/"},"AddCustomCommandToMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Adds existing custom command to the specified context menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateCustomCommand/"},"CreateCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a custom command that can be added to the application toolbar or to the contextmenu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateSubMenuItem/"},"CreateSubMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a new SubMenu for already created Menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateTaskbarGroup/"},"CreateTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates new custom task bar group for custom commands. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: If multiple task bar groups are created for the same MenuLocation with the same ",(0,o.kt)("br",null),"orderPriority, their relative ordering is unspecified and may vary between runs, sessions or ",(0,o.kt)("br",null),"versions. Do not rely on a particular order for groups with equal priority \u2014 assign distinct ",(0,o.kt)("br",null),"orderPriority values to guarantee a deterministic ordering (lower values are shown first).")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./DeleteCustomCommand/"},"DeleteCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Deletes a custom command. The command is automatically removed.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./ExecuteCommand/"},"ExecuteCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Executes a user command.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandName/"},"GetCommandName")),(0,o.kt)("td",{parentName:"tr",align:null},"Resolves the name that has been associated with the given command id.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandState/"},"GetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the command state for builtin or custom command in specified location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetMenuIdOfBuiltInCommand/"},"GetMenuIdOfBuiltInCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the MenuItem ID of a built-in command by its command ID and location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveCustomCommandFromMenu/"},"RemoveCustomCommandFromMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes a custom command from the specified menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveMenuItem/"},"RemoveMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes menuitem from the menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveTaskbarGroup/"},"RemoveTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes custom task bar group from the task bar.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetCommandState/"},"SetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the command's state to be hidden, visible, enabled or disabled. Calling ",(0,o.kt)("br",null),"this method may affect context menu, application toolbar, menus or all of them.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetIcon/"},"SetIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom command.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetMenuItemState/"},"SetMenuItemState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the MenuItem state individually.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetTaskbarGroupIcon/"},"SetTaskbarGroupIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom task bar group.")))))}i.isMDXComponent=!0},94642:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const m={toc:[]},r="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(r,(0,a.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Events"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"/UIExt2/Events/#icommandsevents"},"ICommandsEvents")),(0,o.kt)("td",{parentName:"tr",align:null},"Returns the event registering interface of the ICommands interface.")))))}i.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1a26721c.e0224034.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1a26721c.e03283c3.js similarity index 73% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1a26721c.e0224034.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1a26721c.e03283c3.js index 443ebdaa6..005710fd0 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1a26721c.e0224034.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1a26721c.e03283c3.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[6309],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),c=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),m=c(n),d=o,f=m["".concat(p,".").concat(d)]||m[d]||u[d]||a;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[m]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>f,contentTitle:()=>u,default:()=>b,frontMatter:()=>m,metadata:()=>d,toc:()=>y});var r=n(87462),o=(n(67294),n(3905));const a={toc:[]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,o.kt)(i,(0,r.Z)({},a,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"alt"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"string")),(0,o.kt)("td",{parentName:"tr",align:null},"Alt text for accessibility.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"content"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,o.kt)("a",{parentName:"td",href:"/UIExt2/Enums/BuiltInIcon/"},"BuiltInIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Content of the icon.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"extension"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"string")),(0,o.kt)("td",{parentName:"tr",align:null},"Extension of the icon file (",'"',"svg",'"',", ",'"',"png",'"',", ",'"',"jpg",'"',", ",'"',"jpeg",'"',", ",'"',"ico",'"',"). ",(0,o.kt)("br",null),"This information must be provided if using BASE64 icon content type.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"iconContentType"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"/UIExt2/Enums/IconContentType/"},"IconContentType")),(0,o.kt)("td",{parentName:"tr",align:null},"Type of the icon content.")))))}l.isMDXComponent=!0;const p={toc:[]},c="wrapper";function s(e){let{components:t,...n}=e;return(0,o.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Represents icon information for command icons."),(0,o.kt)("p",null,"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any\nfuture release. Use of this feature is not recommended for production environments."))}s.isMDXComponent=!0;const m={},u="IIconInformation",d={unversionedId:"UIExt2/Models/IIconInformation/index",id:"UIExt2/Models/IIconInformation/index",title:"IIconInformation",description:"Description",source:"@site/docs/UIExt2/Models/IIconInformation/index.mdx",sourceDirName:"UIExt2/Models/IIconInformation",slug:"/UIExt2/Models/IIconInformation/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IIconInformation/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"FtsScope",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FtsScope/"},next:{title:"INonSensitiveVaultData",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/INonSensitiveVaultData/"}},f={},y=[{value:"Description",id:"description",level:2},{value:"Properties",id:"properties",level:2}],k={toc:y},I="wrapper";function b(e){let{components:t,...n}=e;return(0,o.kt)(I,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"iiconinformation"},"IIconInformation"),(0,o.kt)("h2",{id:"description"},"Description"),(0,o.kt)(s,{components:n.components,mdxType:"Description"}),(0,o.kt)("h2",{id:"properties"},"Properties"),(0,o.kt)(l,{components:n.components,mdxType:"Properties"}))}b.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[6309],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p=r.createContext({}),c=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},s=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},m="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,o=e.mdxType,a=e.originalType,p=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),m=c(n),d=o,f=m["".concat(p,".").concat(d)]||m[d]||u[d]||a;return n?r.createElement(f,i(i({ref:t},s),{},{components:n})):r.createElement(f,i({ref:t},s))}));function f(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=n.length,i=new Array(a);i[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[m]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>f,contentTitle:()=>u,default:()=>g,frontMatter:()=>m,metadata:()=>d,toc:()=>y});var r=n(87462),o=(n(67294),n(3905));const a={toc:[]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,o.kt)(i,(0,r.Z)({},a,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"alt"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"string")),(0,o.kt)("td",{parentName:"tr",align:null},"Alt text for accessibility.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"content"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"string")," ","|"," ",(0,o.kt)("a",{parentName:"td",href:"/UIExt2/Enums/BuiltInIcon/"},"BuiltInIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Content of the icon.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"extension"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"string")),(0,o.kt)("td",{parentName:"tr",align:null},"Extension of the icon file (",'"',"svg",'"',", ",'"',"png",'"',", ",'"',"jpg",'"',", ",'"',"jpeg",'"',", ",'"',"ico",'"',"). ",(0,o.kt)("br",null),"This information must be provided if using BASE64 icon content type.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"iconContentType"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"/UIExt2/Enums/IconContentType/"},"IconContentType")),(0,o.kt)("td",{parentName:"tr",align:null},"Type of the icon content.")))))}l.isMDXComponent=!0;const p={toc:[]},c="wrapper";function s(e){let{components:t,...n}=e;return(0,o.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Represents icon information for command icons."))}s.isMDXComponent=!0;const m={},u="IIconInformation",d={unversionedId:"UIExt2/Models/IIconInformation/index",id:"UIExt2/Models/IIconInformation/index",title:"IIconInformation",description:"Description",source:"@site/docs/UIExt2/Models/IIconInformation/index.mdx",sourceDirName:"UIExt2/Models/IIconInformation",slug:"/UIExt2/Models/IIconInformation/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/IIconInformation/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"FtsScope",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/FtsScope/"},next:{title:"INonSensitiveVaultData",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Models/INonSensitiveVaultData/"}},f={},y=[{value:"Description",id:"description",level:2},{value:"Properties",id:"properties",level:2}],k={toc:y},I="wrapper";function g(e){let{components:t,...n}=e;return(0,o.kt)(I,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"iiconinformation"},"IIconInformation"),(0,o.kt)("h2",{id:"description"},"Description"),(0,o.kt)(s,{components:n.components,mdxType:"Description"}),(0,o.kt)("h2",{id:"properties"},"Properties"),(0,o.kt)(l,{components:n.components,mdxType:"Properties"}))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1e5fcfb2.285d0431.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1e5fcfb2.285d0431.js deleted file mode 100644 index 20190f417..000000000 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1e5fcfb2.285d0431.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[6057],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),c=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},p=function(e){var t=c(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,p=i(e,["components","mdxType","originalType","parentName"]),u=c(n),d=a,f=u["".concat(l,".").concat(d)]||u[d]||m[d]||o;return n?r.createElement(f,s(s({ref:t},p),{},{components:n})):r.createElement(f,s({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,s=new Array(o);s[0]=d;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[u]="string"==typeof e?e:a,s[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>y,default:()=>v,frontMatter:()=>f,metadata:()=>b,toc:()=>k});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},s="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "required_data_flags": {\n "all": false,\n "object_version": false,\n "properties": false,\n "acl": false,\n "current_user_permissions": false,\n "properties_for_display": false,\n "relationships": false,\n "collection_member_relationships": false,\n "object_activities": false\n },\n "error_tolerance": 1 /* Enum: ObjectVersionDataRequestErrorTolerance */,\n "identity_type": 1 /* Enum: ObjectVersionDataRequestIdentityType */,\n "object_activities_parameters": {\n "category_filter": {\n "all": false,\n "metadata": false,\n "file_content": false,\n "comments": false\n },\n "limit": 0,\n "offset_obj_ver_version": {\n "type": 7 /* Enum: ObjVerVersionType */,\n "internal_version": 0,\n "external_repository_version": "",\n "external_repository_sort_key": 0\n }\n }\n}\n')))}i.isMDXComponent=!0;const l={toc:[]},c="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"required_data_flags")),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the required object information."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/OBJECTDATAREQUESTFLAGS"},"OBJECTDATAREQUESTFLAGS"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"error_tolerance")),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies how error cases are handled during the request."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Enums/ObjectVersionDataRequestErrorTolerance"},"ObjectVersionDataRequestErrorTolerance"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"identity_type")),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies how objects with changed identities are handled."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Enums/ObjectVersionDataRequestIdentityType"},"ObjectVersionDataRequestIdentityType"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"object_activities_parameters")),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the required object version activity input."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/ObjectVersionActivityRequest"},"ObjectVersionActivityRequest"))))))}p.isMDXComponent=!0;const u={toc:[]},m="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Struct for a object data request details."))}d.isMDXComponent=!0;const f={},y="ObjectVersionDataRequest",b={unversionedId:"gRPC/Messages/ObjectVersionDataRequest/index",id:"gRPC/Messages/ObjectVersionDataRequest/index",title:"ObjectVersionDataRequest",description:"Example",source:"@site/docs/gRPC/Messages/ObjectVersionDataRequest/index.mdx",sourceDirName:"gRPC/Messages/ObjectVersionDataRequest",slug:"/gRPC/Messages/ObjectVersionDataRequest/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Messages/ObjectVersionDataRequest/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"ObjectVersionData",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Messages/ObjectVersionData/"},next:{title:"ObjectVersionDataResult",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Messages/ObjectVersionDataResult/"}},g={},k=[{value:"Example",id:"example",level:2}],O={toc:k},j="wrapper";function v(e){let{components:t,...n}=e;return(0,a.kt)(j,(0,r.Z)({},O,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"objectversiondatarequest"},"ObjectVersionDataRequest"),(0,a.kt)(d,{components:n.components,mdxType:"Description"}),(0,a.kt)(p,{components:n.components,mdxType:"Message"}),(0,a.kt)("h2",{id:"example"},"Example"),(0,a.kt)(i,{components:n.components,mdxType:"Example"}))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1e5fcfb2.8ea2ebd5.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1e5fcfb2.8ea2ebd5.js new file mode 100644 index 000000000..5a9f78c45 --- /dev/null +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/1e5fcfb2.8ea2ebd5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[6057],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,l=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),u=p(n),d=a,f=u["".concat(l,".").concat(d)]||u[d]||m[d]||o;return n?r.createElement(f,i(i({ref:t},c),{},{components:n})):r.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[u]="string"==typeof e?e:a,i[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>y,default:()=>v,frontMatter:()=>f,metadata:()=>b,toc:()=>k});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},i="wrapper";function s(e){let{components:t,...n}=e;return(0,a.kt)(i,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "required_data_flags": {\n "all": false,\n "object_version": false,\n "properties": false,\n "acl": false,\n "current_user_permissions": false,\n "properties_for_display": false,\n "relationships": false,\n "collection_member_relationships": false,\n "object_activities": false\n },\n "version_type": 2 /* Enum: ObjectVersionDataRequestVersionType */,\n "error_tolerance": 1 /* Enum: ObjectVersionDataRequestErrorTolerance */,\n "identity_type": 1 /* Enum: ObjectVersionDataRequestIdentityType */,\n "object_activities_parameters": {\n "category_filter": {\n "all": false,\n "metadata": false,\n "file_content": false,\n "comments": false\n },\n "limit": 0,\n "offset_obj_ver_version": {\n "type": 7 /* Enum: ObjVerVersionType */,\n "internal_version": 0,\n "external_repository_version": "",\n "external_repository_sort_key": 0\n }\n }\n}\n')))}s.isMDXComponent=!0;const l={toc:[]},p="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(p,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"required_data_flags")),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the required object information."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/OBJECTDATAREQUESTFLAGS"},"OBJECTDATAREQUESTFLAGS"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"version_type")),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the version type to search for."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Enums/ObjectVersionDataRequestVersionType"},"ObjectVersionDataRequestVersionType"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"error_tolerance")),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies how error cases are handled during the request."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Enums/ObjectVersionDataRequestErrorTolerance"},"ObjectVersionDataRequestErrorTolerance"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"identity_type")),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies how objects with changed identities are handled."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Enums/ObjectVersionDataRequestIdentityType"},"ObjectVersionDataRequestIdentityType"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"object_activities_parameters")),(0,a.kt)("td",{parentName:"tr",align:null},"Specifies the required object version activity input."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/ObjectVersionActivityRequest"},"ObjectVersionActivityRequest"))))))}c.isMDXComponent=!0;const u={toc:[]},m="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Struct for a object data request details."))}d.isMDXComponent=!0;const f={},y="ObjectVersionDataRequest",b={unversionedId:"gRPC/Messages/ObjectVersionDataRequest/index",id:"gRPC/Messages/ObjectVersionDataRequest/index",title:"ObjectVersionDataRequest",description:"Example",source:"@site/docs/gRPC/Messages/ObjectVersionDataRequest/index.mdx",sourceDirName:"gRPC/Messages/ObjectVersionDataRequest",slug:"/gRPC/Messages/ObjectVersionDataRequest/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Messages/ObjectVersionDataRequest/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"ObjectVersionData",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Messages/ObjectVersionData/"},next:{title:"ObjectVersionDataResult",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Messages/ObjectVersionDataResult/"}},g={},k=[{value:"Example",id:"example",level:2}],O={toc:k},j="wrapper";function v(e){let{components:t,...n}=e;return(0,a.kt)(j,(0,r.Z)({},O,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"objectversiondatarequest"},"ObjectVersionDataRequest"),(0,a.kt)(d,{components:n.components,mdxType:"Description"}),(0,a.kt)(c,{components:n.components,mdxType:"Message"}),(0,a.kt)("h2",{id:"example"},"Example"),(0,a.kt)(s,{components:n.components,mdxType:"Example"}))}v.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/2dc1053a.b7bed4a0.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/2dc1053a.b7bed4a0.js new file mode 100644 index 000000000..6b55a8b23 --- /dev/null +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/2dc1053a.b7bed4a0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[411],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),u=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},c=function(e){var t=u(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(r),d=a,f=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return r?n.createElement(f,l(l({ref:t},c),{},{components:r})):n.createElement(f,l({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{r.d(t,{Z:()=>l});var n=r(67294),a=r(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:r,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:r},t)}},73992:(e,t,r)=>{r.d(t,{Z:()=>w});var n=r(87462),a=r(67294),o=r(86010),l=r(72957),i=r(16550),s=r(75238),u=r(33609),c=r(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function m(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??p(r);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function d(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:r}=e;const n=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(n.location.search);t.set(o,e),n.replace({...n.location,search:t.toString()})}),[o,n])]}function b(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,o=m(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:o}))),[s,u]=f({queryString:r,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,o]=(0,c.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&o.set(e)}),[r,o])]}({groupId:n}),y=(()=>{const e=s??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&i(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),b(e)}),[u,b,o]),tabValues:o}}var y=r(51048);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function v(e){let{className:t,block:r,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,r=c.indexOf(t),n=u[r].value;n!==i&&(p(t),s(n))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const r=c.indexOf(e.currentTarget)+1;t=c[r]??c[0];break}case"ArrowLeft":{const r=c.indexOf(e.currentTarget)-1;t=c[r]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},u.map((e=>{let{value:t,label:r,attributes:l}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":i===t})}),r??t)})))}function k(e){let{lazy:t,children:r,selectedValue:n}=e;const o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},a.createElement(v,(0,n.Z)({},e,t)),a.createElement(k,(0,n.Z)({},e,t)))}function w(e){const t=(0,y.Z)();return a.createElement(g,(0,n.Z)({key:String(t)},e))}},63849:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>w,contentTitle:()=>k,default:()=>E,frontMatter:()=>v,metadata:()=>g,toc:()=>T});var n=r(87462),a=(r(67294),r(3905));const o={toc:[]},l="wrapper";function i(e){let{components:t,...r}=e;return(0,a.kt)(l,(0,n.Z)({},o,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Promise")," < ",(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/ObjFileSource/"},"IObjFileSource")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"Source information of the uploaded temporary files.")))))}i.isMDXComponent=!0;const s={toc:[]},u="wrapper";function c(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"files"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},"FileList"),(0,a.kt)("td",{parentName:"tr",align:null},"The files to upload.")))))}c.isMDXComponent=!0;r(73992);var p=r(18679);const m={toc:[]},d="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// ICommonFunctions is binded into the MFiles global object\nconst result = await MFiles.UploadTemporaryFiles(files);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function h(e){let{components:t,...r}=e;return(0,a.kt)(y,(0,n.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Uploads temporary files to the server and returns a file source which other operations\ncan use to access the uploaded files."),(0,a.kt)("p",null,"The uploaded files are temporary and will be automatically removed from the server\nafter a certain period of time. The caller should use the returned file source to\nperform further operations with the uploaded files before they expire."),(0,a.kt)("p",null,"The method also handles duplicate detection and searchable PDF conversion if the features\nare enabled. A user must interact with the dialogs and may cancel the upload process during these steps,\ncausing an error to be thrown."))}h.isMDXComponent=!0;const v={},k="UploadTemporaryFiles",g={unversionedId:"UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles/index",id:"UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles/index",title:"UploadTemporaryFiles",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles",slug:"/UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"ShowToast",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowToast/"},next:{title:"WriteToWebStorage",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/"}},w={},T=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],I={toc:T},x="wrapper";function E(e){let{components:t,...r}=e;return(0,a.kt)(x,(0,n.Z)({},I,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"uploadtemporaryfiles"},"UploadTemporaryFiles"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(h,{components:r.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:r.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:r.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(i,{components:r.components,mdxType:"Returns"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/2ff231af.14f98162.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/2ff231af.fa583908.js similarity index 71% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/2ff231af.14f98162.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/2ff231af.fa583908.js index 34de6b474..2b5158dc7 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/2ff231af.14f98162.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/2ff231af.fa583908.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[5243],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>b});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),d=a,b=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(b,l(l({ref:t},c),{},{components:n})):r.createElement(b,l({ref:t},c))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),i=n(16550),s=n(75238),u=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[s,u]=b({queryString:n,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=s??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&i(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),f(e)}),[u,f,o]),tabValues:o}}var y=n(51048);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(p(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function w(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function g(e){const t=f(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},a.createElement(k,(0,r.Z)({},e,t)),a.createElement(w,(0,r.Z)({},e,t)))}function N(e){const t=(0,y.Z)();return a.createElement(g,(0,r.Z)({key:String(t)},e))}},78823:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>N,contentTitle:()=>w,default:()=>O,frontMatter:()=>k,metadata:()=>g,toc:()=>v});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Promise")," < ",(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/ObjectWindowResult/"},"ObjectWindowResult")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"Promise which will resolve the object window result.")))))}i.isMDXComponent=!0;const s={toc:[]},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"objectType"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"Object type id.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"objectCreationInfo"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/ObjectCreationInfo/"},"ObjectCreationInfo")),(0,a.kt)("td",{parentName:"tr",align:null},"The ObjectCreationInfo specifying the initial state of the new metadata card.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"prefillPropertyValues"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Array")," < ",(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/PropertyValue/"},"PropertyValue")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"PrefillPropertyValues is a collection of PropertyValue objects. ",(0,a.kt)("br",null),"TODO: AccessControlList length is checked in the implementation, so should it be changed to array. Needs verifying. unit test breaks if changed to array.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"accessControlList"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/AccessControlList/"},"AccessControlList")),(0,a.kt)("td",{parentName:"tr",align:null},"The accessControlList represents an access control list (ACL).")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"options"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/DialogUIParams/"},"DialogUIParams")),(0,a.kt)("td",{parentName:"tr",align:null},"Title and UI options of the dashboard ","[Eg: title/isModal/isResizable/isDraggable]",".")))))}c.isMDXComponent=!0;n(73992);var p=n(18679);const m={toc:[]},d="wrapper";function b(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// ICommonFunctions is binded into the MFiles global object\nconst result = await MFiles.ShowNewObjectWindow(\n objectType,\n objectCreationInfo,\n prefillPropertyValues,\n accessControlList,\n options,\n);\n"))))}b.isMDXComponent=!0;const f={toc:[]},y="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Show new object creation window to create new object. New object can be created using prefil properties as well."))}h.isMDXComponent=!0;const k={},w="ShowNewObjectWindow",g={unversionedId:"UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index",id:"UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index",title:"ShowNewObjectWindow",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow",slug:"/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"ShowEditObjectWindow",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowEditObjectWindow/"},next:{title:"ShowToast",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowToast/"}},N={},v=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],I={toc:v},x="wrapper";function O(e){let{components:t,...n}=e;return(0,a.kt)(x,(0,r.Z)({},I,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"shownewobjectwindow"},"ShowNewObjectWindow"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(h,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(b,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(i,{components:n.components,mdxType:"Returns"}))}O.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[5243],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>b});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),d=a,b=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(b,l(l({ref:t},c),{},{components:n})):r.createElement(b,l({ref:t},c))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),i=n(16550),s=n(75238),u=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[s,u]=b({queryString:n,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=s??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&i(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),f(e)}),[u,f,o]),tabValues:o}}var y=n(51048);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(p(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function w(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function g(e){const t=f(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},a.createElement(k,(0,r.Z)({},e,t)),a.createElement(w,(0,r.Z)({},e,t)))}function N(e){const t=(0,y.Z)();return a.createElement(g,(0,r.Z)({key:String(t)},e))}},78823:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>N,contentTitle:()=>w,default:()=>x,frontMatter:()=>k,metadata:()=>g,toc:()=>v});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Promise")," < ",(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/ObjectWindowResult/"},"ObjectWindowResult")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"Promise which will resolve the object window result.")))))}i.isMDXComponent=!0;const s={toc:[]},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"objectType"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"Object type id.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"objectCreationInfo"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/ObjectCreationInfo/"},"ObjectCreationInfo")),(0,a.kt)("td",{parentName:"tr",align:null},"The ObjectCreationInfo specifying the initial state of the new metadata card.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"prefillPropertyValues"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Array")," < ",(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/PropertyValue/"},"PropertyValue")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"PrefillPropertyValues is a collection of PropertyValue objects.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"accessControlList"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/AccessControlList/"},"AccessControlList")),(0,a.kt)("td",{parentName:"tr",align:null},"The accessControlList represents an access control list (ACL).")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"options"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/DialogUIParams/"},"DialogUIParams")),(0,a.kt)("td",{parentName:"tr",align:null},"Title and UI options of the dashboard ","[Eg: title/isModal/isResizable/isDraggable]",".")))))}c.isMDXComponent=!0;n(73992);var p=n(18679);const m={toc:[]},d="wrapper";function b(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// ICommonFunctions is binded into the MFiles global object\nconst result = await MFiles.ShowNewObjectWindow(\n objectType,\n objectCreationInfo,\n prefillPropertyValues,\n accessControlList,\n options,\n);\n"))))}b.isMDXComponent=!0;const f={toc:[]},y="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Show new object creation window to create new object. New object can be created using prefil properties as well."),(0,a.kt)("p",null,"Note: Multiple files are not supported in ObjectCreationInfo.source_files."))}h.isMDXComponent=!0;const k={},w="ShowNewObjectWindow",g={unversionedId:"UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index",id:"UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index",title:"ShowNewObjectWindow",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow",slug:"/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowNewObjectWindow/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"ShowEditObjectWindow",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowEditObjectWindow/"},next:{title:"ShowToast",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowToast/"}},N={},v=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],I={toc:v},j="wrapper";function x(e){let{components:t,...n}=e;return(0,a.kt)(j,(0,r.Z)({},I,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"shownewobjectwindow"},"ShowNewObjectWindow"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(h,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(b,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(i,{components:n.components,mdxType:"Returns"}))}x.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/367eb14d.f53ed237.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/367eb14d.43c7250a.js similarity index 75% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/367eb14d.f53ed237.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/367eb14d.43c7250a.js index bf87b1a2e..bd3506a37 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/367eb14d.f53ed237.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/367eb14d.43c7250a.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[5925],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>y});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),c=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},s="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),s=c(n),d=a,y=s["".concat(p,".").concat(d)]||s[d]||m[d]||o;return n?r.createElement(y,i(i({ref:t},u),{},{components:n})):r.createElement(y,i({ref:t},u))}));function y(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[s]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>y,contentTitle:()=>m,default:()=>g,frontMatter:()=>s,metadata:()=>d,toc:()=>f});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,a.kt)(i,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Value"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"SVG")),(0,a.kt)("td",{parentName:"tr",align:null},"svg"),(0,a.kt)("td",{parentName:"tr",align:null},"SVG in string format ",'"',"<","svg",">","...","<","svg",">",'"',".")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"BASE64")),(0,a.kt)("td",{parentName:"tr",align:null},"base64"),(0,a.kt)("td",{parentName:"tr",align:null},"Base64 part of file without mimetype part, e.g. ",'"',"iVBORw0KGgoAAAANSUhEUgAA...",'"',". ",(0,a.kt)("br",null),"Note: Extension information must be provided when using this icon content type.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"PATH")),(0,a.kt)("td",{parentName:"tr",align:null},"path"),(0,a.kt)("td",{parentName:"tr",align:null},"Relative path to icon file, e.g. assets/icon/icon.svg")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"BUILT_IN")),(0,a.kt)("td",{parentName:"tr",align:null},"built_in"),(0,a.kt)("td",{parentName:"tr",align:null},"Built-in icon representation.")))))}l.isMDXComponent=!0;const p={toc:[]},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Enum representing possible icon types."),(0,a.kt)("p",null,"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any\nfuture release. Use of this feature is not recommended for production environments."))}u.isMDXComponent=!0;const s={},m="IconContentType",d={unversionedId:"UIExt2/Enums/IconContentType/index",id:"UIExt2/Enums/IconContentType/index",title:"IconContentType",description:"",source:"@site/docs/UIExt2/Enums/IconContentType/index.mdx",sourceDirName:"UIExt2/Enums/IconContentType",slug:"/UIExt2/Enums/IconContentType/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/IconContentType/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"FacetValueType",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetValueType/"},next:{title:"MFBuiltInObjectType",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInObjectType/"}},y={},f=[],k={toc:f},b="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(b,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"iconcontenttype"},"IconContentType"),(0,a.kt)(u,{components:n.components,mdxType:"Description"}),(0,a.kt)(l,{components:n.components,mdxType:"Values"}))}g.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[5925],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>y});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p=r.createContext({}),c=function(e){var t=r.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(p.Provider,{value:t},e.children)},s="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),s=c(n),d=a,y=s["".concat(p,".").concat(d)]||s[d]||m[d]||o;return n?r.createElement(y,i(i({ref:t},u),{},{components:n})):r.createElement(y,i({ref:t},u))}));function y(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,i=new Array(o);i[0]=d;var l={};for(var p in t)hasOwnProperty.call(t,p)&&(l[p]=t[p]);l.originalType=e,l[s]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>y,contentTitle:()=>m,default:()=>g,frontMatter:()=>s,metadata:()=>d,toc:()=>f});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},i="wrapper";function l(e){let{components:t,...n}=e;return(0,a.kt)(i,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Value"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"SVG")),(0,a.kt)("td",{parentName:"tr",align:null},"svg"),(0,a.kt)("td",{parentName:"tr",align:null},"SVG in string format ",'"',"<","svg",">","...","<","svg",">",'"',".")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"BASE64")),(0,a.kt)("td",{parentName:"tr",align:null},"base64"),(0,a.kt)("td",{parentName:"tr",align:null},"Base64 part of file without mimetype part, e.g. ",'"',"iVBORw0KGgoAAAANSUhEUgAA...",'"',". ",(0,a.kt)("br",null),"Note: Extension information must be provided when using this icon content type.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"PATH")),(0,a.kt)("td",{parentName:"tr",align:null},"path"),(0,a.kt)("td",{parentName:"tr",align:null},"Relative path to icon file, e.g. assets/icon/icon.svg")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"BUILT_IN")),(0,a.kt)("td",{parentName:"tr",align:null},"built_in"),(0,a.kt)("td",{parentName:"tr",align:null},"Built-in icon representation.")))))}l.isMDXComponent=!0;const p={toc:[]},c="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Enum representing possible icon types."))}u.isMDXComponent=!0;const s={},m="IconContentType",d={unversionedId:"UIExt2/Enums/IconContentType/index",id:"UIExt2/Enums/IconContentType/index",title:"IconContentType",description:"",source:"@site/docs/UIExt2/Enums/IconContentType/index.mdx",sourceDirName:"UIExt2/Enums/IconContentType",slug:"/UIExt2/Enums/IconContentType/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/IconContentType/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"FacetValueType",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/FacetValueType/"},next:{title:"MFBuiltInObjectType",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/MFBuiltInObjectType/"}},y={},f=[],k={toc:f},b="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(b,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"iconcontenttype"},"IconContentType"),(0,a.kt)(u,{components:n.components,mdxType:"Description"}),(0,a.kt)(l,{components:n.components,mdxType:"Values"}))}g.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3c6e849e.427c5732.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3c6e849e.e8c1af0b.js similarity index 69% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3c6e849e.427c5732.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3c6e849e.e8c1af0b.js index 15a24192c..2bd263a13 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3c6e849e.427c5732.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3c6e849e.e8c1af0b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[8634],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),s=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),p=s(n),d=a,f=p["".concat(i,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,l(l({ref:t},c),{},{components:n})):r.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var u={};for(var i in t)hasOwnProperty.call(t,i)&&(u[i]=t[i]);u.originalType=e,u[p]="string"==typeof e?e:a,l[1]=u;for(var s=2;s{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),u=n(16550),i=n(75238),s=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,u.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,i._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,u]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[i,s]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=i??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&u(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);u(e),s(e),b(e)}),[s,b,o]),tabValues:o}}var y=n(51048);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:u,selectValue:i,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=c.indexOf(t),r=s[n].value;r!==u&&(p(t),i(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",k.tabItem,l?.className,{"tabs__item--active":u===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function g(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(v,(0,r.Z)({},e,t)))}function I(e){const t=(0,y.Z)();return a.createElement(g,(0,r.Z)({key:String(t)},e))}},12431:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>I,contentTitle:()=>v,default:()=>T,frontMatter:()=>h,metadata:()=>g,toc:()=>x});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Promise")," < void >"),(0,a.kt)("td",{parentName:"tr",align:null})))))}u.isMDXComponent=!0;const i={toc:[]},s="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"groupId"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"The task bar group id.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"iconInformation"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/IIconInformation/"},"IIconInformation")),(0,a.kt)("td",{parentName:"tr",align:null},"The icon information.")))))}c.isMDXComponent=!0;n(73992);var p=n(18679);const m={toc:[]},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellFrame points here into the IShellFrame interface\nconst result = await shellFrame.Commands.SetTaskbarGroupIcon(\n groupId,\n iconInformation,\n);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function k(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Sets the icon for a custom task bar group."),(0,a.kt)("p",null,"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any\nfuture release. Use of this feature is not recommended for production environments."))}k.isMDXComponent=!0;const h={},v="SetTaskbarGroupIcon",g={unversionedId:"UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index",id:"UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index",title:"SetTaskbarGroupIcon",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon",slug:"/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"SetMenuItemState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetMenuItemState/"},next:{title:"ICommonFunctions",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/"}},I={},x=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],N={toc:x},w="wrapper";function T(e){let{components:t,...n}=e;return(0,a.kt)(w,(0,r.Z)({},N,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"settaskbargroupicon"},"SetTaskbarGroupIcon"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(k,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(u,{components:n.components,mdxType:"Returns"}))}T.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[8634],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),i=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=i(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),p=i(n),d=a,f=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,l(l({ref:t},c),{},{components:n})):r.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u[p]="string"==typeof e?e:a,l[1]=u;for(var i=2;i{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),u=n(16550),s=n(75238),i=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,i.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,u.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,u]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[s,i]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=s??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&u(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);u(e),i(e),b(e)}),[i,b,o]),tabValues:o}}var y=n(51048);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:u,selectValue:s,tabValues:i}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=c.indexOf(t),r=i[n].value;r!==u&&(p(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},i.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",k.tabItem,l?.className,{"tabs__item--active":u===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function I(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",k.tabList)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(v,(0,r.Z)({},e,t)))}function g(e){const t=(0,y.Z)();return a.createElement(I,(0,r.Z)({key:String(t)},e))}},12431:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>v,default:()=>T,frontMatter:()=>h,metadata:()=>I,toc:()=>x});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Promise")," < void >"),(0,a.kt)("td",{parentName:"tr",align:null})))))}u.isMDXComponent=!0;const s={toc:[]},i="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(i,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"groupId"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"The task bar group id.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"iconInformation"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/IIconInformation/"},"IIconInformation")),(0,a.kt)("td",{parentName:"tr",align:null},"The icon information.")))))}c.isMDXComponent=!0;n(73992);var p=n(18679);const m={toc:[]},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellFrame points here into the IShellFrame interface\nconst result = await shellFrame.Commands.SetTaskbarGroupIcon(\n groupId,\n iconInformation,\n);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function k(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Sets the icon for a custom task bar group."))}k.isMDXComponent=!0;const h={},v="SetTaskbarGroupIcon",I={unversionedId:"UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index",id:"UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index",title:"SetTaskbarGroupIcon",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon",slug:"/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetTaskbarGroupIcon/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"SetMenuItemState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetMenuItemState/"},next:{title:"ICommonFunctions",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/"}},g={},x=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],w={toc:x},N="wrapper";function T(e){let{components:t,...n}=e;return(0,a.kt)(N,(0,r.Z)({},w,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"settaskbargroupicon"},"SetTaskbarGroupIcon"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(k,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(u,{components:n.components,mdxType:"Returns"}))}T.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3e2f23f0.1cb47bf6.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3e2f23f0.d15146fa.js similarity index 67% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3e2f23f0.1cb47bf6.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3e2f23f0.d15146fa.js index a9a7e7dba..0c1f81f8c 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3e2f23f0.1cb47bf6.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3e2f23f0.d15146fa.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[3486],{3905:(t,e,n)=>{n.d(e,{Zo:()=>u,kt:()=>f});var a=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function o(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var m=a.createContext({}),p=function(t){var e=a.useContext(m),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},u=function(t){var e=p(t.components);return a.createElement(m.Provider,{value:e},t.children)},c="mdxType",d={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},s=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,m=t.parentName,u=l(t,["components","mdxType","originalType","parentName"]),c=p(n),s=r,f=c["".concat(m,".").concat(s)]||c[s]||d[s]||i;return n?a.createElement(f,o(o({ref:e},u),{},{components:n})):a.createElement(f,o({ref:e},u))}));function f(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,o=new Array(i);o[0]=s;var l={};for(var m in e)hasOwnProperty.call(e,m)&&(l[m]=e[m]);l.originalType=t,l[c]="string"==typeof t?t:r,o[1]=l;for(var p=2;p{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>p,default:()=>k,frontMatter:()=>m,metadata:()=>u,toc:()=>d});var a=n(87462),r=(n(67294),n(3905));const i={toc:[]},o="wrapper";function l(t){let{components:e,...n}=t;return(0,r.kt)(o,(0,a.Z)({},i,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Name"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./BuiltinCommand/"},"BuiltinCommand")),(0,r.kt)("td",{parentName:"tr",align:null},"The BuiltinCommand enumeration contains all the ids of the builtin commands that can be hidden, shown, disabled or enabled from the menus. This enumeration is used in conjunction with the SetCommandState method.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./CommandLocation/"},"CommandLocation")),(0,r.kt)("td",{parentName:"tr",align:null},"The CommandLocation enumeration specifies the location for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./CommandState/"},"CommandState")),(0,r.kt)("td",{parentName:"tr",align:null},"The CommandState enumeration specifies the visibility state for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./Event/"},"Event")),(0,r.kt)("td",{parentName:"tr",align:null},"The Event enumeration lists collectively all events.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MenuLocation/"},"MenuLocation")),(0,r.kt)("td",{parentName:"tr",align:null},"The MenuLocation enumeration contains all context menu locations into which the custom commands can be added.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./ObjectWindowResultCode/"},"ObjectWindowResultCode")),(0,r.kt)("td",{parentName:"tr",align:null},"The ObjectWindowResultCode enumerates the defined object window modes.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./ToastType/"},"ToastType")),(0,r.kt)("td",{parentName:"tr",align:null},"The ToastType enumeration specifies the different types of toast notifications available.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./FacetRangeType/"},"FacetRangeType")),(0,r.kt)("td",{parentName:"tr",align:null},"Facet Range Type.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./FacetTransformation/"},"FacetTransformation")),(0,r.kt)("td",{parentName:"tr",align:null},"Facet transformation type.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./FacetType/"},"FacetType")),(0,r.kt)("td",{parentName:"tr",align:null},"Facet Type.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./FacetValueType/"},"FacetValueType")),(0,r.kt)("td",{parentName:"tr",align:null},"Facet Value Type.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./IconContentType/"},"IconContentType")),(0,r.kt)("td",{parentName:"tr",align:null},"Enum representing possible icon types. NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./BuiltInIcon/"},"BuiltInIcon")),(0,r.kt)("td",{parentName:"tr",align:null},"Enum representing built-in icons. NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any future release. Use of this feature is not recommended for production environments.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MFBuiltInPropertyDef/"},"MFBuiltInPropertyDef")),(0,r.kt)("td",{parentName:"tr",align:null},"List of built-in properties.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MFBuiltInObjectType/"},"MFBuiltInObjectType")),(0,r.kt)("td",{parentName:"tr",align:null},"List of built-in object types.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MFBuiltInView/"},"MFBuiltInView")),(0,r.kt)("td",{parentName:"tr",align:null},"List of built-in views.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MFBuiltInValueList/"},"MFBuiltInValueList")),(0,r.kt)("td",{parentName:"tr",align:null},"List of built-in value lists.")))))}l.isMDXComponent=!0;const m={},p="Enums",u={unversionedId:"UIExt2/Enums/index",id:"UIExt2/Enums/index",title:"Enums",description:"",source:"@site/docs/UIExt2/Enums/index.mdx",sourceDirName:"UIExt2/Enums",slug:"/UIExt2/Enums/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Events",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Events"},next:{title:"BuiltInIcon",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltInIcon/"}},c={},d=[],s={toc:d},f="wrapper";function k(t){let{components:e,...n}=t;return(0,r.kt)(f,(0,a.Z)({},s,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"enums"},"Enums"),(0,r.kt)(l,{components:n.components,mdxType:"Interfaces"}))}k.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[3486],{3905:(t,e,n)=>{n.d(e,{Zo:()=>u,kt:()=>f});var a=n(67294);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function o(t){for(var e=1;e=0||(r[n]=t[n]);return r}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}var m=a.createContext({}),p=function(t){var e=a.useContext(m),n=e;return t&&(n="function"==typeof t?t(e):o(o({},e),t)),n},u=function(t){var e=p(t.components);return a.createElement(m.Provider,{value:e},t.children)},d="mdxType",c={inlineCode:"code",wrapper:function(t){var e=t.children;return a.createElement(a.Fragment,{},e)}},s=a.forwardRef((function(t,e){var n=t.components,r=t.mdxType,i=t.originalType,m=t.parentName,u=l(t,["components","mdxType","originalType","parentName"]),d=p(n),s=r,f=d["".concat(m,".").concat(s)]||d[s]||c[s]||i;return n?a.createElement(f,o(o({ref:e},u),{},{components:n})):a.createElement(f,o({ref:e},u))}));function f(t,e){var n=arguments,r=e&&e.mdxType;if("string"==typeof t||r){var i=n.length,o=new Array(i);o[0]=s;var l={};for(var m in e)hasOwnProperty.call(e,m)&&(l[m]=e[m]);l.originalType=t,l[d]="string"==typeof t?t:r,o[1]=l;for(var p=2;p{n.r(e),n.d(e,{assets:()=>d,contentTitle:()=>p,default:()=>k,frontMatter:()=>m,metadata:()=>u,toc:()=>c});var a=n(87462),r=(n(67294),n(3905));const i={toc:[]},o="wrapper";function l(t){let{components:e,...n}=t;return(0,r.kt)(o,(0,a.Z)({},i,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Name"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./BuiltinCommand/"},"BuiltinCommand")),(0,r.kt)("td",{parentName:"tr",align:null},"The BuiltinCommand enumeration contains all the ids of the builtin commands that can be hidden, shown, disabled or enabled from the menus. This enumeration is used in conjunction with the SetCommandState method.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./CommandLocation/"},"CommandLocation")),(0,r.kt)("td",{parentName:"tr",align:null},"The CommandLocation enumeration specifies the location for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./CommandState/"},"CommandState")),(0,r.kt)("td",{parentName:"tr",align:null},"The CommandState enumeration specifies the visibility state for the M-Files command when it is displayed in the user interface. This enumeration is used in conjunction with the SetCommandState method.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./Event/"},"Event")),(0,r.kt)("td",{parentName:"tr",align:null},"The Event enumeration lists collectively all events.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MenuLocation/"},"MenuLocation")),(0,r.kt)("td",{parentName:"tr",align:null},"The MenuLocation enumeration contains all context menu locations into which the custom commands can be added.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./ObjectWindowResultCode/"},"ObjectWindowResultCode")),(0,r.kt)("td",{parentName:"tr",align:null},"The ObjectWindowResultCode enumerates the defined object window modes.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./ToastType/"},"ToastType")),(0,r.kt)("td",{parentName:"tr",align:null},"The ToastType enumeration specifies the different types of toast notifications available.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./FacetRangeType/"},"FacetRangeType")),(0,r.kt)("td",{parentName:"tr",align:null},"Facet Range Type.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./FacetTransformation/"},"FacetTransformation")),(0,r.kt)("td",{parentName:"tr",align:null},"Facet transformation type.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./FacetType/"},"FacetType")),(0,r.kt)("td",{parentName:"tr",align:null},"Facet Type.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./FacetValueType/"},"FacetValueType")),(0,r.kt)("td",{parentName:"tr",align:null},"Facet Value Type.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./IconContentType/"},"IconContentType")),(0,r.kt)("td",{parentName:"tr",align:null},"Enum representing possible icon types.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./BuiltInIcon/"},"BuiltInIcon")),(0,r.kt)("td",{parentName:"tr",align:null},"Enum representing built-in icons.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MFBuiltInPropertyDef/"},"MFBuiltInPropertyDef")),(0,r.kt)("td",{parentName:"tr",align:null},"List of built-in properties.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MFBuiltInObjectType/"},"MFBuiltInObjectType")),(0,r.kt)("td",{parentName:"tr",align:null},"List of built-in object types.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MFBuiltInView/"},"MFBuiltInView")),(0,r.kt)("td",{parentName:"tr",align:null},"List of built-in views.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"./MFBuiltInValueList/"},"MFBuiltInValueList")),(0,r.kt)("td",{parentName:"tr",align:null},"List of built-in value lists.")))))}l.isMDXComponent=!0;const m={},p="Enums",u={unversionedId:"UIExt2/Enums/index",id:"UIExt2/Enums/index",title:"Enums",description:"",source:"@site/docs/UIExt2/Enums/index.mdx",sourceDirName:"UIExt2/Enums",slug:"/UIExt2/Enums/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Events",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Events"},next:{title:"BuiltInIcon",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltInIcon/"}},d={},c=[],s={toc:c},f="wrapper";function k(t){let{components:e,...n}=t;return(0,r.kt)(f,(0,a.Z)({},s,n,{components:e,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"enums"},"Enums"),(0,r.kt)(l,{components:n.components,mdxType:"Interfaces"}))}k.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3f686d77.71bda627.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3f686d77.1709d2fc.js similarity index 89% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3f686d77.71bda627.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3f686d77.1709d2fc.js index 14c4ce641..91cc902f5 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3f686d77.71bda627.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/3f686d77.1709d2fc.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[8360],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),i=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=i(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),p=i(n),d=a,f=p["".concat(u,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,l(l({ref:t},s),{},{components:n})):r.createElement(f,l({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c[p]="string"==typeof e?e:a,l[1]=c;for(var i=2;i{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),c=n(16550),u=n(75238),i=n(33609),s=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,i.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,c.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,c]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[u,i]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,s.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=u??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&c(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);c(e),i(e),b(e)}),[i,b,o]),tabValues:o}}var y=n(51048);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:c,selectValue:u,tabValues:i}=e;const s=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=s.indexOf(t),r=i[n].value;r!==c&&(p(t),u(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=s.indexOf(e.currentTarget)+1;t=s[n]??s[0];break}case"ArrowLeft":{const n=s.indexOf(e.currentTarget)-1;t=s[n]??s[s.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},i.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:c===t?0:-1,"aria-selected":c===t,key:t,ref:e=>s.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",v.tabItem,l?.className,{"tabs__item--active":c===t})}),n??t)})))}function g(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function k(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",v.tabList)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(g,(0,r.Z)({},e,t)))}function I(e){const t=(0,y.Z)();return a.createElement(k,(0,r.Z)({key:String(t)},e))}},40024:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>y,default:()=>w,frontMatter:()=>b,metadata:()=>v,toc:()=>g});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < ",(0,a.kt)("inlineCode",{parentName:"td"},"string")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"The accent color configured by user.")))))}c.isMDXComponent=!0;n(73992);var u=n(18679);const i={toc:[]},s="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(u.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// ICommonFunctions is binded into the MFiles global object\nconst result = await MFiles.GetAccentColor();\n"))))}p.isMDXComponent=!0;const m={toc:[]},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Gets accent color."))}f.isMDXComponent=!0;const b={},y="GetAccentColor",v={unversionedId:"UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index",id:"UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index",title:"GetAccentColor",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommonFunctions/GetAccentColor",slug:"/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"DeleteFromWebStorage",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DeleteFromWebStorage/"},next:{title:"GetClientLanguage",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLanguage/"}},h={},g=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Return type",id:"return-type",level:2}],k={toc:g},I="wrapper";function w(e){let{components:t,...n}=e;return(0,a.kt)(I,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"getaccentcolor"},"GetAccentColor"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(f,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(p,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(c,{components:n.components,mdxType:"Returns"}))}w.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[8360],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),i=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},s=function(e){var t=i(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,u=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),p=i(n),d=a,f=p["".concat(u,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,l(l({ref:t},s),{},{components:n})):r.createElement(f,l({ref:t},s))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var c={};for(var u in t)hasOwnProperty.call(t,u)&&(c[u]=t[u]);c.originalType=e,c[p]="string"==typeof e?e:a,l[1]=c;for(var i=2;i{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>I});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),c=n(16550),u=n(75238),i=n(33609),s=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,i.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,c.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,c]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[u,i]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,s.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=u??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&c(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);c(e),i(e),b(e)}),[i,b,o]),tabValues:o}}var y=n(51048);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:c,selectValue:u,tabValues:i}=e;const s=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=s.indexOf(t),r=i[n].value;r!==c&&(p(t),u(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=s.indexOf(e.currentTarget)+1;t=s[n]??s[0];break}case"ArrowLeft":{const n=s.indexOf(e.currentTarget)-1;t=s[n]??s[s.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},i.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:c===t?0:-1,"aria-selected":c===t,key:t,ref:e=>s.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",v.tabItem,l?.className,{"tabs__item--active":c===t})}),n??t)})))}function g(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function k(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",v.tabList)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(g,(0,r.Z)({},e,t)))}function I(e){const t=(0,y.Z)();return a.createElement(k,(0,r.Z)({key:String(t)},e))}},40024:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>y,default:()=>w,frontMatter:()=>b,metadata:()=>v,toc:()=>g});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < ",(0,a.kt)("inlineCode",{parentName:"td"},"string")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"The accent color configured by user.")))))}c.isMDXComponent=!0;n(73992);var u=n(18679);const i={toc:[]},s="wrapper";function p(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(u.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// ICommonFunctions is binded into the MFiles global object\nconst result = await MFiles.GetAccentColor();\n"))))}p.isMDXComponent=!0;const m={toc:[]},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Gets accent color."))}f.isMDXComponent=!0;const b={},y="GetAccentColor",v={unversionedId:"UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index",id:"UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index",title:"GetAccentColor",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommonFunctions/GetAccentColor",slug:"/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"DownloadFileAsDataUri",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri/"},next:{title:"GetClientLanguage",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetClientLanguage/"}},h={},g=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Return type",id:"return-type",level:2}],k={toc:g},I="wrapper";function w(e){let{components:t,...n}=e;return(0,a.kt)(I,(0,r.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"getaccentcolor"},"GetAccentColor"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(f,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(p,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(c,{components:n.components,mdxType:"Returns"}))}w.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/434bb66d.325bdd00.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/434bb66d.f6bb061c.js similarity index 83% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/434bb66d.325bdd00.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/434bb66d.f6bb061c.js index 244de1a1b..980107e25 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/434bb66d.325bdd00.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/434bb66d.f6bb061c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[4336],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),s=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),m=s(n),d=a,f=m["".concat(i,".").concat(d)]||m[d]||p[d]||o;return n?r.createElement(f,l(l({ref:t},c),{},{components:n})):r.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var u={};for(var i in t)hasOwnProperty.call(t,i)&&(u[i]=t[i]);u.originalType=e,u[m]="string"==typeof e?e:a,l[1]=u;for(var s=2;s{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),u=n(16550),i=n(75238),s=n(33609),c=n(92560);function m(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??m(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,u.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,i._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=p(e),[l,u]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[i,s]=f({queryString:n,groupId:r}),[m,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=i??m;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&u(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);u(e),s(e),b(e)}),[s,b,o]),tabValues:o}}var y=n(51048);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:u,selectValue:i,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:m}=(0,l.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),r=s[n].value;r!==u&&(m(t),i(r))},d=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:p},l,{className:(0,o.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":u===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function I(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},a.createElement(k,(0,r.Z)({},e,t)),a.createElement(v,(0,r.Z)({},e,t)))}function g(e){const t=(0,y.Z)();return a.createElement(I,(0,r.Z)({key:String(t)},e))}},93518:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>v,default:()=>E,frontMatter:()=>k,metadata:()=>I,toc:()=>x});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Promise")," < void >"),(0,a.kt)("td",{parentName:"tr",align:null})))))}u.isMDXComponent=!0;const i={toc:[]},s="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"customCommand"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"The custom command id.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"iconInformation"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/IIconInformation/"},"IIconInformation")),(0,a.kt)("td",{parentName:"tr",align:null},"The icon information.")))))}c.isMDXComponent=!0;n(73992);var m=n(18679);const p={toc:[]},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(m.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellFrame points here into the IShellFrame interface\nconst result = await shellFrame.Commands.SetIcon(\n customCommand,\n iconInformation,\n);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Sets the icon for a custom command."),(0,a.kt)("p",null,"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any\nfuture release. Use of this feature is not recommended for production environments."))}h.isMDXComponent=!0;const k={},v="SetIcon",I={unversionedId:"UIExt2/Interfaces/ICommands/SetIcon/index",id:"UIExt2/Interfaces/ICommands/SetIcon/index",title:"SetIcon",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommands/SetIcon/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommands/SetIcon",slug:"/UIExt2/Interfaces/ICommands/SetIcon/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetIcon/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"SetCommandState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetCommandState/"},next:{title:"SetMenuItemState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetMenuItemState/"}},g={},x=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],N={toc:x},w="wrapper";function E(e){let{components:t,...n}=e;return(0,a.kt)(w,(0,r.Z)({},N,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"seticon"},"SetIcon"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(h,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(u,{components:n.components,mdxType:"Returns"}))}E.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[4336],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),s=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),m=s(n),d=a,f=m["".concat(i,".").concat(d)]||m[d]||p[d]||o;return n?r.createElement(f,l(l({ref:t},c),{},{components:n})):r.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var u={};for(var i in t)hasOwnProperty.call(t,i)&&(u[i]=t[i]);u.originalType=e,u[m]="string"==typeof e?e:a,l[1]=u;for(var s=2;s{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>g});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),u=n(16550),i=n(75238),s=n(33609),c=n(92560);function m(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function p(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??m(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,u.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,i._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=p(e),[l,u]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[i,s]=f({queryString:n,groupId:r}),[m,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=i??m;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&u(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);u(e),s(e),b(e)}),[s,b,o]),tabValues:o}}var y=n(51048);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:u,selectValue:i,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:m}=(0,l.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),r=s[n].value;r!==u&&(m(t),i(r))},d=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:p},l,{className:(0,o.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":u===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function I(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},a.createElement(k,(0,r.Z)({},e,t)),a.createElement(v,(0,r.Z)({},e,t)))}function g(e){const t=(0,y.Z)();return a.createElement(I,(0,r.Z)({key:String(t)},e))}},93518:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>g,contentTitle:()=>v,default:()=>E,frontMatter:()=>k,metadata:()=>I,toc:()=>x});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function u(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Promise")," < void >"),(0,a.kt)("td",{parentName:"tr",align:null})))))}u.isMDXComponent=!0;const i={toc:[]},s="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"customCommand"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"The custom command id.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"iconInformation"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/IIconInformation/"},"IIconInformation")),(0,a.kt)("td",{parentName:"tr",align:null},"The icon information.")))))}c.isMDXComponent=!0;n(73992);var m=n(18679);const p={toc:[]},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(m.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellFrame points here into the IShellFrame interface\nconst result = await shellFrame.Commands.SetIcon(\n customCommand,\n iconInformation,\n);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Sets the icon for a custom command."))}h.isMDXComponent=!0;const k={},v="SetIcon",I={unversionedId:"UIExt2/Interfaces/ICommands/SetIcon/index",id:"UIExt2/Interfaces/ICommands/SetIcon/index",title:"SetIcon",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommands/SetIcon/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommands/SetIcon",slug:"/UIExt2/Interfaces/ICommands/SetIcon/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetIcon/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"SetCommandState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetCommandState/"},next:{title:"SetMenuItemState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetMenuItemState/"}},g={},x=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],w={toc:x},N="wrapper";function E(e){let{components:t,...n}=e;return(0,a.kt)(N,(0,r.Z)({},w,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"seticon"},"SetIcon"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(h,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(u,{components:n.components,mdxType:"Returns"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/47355b08.6e6e2ce5.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/47355b08.95de69f3.js similarity index 72% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/47355b08.6e6e2ce5.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/47355b08.95de69f3.js index f19109de5..23266f7fe 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/47355b08.6e6e2ce5.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/47355b08.95de69f3.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[6065],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},c=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},m="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),m=i(r),d=a,f=m["".concat(s,".").concat(d)]||m[d]||p[d]||o;return r?n.createElement(f,l(l({ref:t},c),{},{components:r})):n.createElement(f,l({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=d;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u[m]="string"==typeof e?e:a,l[1]=u;for(var i=2;i{r.d(t,{Z:()=>l});var n=r(67294),a=r(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:r,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:r},t)}},73992:(e,t,r)=>{r.d(t,{Z:()=>I});var n=r(87462),a=r(67294),o=r(86010),l=r(72957),u=r(16550),s=r(75238),i=r(33609),c=r(92560);function m(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function p(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??m(r);return function(e){const t=(0,i.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function d(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:r}=e;const n=(0,u.k6)(),o=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(n.location.search);t.set(o,e),n.replace({...n.location,search:t.toString()})}),[o,n])]}function b(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,o=p(e),[l,u]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:o}))),[s,i]=f({queryString:r,groupId:n}),[m,b]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,o]=(0,c.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&o.set(e)}),[r,o])]}({groupId:n}),y=(()=>{const e=s??m;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&u(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);u(e),i(e),b(e)}),[i,b,o]),tabValues:o}}var y=r(51048);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:r,selectedValue:u,selectValue:s,tabValues:i}=e;const c=[],{blockElementScrollPositionUntilNextRender:m}=(0,l.o5)(),p=e=>{const t=e.currentTarget,r=c.indexOf(t),n=i[r].value;n!==u&&(m(t),s(n))},d=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const r=c.indexOf(e.currentTarget)+1;t=c[r]??c[0];break}case"ArrowLeft":{const r=c.indexOf(e.currentTarget)-1;t=c[r]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},i.map((e=>{let{value:t,label:r,attributes:l}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:p},l,{className:(0,o.Z)("tabs__item",v.tabItem,l?.className,{"tabs__item--active":u===t})}),r??t)})))}function h(e){let{lazy:t,children:r,selectedValue:n}=e;const o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",v.tabList)},a.createElement(k,(0,n.Z)({},e,t)),a.createElement(h,(0,n.Z)({},e,t)))}function I(e){const t=(0,y.Z)();return a.createElement(g,(0,n.Z)({key:String(t)},e))}},84130:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>I,contentTitle:()=>h,default:()=>E,frontMatter:()=>k,metadata:()=>g,toc:()=>x});var n=r(87462),a=(r(67294),r(3905));const o={toc:[]},l="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(l,(0,n.Z)({},o,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < void >"),(0,a.kt)("td",{parentName:"tr",align:null},"Method does not return a value")))))}u.isMDXComponent=!0;const s={toc:[]},i="wrapper";function c(e){let{components:t,...r}=e;return(0,a.kt)(i,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"groupId"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"The task bar location id to remove.")))))}c.isMDXComponent=!0;r(73992);var m=r(18679);const p={toc:[]},d="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(m.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellFrame points here into the IShellFrame interface\nawait shellFrame.Commands.RemoveTaskbarGroup(groupId);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function v(e){let{components:t,...r}=e;return(0,a.kt)(y,(0,n.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Removes custom task bar group from the task bar."),(0,a.kt)("p",null,"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any\nfuture release. Use of this feature is not recommended for production environments."))}v.isMDXComponent=!0;const k={},h="RemoveTaskbarGroup",g={unversionedId:"UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index",id:"UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index",title:"RemoveTaskbarGroup",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommands/RemoveTaskbarGroup",slug:"/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"RemoveMenuItem",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveMenuItem/"},next:{title:"SetCommandState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetCommandState/"}},I={},x=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],w={toc:x},T="wrapper";function E(e){let{components:t,...r}=e;return(0,a.kt)(T,(0,n.Z)({},w,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"removetaskbargroup"},"RemoveTaskbarGroup"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(v,{components:r.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:r.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:r.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(u,{components:r.components,mdxType:"Returns"}))}E.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[6065],{3905:(e,t,r)=>{r.d(t,{Zo:()=>c,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),i=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},c=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=u(e,["components","mdxType","originalType","parentName"]),p=i(r),d=a,f=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return r?n.createElement(f,l(l({ref:t},c),{},{components:r})):n.createElement(f,l({ref:t},c))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,l=new Array(o);l[0]=d;var u={};for(var s in t)hasOwnProperty.call(t,s)&&(u[s]=t[s]);u.originalType=e,u[p]="string"==typeof e?e:a,l[1]=u;for(var i=2;i{r.d(t,{Z:()=>l});var n=r(67294),a=r(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:r,className:l}=e;return n.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:r},t)}},73992:(e,t,r)=>{r.d(t,{Z:()=>I});var n=r(87462),a=r(67294),o=r(86010),l=r(72957),u=r(16550),s=r(75238),i=r(33609),c=r(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}function m(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??p(r);return function(e){const t=(0,i.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function d(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:r}=e;const n=(0,u.k6)(),o=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(n.location.search);t.set(o,e),n.replace({...n.location,search:t.toString()})}),[o,n])]}function b(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,o=m(e),[l,u]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:o}))),[s,i]=f({queryString:r,groupId:n}),[p,b]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,o]=(0,c.Nk)(r);return[n,(0,a.useCallback)((e=>{r&&o.set(e)}),[r,o])]}({groupId:n}),y=(()=>{const e=s??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&u(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);u(e),i(e),b(e)}),[i,b,o]),tabValues:o}}var y=r(51048);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:r,selectedValue:u,selectValue:s,tabValues:i}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,r=c.indexOf(t),n=i[r].value;n!==u&&(p(t),s(n))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const r=c.indexOf(e.currentTarget)+1;t=c[r]??c[0];break}case"ArrowLeft":{const r=c.indexOf(e.currentTarget)-1;t=c[r]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":r},t)},i.map((e=>{let{value:t,label:r,attributes:l}=e;return a.createElement("li",(0,n.Z)({role:"tab",tabIndex:u===t?0:-1,"aria-selected":u===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",v.tabItem,l?.className,{"tabs__item--active":u===t})}),r??t)})))}function h(e){let{lazy:t,children:r,selectedValue:n}=e;const o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===n));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==n}))))}function g(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",v.tabList)},a.createElement(k,(0,n.Z)({},e,t)),a.createElement(h,(0,n.Z)({},e,t)))}function I(e){const t=(0,y.Z)();return a.createElement(g,(0,n.Z)({key:String(t)},e))}},84130:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>I,contentTitle:()=>h,default:()=>E,frontMatter:()=>k,metadata:()=>g,toc:()=>x});var n=r(87462),a=(r(67294),r(3905));const o={toc:[]},l="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(l,(0,n.Z)({},o,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < void >"),(0,a.kt)("td",{parentName:"tr",align:null},"Method does not return a value")))))}u.isMDXComponent=!0;const s={toc:[]},i="wrapper";function c(e){let{components:t,...r}=e;return(0,a.kt)(i,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"groupId"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"The task bar location id to remove.")))))}c.isMDXComponent=!0;r(73992);var p=r(18679);const m={toc:[]},d="wrapper";function f(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},m,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellFrame points here into the IShellFrame interface\nawait shellFrame.Commands.RemoveTaskbarGroup(groupId);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function v(e){let{components:t,...r}=e;return(0,a.kt)(y,(0,n.Z)({},b,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Removes custom task bar group from the task bar."))}v.isMDXComponent=!0;const k={},h="RemoveTaskbarGroup",g={unversionedId:"UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index",id:"UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index",title:"RemoveTaskbarGroup",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommands/RemoveTaskbarGroup",slug:"/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveTaskbarGroup/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"RemoveMenuItem",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/RemoveMenuItem/"},next:{title:"SetCommandState",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/SetCommandState/"}},I={},x=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],w={toc:x},T="wrapper";function E(e){let{components:t,...r}=e;return(0,a.kt)(T,(0,n.Z)({},w,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"removetaskbargroup"},"RemoveTaskbarGroup"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(v,{components:r.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:r.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:r.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(u,{components:r.components,mdxType:"Returns"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4bceb49e.04a3f9cf.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4bceb49e.04a3f9cf.js deleted file mode 100644 index 702734b17..000000000 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4bceb49e.04a3f9cf.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[1483],{3905:(e,t,r)=>{r.d(t,{Zo:()=>p,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var s=n.createContext({}),c=function(e){var t=n.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},p=function(e){var t=c(e.components);return n.createElement(s.Provider,{value:t},e.children)},u="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),u=c(r),d=a,f=u["".concat(s,".").concat(d)]||u[d]||m[d]||o;return r?n.createElement(f,i(i({ref:t},p),{},{components:r})):n.createElement(f,i({ref:t},p))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[u]="string"==typeof e?e:a,i[1]=l;for(var c=2;c{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>c,default:()=>y,frontMatter:()=>s,metadata:()=>p,toc:()=>m});var n=r(87462),a=(r(67294),r(3905));const o={toc:[]},i="wrapper";function l(e){let{components:t,...r}=e;return(0,a.kt)(i,(0,n.Z)({},o,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./GetMetadataStructureItemIdByAlias/"},"GetMetadataStructureItemIdByAlias")),(0,a.kt)("td",{parentName:"tr",align:null},"Gets metadata structure item ID by alias.")))))}l.isMDXComponent=!0;const s={},c="VaultOperations",p={unversionedId:"gRPC/Interfaces/VaultOperations/index",id:"gRPC/Interfaces/VaultOperations/index",title:"VaultOperations",description:"Methods",source:"@site/docs/gRPC/Interfaces/VaultOperations/index.mdx",sourceDirName:"gRPC/Interfaces/VaultOperations",slug:"/gRPC/Interfaces/VaultOperations/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"RunExtensionMethod",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultExtensionMethodsOperations/RunExtensionMethod/"},next:{title:"GetMetadataStructureItemIdByAlias",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/"}},u={},m=[{value:"Methods",id:"methods",level:2}],d={toc:m},f="wrapper";function y(e){let{components:t,...r}=e;return(0,a.kt)(f,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"vaultoperations"},"VaultOperations"),(0,a.kt)("h2",{id:"methods"},"Methods"),(0,a.kt)(l,{components:r.components,mdxType:"Methods"}))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4bceb49e.48099f84.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4bceb49e.48099f84.js new file mode 100644 index 000000000..79d4dd8fe --- /dev/null +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4bceb49e.48099f84.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[1483],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>f});var n=r(67294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var c=n.createContext({}),s=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},u=function(e){var t=s(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},d=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,c=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),p=s(r),d=a,f=p["".concat(c,".").concat(d)]||p[d]||m[d]||o;return r?n.createElement(f,i(i({ref:t},u),{},{components:r})):n.createElement(f,i({ref:t},u))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,i=new Array(o);i[0]=d;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:a,i[1]=l;for(var s=2;s{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>y,frontMatter:()=>c,metadata:()=>u,toc:()=>m});var n=r(87462),a=(r(67294),r(3905));const o={toc:[]},i="wrapper";function l(e){let{components:t,...r}=e;return(0,a.kt)(i,(0,n.Z)({},o,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./GetMetadataStructureItemIdByAlias/"},"GetMetadataStructureItemIdByAlias")),(0,a.kt)("td",{parentName:"tr",align:null},"Gets metadata structure item ID by alias.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./GetMetadataStructureItemIdByGUID/"},"GetMetadataStructureItemIdByGUID")),(0,a.kt)("td",{parentName:"tr",align:null},"Gets metadata structure item ID by GUID.")))))}l.isMDXComponent=!0;const c={},s="VaultOperations",u={unversionedId:"gRPC/Interfaces/VaultOperations/index",id:"gRPC/Interfaces/VaultOperations/index",title:"VaultOperations",description:"Methods",source:"@site/docs/gRPC/Interfaces/VaultOperations/index.mdx",sourceDirName:"gRPC/Interfaces/VaultOperations",slug:"/gRPC/Interfaces/VaultOperations/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"RunExtensionMethod",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultExtensionMethodsOperations/RunExtensionMethod/"},next:{title:"GetMetadataStructureItemIdByAlias",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/"}},p={},m=[{value:"Methods",id:"methods",level:2}],d={toc:m},f="wrapper";function y(e){let{components:t,...r}=e;return(0,a.kt)(f,(0,n.Z)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"vaultoperations"},"VaultOperations"),(0,a.kt)("h2",{id:"methods"},"Methods"),(0,a.kt)(l,{components:r.components,mdxType:"Methods"}))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4c72923f.4ba8f6f1.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4c72923f.7bb31916.js similarity index 67% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4c72923f.4ba8f6f1.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4c72923f.7bb31916.js index 06797f129..773e91647 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4c72923f.4ba8f6f1.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/4c72923f.7bb31916.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[1838],{3905:(e,t,n)=>{n.d(t,{Zo:()=>s,kt:()=>h});var a=n(67294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function m(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l=a.createContext({}),d=function(e){var t=a.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):m(m({},t),e)),n},s=function(e){var t=d(e.components);return a.createElement(l.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},p=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),c=d(n),p=o,h=c["".concat(l,".").concat(p)]||c[p]||u[p]||r;return n?a.createElement(h,m(m({ref:t},s),{},{components:n})):a.createElement(h,m({ref:t},s))}));function h(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,m=new Array(r);m[0]=p;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:o,m[1]=i;for(var d=2;d{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>m,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>d});var a=n(87462),o=(n(67294),n(3905));n(45274);const r={sidebar_position:1},m="Overview",i={unversionedId:"Overview/Overview",id:"Overview/Overview",title:"Overview",description:"User Interface Extensibility Framework applications are JavaScript applications that run within the M-Files Web client. The framework provides a set of objects that allow you to interact with the user interface by adding commands to various menus, to add your own tabs/dashboards, or to react when various events fire within the user interface. Applications can also use the M-Files Vault API to perform tasks within the vault such as searching or creating objects.",source:"@site/docs/Overview/Overview.mdx",sourceDirName:"Overview",slug:"/Overview/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Getting Started",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/"},next:{title:"Application Structure",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ApplicationStructure"}},l={},d=[{value:"What can be done using the User Interface Extensibility Framework?",id:"what-can-be-done-using-the-user-interface-extensibility-framework",level:2},{value:"How are UI applications structured?",id:"how-are-ui-applications-structured",level:2},{value:"How do I deploy and test my UI applications?",id:"how-do-i-deploy-and-test-my-ui-applications",level:2}],s={toc:d},c="wrapper";function u(e){let{components:t,...n}=e;return(0,o.kt)(c,(0,a.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"overview"},"Overview"),(0,o.kt)("p",null,"User Interface Extensibility Framework applications are JavaScript applications that run within the M-Files Web client. The ",(0,o.kt)("a",{parentName:"p",href:"../UIExt2"},"framework provides a set of objects")," that allow you to interact with the user interface by adding commands to various menus, to add your own tabs/dashboards, or to react when various events fire within the user interface. Applications can also use the ",(0,o.kt)("a",{parentName:"p",href:"../gRPC"},"M-Files Vault API")," to perform tasks within the vault such as searching or creating objects."),(0,o.kt)("h2",{id:"what-can-be-done-using-the-user-interface-extensibility-framework"},"What can be done using the User Interface Extensibility Framework?"),(0,o.kt)("p",null,"The User Interface Extensibility Framework allows third-party developers to extend the M-Files client interface in a number of ways:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"By reacting when ",(0,o.kt)("a",{parentName:"li",href:"./Events#interface-events"},"events fire within the user interface"),", such as reacting when a user selects an object of a known type."),(0,o.kt)("li",{parentName:"ul"},"By adding ",(0,o.kt)("a",{parentName:"li",href:"./Commands"},"commands")," to either the main menu or context menu, and reacting when those commands are clicked."),(0,o.kt)("li",{parentName:"ul"},'By adding custom tabs to the user interface, allowing custom HTML pages ("',(0,o.kt)("a",{parentName:"li",href:"./Dashboards#open-a-new-dashboard-using-the-tab"},"dashboards"),'") to be shown within M-Files.'),(0,o.kt)("li",{parentName:"ul"},"By showing ",(0,o.kt)("a",{parentName:"li",href:"./Dashboards#open-a-popup-dashboard"},"popup dashboards"),", for example when a command is clicked."),(0,o.kt)("li",{parentName:"ul"},"By interacting with other components of the user interface through the ",(0,o.kt)("a",{parentName:"li",href:"../UIExt2"},"UIX API"),", or interacting with the vault via the ",(0,o.kt)("a",{parentName:"li",href:"../gRPC"},"Vault API"),"."),(0,o.kt)("li",{parentName:"ul"},"Using any combination of the above.")),(0,o.kt)("h2",{id:"how-are-ui-applications-structured"},"How are UI applications structured?"),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"More information on the application structure is available in the ",(0,o.kt)("a",{parentName:"p",href:"./ApplicationStructure"},"dedicated page"),".")),(0,o.kt)("p",null,"UI applications are deployed as a ",(0,o.kt)("inlineCode",{parentName:"p"},".mfappx")," file, which is a renamed ",(0,o.kt)("inlineCode",{parentName:"p"},".zip")," file. This archive contains the files that the application needs to run, including:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"A manifest file named ",(0,o.kt)("inlineCode",{parentName:"li"},"appdef.xml")," which defines the application ID, name, modules, and dashboards."),(0,o.kt)("li",{parentName:"ul"},"At least one ",(0,o.kt)("a",{parentName:"li",href:"./Modules"},"module")," file which declares the application entry point."),(0,o.kt)("li",{parentName:"ul"},"Zero, one, or more ",(0,o.kt)("a",{parentName:"li",href:"./Dashboards"},"dashboard")," HTML file, along with any supporting files such as CSS, JavaScript, or images.")),(0,o.kt)("h2",{id:"how-do-i-deploy-and-test-my-ui-applications"},"How do I deploy and test my UI applications?"))}u.isMDXComponent=!0},47713:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Value"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Undefined")),(0,o.kt)("td",{parentName:"tr",align:null},"0"),(0,o.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Active")),(0,o.kt)("td",{parentName:"tr",align:null},"1"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is visible and enabled.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Hidden")),(0,o.kt)("td",{parentName:"tr",align:null},"3"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is not visible.")))))}i.isMDXComponent=!0},9826:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"shellFrame.Commands.SetCommandState( \n commandId, // The ID of the command which state is to be changed\n MFiles.CommandLocation.MainMenu, // The location in the UI where the command's state is being changed\n MFiles.CommandState.CommandState_Hidden // New state of the command in specific location\n);\n")))}i.isMDXComponent=!0},45274:(e,t,n)=>{n(87462),n(67294),n(3905),n(7606),n(94642),n(37415),n(47713),n(9826)},37415:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,'This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.'),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'\n// Called when the UI Extension starts\nfunction OnNewShellUI(shellUI) {\n\n // Wait for the ShellFrame to be created.\n shellUI.Events.Register(\n MFiles.Event.NewShellFrame,\n async (shellFrame) => {\n\n // Wait for the shellframe to start\n shellFrame.Events.Register( \n MFiles.Event.Started,\n async () => {\n\n // Create a new custom command and menu item for the command\n const createCommand = async ( name: string ) => {\n\n // Create a new custom command\n const commandId = await shellFrame.Commands.CreateCustomCommand(name);\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n // Command ID\n commands.exampleCommand,\n // Menulocation\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n // Priority of the command\n 1 \n );\n\n // Return a data structure containing essential information about the commands\n return {\n id: commandId, // ID of the command\n menuItemId // Menu item ID, can be used to add sub menus to this menu item.\n }\n }\n\n // Create an Example command and a set of sample commands to control it\'s visibility\n const commands = {\n // This is the sample command\n exampleCommand : await createCommand("Hello World"),\n\n // These commands control the state of the example command\n addCommand: await createCommand("Add Command To Menu"),\n deleteCustomCommand: await createCommand("Delete Command")\n hideCommand: await createCommand("Hide Command"),\n showCommand: await createCommand("Activate Command"),\n executeCommand: await createCommand("Execute Command"),\n getCommandName: await createCommand("Get Name"),\n getCommandState: await createCommand("Get Command State"),\n removeCommandFromMenu: await createCommand("Remove From Menu"), \n removeCommand: await createCommand("Remove Command")\n }\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n\n // Listen for the custom commands.\n shellFrame.Commands.Events.Register(\n\n // Listen for the CustomCommand events.\n MFiles.Event.CustomCommand,\n\n // Each command has ID and optional data provided with it.\n ( commandId, data ) => {\n // Respond to the command if custom command sent by the application \n switch( commandId ) {\n\n // Run the Example command\n case commands.exampleCommand.id:\n shellFrame.ShowMessage( "Hello World!" );\n break;\n\n // Add the new menuitem which runs the example command\n case commands.addCommand.id:\n await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n break;\n\n // Removes the command from particular menu\n case commands.removeCommandFromMenu.id:\n await shellFrame.Commands.RemoveCustomCommandFromMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu\n );\n break;\n\n // Deletes the command permanently\n case commands.deleteCommand.id:\n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Hiddes all command instances for specific command ID\n case commands.hideCommand.id:\n // Hide the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Hidden\n );\n break;\n\n // Activates (makes visible) all command instances for specific command ID\n case commands.showCommand.id:\n // Show the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Get the command name\n case commands.getCommandName.id:\n const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);\n shellFrame.ShowMessage( name );\n break;\n\n // Get the Command State\n case commands.getCommandState.id:\n\n // NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu\n const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );\n shellFrame.ShowMessage( `Command state: ${commandState}` );\n break;\n\n }\n }\n );\n }\n )\n }\n )\n}\n')),(0,o.kt)("p",null,"This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions."))}i.isMDXComponent=!0},7606:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./AddCustomCommandToMenu/"},"AddCustomCommandToMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Adds existing custom command to the specified context menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateCustomCommand/"},"CreateCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a custom command that can be added to the application toolbar or to the contextmenu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateSubMenuItem/"},"CreateSubMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a new SubMenu for already created Menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateTaskbarGroup/"},"CreateTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates new custom task bar group for custom commands. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: If multiple task bar groups are created for the same MenuLocation with the same ",(0,o.kt)("br",null),"orderPriority, their relative ordering is unspecified and may vary between runs, sessions or ",(0,o.kt)("br",null),"versions. Do not rely on a particular order for groups with equal priority \u2014 assign distinct ",(0,o.kt)("br",null),"orderPriority values to guarantee a deterministic ordering (lower values are shown first).")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./DeleteCustomCommand/"},"DeleteCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Deletes a custom command. The command is automatically removed.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./ExecuteCommand/"},"ExecuteCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Executes a user command.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandName/"},"GetCommandName")),(0,o.kt)("td",{parentName:"tr",align:null},"Resolves the name that has been associated with the given command id.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandState/"},"GetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the command state for builtin or custom command in specified location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetMenuIdOfBuiltInCommand/"},"GetMenuIdOfBuiltInCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the MenuItem ID of a built-in command by its command ID and location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveCustomCommandFromMenu/"},"RemoveCustomCommandFromMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes a custom command from the specified menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveMenuItem/"},"RemoveMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes menuitem from the menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveTaskbarGroup/"},"RemoveTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes custom task bar group from the task bar. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetCommandState/"},"SetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the command's state to be hidden, visible, enabled or disabled. Calling ",(0,o.kt)("br",null),"this method may affect context menu, application toolbar, menus or all of them.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetIcon/"},"SetIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom command. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetMenuItemState/"},"SetMenuItemState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the MenuItem state individually.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetTaskbarGroupIcon/"},"SetTaskbarGroupIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom task bar group. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")))))}i.isMDXComponent=!0},94642:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),o=(n(67294),n(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...n}=e;return(0,o.kt)(m,(0,a.Z)({},r,n,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Events"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"/UIExt2/Events/#icommandsevents"},"ICommandsEvents")),(0,o.kt)("td",{parentName:"tr",align:null},"Returns the event registering interface of the ICommands interface.")))))}i.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[1838],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>h});var n=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function m(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var l=n.createContext({}),d=function(e){var t=n.useContext(l),a=t;return e&&(a="function"==typeof e?e(t):m(m({},t),e)),a},s=function(e){var t=d(e.components);return n.createElement(l.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,l=e.parentName,s=i(e,["components","mdxType","originalType","parentName"]),c=d(a),p=o,h=c["".concat(l,".").concat(p)]||c[p]||u[p]||r;return a?n.createElement(h,m(m({ref:t},s),{},{components:a})):n.createElement(h,m({ref:t},s))}));function h(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,m=new Array(r);m[0]=p;var i={};for(var l in t)hasOwnProperty.call(t,l)&&(i[l]=t[l]);i.originalType=e,i[c]="string"==typeof e?e:o,m[1]=i;for(var d=2;d{a.r(t),a.d(t,{assets:()=>l,contentTitle:()=>m,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>d});var n=a(87462),o=(a(67294),a(3905));a(45274);const r={sidebar_position:1},m="Overview",i={unversionedId:"Overview/Overview",id:"Overview/Overview",title:"Overview",description:"User Interface Extensibility Framework applications are JavaScript applications that run within the M-Files Web client. The framework provides a set of objects that allow you to interact with the user interface by adding commands to various menus, to add your own tabs/dashboards, or to react when various events fire within the user interface. Applications can also use the M-Files Vault API to perform tasks within the vault such as searching or creating objects.",source:"@site/docs/Overview/Overview.mdx",sourceDirName:"Overview",slug:"/Overview/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/",draft:!1,tags:[],version:"current",sidebarPosition:1,frontMatter:{sidebar_position:1},sidebar:"tutorialSidebar",previous:{title:"Getting Started",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/"},next:{title:"Application Structure",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ApplicationStructure"}},l={},d=[{value:"What can be done using the User Interface Extensibility Framework?",id:"what-can-be-done-using-the-user-interface-extensibility-framework",level:2},{value:"How are UI applications structured?",id:"how-are-ui-applications-structured",level:2},{value:"How do I deploy and test my UI applications?",id:"how-do-i-deploy-and-test-my-ui-applications",level:2}],s={toc:d},c="wrapper";function u(e){let{components:t,...a}=e;return(0,o.kt)(c,(0,n.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"overview"},"Overview"),(0,o.kt)("p",null,"User Interface Extensibility Framework applications are JavaScript applications that run within the M-Files Web client. The ",(0,o.kt)("a",{parentName:"p",href:"../UIExt2"},"framework provides a set of objects")," that allow you to interact with the user interface by adding commands to various menus, to add your own tabs/dashboards, or to react when various events fire within the user interface. Applications can also use the ",(0,o.kt)("a",{parentName:"p",href:"../gRPC"},"M-Files Vault API")," to perform tasks within the vault such as searching or creating objects."),(0,o.kt)("h2",{id:"what-can-be-done-using-the-user-interface-extensibility-framework"},"What can be done using the User Interface Extensibility Framework?"),(0,o.kt)("p",null,"The User Interface Extensibility Framework allows third-party developers to extend the M-Files client interface in a number of ways:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"By reacting when ",(0,o.kt)("a",{parentName:"li",href:"./Events#interface-events"},"events fire within the user interface"),", such as reacting when a user selects an object of a known type."),(0,o.kt)("li",{parentName:"ul"},"By adding ",(0,o.kt)("a",{parentName:"li",href:"./Commands"},"commands")," to either the main menu or context menu, and reacting when those commands are clicked."),(0,o.kt)("li",{parentName:"ul"},'By adding custom tabs to the user interface, allowing custom HTML pages ("',(0,o.kt)("a",{parentName:"li",href:"./Dashboards#open-a-new-dashboard-using-the-tab"},"dashboards"),'") to be shown within M-Files.'),(0,o.kt)("li",{parentName:"ul"},"By showing ",(0,o.kt)("a",{parentName:"li",href:"./Dashboards#open-a-popup-dashboard"},"popup dashboards"),", for example when a command is clicked."),(0,o.kt)("li",{parentName:"ul"},"By interacting with other components of the user interface through the ",(0,o.kt)("a",{parentName:"li",href:"../UIExt2"},"UIX API"),", or interacting with the vault via the ",(0,o.kt)("a",{parentName:"li",href:"../gRPC"},"Vault API"),"."),(0,o.kt)("li",{parentName:"ul"},"Using any combination of the above.")),(0,o.kt)("h2",{id:"how-are-ui-applications-structured"},"How are UI applications structured?"),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"More information on the application structure is available in the ",(0,o.kt)("a",{parentName:"p",href:"./ApplicationStructure"},"dedicated page"),".")),(0,o.kt)("p",null,"UI applications are deployed as a ",(0,o.kt)("inlineCode",{parentName:"p"},".mfappx")," file, which is a renamed ",(0,o.kt)("inlineCode",{parentName:"p"},".zip")," file. This archive contains the files that the application needs to run, including:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"A manifest file named ",(0,o.kt)("inlineCode",{parentName:"li"},"appdef.xml")," which defines the application ID, name, modules, and dashboards."),(0,o.kt)("li",{parentName:"ul"},"At least one ",(0,o.kt)("a",{parentName:"li",href:"./Modules"},"module")," file which declares the application entry point."),(0,o.kt)("li",{parentName:"ul"},"Zero, one, or more ",(0,o.kt)("a",{parentName:"li",href:"./Dashboards"},"dashboard")," HTML file, along with any supporting files such as CSS, JavaScript, or images.")),(0,o.kt)("h2",{id:"how-do-i-deploy-and-test-my-ui-applications"},"How do I deploy and test my UI applications?"))}u.isMDXComponent=!0},47713:(e,t,a)=>{a.d(t,{ZP:()=>i});var n=a(87462),o=(a(67294),a(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...a}=e;return(0,o.kt)(m,(0,n.Z)({},r,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Value"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Undefined")),(0,o.kt)("td",{parentName:"tr",align:null},"0"),(0,o.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Active")),(0,o.kt)("td",{parentName:"tr",align:null},"1"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is visible and enabled.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Hidden")),(0,o.kt)("td",{parentName:"tr",align:null},"3"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is not visible.")))))}i.isMDXComponent=!0},9826:(e,t,a)=>{a.d(t,{ZP:()=>i});var n=a(87462),o=(a(67294),a(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...a}=e;return(0,o.kt)(m,(0,n.Z)({},r,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"shellFrame.Commands.SetCommandState( \n commandId, // The ID of the command which state is to be changed\n MFiles.CommandLocation.MainMenu, // The location in the UI where the command's state is being changed\n MFiles.CommandState.CommandState_Hidden // New state of the command in specific location\n);\n")))}i.isMDXComponent=!0},45274:(e,t,a)=>{a(87462),a(67294),a(3905),a(7606),a(94642),a(37415),a(47713),a(9826)},37415:(e,t,a)=>{a.d(t,{ZP:()=>i});var n=a(87462),o=(a(67294),a(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...a}=e;return(0,o.kt)(m,(0,n.Z)({},r,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,'This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.'),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'\n// Called when the UI Extension starts\nfunction OnNewShellUI(shellUI) {\n\n // Wait for the ShellFrame to be created.\n shellUI.Events.Register(\n MFiles.Event.NewShellFrame,\n async (shellFrame) => {\n\n // Wait for the shellframe to start\n shellFrame.Events.Register( \n MFiles.Event.Started,\n async () => {\n\n // Create a new custom command and menu item for the command\n const createCommand = async ( name: string ) => {\n\n // Create a new custom command\n const commandId = await shellFrame.Commands.CreateCustomCommand(name);\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n // Command ID\n commands.exampleCommand,\n // Menulocation\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n // Priority of the command\n 1 \n );\n\n // Return a data structure containing essential information about the commands\n return {\n id: commandId, // ID of the command\n menuItemId // Menu item ID, can be used to add sub menus to this menu item.\n }\n }\n\n // Create an Example command and a set of sample commands to control it\'s visibility\n const commands = {\n // This is the sample command\n exampleCommand : await createCommand("Hello World"),\n\n // These commands control the state of the example command\n addCommand: await createCommand("Add Command To Menu"),\n deleteCustomCommand: await createCommand("Delete Command")\n hideCommand: await createCommand("Hide Command"),\n showCommand: await createCommand("Activate Command"),\n executeCommand: await createCommand("Execute Command"),\n getCommandName: await createCommand("Get Name"),\n getCommandState: await createCommand("Get Command State"),\n removeCommandFromMenu: await createCommand("Remove From Menu"), \n removeCommand: await createCommand("Remove Command")\n }\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n\n // Listen for the custom commands.\n shellFrame.Commands.Events.Register(\n\n // Listen for the CustomCommand events.\n MFiles.Event.CustomCommand,\n\n // Each command has ID and optional data provided with it.\n ( commandId, data ) => {\n // Respond to the command if custom command sent by the application \n switch( commandId ) {\n\n // Run the Example command\n case commands.exampleCommand.id:\n shellFrame.ShowMessage( "Hello World!" );\n break;\n\n // Add the new menuitem which runs the example command\n case commands.addCommand.id:\n await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n break;\n\n // Removes the command from particular menu\n case commands.removeCommandFromMenu.id:\n await shellFrame.Commands.RemoveCustomCommandFromMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu\n );\n break;\n\n // Deletes the command permanently\n case commands.deleteCommand.id:\n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Hiddes all command instances for specific command ID\n case commands.hideCommand.id:\n // Hide the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Hidden\n );\n break;\n\n // Activates (makes visible) all command instances for specific command ID\n case commands.showCommand.id:\n // Show the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Get the command name\n case commands.getCommandName.id:\n const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);\n shellFrame.ShowMessage( name );\n break;\n\n // Get the Command State\n case commands.getCommandState.id:\n\n // NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu\n const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );\n shellFrame.ShowMessage( `Command state: ${commandState}` );\n break;\n\n }\n }\n );\n }\n )\n }\n )\n}\n')),(0,o.kt)("p",null,"This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions."))}i.isMDXComponent=!0},7606:(e,t,a)=>{a.d(t,{ZP:()=>i});var n=a(87462),o=(a(67294),a(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...a}=e;return(0,o.kt)(m,(0,n.Z)({},r,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./AddCustomCommandToMenu/"},"AddCustomCommandToMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Adds existing custom command to the specified context menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateCustomCommand/"},"CreateCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a custom command that can be added to the application toolbar or to the contextmenu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateSubMenuItem/"},"CreateSubMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a new SubMenu for already created Menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateTaskbarGroup/"},"CreateTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates new custom task bar group for custom commands. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: If multiple task bar groups are created for the same MenuLocation with the same ",(0,o.kt)("br",null),"orderPriority, their relative ordering is unspecified and may vary between runs, sessions or ",(0,o.kt)("br",null),"versions. Do not rely on a particular order for groups with equal priority \u2014 assign distinct ",(0,o.kt)("br",null),"orderPriority values to guarantee a deterministic ordering (lower values are shown first).")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./DeleteCustomCommand/"},"DeleteCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Deletes a custom command. The command is automatically removed.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./ExecuteCommand/"},"ExecuteCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Executes a user command.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandName/"},"GetCommandName")),(0,o.kt)("td",{parentName:"tr",align:null},"Resolves the name that has been associated with the given command id.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandState/"},"GetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the command state for builtin or custom command in specified location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetMenuIdOfBuiltInCommand/"},"GetMenuIdOfBuiltInCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the MenuItem ID of a built-in command by its command ID and location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveCustomCommandFromMenu/"},"RemoveCustomCommandFromMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes a custom command from the specified menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveMenuItem/"},"RemoveMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes menuitem from the menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveTaskbarGroup/"},"RemoveTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes custom task bar group from the task bar.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetCommandState/"},"SetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the command's state to be hidden, visible, enabled or disabled. Calling ",(0,o.kt)("br",null),"this method may affect context menu, application toolbar, menus or all of them.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetIcon/"},"SetIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom command.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetMenuItemState/"},"SetMenuItemState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the MenuItem state individually.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetTaskbarGroupIcon/"},"SetTaskbarGroupIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom task bar group.")))))}i.isMDXComponent=!0},94642:(e,t,a)=>{a.d(t,{ZP:()=>i});var n=a(87462),o=(a(67294),a(3905));const r={toc:[]},m="wrapper";function i(e){let{components:t,...a}=e;return(0,o.kt)(m,(0,n.Z)({},r,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Events"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"/UIExt2/Events/#icommandsevents"},"ICommandsEvents")),(0,o.kt)("td",{parentName:"tr",align:null},"Returns the event registering interface of the ICommands interface.")))))}i.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5585d983.71c4cbf4.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5585d983.d2b407ac.js similarity index 55% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5585d983.71c4cbf4.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5585d983.d2b407ac.js index 61434a09f..bea7d3a8f 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5585d983.71c4cbf4.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5585d983.d2b407ac.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[5010],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=s(n),m=a,f=p["".concat(u,".").concat(m)]||p[m]||d[m]||l;return n?r.createElement(f,o(o({ref:t},c),{},{components:n})):r.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,o=new Array(l);o[0]=m;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[p]="string"==typeof e?e:a,o[1]=i;for(var s=2;s{n.d(t,{Z:()=>o});var r=n(67294),a=n(86010);const l={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,o),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(87462),a=n(67294),l=n(86010),o=n(72957),i=n(16550),u=n(75238),s=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function d(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,l=d(e),[o,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[u,s]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:r}),k=(()=>{const e=u??p;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{k&&i(k)}),[k]);return{selectedValue:o,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),s(e),b(e)}),[s,b,l]),tabValues:l}}var k=n(51048);const y={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function g(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,o.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),r=s[n].value;r!==i&&(p(t),u(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:o}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},o,{className:(0,l.Z)("tabs__item",y.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function h(e){let{lazy:t,children:n,selectedValue:r}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},a.createElement(g,(0,r.Z)({},e,t)),a.createElement(h,(0,r.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return a.createElement(v,(0,r.Z)({key:String(t)},e))}},3054:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>N,contentTitle:()=>h,default:()=>E,frontMatter:()=>g,metadata:()=>v,toc:()=>I});var r=n(87462),a=(n(67294),n(3905));const l={toc:[]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(o,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < void >"),(0,a.kt)("td",{parentName:"tr",align:null},"Method does not return a value")))))}i.isMDXComponent=!0;const u={toc:[]},s="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"selectedFileID"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"Selected file's ID.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"selectedObject"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/ISelectedFile/"},"ISelectedFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Selected object info.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"fileToBeReplaced"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," FileList"),(0,a.kt)("td",{parentName:"tr",align:null},"Info of file to be replaced. See ",(0,a.kt)("br",null),(0,a.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/API/FileList"},"https://developer.mozilla.org/en-US/docs/Web/API/FileList"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"dataURL"),(0,a.kt)("td",{parentName:"tr",align:null},"Optional"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Data URL of the file to be replaced. ",(0,a.kt)("br",null),"Only base64-encoded data URLs are supported and MIME-type is not optional. ",(0,a.kt)("br",null),"Syntax should be: ",'"',"data:","[<","media-type",">][;base64]",",","<","data",">",'"',".")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"dataURLName"),(0,a.kt)("td",{parentName:"tr",align:null},"Optional"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Name of the file with the extension represented by the data URL.")))))}c.isMDXComponent=!0;n(73992);var p=n(18679);const d={toc:[]},m="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellListing points to instance of IShellListing\nawait shellListing.ReplaceFile(\n selectedFileID,\n selectedObject,\n fileToBeReplaced,\n dataURL,\n dataURLName,\n);\n"))))}f.isMDXComponent=!0;const b={toc:[]},k="wrapper";function y(e){let{components:t,...n}=e;return(0,a.kt)(k,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Perform file replace."))}y.isMDXComponent=!0;const g={},h="ReplaceFile",v={unversionedId:"UIExt2/Interfaces/IShellListing/ReplaceFile/index",id:"UIExt2/Interfaces/IShellListing/ReplaceFile/index",title:"ReplaceFile",description:"Description",source:"@site/docs/UIExt2/Interfaces/IShellListing/ReplaceFile/index.mdx",sourceDirName:"UIExt2/Interfaces/IShellListing/ReplaceFile",slug:"/UIExt2/Interfaces/IShellListing/ReplaceFile/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ReplaceFile/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"RemoveListingItem",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RemoveListingItem/"},next:{title:"SelectFolder",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectFolder/"}},N={},I=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],x={toc:I},w="wrapper";function E(e){let{components:t,...n}=e;return(0,a.kt)(w,(0,r.Z)({},x,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"replacefile"},"ReplaceFile"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(y,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(i,{components:n.components,mdxType:"Returns"}))}E.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[5010],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u=r.createContext({}),s=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},c=function(e){var t=s(e.components);return r.createElement(u.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},m=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,u=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=s(n),m=a,f=p["".concat(u,".").concat(m)]||p[m]||d[m]||l;return n?r.createElement(f,i(i({ref:t},c),{},{components:n})):r.createElement(f,i({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=m;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o[p]="string"==typeof e?e:a,i[1]=o;for(var s=2;s{n.d(t,{Z:()=>i});var r=n(67294),a=n(86010);const l={tabItem:"tabItem_Ymn6"};function i(e){let{children:t,hidden:n,className:i}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(l.tabItem,i),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>N});var r=n(87462),a=n(67294),l=n(86010),i=n(72957),o=n(16550),u=n(75238),s=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function d(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function m(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(l),(0,a.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,l=d(e),[i,o]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!m({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[u,s]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:r}),k=(()=>{const e=u??p;return m({value:e,tabValues:l})?e:null})();(0,a.useLayoutEffect)((()=>{k&&o(k)}),[k]);return{selectedValue:i,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),s(e),b(e)}),[s,b,l]),tabValues:l}}var k=n(51048);const y={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function g(e){let{className:t,block:n,selectedValue:o,selectValue:u,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,i.o5)(),d=e=>{const t=e.currentTarget,n=c.indexOf(t),r=s[n].value;r!==o&&(p(t),u(r))},m=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},s.map((e=>{let{value:t,label:n,attributes:i}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:m,onClick:d},i,{className:(0,l.Z)("tabs__item",y.tabItem,i?.className,{"tabs__item--active":o===t})}),n??t)})))}function h(e){let{lazy:t,children:n,selectedValue:r}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=b(e);return a.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},a.createElement(g,(0,r.Z)({},e,t)),a.createElement(h,(0,r.Z)({},e,t)))}function N(e){const t=(0,k.Z)();return a.createElement(v,(0,r.Z)({key:String(t)},e))}},3054:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>N,contentTitle:()=>h,default:()=>E,frontMatter:()=>g,metadata:()=>v,toc:()=>I});var r=n(87462),a=(n(67294),n(3905));const l={toc:[]},i="wrapper";function o(e){let{components:t,...n}=e;return(0,a.kt)(i,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < void >"),(0,a.kt)("td",{parentName:"tr",align:null},"Method does not return a value")))))}o.isMDXComponent=!0;const u={toc:[]},s="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(s,(0,r.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"selectedFileID"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"number")),(0,a.kt)("td",{parentName:"tr",align:null},"Selected file's ID.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"selectedObject"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Models/ISelectedFile/"},"ISelectedFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Selected object info.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"fileToBeReplaced"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," FileList"),(0,a.kt)("td",{parentName:"tr",align:null},"File to replace (ignored if dataURL provided). See ",(0,a.kt)("br",null),(0,a.kt)("a",{parentName:"td",href:"https://developer.mozilla.org/en-US/docs/Web/API/FileList"},"FileList from MDN"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"dataURL"),(0,a.kt)("td",{parentName:"tr",align:null},"Optional"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Optional data URL (base64 + mime); overrides fileToBeReplaced.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"dataURLName"),(0,a.kt)("td",{parentName:"tr",align:null},"Optional"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"null")," ","|"," ",(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Filename to use when dataURL is supplied (required with dataURL).")))))}c.isMDXComponent=!0;n(73992);var p=n(18679);const d={toc:[]},m="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},d,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// shellListing points to instance of IShellListing\nawait shellListing.ReplaceFile(\n selectedFileID,\n selectedObject,\n fileToBeReplaced,\n dataURL,\n dataURLName,\n);\n"))))}f.isMDXComponent=!0;const b={toc:[]},k="wrapper";function y(e){let{components:t,...n}=e;return(0,a.kt)(k,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Perform file replace."),(0,a.kt)("p",null,"If a data URL is provided it takes precedence and will be used as the replacement file\n(overriding fileToBeReplaced). Data URLs must be base64-encoded, include a MIME type and\nthe decoded payload must not exceed 64 MiB (67,108,864 bytes). When using a data URL you\nmust also provide dataURLName (filename for the decoded file)."))}y.isMDXComponent=!0;const g={},h="ReplaceFile",v={unversionedId:"UIExt2/Interfaces/IShellListing/ReplaceFile/index",id:"UIExt2/Interfaces/IShellListing/ReplaceFile/index",title:"ReplaceFile",description:"Description",source:"@site/docs/UIExt2/Interfaces/IShellListing/ReplaceFile/index.mdx",sourceDirName:"UIExt2/Interfaces/IShellListing/ReplaceFile",slug:"/UIExt2/Interfaces/IShellListing/ReplaceFile/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ReplaceFile/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"RemoveListingItem",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/RemoveListingItem/"},next:{title:"SelectFolder",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/SelectFolder/"}},N={},I=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],w={toc:I},x="wrapper";function E(e){let{components:t,...n}=e;return(0,a.kt)(x,(0,r.Z)({},w,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"replacefile"},"ReplaceFile"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(y,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(o,{components:n.components,mdxType:"Returns"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5a161bc6.649a70d2.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5a161bc6.9212506c.js similarity index 57% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5a161bc6.649a70d2.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5a161bc6.9212506c.js index 9d3fb35d7..12f26187a 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5a161bc6.649a70d2.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5a161bc6.9212506c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[9882],{3905:(e,n,t)=>{t.d(n,{Zo:()=>l,kt:()=>h});var a=t(67294);function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var s=a.createContext({}),d=function(e){var n=a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},l=function(e){var n=d(e.components);return a.createElement(s.Provider,{value:n},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},p=a.forwardRef((function(e,n){var t=e.components,o=e.mdxType,m=e.originalType,s=e.parentName,l=r(e,["components","mdxType","originalType","parentName"]),c=d(t),p=o,h=c["".concat(s,".").concat(p)]||c[p]||u[p]||m;return t?a.createElement(h,i(i({ref:n},l),{},{components:t})):a.createElement(h,i({ref:n},l))}));function h(e,n){var t=arguments,o=n&&n.mdxType;if("string"==typeof e||o){var m=t.length,i=new Array(m);i[0]=p;var r={};for(var s in n)hasOwnProperty.call(n,s)&&(r[s]=n[s]);r.originalType=e,r[c]="string"==typeof e?e:o,i[1]=r;for(var d=2;d{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var a=t(87462),o=(t(67294),t(3905)),m=(t(47713),t(9826));t(45274);const i={sidebar_position:5},r="Using Custom Commands",s={unversionedId:"Overview/Commands",id:"Overview/Commands",title:"Using Custom Commands",description:"The Custom Commands interface provides a set of commands for customizing menus, creating custom commands, and managing their states in M-Files UI Extensions. The ICommands provides set of tools for developers to customize the user interface, manage commands, and control their visibility and availability within the application.",source:"@site/docs/Overview/Commands.mdx",sourceDirName:"Overview",slug:"/Overview/Commands",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Commands",draft:!1,tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"Dialogs and Messages",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Messages"},next:{title:"Working with the Shell Listing",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ListingView"}},d={},l=[{value:"Managing Commands",id:"managing-commands",level:2},{value:"Creating a Custom Command",id:"creating-a-custom-command",level:3},{value:"Controlling the Command visibility",id:"controlling-the-command-visibility",level:3},{value:"Executing the Command manually",id:"executing-the-command-manually",level:3},{value:"Listening and Responding to Custom Commands",id:"listening-and-responding-to-custom-commands",level:3},{value:"Command locations",id:"command-locations",level:2},{value:"The context menu",id:"the-context-menu",level:3},{value:"The main menu",id:"the-main-menu",level:3},{value:"Child commands",id:"child-commands",level:4},{value:"Icons",id:"icons",level:2},{value:"Example of setting an icon from a relative path for a custom command.",id:"example-of-setting-an-icon-from-a-relative-path-for-a-custom-command",level:3},{value:"IIconInformation configuration examples for other content types.",id:"iiconinformation-configuration-examples-for-other-content-types",level:3},{value:"SVG string icon:",id:"svg-string-icon",level:4},{value:"Base64 string:",id:"base64-string",level:4},{value:"Using built-in icons:",id:"using-built-in-icons",level:3}],c={toc:l},u="wrapper";function p(e){let{components:n,...i}=e;return(0,o.kt)(u,(0,a.Z)({},c,i,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"using-custom-commands"},"Using Custom Commands"),(0,o.kt)("p",null,"The Custom Commands interface provides a set of commands for customizing menus, creating custom commands, and managing their states in M-Files UI Extensions. The ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/ICommands/"},"ICommands")," provides set of tools for developers to customize the user interface, manage commands, and control their visibility and availability within the application."),(0,o.kt)("h2",{id:"managing-commands"},"Managing Commands"),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"ICommands is part of ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/IShellFrame/"},"IShellFrame")," interface. To use this interface you have to first obtain instance of the IShellFrame. ")),(0,o.kt)("h3",{id:"creating-a-custom-command"},"Creating a Custom Command"),(0,o.kt)("p",null,"The commands created by the ICommands interface are usually so called ",(0,o.kt)("strong",{parentName:"p"},"Custom Commands")," which are available only for your UI Extension application."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"// Create a new custom command using IShellFrame instance.\nconst commandId = await shellFrame.Commands.CreateCustomCommand(name);\n")),(0,o.kt)("h3",{id:"controlling-the-command-visibility"},"Controlling the Command visibility"),(0,o.kt)("p",null,"Creating a command does not automatically add the command to the user interface. To do that the ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/ICommands/SetCommandState"},"SetCommandState")," method must be used. This method defines the command state (hidden/visible) in specific parts of the user interface:"),(0,o.kt)(m.ZP,{components:i.components,mdxType:"SetCommandState"}),(0,o.kt)("h3",{id:"executing-the-command-manually"},"Executing the Command manually"),(0,o.kt)("p",null,"The Custom command can executed directly using ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/ICommands/ExecuteCommand"},"ExecuteCommand"),", which accepts also optional ",(0,o.kt)("inlineCode",{parentName:"p"},"data")," parameter."),(0,o.kt)("p",null,"The ",(0,o.kt)("inlineCode",{parentName:"p"},"data")," must be serializeable using ",(0,o.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm"},"Structured Cloning Algorithm"),"."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"// Execute a new custom command with data parameter\nawait shellFrame.Commands.ExecuteCommand(commandId, {\n someCustomData: 1234\n});\n")),(0,o.kt)("h3",{id:"listening-and-responding-to-custom-commands"},"Listening and Responding to Custom Commands"),(0,o.kt)("p",null,"User can listen to cuostom command events using ",(0,o.kt)("inlineCode",{parentName:"p"},"MFiles.Event.CustomCommand"),", which has a callback having parameters ",(0,o.kt)("inlineCode",{parentName:"p"},"(commandId, data)"),"."),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"It is generally recommended to have a single listener function for custom commands to avoid responding to the same command multiple times.")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"\n// Listen for the custom commands.\nshellFrame.Commands.Events.Register(\n\n // Listen for the CustomCommand events.\n MFiles.Event.CustomCommand,\n\n // Each command has ID and optional data provided with it.\n ( commandId, data ) => {\n }\n);\n\n")),(0,o.kt)("h2",{id:"command-locations"},"Command locations"),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"The ",(0,o.kt)("a",{parentName:"p",href:"../../Samples/Commands"},"commands sample")," includes practical examples of code that adds commands to different locations.")),(0,o.kt)("p",null,"Commands can be shown in two primary locations: within the context menu (shown when the user right-clicks on something in a listing), and within the main menu."),(0,o.kt)("h3",{id:"the-context-menu"},"The context menu"),(0,o.kt)("p",null,"Commands can be added to the context menu which is shown when a user right-clicks on something in a listing. The command may be shown similarly to this:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"The command shown in the context menu",src:t(91482).Z,width:"1076",height:"882"})),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'// This code should be placed to run when the shell frame is started.\n\n// Create the command.\nconst commandOneId = await shellFrame.Commands.CreateCustomCommand\n(\n "My First Command"\n);\n\n// Add the command to the bottom of the context menu.\nawait shellFrame.Commands.AddCustomCommandToMenu\n(\n commandOneId,\n MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, // Note: context menu\n 1\n);\n\n// Show a message when the command is clicked.\nshellFrame.Commands.Events.Register(\n MFiles.Event.CustomCommand,\n async ( commandId ) => {\n\n // If something other than our command was clicked then die.\n if(commandId !== commandOneId)\n return;\n \n // Our context menu command was clicked.\n await shellFrame.ShowMessage( "My context menu command was clicked." );\n }\n);\n')),(0,o.kt)("h3",{id:"the-main-menu"},"The main menu"),(0,o.kt)("admonition",{type:"tip"},(0,o.kt)("p",{parentName:"admonition"},"The ",(0,o.kt)("a",{parentName:"p",href:"../../Samples/Commands"},"commands sample")," includes practical examples of code that adds commands to different locations.")),(0,o.kt)("p",null,'Commands can be added to the "main menu", which is located at the top-right of the user interface, as a three-dot icon. Clicking this icon expands the menu and shows commands added to the menu.'),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"The main menu is not shown until one or more UI Extensions add commands to this location.")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'// This code should be placed to run when the shell frame is started.\n\n// Create the command.\nconst commandOneId = await shellFrame.Commands.CreateCustomCommand\n(\n "My First Command"\n);\n\n// Add the command to the main menu.\nawait shellFrame.Commands.AddCustomCommandToMenu\n(\n commandOneId,\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, // Note: top pane menu\n 1\n);\n\n// Show a message when the command is clicked.\nshellFrame.Commands.Events.Register(\n MFiles.Event.CustomCommand,\n async ( commandId ) => {\n\n // If something other than our command was clicked then die.\n if(commandId !== commandOneId)\n return;\n \n // Our context menu command was clicked.\n await shellFrame.ShowMessage( "My top menu command was clicked." );\n }\n);\n')),(0,o.kt)("h4",{id:"child-commands"},"Child commands"),(0,o.kt)("p",null,"The main menu supports commands with sub-menu commands. This functionality allows you to group commands logically by function within your application:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"A main menu command with sub-menu commands",src:t(38316).Z,width:"1252",height:"407"})),(0,o.kt)("p",null,"To do this, create the parent command and then call ",(0,o.kt)("inlineCode",{parentName:"p"},"CreateSubMenuItem")," to create child commands:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'// This code should be placed to run when the shell frame is started.\n\n// Create the parent command.\nconst commandOneId = await shellFrame.Commands.CreateCustomCommand\n(\n "My First Command"\n);\n\n// Add the parent command to the main menu.\nconst parentMenuItemId = await shellFrame.Commands.AddCustomCommandToMenu\n(\n commandOneId,\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, // Note: top pane menu\n 1\n);\n\n // Create child commands (buttons).\nconst commandChildOneId = await shellFrame.Commands.CreateCustomCommand\n(\n "My First Child Command"\n);\nconst commandChildTwoId = await shellFrame.Commands.CreateCustomCommand\n(\n "My Second Child Command"\n);\n\n// Add the child commands to the parent.\nawait shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildOneId, 1 );\nawait shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildTwoId, 1 );\n\n\n// Show a message when the command is clicked.\nshellFrame.Commands.Events.Register(\n MFiles.Event.CustomCommand,\n async ( commandId ) => {\n\n // Only react when the child commands are clicked.\n if(commandId !== commandChildOneId && commandId !== commandChildTwoId)\n return;\n \n // One of the two child commands was clicked.\n await shellFrame.ShowMessage( "One of the child commands was clicked!" );\n }\n);\n')),(0,o.kt)("admonition",{type:"note"},(0,o.kt)("p",{parentName:"admonition"},"Context menus do not currently support child commands.")),(0,o.kt)("h2",{id:"icons"},"Icons"),(0,o.kt)("p",null,"Commands support icons in all menu locations."),(0,o.kt)("h1",{id:"a-main-menu-command-with-sub-menu-commands"},(0,o.kt)("img",{alt:"A main menu command with sub-menu commands",src:t(47013).Z,width:"1996",height:"1166"})),(0,o.kt)("p",null,"Adding an icon for command can be done using SetIcon method with IIconInformation configuration."),(0,o.kt)("h3",{id:"example-of-setting-an-icon-from-a-relative-path-for-a-custom-command"},"Example of setting an icon from a relative path for a custom command."),(0,o.kt)("p",null,"First, create a custom command ID. Next, add the necessary information to the icon information object to set the actual icon. Finally, add the command to any menu location. All current menu locations are supported, and the added icon will appear on the left side of the menu item."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'// This code should be placed to run when the shell frame is started.\n\n// Create custom command ID.\nconst customCommand = await shellFrame.Commands.CreateCustomCommand("Custom command");\n\n// Create icon information.\nconst iconIdInformation = { \n content: "assets/icons/customCommandIcon.svg", \n iconContentType: "PATH",\n alt: "Custom command icon alt",\n extension: "svg" \n};\n\n// Set icon for created command ID.\nawait shellFrame.Commands.SetIcon(commandCheckoutId, iconIdInformation);\n\n// Add command to the taskbar menu location.\nawait shellFrame.Commands.AddCustomCommandToMenu(commandCheckoutId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1);\n')),(0,o.kt)("h3",{id:"iiconinformation-configuration-examples-for-other-content-types"},"IIconInformation configuration examples for other content types."),(0,o.kt)("h4",{id:"svg-string-icon"},"SVG string icon:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"// Icon in SVG string format.\nconst svgStringIcon = \"\";\n\n// Create iconInformation object.\nconst iconIdInformation = { \n content: svgStringIcon, \n iconContentType: \"SVG\",\n alt: \"Custom command SVG string icon alt\",\n extension: \"svg\" \n};\n")),(0,o.kt)("h4",{id:"base64-string"},"Base64 string:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'// Icon in base64 string format.\nconst base64StringIcon = "PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMSIgeT0iMTQiIHdpZHRoPSIxNCIgaGVpZ2h0PSIxIiByeD0iMC41IiBmaWxsPSIjMzYzQTQwIi8+CjxjaXJjbGUgY3g9IjMiIGN5PSI3IiByPSIxLjUiIHN0cm9rZT0iIzM2M0E0MCIvPgo8cGF0aCBkPSJNNSA4TDYuNSAxMC41IiBzdHJva2U9IiMzNjNBNDAiLz4KPGNpcmNsZSBjeD0iOCIgY3k9IjExIiByPSIxLjUiIHN0cm9rZT0iIzM2M0E0MCIvPgo8Y2lyY2xlIGN4PSIxMyIgY3k9IjMiIHI9IjEuNSIgc3Ryb2tlPSIjMzYzQTQwIi8+CjxwYXRoIGQ9Ik0xMi41IDRMOSA5LjUiIHN0cm9rZT0iIzM2M0E0MCIvPgo8L3N2Zz4K";\n\n// Create iconInformation object.\nconst iconIdInformation = { \n content: base64StringIcon, \n iconContentType: "BASE64",\n alt: "Custom command SVG base64 string icon alt",\n extension: "svg"\n};\n')),(0,o.kt)("p",null,"Note: With Base64 string, extension information must be provided in order to handle icon information correctly."),(0,o.kt)("h3",{id:"using-built-in-icons"},"Using built-in icons:"),(0,o.kt)("p",null,"It is possible to use built-in icons for commands. See available built-in icon IDs from the BuiltInIcon enumeration in the IIconInformation interface."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},' // Create iconInformation object for builtin Checkout icon.\n const iconIdInformation = { \n content: 0,\n iconContentType: "BUILT_IN", \n alt: `built-in icon alt`, \n extension: "" \n };\n')))}p.isMDXComponent=!0},47713:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),o=(t(67294),t(3905));const m={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,o.kt)(i,(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Value"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Undefined")),(0,o.kt)("td",{parentName:"tr",align:null},"0"),(0,o.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Active")),(0,o.kt)("td",{parentName:"tr",align:null},"1"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is visible and enabled.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("inlineCode",{parentName:"td"},"CommandState_Hidden")),(0,o.kt)("td",{parentName:"tr",align:null},"3"),(0,o.kt)("td",{parentName:"tr",align:null},"The command is not visible.")))))}r.isMDXComponent=!0},9826:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),o=(t(67294),t(3905));const m={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,o.kt)(i,(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},"shellFrame.Commands.SetCommandState( \n commandId, // The ID of the command which state is to be changed\n MFiles.CommandLocation.MainMenu, // The location in the UI where the command's state is being changed\n MFiles.CommandState.CommandState_Hidden // New state of the command in specific location\n);\n")))}r.isMDXComponent=!0},45274:(e,n,t)=>{t(87462),t(67294),t(3905),t(7606),t(94642),t(37415),t(47713),t(9826)},37415:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),o=(t(67294),t(3905));const m={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,o.kt)(i,(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("p",null,'This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.'),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'\n// Called when the UI Extension starts\nfunction OnNewShellUI(shellUI) {\n\n // Wait for the ShellFrame to be created.\n shellUI.Events.Register(\n MFiles.Event.NewShellFrame,\n async (shellFrame) => {\n\n // Wait for the shellframe to start\n shellFrame.Events.Register( \n MFiles.Event.Started,\n async () => {\n\n // Create a new custom command and menu item for the command\n const createCommand = async ( name: string ) => {\n\n // Create a new custom command\n const commandId = await shellFrame.Commands.CreateCustomCommand(name);\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n // Command ID\n commands.exampleCommand,\n // Menulocation\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n // Priority of the command\n 1 \n );\n\n // Return a data structure containing essential information about the commands\n return {\n id: commandId, // ID of the command\n menuItemId // Menu item ID, can be used to add sub menus to this menu item.\n }\n }\n\n // Create an Example command and a set of sample commands to control it\'s visibility\n const commands = {\n // This is the sample command\n exampleCommand : await createCommand("Hello World"),\n\n // These commands control the state of the example command\n addCommand: await createCommand("Add Command To Menu"),\n deleteCustomCommand: await createCommand("Delete Command")\n hideCommand: await createCommand("Hide Command"),\n showCommand: await createCommand("Activate Command"),\n executeCommand: await createCommand("Execute Command"),\n getCommandName: await createCommand("Get Name"),\n getCommandState: await createCommand("Get Command State"),\n removeCommandFromMenu: await createCommand("Remove From Menu"), \n removeCommand: await createCommand("Remove Command")\n }\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n\n // Listen for the custom commands.\n shellFrame.Commands.Events.Register(\n\n // Listen for the CustomCommand events.\n MFiles.Event.CustomCommand,\n\n // Each command has ID and optional data provided with it.\n ( commandId, data ) => {\n // Respond to the command if custom command sent by the application \n switch( commandId ) {\n\n // Run the Example command\n case commands.exampleCommand.id:\n shellFrame.ShowMessage( "Hello World!" );\n break;\n\n // Add the new menuitem which runs the example command\n case commands.addCommand.id:\n await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n break;\n\n // Removes the command from particular menu\n case commands.removeCommandFromMenu.id:\n await shellFrame.Commands.RemoveCustomCommandFromMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu\n );\n break;\n\n // Deletes the command permanently\n case commands.deleteCommand.id:\n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Hiddes all command instances for specific command ID\n case commands.hideCommand.id:\n // Hide the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Hidden\n );\n break;\n\n // Activates (makes visible) all command instances for specific command ID\n case commands.showCommand.id:\n // Show the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Get the command name\n case commands.getCommandName.id:\n const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);\n shellFrame.ShowMessage( name );\n break;\n\n // Get the Command State\n case commands.getCommandState.id:\n\n // NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu\n const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );\n shellFrame.ShowMessage( `Command state: ${commandState}` );\n break;\n\n }\n }\n );\n }\n )\n }\n )\n}\n')),(0,o.kt)("p",null,"This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions."))}r.isMDXComponent=!0},7606:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),o=(t(67294),t(3905));const m={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,o.kt)(i,(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./AddCustomCommandToMenu/"},"AddCustomCommandToMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Adds existing custom command to the specified context menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateCustomCommand/"},"CreateCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a custom command that can be added to the application toolbar or to the contextmenu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateSubMenuItem/"},"CreateSubMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates a new SubMenu for already created Menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./CreateTaskbarGroup/"},"CreateTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Creates new custom task bar group for custom commands. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: If multiple task bar groups are created for the same MenuLocation with the same ",(0,o.kt)("br",null),"orderPriority, their relative ordering is unspecified and may vary between runs, sessions or ",(0,o.kt)("br",null),"versions. Do not rely on a particular order for groups with equal priority \u2014 assign distinct ",(0,o.kt)("br",null),"orderPriority values to guarantee a deterministic ordering (lower values are shown first).")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./DeleteCustomCommand/"},"DeleteCustomCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Deletes a custom command. The command is automatically removed.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./ExecuteCommand/"},"ExecuteCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Executes a user command.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandName/"},"GetCommandName")),(0,o.kt)("td",{parentName:"tr",align:null},"Resolves the name that has been associated with the given command id.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetCommandState/"},"GetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the command state for builtin or custom command in specified location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./GetMenuIdOfBuiltInCommand/"},"GetMenuIdOfBuiltInCommand")),(0,o.kt)("td",{parentName:"tr",align:null},"Gets the MenuItem ID of a built-in command by its command ID and location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveCustomCommandFromMenu/"},"RemoveCustomCommandFromMenu")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes a custom command from the specified menu location.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveMenuItem/"},"RemoveMenuItem")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes menuitem from the menu.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./RemoveTaskbarGroup/"},"RemoveTaskbarGroup")),(0,o.kt)("td",{parentName:"tr",align:null},"Removes custom task bar group from the task bar. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetCommandState/"},"SetCommandState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the command's state to be hidden, visible, enabled or disabled. Calling ",(0,o.kt)("br",null),"this method may affect context menu, application toolbar, menus or all of them.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetIcon/"},"SetIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom command. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetMenuItemState/"},"SetMenuItemState")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the MenuItem state individually.")),(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"./SetTaskbarGroupIcon/"},"SetTaskbarGroupIcon")),(0,o.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom task bar group. ",(0,o.kt)("br",null)," ",(0,o.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,o.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")))))}r.isMDXComponent=!0},94642:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),o=(t(67294),t(3905));const m={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,o.kt)(i,(0,a.Z)({},m,t,{components:n,mdxType:"MDXLayout"}),(0,o.kt)("table",null,(0,o.kt)("thead",{parentName:"table"},(0,o.kt)("tr",{parentName:"thead"},(0,o.kt)("th",{parentName:"tr",align:null},"Name"),(0,o.kt)("th",{parentName:"tr",align:null},"Type"),(0,o.kt)("th",{parentName:"tr",align:null},"Description"))),(0,o.kt)("tbody",{parentName:"table"},(0,o.kt)("tr",{parentName:"tbody"},(0,o.kt)("td",{parentName:"tr",align:null},"Events"),(0,o.kt)("td",{parentName:"tr",align:null},(0,o.kt)("a",{parentName:"td",href:"/UIExt2/Events/#icommandsevents"},"ICommandsEvents")),(0,o.kt)("td",{parentName:"tr",align:null},"Returns the event registering interface of the ICommands interface.")))))}r.isMDXComponent=!0},91482:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/Commands_3-c8148bb22e501e5471b6553619f7323b.png"},38316:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/Commands_4-3f91ab15528b6cb15a47a4a0ddc4b745.png"},47013:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/Commands_8-e254bb41f0a4814a0fe6f62cd1a679cd.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[9882],{3905:(e,n,t)=>{t.d(n,{Zo:()=>l,kt:()=>h});var a=t(67294);function m(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function i(e){for(var n=1;n=0||(m[t]=e[t]);return m}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(m[t]=e[t])}return m}var d=a.createContext({}),s=function(e){var n=a.useContext(d),t=n;return e&&(t="function"==typeof e?e(n):i(i({},n),e)),t},l=function(e){var n=s(e.components);return a.createElement(d.Provider,{value:n},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var n=e.children;return a.createElement(a.Fragment,{},n)}},p=a.forwardRef((function(e,n){var t=e.components,m=e.mdxType,o=e.originalType,d=e.parentName,l=r(e,["components","mdxType","originalType","parentName"]),c=s(t),p=m,h=c["".concat(d,".").concat(p)]||c[p]||u[p]||o;return t?a.createElement(h,i(i({ref:n},l),{},{components:t})):a.createElement(h,i({ref:n},l))}));function h(e,n){var t=arguments,m=n&&n.mdxType;if("string"==typeof e||m){var o=t.length,i=new Array(o);i[0]=p;var r={};for(var d in n)hasOwnProperty.call(n,d)&&(r[d]=n[d]);r.originalType=e,r[c]="string"==typeof e?e:m,i[1]=r;for(var s=2;s{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>d,toc:()=>l});var a=t(87462),m=(t(67294),t(3905)),o=(t(47713),t(9826));t(45274);const i={sidebar_position:5},r="Using Custom Commands",d={unversionedId:"Overview/Commands",id:"Overview/Commands",title:"Using Custom Commands",description:"The Custom Commands interface provides a set of commands for customizing menus, creating custom commands, and managing their states in M-Files UI Extensions. The ICommands provides set of tools for developers to customize the user interface, manage commands, and control their visibility and availability within the application.",source:"@site/docs/Overview/Commands.mdx",sourceDirName:"Overview",slug:"/Overview/Commands",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Commands",draft:!1,tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_position:5},sidebar:"tutorialSidebar",previous:{title:"Dialogs and Messages",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Messages"},next:{title:"Working with the Shell Listing",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ListingView"}},s={},l=[{value:"Managing Commands",id:"managing-commands",level:2},{value:"Creating a Custom Command",id:"creating-a-custom-command",level:3},{value:"Controlling the Command visibility",id:"controlling-the-command-visibility",level:3},{value:"Executing the Command manually",id:"executing-the-command-manually",level:3},{value:"Listening and Responding to Custom Commands",id:"listening-and-responding-to-custom-commands",level:3},{value:"Command locations",id:"command-locations",level:2},{value:"The context menu",id:"the-context-menu",level:3},{value:"The main menu",id:"the-main-menu",level:3},{value:"Child commands",id:"child-commands",level:4},{value:"Icons",id:"icons",level:2},{value:"Example of setting an icon from a relative path for a custom command.",id:"example-of-setting-an-icon-from-a-relative-path-for-a-custom-command",level:3},{value:"IIconInformation configuration examples for other content types.",id:"iiconinformation-configuration-examples-for-other-content-types",level:3},{value:"SVG string icon:",id:"svg-string-icon",level:4},{value:"Base64 string:",id:"base64-string",level:4},{value:"Using built-in icons:",id:"using-built-in-icons",level:3}],c={toc:l},u="wrapper";function p(e){let{components:n,...i}=e;return(0,m.kt)(u,(0,a.Z)({},c,i,{components:n,mdxType:"MDXLayout"}),(0,m.kt)("h1",{id:"using-custom-commands"},"Using Custom Commands"),(0,m.kt)("p",null,"The Custom Commands interface provides a set of commands for customizing menus, creating custom commands, and managing their states in M-Files UI Extensions. The ",(0,m.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/ICommands/"},"ICommands")," provides set of tools for developers to customize the user interface, manage commands, and control their visibility and availability within the application."),(0,m.kt)("h2",{id:"managing-commands"},"Managing Commands"),(0,m.kt)("admonition",{type:"note"},(0,m.kt)("p",{parentName:"admonition"},"ICommands is part of ",(0,m.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/IShellFrame/"},"IShellFrame")," interface. To use this interface you have to first obtain instance of the IShellFrame. ")),(0,m.kt)("h3",{id:"creating-a-custom-command"},"Creating a Custom Command"),(0,m.kt)("p",null,"The commands created by the ICommands interface are usually so called ",(0,m.kt)("strong",{parentName:"p"},"Custom Commands")," which are available only for your UI Extension application."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},"// Create a new custom command using IShellFrame instance.\nconst commandId = await shellFrame.Commands.CreateCustomCommand(name);\n")),(0,m.kt)("h3",{id:"controlling-the-command-visibility"},"Controlling the Command visibility"),(0,m.kt)("p",null,"Creating a command does not automatically add the command to the user interface. To do that the ",(0,m.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/ICommands/SetCommandState"},"SetCommandState")," method must be used. This method defines the command state (hidden/visible) in specific parts of the user interface:"),(0,m.kt)(o.ZP,{components:i.components,mdxType:"SetCommandState"}),(0,m.kt)("h3",{id:"executing-the-command-manually"},"Executing the Command manually"),(0,m.kt)("p",null,"The Custom command can executed directly using ",(0,m.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/ICommands/ExecuteCommand"},"ExecuteCommand"),", which accepts also optional ",(0,m.kt)("inlineCode",{parentName:"p"},"data")," parameter."),(0,m.kt)("p",null,"The ",(0,m.kt)("inlineCode",{parentName:"p"},"data")," must be serializeable using ",(0,m.kt)("a",{parentName:"p",href:"https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm"},"Structured Cloning Algorithm"),"."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},"// Execute a new custom command with data parameter\nawait shellFrame.Commands.ExecuteCommand(commandId, {\n someCustomData: 1234\n});\n")),(0,m.kt)("h3",{id:"listening-and-responding-to-custom-commands"},"Listening and Responding to Custom Commands"),(0,m.kt)("p",null,"User can listen to cuostom command events using ",(0,m.kt)("inlineCode",{parentName:"p"},"MFiles.Event.CustomCommand"),", which has a callback having parameters ",(0,m.kt)("inlineCode",{parentName:"p"},"(commandId, data)"),"."),(0,m.kt)("admonition",{type:"tip"},(0,m.kt)("p",{parentName:"admonition"},"It is generally recommended to have a single listener function for custom commands to avoid responding to the same command multiple times.")),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},"\n// Listen for the custom commands.\nshellFrame.Commands.Events.Register(\n\n // Listen for the CustomCommand events.\n MFiles.Event.CustomCommand,\n\n // Each command has ID and optional data provided with it.\n ( commandId, data ) => {\n }\n);\n\n")),(0,m.kt)("h2",{id:"command-locations"},"Command locations"),(0,m.kt)("admonition",{type:"tip"},(0,m.kt)("p",{parentName:"admonition"},"The ",(0,m.kt)("a",{parentName:"p",href:"../../Samples/Commands"},"commands sample")," includes practical examples of code that adds commands to different locations.")),(0,m.kt)("p",null,"Commands can be shown in two primary locations: within the context menu (shown when the user right-clicks on something in a listing), and within the main menu."),(0,m.kt)("h3",{id:"the-context-menu"},"The context menu"),(0,m.kt)("p",null,"Commands can be added to the context menu which is shown when a user right-clicks on something in a listing. The command may be shown similarly to this:"),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"The command shown in the context menu",src:t(91482).Z,width:"1076",height:"882"})),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},'// This code should be placed to run when the shell frame is started.\n\n// Create the command.\nconst commandOneId = await shellFrame.Commands.CreateCustomCommand\n(\n "My First Command"\n);\n\n// Add the command to the bottom of the context menu.\nawait shellFrame.Commands.AddCustomCommandToMenu\n(\n commandOneId,\n MFiles.MenuLocation.MenuLocation_ContextMenu_Bottom, // Note: context menu\n 1\n);\n\n// Show a message when the command is clicked.\nshellFrame.Commands.Events.Register(\n MFiles.Event.CustomCommand,\n async ( commandId ) => {\n\n // If something other than our command was clicked then die.\n if(commandId !== commandOneId)\n return;\n \n // Our context menu command was clicked.\n await shellFrame.ShowMessage( "My context menu command was clicked." );\n }\n);\n')),(0,m.kt)("h3",{id:"the-main-menu"},"The main menu"),(0,m.kt)("admonition",{type:"tip"},(0,m.kt)("p",{parentName:"admonition"},"The ",(0,m.kt)("a",{parentName:"p",href:"../../Samples/Commands"},"commands sample")," includes practical examples of code that adds commands to different locations.")),(0,m.kt)("p",null,'Commands can be added to the "main menu", which is located at the top-right of the user interface, as a three-dot icon. Clicking this icon expands the menu and shows commands added to the menu.'),(0,m.kt)("admonition",{type:"note"},(0,m.kt)("p",{parentName:"admonition"},"The main menu is not shown until one or more UI Extensions add commands to this location.")),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},'// This code should be placed to run when the shell frame is started.\n\n// Create the command.\nconst commandOneId = await shellFrame.Commands.CreateCustomCommand\n(\n "My First Command"\n);\n\n// Add the command to the main menu.\nawait shellFrame.Commands.AddCustomCommandToMenu\n(\n commandOneId,\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, // Note: top pane menu\n 1\n);\n\n// Show a message when the command is clicked.\nshellFrame.Commands.Events.Register(\n MFiles.Event.CustomCommand,\n async ( commandId ) => {\n\n // If something other than our command was clicked then die.\n if(commandId !== commandOneId)\n return;\n \n // Our context menu command was clicked.\n await shellFrame.ShowMessage( "My top menu command was clicked." );\n }\n);\n')),(0,m.kt)("h4",{id:"child-commands"},"Child commands"),(0,m.kt)("p",null,"The main menu supports commands with sub-menu commands. This functionality allows you to group commands logically by function within your application:"),(0,m.kt)("p",null,(0,m.kt)("img",{alt:"A main menu command with sub-menu commands",src:t(38316).Z,width:"1252",height:"407"})),(0,m.kt)("p",null,"To do this, create the parent command and then call ",(0,m.kt)("inlineCode",{parentName:"p"},"CreateSubMenuItem")," to create child commands:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},'// This code should be placed to run when the shell frame is started.\n\n// Create the parent command.\nconst commandOneId = await shellFrame.Commands.CreateCustomCommand\n(\n "My First Command"\n);\n\n// Add the parent command to the main menu.\nconst parentMenuItemId = await shellFrame.Commands.AddCustomCommandToMenu\n(\n commandOneId,\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, // Note: top pane menu\n 1\n);\n\n // Create child commands (buttons).\nconst commandChildOneId = await shellFrame.Commands.CreateCustomCommand\n(\n "My First Child Command"\n);\nconst commandChildTwoId = await shellFrame.Commands.CreateCustomCommand\n(\n "My Second Child Command"\n);\n\n// Add the child commands to the parent.\nawait shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildOneId, 1 );\nawait shellFrame.Commands.CreateSubMenuItem( parentMenuItemId, commandChildTwoId, 1 );\n\n\n// Show a message when the command is clicked.\nshellFrame.Commands.Events.Register(\n MFiles.Event.CustomCommand,\n async ( commandId ) => {\n\n // Only react when the child commands are clicked.\n if(commandId !== commandChildOneId && commandId !== commandChildTwoId)\n return;\n \n // One of the two child commands was clicked.\n await shellFrame.ShowMessage( "One of the child commands was clicked!" );\n }\n);\n')),(0,m.kt)("admonition",{type:"note"},(0,m.kt)("p",{parentName:"admonition"},"Context menus do not currently support child commands.")),(0,m.kt)("h2",{id:"icons"},"Icons"),(0,m.kt)("p",null,"Commands support icons in all menu locations."),(0,m.kt)("h1",{id:"a-main-menu-command-with-sub-menu-commands"},(0,m.kt)("img",{alt:"A main menu command with sub-menu commands",src:t(47013).Z,width:"1996",height:"1166"})),(0,m.kt)("p",null,"Adding an icon for command can be done using SetIcon method with IIconInformation configuration."),(0,m.kt)("h3",{id:"example-of-setting-an-icon-from-a-relative-path-for-a-custom-command"},"Example of setting an icon from a relative path for a custom command."),(0,m.kt)("p",null,"First, create a custom command ID. Next, add the necessary information to the icon information object to set the actual icon. Finally, add the command to any menu location. All current menu locations are supported, and the added icon will appear on the left side of the menu item."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},'// This code should be placed to run when the shell frame is started.\n\n// Create custom command ID.\nconst customCommand = await shellFrame.Commands.CreateCustomCommand("Custom command");\n\n// Create icon information.\nconst iconIdInformation = { \n content: "assets/icons/customCommandIcon.svg", \n iconContentType: "PATH",\n alt: "Custom command icon alt",\n extension: "svg" \n};\n\n// Set icon for created command ID.\nawait shellFrame.Commands.SetIcon(commandCheckoutId, iconIdInformation);\n\n// Add command to the taskbar menu location.\nawait shellFrame.Commands.AddCustomCommandToMenu(commandCheckoutId, MFiles.MenuLocation.MenuLocation_TaskBar_MainActions, 1);\n')),(0,m.kt)("h3",{id:"iiconinformation-configuration-examples-for-other-content-types"},"IIconInformation configuration examples for other content types."),(0,m.kt)("h4",{id:"svg-string-icon"},"SVG string icon:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},"// Icon in SVG string format.\nconst svgStringIcon = \"\";\n\n// Create iconInformation object.\nconst iconIdInformation = { \n content: svgStringIcon, \n iconContentType: \"SVG\",\n alt: \"Custom command SVG string icon alt\",\n extension: \"svg\" \n};\n")),(0,m.kt)("h4",{id:"base64-string"},"Base64 string:"),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},'// Icon in base64 string format.\nconst base64StringIcon = "PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMSIgeT0iMTQiIHdpZHRoPSIxNCIgaGVpZ2h0PSIxIiByeD0iMC41IiBmaWxsPSIjMzYzQTQwIi8+CjxjaXJjbGUgY3g9IjMiIGN5PSI3IiByPSIxLjUiIHN0cm9rZT0iIzM2M0E0MCIvPgo8cGF0aCBkPSJNNSA4TDYuNSAxMC41IiBzdHJva2U9IiMzNjNBNDAiLz4KPGNpcmNsZSBjeD0iOCIgY3k9IjExIiByPSIxLjUiIHN0cm9rZT0iIzM2M0E0MCIvPgo8Y2lyY2xlIGN4PSIxMyIgY3k9IjMiIHI9IjEuNSIgc3Ryb2tlPSIjMzYzQTQwIi8+CjxwYXRoIGQ9Ik0xMi41IDRMOSA5LjUiIHN0cm9rZT0iIzM2M0E0MCIvPgo8L3N2Zz4K";\n\n// Create iconInformation object.\nconst iconIdInformation = { \n content: base64StringIcon, \n iconContentType: "BASE64",\n alt: "Custom command SVG base64 string icon alt",\n extension: "svg"\n};\n')),(0,m.kt)("p",null,"Note: With Base64 string, extension information must be provided in order to handle icon information correctly."),(0,m.kt)("h3",{id:"using-built-in-icons"},"Using built-in icons:"),(0,m.kt)("p",null,"It is possible to use built-in icons for commands. See available built-in icon IDs from the BuiltInIcon enumeration in the IIconInformation interface."),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},' // Create iconInformation object for builtin Checkout icon.\n const iconIdInformation = { \n content: 0,\n iconContentType: "BUILT_IN", \n alt: `built-in icon alt`, \n extension: "" \n };\n')))}p.isMDXComponent=!0},47713:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),m=(t(67294),t(3905));const o={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,m.kt)(i,(0,a.Z)({},o,t,{components:n,mdxType:"MDXLayout"}),(0,m.kt)("table",null,(0,m.kt)("thead",{parentName:"table"},(0,m.kt)("tr",{parentName:"thead"},(0,m.kt)("th",{parentName:"tr",align:null},"Name"),(0,m.kt)("th",{parentName:"tr",align:null},"Value"),(0,m.kt)("th",{parentName:"tr",align:null},"Description"))),(0,m.kt)("tbody",{parentName:"table"},(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("inlineCode",{parentName:"td"},"CommandState_Undefined")),(0,m.kt)("td",{parentName:"tr",align:null},"0"),(0,m.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("inlineCode",{parentName:"td"},"CommandState_Active")),(0,m.kt)("td",{parentName:"tr",align:null},"1"),(0,m.kt)("td",{parentName:"tr",align:null},"The command is visible and enabled.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("inlineCode",{parentName:"td"},"CommandState_Hidden")),(0,m.kt)("td",{parentName:"tr",align:null},"3"),(0,m.kt)("td",{parentName:"tr",align:null},"The command is not visible.")))))}r.isMDXComponent=!0},9826:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),m=(t(67294),t(3905));const o={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,m.kt)(i,(0,a.Z)({},o,t,{components:n,mdxType:"MDXLayout"}),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},"shellFrame.Commands.SetCommandState( \n commandId, // The ID of the command which state is to be changed\n MFiles.CommandLocation.MainMenu, // The location in the UI where the command's state is being changed\n MFiles.CommandState.CommandState_Hidden // New state of the command in specific location\n);\n")))}r.isMDXComponent=!0},45274:(e,n,t)=>{t(87462),t(67294),t(3905),t(7606),t(94642),t(37415),t(47713),t(9826)},37415:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),m=(t(67294),t(3905));const o={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,m.kt)(i,(0,a.Z)({},o,t,{components:n,mdxType:"MDXLayout"}),(0,m.kt)("p",null,'This JavaScript code is a UI Extension for M-Files, creating custom commands such as "Hello World" and providing functionality to dynamically show, hide, and remove these commands from the top menu based on user interactions within the M-Files shell.'),(0,m.kt)("pre",null,(0,m.kt)("code",{parentName:"pre",className:"language-javascript"},'\n// Called when the UI Extension starts\nfunction OnNewShellUI(shellUI) {\n\n // Wait for the ShellFrame to be created.\n shellUI.Events.Register(\n MFiles.Event.NewShellFrame,\n async (shellFrame) => {\n\n // Wait for the shellframe to start\n shellFrame.Events.Register( \n MFiles.Event.Started,\n async () => {\n\n // Create a new custom command and menu item for the command\n const createCommand = async ( name: string ) => {\n\n // Create a new custom command\n const commandId = await shellFrame.Commands.CreateCustomCommand(name);\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n // Command ID\n commands.exampleCommand,\n // Menulocation\n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n // Priority of the command\n 1 \n );\n\n // Return a data structure containing essential information about the commands\n return {\n id: commandId, // ID of the command\n menuItemId // Menu item ID, can be used to add sub menus to this menu item.\n }\n }\n\n // Create an Example command and a set of sample commands to control it\'s visibility\n const commands = {\n // This is the sample command\n exampleCommand : await createCommand("Hello World"),\n\n // These commands control the state of the example command\n addCommand: await createCommand("Add Command To Menu"),\n deleteCustomCommand: await createCommand("Delete Command")\n hideCommand: await createCommand("Hide Command"),\n showCommand: await createCommand("Activate Command"),\n executeCommand: await createCommand("Execute Command"),\n getCommandName: await createCommand("Get Name"),\n getCommandState: await createCommand("Get Command State"),\n removeCommandFromMenu: await createCommand("Remove From Menu"), \n removeCommand: await createCommand("Remove Command")\n }\n\n // Add the command to the top menu\n const menuItemId = await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n\n // Listen for the custom commands.\n shellFrame.Commands.Events.Register(\n\n // Listen for the CustomCommand events.\n MFiles.Event.CustomCommand,\n\n // Each command has ID and optional data provided with it.\n ( commandId, data ) => {\n // Respond to the command if custom command sent by the application \n switch( commandId ) {\n\n // Run the Example command\n case commands.exampleCommand.id:\n shellFrame.ShowMessage( "Hello World!" );\n break;\n\n // Add the new menuitem which runs the example command\n case commands.addCommand.id:\n await shellFrame.Commands.AddCustomCommandToMenu(\n commands.exampleCommand, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu, \n 1 // Priority of the command\n );\n break;\n\n // Removes the command from particular menu\n case commands.removeCommandFromMenu.id:\n await shellFrame.Commands.RemoveCustomCommandFromMenu(\n commands.exampleCommand,, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu\n );\n break;\n\n // Deletes the command permanently\n case commands.deleteCommand.id:\n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Hiddes all command instances for specific command ID\n case commands.hideCommand.id:\n // Hide the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.CommandLocation.MainMenu,\n MFiles.CommandState.CommandState_Hidden\n );\n break;\n\n // Activates (makes visible) all command instances for specific command ID\n case commands.showCommand.id:\n // Show the command \n shellFrame.Commands.SetCommandState( \n commandId, \n MFiles.MenuLocation.MenuLocation_TopPaneMenu,\n MFiles.CommandState.CommandState_Active\n );\n break;\n\n // Get the command name\n case commands.getCommandName.id:\n const name = await shellFrame.Commands.getCommandName(commands.exampleCommand.id);\n shellFrame.ShowMessage( name );\n break;\n\n // Get the Command State\n case commands.getCommandState.id:\n\n // NOTE: the MFiles.CommandLocation.MainMenu must be used to get state of items added to the Top Menu\n const commandState = await shellFrame.Commands.getCommandState(commands.exampleCommand.id, MFiles.CommandLocation.MainMenu );\n shellFrame.ShowMessage( `Command state: ${commandState}` );\n break;\n\n }\n }\n );\n }\n )\n }\n )\n}\n')),(0,m.kt)("p",null,"This code is essentially setting up a simple UI extension with custom commands that can be triggered from the top menu, and it allows dynamic control over the visibility of these commands based on user interactions."))}r.isMDXComponent=!0},7606:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),m=(t(67294),t(3905));const o={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,m.kt)(i,(0,a.Z)({},o,t,{components:n,mdxType:"MDXLayout"}),(0,m.kt)("table",null,(0,m.kt)("thead",{parentName:"table"},(0,m.kt)("tr",{parentName:"thead"},(0,m.kt)("th",{parentName:"tr",align:null},"Name"),(0,m.kt)("th",{parentName:"tr",align:null},"Description"))),(0,m.kt)("tbody",{parentName:"table"},(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./AddCustomCommandToMenu/"},"AddCustomCommandToMenu")),(0,m.kt)("td",{parentName:"tr",align:null},"Adds existing custom command to the specified context menu location.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./CreateCustomCommand/"},"CreateCustomCommand")),(0,m.kt)("td",{parentName:"tr",align:null},"Creates a custom command that can be added to the application toolbar or to the contextmenu.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./CreateSubMenuItem/"},"CreateSubMenuItem")),(0,m.kt)("td",{parentName:"tr",align:null},"Creates a new SubMenu for already created Menu.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./CreateTaskbarGroup/"},"CreateTaskbarGroup")),(0,m.kt)("td",{parentName:"tr",align:null},"Creates new custom task bar group for custom commands. ",(0,m.kt)("br",null)," ",(0,m.kt)("br",null),"NOTE: If multiple task bar groups are created for the same MenuLocation with the same ",(0,m.kt)("br",null),"orderPriority, their relative ordering is unspecified and may vary between runs, sessions or ",(0,m.kt)("br",null),"versions. Do not rely on a particular order for groups with equal priority \u2014 assign distinct ",(0,m.kt)("br",null),"orderPriority values to guarantee a deterministic ordering (lower values are shown first).")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./DeleteCustomCommand/"},"DeleteCustomCommand")),(0,m.kt)("td",{parentName:"tr",align:null},"Deletes a custom command. The command is automatically removed.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./ExecuteCommand/"},"ExecuteCommand")),(0,m.kt)("td",{parentName:"tr",align:null},"Executes a user command.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./GetCommandName/"},"GetCommandName")),(0,m.kt)("td",{parentName:"tr",align:null},"Resolves the name that has been associated with the given command id.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./GetCommandState/"},"GetCommandState")),(0,m.kt)("td",{parentName:"tr",align:null},"Gets the command state for builtin or custom command in specified location.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./GetMenuIdOfBuiltInCommand/"},"GetMenuIdOfBuiltInCommand")),(0,m.kt)("td",{parentName:"tr",align:null},"Gets the MenuItem ID of a built-in command by its command ID and location.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./RemoveCustomCommandFromMenu/"},"RemoveCustomCommandFromMenu")),(0,m.kt)("td",{parentName:"tr",align:null},"Removes a custom command from the specified menu location.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./RemoveMenuItem/"},"RemoveMenuItem")),(0,m.kt)("td",{parentName:"tr",align:null},"Removes menuitem from the menu.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./RemoveTaskbarGroup/"},"RemoveTaskbarGroup")),(0,m.kt)("td",{parentName:"tr",align:null},"Removes custom task bar group from the task bar.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./SetCommandState/"},"SetCommandState")),(0,m.kt)("td",{parentName:"tr",align:null},"Sets the command's state to be hidden, visible, enabled or disabled. Calling ",(0,m.kt)("br",null),"this method may affect context menu, application toolbar, menus or all of them.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./SetIcon/"},"SetIcon")),(0,m.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom command.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./SetMenuItemState/"},"SetMenuItemState")),(0,m.kt)("td",{parentName:"tr",align:null},"Sets the MenuItem state individually.")),(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"./SetTaskbarGroupIcon/"},"SetTaskbarGroupIcon")),(0,m.kt)("td",{parentName:"tr",align:null},"Sets the icon for a custom task bar group.")))))}r.isMDXComponent=!0},94642:(e,n,t)=>{t.d(n,{ZP:()=>r});var a=t(87462),m=(t(67294),t(3905));const o={toc:[]},i="wrapper";function r(e){let{components:n,...t}=e;return(0,m.kt)(i,(0,a.Z)({},o,t,{components:n,mdxType:"MDXLayout"}),(0,m.kt)("table",null,(0,m.kt)("thead",{parentName:"table"},(0,m.kt)("tr",{parentName:"thead"},(0,m.kt)("th",{parentName:"tr",align:null},"Name"),(0,m.kt)("th",{parentName:"tr",align:null},"Type"),(0,m.kt)("th",{parentName:"tr",align:null},"Description"))),(0,m.kt)("tbody",{parentName:"table"},(0,m.kt)("tr",{parentName:"tbody"},(0,m.kt)("td",{parentName:"tr",align:null},"Events"),(0,m.kt)("td",{parentName:"tr",align:null},(0,m.kt)("a",{parentName:"td",href:"/UIExt2/Events/#icommandsevents"},"ICommandsEvents")),(0,m.kt)("td",{parentName:"tr",align:null},"Returns the event registering interface of the ICommands interface.")))))}r.isMDXComponent=!0},91482:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/Commands_3-c8148bb22e501e5471b6553619f7323b.png"},38316:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/Commands_4-3f91ab15528b6cb15a47a4a0ddc4b745.png"},47013:(e,n,t)=>{t.d(n,{Z:()=>a});const a=t.p+"assets/images/Commands_8-e254bb41f0a4814a0fe6f62cd1a679cd.png"}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5c9db9cf.3a56d418.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5c9db9cf.4f25fcf0.js similarity index 76% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5c9db9cf.3a56d418.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5c9db9cf.4f25fcf0.js index 577ee1ef6..abf1461ac 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5c9db9cf.3a56d418.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5c9db9cf.4f25fcf0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[1957],{3905:(t,n,e)=>{e.d(n,{Zo:()=>u,kt:()=>N});var a=e(67294);function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function l(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,a)}return e}function i(t){for(var n=1;n=0||(r[e]=t[e]);return r}(t,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}var p=a.createContext({}),m=function(t){var n=a.useContext(p),e=n;return t&&(e="function"==typeof t?t(n):i(i({},n),t)),e},u=function(t){var n=m(t.components);return a.createElement(p.Provider,{value:n},t.children)},d="mdxType",k={inlineCode:"code",wrapper:function(t){var n=t.children;return a.createElement(a.Fragment,{},n)}},c=a.forwardRef((function(t,n){var e=t.components,r=t.mdxType,l=t.originalType,p=t.parentName,u=o(t,["components","mdxType","originalType","parentName"]),d=m(e),c=r,N=d["".concat(p,".").concat(c)]||d[c]||k[c]||l;return e?a.createElement(N,i(i({ref:n},u),{},{components:e})):a.createElement(N,i({ref:n},u))}));function N(t,n){var e=arguments,r=n&&n.mdxType;if("string"==typeof t||r){var l=e.length,i=new Array(l);i[0]=c;var o={};for(var p in n)hasOwnProperty.call(n,p)&&(o[p]=n[p]);o.originalType=t,o[d]="string"==typeof t?t:r,i[1]=o;for(var m=2;m{e.r(n),e.d(n,{assets:()=>N,contentTitle:()=>k,default:()=>y,frontMatter:()=>d,metadata:()=>c,toc:()=>g});var a=e(87462),r=(e(67294),e(3905));const l={toc:[]},i="wrapper";function o(t){let{components:n,...e}=t;return(0,r.kt)(i,(0,a.Z)({},l,e,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Name"),(0,r.kt)("th",{parentName:"tr",align:null},"Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_CheckOut")),(0,r.kt)("td",{parentName:"tr",align:null},"0"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_CheckIn")),(0,r.kt)("td",{parentName:"tr",align:null},"1"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_History")),(0,r.kt)("td",{parentName:"tr",align:null},"2"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_MakeCopy")),(0,r.kt)("td",{parentName:"tr",align:null},"3"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_View")),(0,r.kt)("td",{parentName:"tr",align:null},"4"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Workflow")),(0,r.kt)("td",{parentName:"tr",align:null},"5"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Assignment")),(0,r.kt)("td",{parentName:"tr",align:null},"6"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_MarkComplete")),(0,r.kt)("td",{parentName:"tr",align:null},"7"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_TraditionalFolder")),(0,r.kt)("td",{parentName:"tr",align:null},"8"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_ChangeState")),(0,r.kt)("td",{parentName:"tr",align:null},"9"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_DocumentCollection")),(0,r.kt)("td",{parentName:"tr",align:null},"10"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_DefaultFile")),(0,r.kt)("td",{parentName:"tr",align:null},"11"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Property")),(0,r.kt)("td",{parentName:"tr",align:null},"12"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Undo")),(0,r.kt)("td",{parentName:"tr",align:null},"13"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_User")),(0,r.kt)("td",{parentName:"tr",align:null},"14"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Group")),(0,r.kt)("td",{parentName:"tr",align:null},"15"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_NewItem")),(0,r.kt)("td",{parentName:"tr",align:null},"16"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_ContactPerson")),(0,r.kt)("td",{parentName:"tr",align:null},"17"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_StatusBlue")),(0,r.kt)("td",{parentName:"tr",align:null},"18"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_CircleBlue")),(0,r.kt)("td",{parentName:"tr",align:null},"19"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Favorite")),(0,r.kt)("td",{parentName:"tr",align:null},"20"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Idea")),(0,r.kt)("td",{parentName:"tr",align:null},"21"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Bubble")),(0,r.kt)("td",{parentName:"tr",align:null},"22"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Delete")),(0,r.kt)("td",{parentName:"tr",align:null},"23"),(0,r.kt)("td",{parentName:"tr",align:null})))))}o.isMDXComponent=!0;const p={toc:[]},m="wrapper";function u(t){let{components:n,...e}=t;return(0,r.kt)(m,(0,a.Z)({},p,e,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Enum representing built-in icons."),(0,r.kt)("p",null,"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any\nfuture release. Use of this feature is not recommended for production environments."))}u.isMDXComponent=!0;const d={},k="BuiltInIcon",c={unversionedId:"UIExt2/Enums/BuiltInIcon/index",id:"UIExt2/Enums/BuiltInIcon/index",title:"BuiltInIcon",description:"",source:"@site/docs/UIExt2/Enums/BuiltInIcon/index.mdx",sourceDirName:"UIExt2/Enums/BuiltInIcon",slug:"/UIExt2/Enums/BuiltInIcon/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltInIcon/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Enums",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/"},next:{title:"BuiltinCommand",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltinCommand/"}},N={},g=[],s={toc:g},I="wrapper";function y(t){let{components:n,...e}=t;return(0,r.kt)(I,(0,a.Z)({},s,e,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"builtinicon"},"BuiltInIcon"),(0,r.kt)(u,{components:e.components,mdxType:"Description"}),(0,r.kt)(o,{components:e.components,mdxType:"Values"}))}y.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[1957],{3905:(t,n,e)=>{e.d(n,{Zo:()=>u,kt:()=>c});var a=e(67294);function r(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function l(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,a)}return e}function i(t){for(var n=1;n=0||(r[e]=t[e]);return r}(t,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(r[e]=t[e])}return r}var p=a.createContext({}),m=function(t){var n=a.useContext(p),e=n;return t&&(e="function"==typeof t?t(n):i(i({},n),t)),e},u=function(t){var n=m(t.components);return a.createElement(p.Provider,{value:n},t.children)},d="mdxType",k={inlineCode:"code",wrapper:function(t){var n=t.children;return a.createElement(a.Fragment,{},n)}},N=a.forwardRef((function(t,n){var e=t.components,r=t.mdxType,l=t.originalType,p=t.parentName,u=o(t,["components","mdxType","originalType","parentName"]),d=m(e),N=r,c=d["".concat(p,".").concat(N)]||d[N]||k[N]||l;return e?a.createElement(c,i(i({ref:n},u),{},{components:e})):a.createElement(c,i({ref:n},u))}));function c(t,n){var e=arguments,r=n&&n.mdxType;if("string"==typeof t||r){var l=e.length,i=new Array(l);i[0]=N;var o={};for(var p in n)hasOwnProperty.call(n,p)&&(o[p]=n[p]);o.originalType=t,o[d]="string"==typeof t?t:r,i[1]=o;for(var m=2;m{e.r(n),e.d(n,{assets:()=>c,contentTitle:()=>k,default:()=>y,frontMatter:()=>d,metadata:()=>N,toc:()=>g});var a=e(87462),r=(e(67294),e(3905));const l={toc:[]},i="wrapper";function o(t){let{components:n,...e}=t;return(0,r.kt)(i,(0,a.Z)({},l,e,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Name"),(0,r.kt)("th",{parentName:"tr",align:null},"Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_CheckOut")),(0,r.kt)("td",{parentName:"tr",align:null},"0"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_CheckIn")),(0,r.kt)("td",{parentName:"tr",align:null},"1"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_History")),(0,r.kt)("td",{parentName:"tr",align:null},"2"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_MakeCopy")),(0,r.kt)("td",{parentName:"tr",align:null},"3"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_View")),(0,r.kt)("td",{parentName:"tr",align:null},"4"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Workflow")),(0,r.kt)("td",{parentName:"tr",align:null},"5"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Assignment")),(0,r.kt)("td",{parentName:"tr",align:null},"6"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_MarkComplete")),(0,r.kt)("td",{parentName:"tr",align:null},"7"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_TraditionalFolder")),(0,r.kt)("td",{parentName:"tr",align:null},"8"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_ChangeState")),(0,r.kt)("td",{parentName:"tr",align:null},"9"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_DocumentCollection")),(0,r.kt)("td",{parentName:"tr",align:null},"10"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_DefaultFile")),(0,r.kt)("td",{parentName:"tr",align:null},"11"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Property")),(0,r.kt)("td",{parentName:"tr",align:null},"12"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Undo")),(0,r.kt)("td",{parentName:"tr",align:null},"13"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_User")),(0,r.kt)("td",{parentName:"tr",align:null},"14"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Group")),(0,r.kt)("td",{parentName:"tr",align:null},"15"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_NewItem")),(0,r.kt)("td",{parentName:"tr",align:null},"16"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_ContactPerson")),(0,r.kt)("td",{parentName:"tr",align:null},"17"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_StatusBlue")),(0,r.kt)("td",{parentName:"tr",align:null},"18"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_CircleBlue")),(0,r.kt)("td",{parentName:"tr",align:null},"19"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Favorite")),(0,r.kt)("td",{parentName:"tr",align:null},"20"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Idea")),(0,r.kt)("td",{parentName:"tr",align:null},"21"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Bubble")),(0,r.kt)("td",{parentName:"tr",align:null},"22"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_Delete")),(0,r.kt)("td",{parentName:"tr",align:null},"23"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_ConflictResolution_KeepChanges")),(0,r.kt)("td",{parentName:"tr",align:null},"24"),(0,r.kt)("td",{parentName:"tr",align:null})),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"BuiltInIcon_ConflictResolution_DiscardChanges")),(0,r.kt)("td",{parentName:"tr",align:null},"25"),(0,r.kt)("td",{parentName:"tr",align:null})))))}o.isMDXComponent=!0;const p={toc:[]},m="wrapper";function u(t){let{components:n,...e}=t;return(0,r.kt)(m,(0,a.Z)({},p,e,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Enum representing built-in icons."))}u.isMDXComponent=!0;const d={},k="BuiltInIcon",N={unversionedId:"UIExt2/Enums/BuiltInIcon/index",id:"UIExt2/Enums/BuiltInIcon/index",title:"BuiltInIcon",description:"",source:"@site/docs/UIExt2/Enums/BuiltInIcon/index.mdx",sourceDirName:"UIExt2/Enums/BuiltInIcon",slug:"/UIExt2/Enums/BuiltInIcon/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltInIcon/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"Enums",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/"},next:{title:"BuiltinCommand",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Enums/BuiltinCommand/"}},c={},g=[],s={toc:g},I="wrapper";function y(t){let{components:n,...e}=t;return(0,r.kt)(I,(0,a.Z)({},s,e,{components:n,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"builtinicon"},"BuiltInIcon"),(0,r.kt)(u,{components:e.components,mdxType:"Description"}),(0,r.kt)(o,{components:e.components,mdxType:"Values"}))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5f6c97ad.df14be38.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5f6c97ad.df14be38.js new file mode 100644 index 000000000..79d46f8d7 --- /dev/null +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/5f6c97ad.df14be38.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[508],{3905:(e,t,a)=>{a.d(t,{Zo:()=>c,kt:()=>f});var r=a(67294);function n(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function l(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function u(e){for(var t=1;t=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var i=r.createContext({}),s=function(e){var t=r.useContext(i),a=t;return e&&(a="function"==typeof e?e(t):u(u({},t),e)),a},c=function(e){var t=s(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var a=e.components,n=e.mdxType,l=e.originalType,i=e.parentName,c=o(e,["components","mdxType","originalType","parentName"]),p=s(a),d=n,f=p["".concat(i,".").concat(d)]||p[d]||m[d]||l;return a?r.createElement(f,u(u({ref:t},c),{},{components:a})):r.createElement(f,u({ref:t},c))}));function f(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var l=a.length,u=new Array(l);u[0]=d;var o={};for(var i in t)hasOwnProperty.call(t,i)&&(o[i]=t[i]);o.originalType=e,o[p]="string"==typeof e?e:n,u[1]=o;for(var s=2;s{a.d(t,{Z:()=>u});var r=a(67294),n=a(86010);const l={tabItem:"tabItem_Ymn6"};function u(e){let{children:t,hidden:a,className:u}=e;return r.createElement("div",{role:"tabpanel",className:(0,n.Z)(l.tabItem,u),hidden:a},t)}},73992:(e,t,a)=>{a.d(t,{Z:()=>v});var r=a(87462),n=a(67294),l=a(86010),u=a(72957),o=a(16550),i=a(75238),s=a(33609),c=a(92560);function p(e){return function(e){return n.Children.map(e,(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:a,attributes:r,default:n}}=e;return{value:t,label:a,attributes:r,default:n}}))}function m(e){const{values:t,children:a}=e;return(0,n.useMemo)((()=>{const e=t??p(a);return function(e){const t=(0,s.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,a])}function d(e){let{value:t,tabValues:a}=e;return a.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:a}=e;const r=(0,o.k6)(),l=function(e){let{queryString:t=!1,groupId:a}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:t,groupId:a});return[(0,i._X)(l),(0,n.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(r.location.search);t.set(l,e),r.replace({...r.location,search:t.toString()})}),[l,r])]}function y(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,l=m(e),[u,o]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=a.find((e=>e.default))??a[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:l}))),[i,s]=f({queryString:a,groupId:r}),[p,y]=function(e){let{groupId:t}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,l]=(0,c.Nk)(a);return[r,(0,n.useCallback)((e=>{a&&l.set(e)}),[a,l])]}({groupId:r}),b=(()=>{const e=i??p;return d({value:e,tabValues:l})?e:null})();(0,n.useLayoutEffect)((()=>{b&&o(b)}),[b]);return{selectedValue:u,selectValue:(0,n.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),s(e),y(e)}),[s,y,l]),tabValues:l}}var b=a(51048);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:a,selectedValue:o,selectValue:i,tabValues:s}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,u.o5)(),m=e=>{const t=e.currentTarget,a=c.indexOf(t),r=s[a].value;r!==o&&(p(t),i(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;t=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;t=c[a]??c[c.length-1];break}}t?.focus()};return n.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":a},t)},s.map((e=>{let{value:t,label:a,attributes:u}=e;return n.createElement("li",(0,r.Z)({role:"tab",tabIndex:o===t?0:-1,"aria-selected":o===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},u,{className:(0,l.Z)("tabs__item",g.tabItem,u?.className,{"tabs__item--active":o===t})}),a??t)})))}function h(e){let{lazy:t,children:a,selectedValue:r}=e;const l=(Array.isArray(a)?a:[a]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===r));return e?(0,n.cloneElement)(e,{className:"margin-top--md"}):null}return n.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function I(e){const t=y(e);return n.createElement("div",{className:(0,l.Z)("tabs-container",g.tabList)},n.createElement(k,(0,r.Z)({},e,t)),n.createElement(h,(0,r.Z)({},e,t)))}function v(e){const t=(0,b.Z)();return n.createElement(I,(0,r.Z)({key:String(t)},e))}},52414:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>v,contentTitle:()=>h,default:()=>D,frontMatter:()=>k,metadata:()=>I,toc:()=>N});var r=a(87462),n=(a(67294),a(3905));const l={toc:[{value:"Example",id:"example",level:3}]},u="wrapper";function o(e){let{components:t,...a}=e;return(0,n.kt)(u,(0,r.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Name"),(0,n.kt)("th",{parentName:"tr",align:null},"Description"),(0,n.kt)("th",{parentName:"tr",align:null},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"is_found")),(0,n.kt)("td",{parentName:"tr",align:null},"Receives true if the metadata structure item was found by GUID."),(0,n.kt)("td",{parentName:"tr",align:null},"boolean")),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"id")),(0,n.kt)("td",{parentName:"tr",align:null},"Receives the id of the metadata structure item. Valid only if item is found."),(0,n.kt)("td",{parentName:"tr",align:null},"number")))),(0,n.kt)("h3",{id:"example"},"Example"),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-json"},'{\n "is_found": false,\n "id": 0\n}\n')))}o.isMDXComponent=!0;const i={toc:[]},s="wrapper";function c(e){let{components:t,...a}=e;return(0,n.kt)(s,(0,r.Z)({},i,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("table",null,(0,n.kt)("thead",{parentName:"table"},(0,n.kt)("tr",{parentName:"thead"},(0,n.kt)("th",{parentName:"tr",align:null},"Name"),(0,n.kt)("th",{parentName:"tr",align:null},"Description"),(0,n.kt)("th",{parentName:"tr",align:null},"Type"))),(0,n.kt)("tbody",{parentName:"table"},(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"item_type")),(0,n.kt)("td",{parentName:"tr",align:null},"Metadata structure item type."),(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("a",{parentName:"td",href:"/gRPC/Enums/MetadataStructureItem"},"MetadataStructureItem"))),(0,n.kt)("tr",{parentName:"tbody"},(0,n.kt)("td",{parentName:"tr",align:null},(0,n.kt)("inlineCode",{parentName:"td"},"guid")),(0,n.kt)("td",{parentName:"tr",align:null},"GUID of the metadata structure item."),(0,n.kt)("td",{parentName:"tr",align:null},"string")))))}c.isMDXComponent=!0;a(73992);var p=a(18679);const m={toc:[]},d="wrapper";function f(e){let{components:t,...a}=e;return(0,n.kt)(d,(0,r.Z)({},m,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre",className:"language-js"},'// Assumes shellUI has been initialized with IShellUI instance\nconst results =\n await shellUI.Vault.VaultOperations.GetMetadataStructureItemIdByGUID({\n item_type: 10000 /* Enum: MetadataStructureItem */,\n guid: "",\n });\n'))))}f.isMDXComponent=!0;const y={toc:[]},b="wrapper";function g(e){let{components:t,...a}=e;return(0,n.kt)(b,(0,r.Z)({},y,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"Gets metadata structure item ID by GUID."))}g.isMDXComponent=!0;const k={},h="GetMetadataStructureItemIdByGUID",I={unversionedId:"gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByGUID/index",id:"gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByGUID/index",title:"GetMetadataStructureItemIdByGUID",description:"Syntax",source:"@site/docs/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByGUID/index.mdx",sourceDirName:"gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByGUID",slug:"/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByGUID/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByGUID/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"GetMetadataStructureItemIdByAlias",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/VaultOperations/GetMetadataStructureItemIdByAlias/"},next:{title:"ViewsOperations",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/ViewsOperations/"}},v={},N=[{value:"Syntax",id:"syntax",level:2},{value:"Message",id:"message",level:2},{value:"Return type",id:"return-type",level:2}],w={toc:N},x="wrapper";function D(e){let{components:t,...a}=e;return(0,n.kt)(x,(0,r.Z)({},w,a,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("h1",{id:"getmetadatastructureitemidbyguid"},"GetMetadataStructureItemIdByGUID"),(0,n.kt)(g,{components:a.components,mdxType:"Description"}),(0,n.kt)("h2",{id:"syntax"},"Syntax"),(0,n.kt)(f,{components:a.components,mdxType:"Syntax"}),(0,n.kt)("h2",{id:"message"},"Message"),(0,n.kt)(c,{components:a.components,mdxType:"Message"}),(0,n.kt)("h2",{id:"return-type"},"Return type"),(0,n.kt)(o,{components:a.components,mdxType:"Returns"}))}D.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/696d7af6.c9ec1caa.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/696d7af6.630e344f.js similarity index 59% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/696d7af6.c9ec1caa.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/696d7af6.630e344f.js index 5e7de6bd0..4bebc304b 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/696d7af6.c9ec1caa.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/696d7af6.630e344f.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[7183],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),m=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=m(e.components);return a.createElement(u.Provider,{value:t},e.children)},s="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),s=m(n),d=r,f=s["".concat(u,".").concat(d)]||s[d]||p[d]||l;return n?a.createElement(f,o(o({ref:t},c),{},{components:n})):a.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=d;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[s]="string"==typeof e?e:r,o[1]=i;for(var m=2;m{n.d(t,{Z:()=>o});var a=n(67294),r=n(86010);const l={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(87462),r=n(67294),l=n(86010),o=n(72957),i=n(16550),u=n(75238),m=n(33609),c=n(92560);function s(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function p(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??s(n);return function(e){const t=(0,m.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=p(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[u,m]=f({queryString:n,groupId:a}),[s,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),b=(()=>{const e=u??s;return d({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{b&&i(b)}),[b]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),m(e),k(e)}),[m,k,l]),tabValues:l}}var b=n(51048);const y={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:m}=e;const c=[],{blockElementScrollPositionUntilNextRender:s}=(0,o.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),a=m[n].value;a!==i&&(s(t),u(a))},d=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},m.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:p},o,{className:(0,l.Z)("tabs__item",y.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function N(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(N,(0,a.Z)({},e,t)))}function v(e){const t=(0,b.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},93986:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),r=(n(67294),n(3905));const l={toc:[]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Name"),(0,r.kt)("th",{parentName:"tr",align:null},"Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Undefined")),(0,r.kt)("td",{parentName:"tr",align:null},"0"),(0,r.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"MainMenu")),(0,r.kt)("td",{parentName:"tr",align:null},"1"),(0,r.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the main menus, such as top menu and command bars.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"ContextMenu")),(0,r.kt)("td",{parentName:"tr",align:null},"2"),(0,r.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the context menu.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"ActivityContextMenu")),(0,r.kt)("td",{parentName:"tr",align:null},"6"),(0,r.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the activity context menu.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"TaskBar")),(0,r.kt)("td",{parentName:"tr",align:null},"7"),(0,r.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance on task bar. ",(0,r.kt)("br",null)," ",(0,r.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,r.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"All")),(0,r.kt)("td",{parentName:"tr",align:null},"268435455"),(0,r.kt)("td",{parentName:"tr",align:null},"Refers to all command locations. ",(0,r.kt)("br",null)," ",(0,r.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,r.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")))))}i.isMDXComponent=!0},68069:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>I,contentTitle:()=>g,default:()=>E,frontMatter:()=>N,metadata:()=>v,toc:()=>x});var a=n(87462),r=(n(67294),n(3905));const l={toc:[]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Promise < ",(0,r.kt)("a",{parentName:"td",href:"/UIExt2/Enums/CommandState/"},"CommandState")," >"),(0,r.kt)("td",{parentName:"tr",align:null},"The command state.")))))}i.isMDXComponent=!0;const u={toc:[]},m="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Name"),(0,r.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"command"),(0,r.kt)("td",{parentName:"tr",align:null},"Required"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number")),(0,r.kt)("td",{parentName:"tr",align:null},"The command id. Can be a builtin command enumerated value or custom command id.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"location"),(0,r.kt)("td",{parentName:"tr",align:null},"Required"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"/UIExt2/Enums/CommandLocation/"},"CommandLocation")),(0,r.kt)("td",{parentName:"tr",align:null},"Detailed command location to examine. Possible locations are enumerated.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"includeBuiltInState"),(0,r.kt)("td",{parentName:"tr",align:null},"Required"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:null},"If true, takes the built-in state of the command into account.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"includeScriptSpecifiedState"),(0,r.kt)("td",{parentName:"tr",align:null},"Required"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:null},"If true, accounts for the script-specified state of the command.")))))}c.isMDXComponent=!0;n(73992);var s=n(18679);const p={toc:[]},d="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)(s.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"// shellFrame points here into the IShellFrame interface\nconst result = await shellFrame.Commands.GetCommandState(\n command,\n location,\n includeBuiltInState,\n includeScriptSpecifiedState,\n);\n"))))}f.isMDXComponent=!0;const k={toc:[]},b="wrapper";function y(e){let{components:t,...n}=e;return(0,r.kt)(b,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Gets the command state for builtin or custom command in specified location."))}y.isMDXComponent=!0;var h=n(93986);const N={},g="GetCommandState",v={unversionedId:"UIExt2/Interfaces/ICommands/GetCommandState/index",id:"UIExt2/Interfaces/ICommands/GetCommandState/index",title:"GetCommandState",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommands/GetCommandState/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommands/GetCommandState",slug:"/UIExt2/Interfaces/ICommands/GetCommandState/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandState/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"GetCommandName",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandName/"},next:{title:"GetMenuIdOfBuiltInCommand",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetMenuIdOfBuiltInCommand/"}},I={},x=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],C={toc:x},w="wrapper";function E(e){let{components:t,...n}=e;return(0,r.kt)(w,(0,a.Z)({},C,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"getcommandstate"},"GetCommandState"),(0,r.kt)("h2",{id:"description"},"Description"),(0,r.kt)(y,{components:n.components,mdxType:"Description"}),(0,r.kt)("h2",{id:"syntax"},"Syntax"),(0,r.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,r.kt)("h2",{id:"parameters"},"Parameters"),(0,r.kt)(c,{components:n.components,mdxType:"Params"}),(0,r.kt)("p",null,"Possible values for the command location are:"),(0,r.kt)(h.ZP,{components:n.components,mdxType:"CommandLocation"}),(0,r.kt)("h2",{id:"return-type"},"Return type"),(0,r.kt)(i,{components:n.components,mdxType:"Returns"}))}E.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[7183],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var a=n(67294);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function o(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u=a.createContext({}),m=function(e){var t=a.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},c=function(e){var t=m(e.components);return a.createElement(u.Provider,{value:t},e.children)},s="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},d=a.forwardRef((function(e,t){var n=e.components,r=e.mdxType,l=e.originalType,u=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),s=m(n),d=r,f=s["".concat(u,".").concat(d)]||s[d]||p[d]||l;return n?a.createElement(f,o(o({ref:t},c),{},{components:n})):a.createElement(f,o({ref:t},c))}));function f(e,t){var n=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var l=n.length,o=new Array(l);o[0]=d;var i={};for(var u in t)hasOwnProperty.call(t,u)&&(i[u]=t[u]);i.originalType=e,i[s]="string"==typeof e?e:r,o[1]=i;for(var m=2;m{n.d(t,{Z:()=>o});var a=n(67294),r=n(86010);const l={tabItem:"tabItem_Ymn6"};function o(e){let{children:t,hidden:n,className:o}=e;return a.createElement("div",{role:"tabpanel",className:(0,r.Z)(l.tabItem,o),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>v});var a=n(87462),r=n(67294),l=n(86010),o=n(72957),i=n(16550),u=n(75238),m=n(33609),c=n(92560);function s(e){return function(e){return r.Children.map(e,(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}function p(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??s(n);return function(e){const t=(0,m.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const a=(0,i.k6)(),l=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,u._X)(l),(0,r.useCallback)((e=>{if(!l)return;const t=new URLSearchParams(a.location.search);t.set(l,e),a.replace({...a.location,search:t.toString()})}),[l,a])]}function k(e){const{defaultValue:t,queryString:n=!1,groupId:a}=e,l=p(e),[o,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:l}))),[u,m]=f({queryString:n,groupId:a}),[s,k]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,l]=(0,c.Nk)(n);return[a,(0,r.useCallback)((e=>{n&&l.set(e)}),[n,l])]}({groupId:a}),b=(()=>{const e=u??s;return d({value:e,tabValues:l})?e:null})();(0,r.useLayoutEffect)((()=>{b&&i(b)}),[b]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!d({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);i(e),m(e),k(e)}),[m,k,l]),tabValues:l}}var b=n(51048);const y={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:u,tabValues:m}=e;const c=[],{blockElementScrollPositionUntilNextRender:s}=(0,o.o5)(),p=e=>{const t=e.currentTarget,n=c.indexOf(t),a=m[n].value;a!==i&&(s(t),u(a))},d=e=>{let t=null;switch(e.key){case"Enter":p(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return r.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.Z)("tabs",{"tabs--block":n},t)},m.map((e=>{let{value:t,label:n,attributes:o}=e;return r.createElement("li",(0,a.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:p},o,{className:(0,l.Z)("tabs__item",y.tabItem,o?.className,{"tabs__item--active":i===t})}),n??t)})))}function N(e){let{lazy:t,children:n,selectedValue:a}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:"margin-top--md"}):null}return r.createElement("div",{className:"margin-top--md"},l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==a}))))}function g(e){const t=k(e);return r.createElement("div",{className:(0,l.Z)("tabs-container",y.tabList)},r.createElement(h,(0,a.Z)({},e,t)),r.createElement(N,(0,a.Z)({},e,t)))}function v(e){const t=(0,b.Z)();return r.createElement(g,(0,a.Z)({key:String(t)},e))}},93986:(e,t,n)=>{n.d(t,{ZP:()=>i});var a=n(87462),r=(n(67294),n(3905));const l={toc:[]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Name"),(0,r.kt)("th",{parentName:"tr",align:null},"Value"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"Undefined")),(0,r.kt)("td",{parentName:"tr",align:null},"0"),(0,r.kt)("td",{parentName:"tr",align:null},"Undefined value.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"MainMenu")),(0,r.kt)("td",{parentName:"tr",align:null},"1"),(0,r.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the main menus, such as top menu and command bars.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"ContextMenu")),(0,r.kt)("td",{parentName:"tr",align:null},"2"),(0,r.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the context menu.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"ActivityContextMenu")),(0,r.kt)("td",{parentName:"tr",align:null},"6"),(0,r.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance in the activity context menu.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"TaskBar")),(0,r.kt)("td",{parentName:"tr",align:null},"7"),(0,r.kt)("td",{parentName:"tr",align:null},"Specifies the command appearance on task bar.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"All")),(0,r.kt)("td",{parentName:"tr",align:null},"268435455"),(0,r.kt)("td",{parentName:"tr",align:null},"Refers to all command locations. ",(0,r.kt)("br",null)," ",(0,r.kt)("br",null),"NOTE: Stability is experimental. Non-backward compatible changes or removal may occur in any ",(0,r.kt)("br",null),"future release. Use of this feature is not recommended for production environments.")))))}i.isMDXComponent=!0},68069:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>I,contentTitle:()=>g,default:()=>E,frontMatter:()=>N,metadata:()=>v,toc:()=>C});var a=n(87462),r=(n(67294),n(3905));const l={toc:[]},o="wrapper";function i(e){let{components:t,...n}=e;return(0,r.kt)(o,(0,a.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"Promise < ",(0,r.kt)("a",{parentName:"td",href:"/UIExt2/Enums/CommandState/"},"CommandState")," >"),(0,r.kt)("td",{parentName:"tr",align:null},"The command state.")))))}i.isMDXComponent=!0;const u={toc:[]},m="wrapper";function c(e){let{components:t,...n}=e;return(0,r.kt)(m,(0,a.Z)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("table",null,(0,r.kt)("thead",{parentName:"table"},(0,r.kt)("tr",{parentName:"thead"},(0,r.kt)("th",{parentName:"tr",align:null},"Name"),(0,r.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,r.kt)("th",{parentName:"tr",align:null},"Type"),(0,r.kt)("th",{parentName:"tr",align:null},"Description"))),(0,r.kt)("tbody",{parentName:"table"},(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"command"),(0,r.kt)("td",{parentName:"tr",align:null},"Required"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"number")),(0,r.kt)("td",{parentName:"tr",align:null},"The command id. Can be a builtin command enumerated value or custom command id.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"location"),(0,r.kt)("td",{parentName:"tr",align:null},"Required"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("a",{parentName:"td",href:"/UIExt2/Enums/CommandLocation/"},"CommandLocation")),(0,r.kt)("td",{parentName:"tr",align:null},"Detailed command location to examine. Possible locations are enumerated.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"includeBuiltInState"),(0,r.kt)("td",{parentName:"tr",align:null},"Required"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:null},"If true, takes the built-in state of the command into account.")),(0,r.kt)("tr",{parentName:"tbody"},(0,r.kt)("td",{parentName:"tr",align:null},"includeScriptSpecifiedState"),(0,r.kt)("td",{parentName:"tr",align:null},"Required"),(0,r.kt)("td",{parentName:"tr",align:null},(0,r.kt)("inlineCode",{parentName:"td"},"boolean")),(0,r.kt)("td",{parentName:"tr",align:null},"If true, accounts for the script-specified state of the command.")))))}c.isMDXComponent=!0;n(73992);var s=n(18679);const p={toc:[]},d="wrapper";function f(e){let{components:t,...n}=e;return(0,r.kt)(d,(0,a.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)(s.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-js"},"// shellFrame points here into the IShellFrame interface\nconst result = await shellFrame.Commands.GetCommandState(\n command,\n location,\n includeBuiltInState,\n includeScriptSpecifiedState,\n);\n"))))}f.isMDXComponent=!0;const k={toc:[]},b="wrapper";function y(e){let{components:t,...n}=e;return(0,r.kt)(b,(0,a.Z)({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("p",null,"Gets the command state for builtin or custom command in specified location."))}y.isMDXComponent=!0;var h=n(93986);const N={},g="GetCommandState",v={unversionedId:"UIExt2/Interfaces/ICommands/GetCommandState/index",id:"UIExt2/Interfaces/ICommands/GetCommandState/index",title:"GetCommandState",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommands/GetCommandState/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommands/GetCommandState",slug:"/UIExt2/Interfaces/ICommands/GetCommandState/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandState/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"GetCommandName",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetCommandName/"},next:{title:"GetMenuIdOfBuiltInCommand",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommands/GetMenuIdOfBuiltInCommand/"}},I={},C=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],x={toc:C},w="wrapper";function E(e){let{components:t,...n}=e;return(0,r.kt)(w,(0,a.Z)({},x,n,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"getcommandstate"},"GetCommandState"),(0,r.kt)("h2",{id:"description"},"Description"),(0,r.kt)(y,{components:n.components,mdxType:"Description"}),(0,r.kt)("h2",{id:"syntax"},"Syntax"),(0,r.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,r.kt)("h2",{id:"parameters"},"Parameters"),(0,r.kt)(c,{components:n.components,mdxType:"Params"}),(0,r.kt)("p",null,"Possible values for the command location are:"),(0,r.kt)(h.ZP,{components:n.components,mdxType:"CommandLocation"}),(0,r.kt)("h2",{id:"return-type"},"Return type"),(0,r.kt)(i,{components:n.components,mdxType:"Returns"}))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/6bfbab4d.b990ced1.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/6bfbab4d.b990ced1.js new file mode 100644 index 000000000..8670b0dfa --- /dev/null +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/6bfbab4d.b990ced1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[2316],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>b});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var i=r.createContext({}),u=function(e){var t=r.useContext(i),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(i.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,i=e.parentName,c=s(e,["components","mdxType","originalType","parentName"]),p=u(n),d=a,b=p["".concat(i,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(b,l(l({ref:t},c),{},{components:n})):r.createElement(b,l({ref:t},c))}));function b(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var s={};for(var i in t)hasOwnProperty.call(t,i)&&(s[i]=t[i]);s.originalType=e,s[p]="string"==typeof e?e:a,l[1]=s;for(var u=2;u{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>O});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),s=n(16550),i=n(75238),u=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:n}=e;const r=(0,s.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,i._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,s]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[i,u]=b({queryString:n,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=i??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&s(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);s(e),u(e),f(e)}),[u,f,o]),tabValues:o}}var y=n(51048);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function k(e){let{className:t,block:n,selectedValue:s,selectValue:i,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==s&&(p(t),i(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",h.tabItem,l?.className,{"tabs__item--active":s===t})}),n??t)})))}function v(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function g(e){const t=f(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",h.tabList)},a.createElement(k,(0,r.Z)({},e,t)),a.createElement(v,(0,r.Z)({},e,t)))}function O(e){const t=(0,y.Z)();return a.createElement(g,(0,r.Z)({key:String(t)},e))}},5508:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>O,contentTitle:()=>v,default:()=>x,frontMatter:()=>k,metadata:()=>g,toc:()=>N});var r=n(87462),a=(n(67294),n(3905));const o={toc:[{value:"Example",id:"example",level:3}]},l="wrapper";function s(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"object_version")),(0,a.kt)("td",{parentName:"tr",align:null},"The latest document version ID. It can be a checked-out version only if the current user has this document checked out."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/ObjVerVersion"},"ObjVerVersion"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"version_guid")),(0,a.kt)("td",{parentName:"tr",align:null},"The GUID of the document version."),(0,a.kt)("td",{parentName:"tr",align:null},"string")))),(0,a.kt)("h3",{id:"example"},"Example"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-json"},'{\n "object_version": {\n "type": 7 /* Enum: ObjVerVersionType */,\n "internal_version": 0,\n "external_repository_version": "",\n "external_repository_sort_key": 0\n },\n "version_guid": ""\n}\n')))}s.isMDXComponent=!0;const i={toc:[]},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"obj_id")),(0,a.kt)("td",{parentName:"tr",align:null},"The object ID."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/ObjID"},"ObjID"))),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"allow_checked_out")),(0,a.kt)("td",{parentName:"tr",align:null},"True if a checked-out document version can be returned if the document is currently checked out to this user. Note that even if this parameter is true, the method never returns a version that is checked out to some other user."),(0,a.kt)("td",{parentName:"tr",align:null},"boolean")))))}c.isMDXComponent=!0;n(73992);var p=n(18679);const m={toc:[]},d="wrapper";function b(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},'// Assumes shellUI has been initialized with IShellUI instance\nconst results = await shellUI.Vault.ObjectOperations.GetLatestObjectVersion({\n obj_id: {\n type: 0,\n item_id: {\n internal_id: 0,\n external_repository_id: {\n connection: "",\n item: "",\n },\n },\n },\n allow_checked_out: false,\n});\n'))))}b.isMDXComponent=!0;const f={toc:[]},y="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Gets the latest document version of the given document."))}h.isMDXComponent=!0;const k={},v="GetLatestObjectVersion",g={unversionedId:"gRPC/Interfaces/ObjectOperations/GetLatestObjectVersion/index",id:"gRPC/Interfaces/ObjectOperations/GetLatestObjectVersion/index",title:"GetLatestObjectVersion",description:"Syntax",source:"@site/docs/gRPC/Interfaces/ObjectOperations/GetLatestObjectVersion/index.mdx",sourceDirName:"gRPC/Interfaces/ObjectOperations/GetLatestObjectVersion",slug:"/gRPC/Interfaces/ObjectOperations/GetLatestObjectVersion/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/ObjectOperations/GetLatestObjectVersion/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"GetEffectivePermissions",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/ObjectOperations/GetEffectivePermissions/"},next:{title:"GetObjIDByGUID",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/gRPC/Interfaces/ObjectOperations/GetObjIDByGUID/"}},O={},N=[{value:"Syntax",id:"syntax",level:2},{value:"Message",id:"message",level:2},{value:"Return type",id:"return-type",level:2}],j={toc:N},w="wrapper";function x(e){let{components:t,...n}=e;return(0,a.kt)(w,(0,r.Z)({},j,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"getlatestobjectversion"},"GetLatestObjectVersion"),(0,a.kt)(h,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(b,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"message"},"Message"),(0,a.kt)(c,{components:n.components,mdxType:"Message"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(s,{components:n.components,mdxType:"Returns"}))}x.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/6cc139e9.7287319c.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/6cc139e9.7287319c.js new file mode 100644 index 000000000..1361510c9 --- /dev/null +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/6cc139e9.7287319c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[7119],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),d=a,f=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,l(l({ref:t},c),{},{components:n})):r.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),i=n(16550),s=n(75238),u=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[s,u]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=s??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&i(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),b(e)}),[u,b,o]),tabValues:o}}var y=n(51048);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(p(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(k,(0,r.Z)({},e,t)))}function w(e){const t=(0,y.Z)();return a.createElement(v,(0,r.Z)({key:String(t)},e))}},65576:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>w,contentTitle:()=>k,default:()=>N,frontMatter:()=>h,metadata:()=>v,toc:()=>I});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"Promise")," < ",(0,a.kt)("inlineCode",{parentName:"td"},"string")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"Promise resolving to a data URI string (data:mime/type;base64,encodeddata).")))))}i.isMDXComponent=!0;const s={toc:[]},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"objVer"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/ObjVer/"},"ObjVer")),(0,a.kt)("td",{parentName:"tr",align:null},"The object version containing the file.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"fileVer"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/gRPC/Messages/FileVer/"},"FileVer")),(0,a.kt)("td",{parentName:"tr",align:null},"The specific file version to download.")))))}c.isMDXComponent=!0;n(73992);var p=n(18679);const m={toc:[]},d="wrapper";function f(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)(p.Z,{value:"js",label:"JavaScript",mdxType:"TabItem"},(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-js"},"// ICommonFunctions is binded into the MFiles global object\nconst result = await MFiles.DownloadFileAsDataUri(objVer, fileVer);\n"))))}f.isMDXComponent=!0;const b={toc:[]},y="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(y,(0,r.Z)({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Downloads a file from an object as a base64-encoded data URI."),(0,a.kt)("p",null,"Retrieves the content of a specific file version from a vault object and returns it\nas a data URI string with base64 encoding. This is useful for embedding file content\ndirectly in HTML or passing file data as strings."),(0,a.kt)("p",null,"Files larger than 64MB are rejected to prevent memory exhaustion."))}g.isMDXComponent=!0;const h={},k="DownloadFileAsDataUri",v={unversionedId:"UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri/index",id:"UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri/index",title:"DownloadFileAsDataUri",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri",slug:"/UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DownloadFileAsDataUri/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"DeleteFromWebStorage",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/DeleteFromWebStorage/"},next:{title:"GetAccentColor",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/GetAccentColor/"}},w={},I=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2}],D={toc:I},x="wrapper";function N(e){let{components:t,...n}=e;return(0,a.kt)(x,(0,r.Z)({},D,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"downloadfileasdatauri"},"DownloadFileAsDataUri"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(g,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)(f,{components:n.components,mdxType:"Syntax"}),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(i,{components:n.components,mdxType:"Returns"}))}N.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/706fdde3.ecd3b435.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/706fdde3.8f35453e.js similarity index 78% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/706fdde3.ecd3b435.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/706fdde3.8f35453e.js index ead1e0ca5..7013734d1 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/706fdde3.ecd3b435.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/706fdde3.8f35453e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[927],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),d=a,f=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,l(l({ref:t},c),{},{components:n})):r.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),i=n(16550),s=n(75238),u=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[s,u]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=s??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&i(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),b(e)}),[u,b,o]),tabValues:o}}var y=n(51048);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(p(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(k,(0,r.Z)({},e,t)))}function w(e){const t=(0,y.Z)();return a.createElement(v,(0,r.Z)({key:String(t)},e))}},1974:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>y,default:()=>I,frontMatter:()=>b,metadata:()=>g,toc:()=>k});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < ",(0,a.kt)("inlineCode",{parentName:"td"},"boolean")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"True / false based on the status.")))))}i.isMDXComponent=!0;const s={toc:[]},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"key"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"The web storage key.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"value"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"The value.")))))}c.isMDXComponent=!0;n(73992),n(18679);const p={toc:[]},m="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Writes the value in the browser web storage."))}d.isMDXComponent=!0;var f=n(32507);const b={},y="WriteToWebStorage",g={unversionedId:"UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index",id:"UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index",title:"WriteToWebStorage",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage",slug:"/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"ShowToast",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/ShowToast/"},next:{title:"IDashboard",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/"}},h={},k=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2},{value:"Example",id:"example",level:2}],v={toc:k},w="wrapper";function I(e){let{components:t,...n}=e;return(0,a.kt)(w,(0,r.Z)({},v,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"writetowebstorage"},"WriteToWebStorage"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(d,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},'// Writes a value for key "keyName" from application specific storage.\nawait MFiles.WriteToWebStorage( keyName, value );\n')),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(i,{components:n.components,mdxType:"Returns"}),(0,a.kt)("h2",{id:"example"},"Example"),(0,a.kt)(f.ZP,{components:n.components,mdxType:"Example"}))}I.isMDXComponent=!0},32507:(e,t,n)=>{n.d(t,{ZP:()=>i});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,'This sample demonstrates the use of M-Files API functions to interact with web storage: it writes "Sample Value" to storage with the key "testKey", reads it back, logs the value to the console, and finally deletes the entry from web storage.'),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Values written to web storage must be string values, because they are internally serialized into string values.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},'\n// Called when the UI Extension starts\nasync function OnNewShellUI(shellUI) {\n\n // Write to web storage some value\n await MFiles.WriteToWebStorage( "testKey", "Sample Value" );\n\n // Read the value from the web storage\n const storedValue = await MFiles.ReadFromWebStorage( "testKey" );\n\n // Outputs: "Sample Value"\n console.log( storedValue );\n\n // Remove key from the storage.\n await MFiles.DeleteFromWebStorage( "testKey" );\n\n}\n')))}i.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[927],{3905:(e,t,n)=>{n.d(t,{Zo:()=>c,kt:()=>f});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},c=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,c=i(e,["components","mdxType","originalType","parentName"]),p=u(n),d=a,f=p["".concat(s,".").concat(d)]||p[d]||m[d]||o;return n?r.createElement(f,l(l({ref:t},c),{},{components:n})):r.createElement(f,l({ref:t},c))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=d;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var u=2;u{n.d(t,{Z:()=>l});var r=n(67294),a=n(86010);const o={tabItem:"tabItem_Ymn6"};function l(e){let{children:t,hidden:n,className:l}=e;return r.createElement("div",{role:"tabpanel",className:(0,a.Z)(o.tabItem,l),hidden:n},t)}},73992:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(87462),a=n(67294),o=n(86010),l=n(72957),i=n(16550),s=n(75238),u=n(33609),c=n(92560);function p(e){return function(e){return a.Children.map(e,(e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:a}}=e;return{value:t,label:n,attributes:r,default:a}}))}function m(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??p(n);return function(e){const t=(0,u.l)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function d(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const r=(0,i.k6)(),o=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,s._X)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(r.location.search);t.set(o,e),r.replace({...r.location,search:t.toString()})}),[o,r])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=m(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!d({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:o}))),[s,u]=f({queryString:n,groupId:r}),[p,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,o]=(0,c.Nk)(n);return[r,(0,a.useCallback)((e=>{n&&o.set(e)}),[n,o])]}({groupId:r}),y=(()=>{const e=s??p;return d({value:e,tabValues:o})?e:null})();(0,a.useLayoutEffect)((()=>{y&&i(y)}),[y]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!d({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),b(e)}),[u,b,o]),tabValues:o}}var y=n(51048);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};function h(e){let{className:t,block:n,selectedValue:i,selectValue:s,tabValues:u}=e;const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.o5)(),m=e=>{const t=e.currentTarget,n=c.indexOf(t),r=u[n].value;r!==i&&(p(t),s(r))},d=e=>{let t=null;switch(e.key){case"Enter":m(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;t=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;t=c[n]??c[c.length-1];break}}t?.focus()};return a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.Z)("tabs",{"tabs--block":n},t)},u.map((e=>{let{value:t,label:n,attributes:l}=e;return a.createElement("li",(0,r.Z)({role:"tab",tabIndex:i===t?0:-1,"aria-selected":i===t,key:t,ref:e=>c.push(e),onKeyDown:d,onClick:m},l,{className:(0,o.Z)("tabs__item",g.tabItem,l?.className,{"tabs__item--active":i===t})}),n??t)})))}function k(e){let{lazy:t,children:n,selectedValue:r}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return a.createElement("div",{className:"margin-top--md"},o.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r}))))}function v(e){const t=b(e);return a.createElement("div",{className:(0,o.Z)("tabs-container",g.tabList)},a.createElement(h,(0,r.Z)({},e,t)),a.createElement(k,(0,r.Z)({},e,t)))}function w(e){const t=(0,y.Z)();return a.createElement(v,(0,r.Z)({key:String(t)},e))}},1974:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>y,default:()=>I,frontMatter:()=>b,metadata:()=>g,toc:()=>k});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Promise < ",(0,a.kt)("inlineCode",{parentName:"td"},"boolean")," >"),(0,a.kt)("td",{parentName:"tr",align:null},"True / false based on the status.")))))}i.isMDXComponent=!0;const s={toc:[]},u="wrapper";function c(e){let{components:t,...n}=e;return(0,a.kt)(u,(0,r.Z)({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Optionality"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"key"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"The web storage key.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"value"),(0,a.kt)("td",{parentName:"tr",align:null},"Required"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"The value.")))))}c.isMDXComponent=!0;n(73992),n(18679);const p={toc:[]},m="wrapper";function d(e){let{components:t,...n}=e;return(0,a.kt)(m,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,"Writes the value in the browser web storage."))}d.isMDXComponent=!0;var f=n(32507);const b={},y="WriteToWebStorage",g={unversionedId:"UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index",id:"UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index",title:"WriteToWebStorage",description:"Description",source:"@site/docs/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/index.mdx",sourceDirName:"UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage",slug:"/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/WriteToWebStorage/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"UploadTemporaryFiles",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/ICommonFunctions/UploadTemporaryFiles/"},next:{title:"IDashboard",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IDashboard/"}},h={},k=[{value:"Description",id:"description",level:2},{value:"Syntax",id:"syntax",level:2},{value:"Parameters",id:"parameters",level:2},{value:"Return type",id:"return-type",level:2},{value:"Example",id:"example",level:2}],v={toc:k},w="wrapper";function I(e){let{components:t,...n}=e;return(0,a.kt)(w,(0,r.Z)({},v,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"writetowebstorage"},"WriteToWebStorage"),(0,a.kt)("h2",{id:"description"},"Description"),(0,a.kt)(d,{components:n.components,mdxType:"Description"}),(0,a.kt)("h2",{id:"syntax"},"Syntax"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},'// Writes a value for key "keyName" from application specific storage.\nawait MFiles.WriteToWebStorage( keyName, value );\n')),(0,a.kt)("h2",{id:"parameters"},"Parameters"),(0,a.kt)(c,{components:n.components,mdxType:"Params"}),(0,a.kt)("h2",{id:"return-type"},"Return type"),(0,a.kt)(i,{components:n.components,mdxType:"Returns"}),(0,a.kt)("h2",{id:"example"},"Example"),(0,a.kt)(f.ZP,{components:n.components,mdxType:"Example"}))}I.isMDXComponent=!0},32507:(e,t,n)=>{n.d(t,{ZP:()=>i});var r=n(87462),a=(n(67294),n(3905));const o={toc:[]},l="wrapper";function i(e){let{components:t,...n}=e;return(0,a.kt)(l,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("p",null,'This sample demonstrates the use of M-Files API functions to interact with web storage: it writes "Sample Value" to storage with the key "testKey", reads it back, logs the value to the console, and finally deletes the entry from web storage.'),(0,a.kt)("admonition",{type:"note"},(0,a.kt)("p",{parentName:"admonition"},"Values written to web storage must be string values, because they are internally serialized into string values.")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-javascript"},'\n// Called when the UI Extension starts\nasync function OnNewShellUI(shellUI) {\n\n // Write to web storage some value\n await MFiles.WriteToWebStorage( "testKey", "Sample Value" );\n\n // Read the value from the web storage\n const storedValue = await MFiles.ReadFromWebStorage( "testKey" );\n\n // Outputs: "Sample Value"\n console.log( storedValue );\n\n // Remove key from the storage.\n await MFiles.DeleteFromWebStorage( "testKey" );\n\n}\n')))}i.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/70b9fe84.67236cce.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/70b9fe84.67236cce.js deleted file mode 100644 index 5edd4bb0a..000000000 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/70b9fe84.67236cce.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[1141],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>h});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),d=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=d(e.components);return r.createElement(o.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,o=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),p=d(n),g=a,h=p["".concat(o,".").concat(g)]||p[g]||c[g]||l;return n?r.createElement(h,i(i({ref:t},m),{},{components:n})):r.createElement(h,i({ref:t},m))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=g;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:a,i[1]=s;for(var d=2;d{n.r(t),n.d(t,{assets:()=>N,contentTitle:()=>k,default:()=>S,frontMatter:()=>h,metadata:()=>u,toc:()=>b});var r=n(87462),a=(n(67294),n(3905));const l={toc:[]},i="wrapper";function s(e){let{components:t,...n}=e;return(0,a.kt)(i,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Event"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Arguments"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Started"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents started event."),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Stop"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents stopped event."),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectionChanged"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectionChanged event. ",(0,a.kt)("br",null),"This event is triggered when the selection in the listing view is set, changed or removed."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellItems")," Contains the selected items.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectNextObject"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectNextObject event. This event is triggered when the next object in the listing is selected."),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectPreviousObject"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectPreviousObject event. This event is triggered when the previous object in the listing is selected."),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectNextFolder"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectNextFolder event. This event is triggered when the next folder in the listing is selected."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"folderType")," type of the folder, which have been selected.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectPreviousFolder"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectPreviousFolder event. This event is triggered when the previous folder in the listing is selected."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"folderType")," type of the folder, which have been selected.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListingDeactivated"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListingDeactivated event. ",(0,a.kt)("br",null),"This event is triggered when the listing object becomes inactive and loses the input focus."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellListing")," The next active shell listing object. Can be null.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListingActivated"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListingActivated event. ",(0,a.kt)("br",null),"This event is triggered when the listing object becomes active and receives the input focus."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellListing")," The previous active shell listing object. Can be null.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ContentChanged"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ContentChanged event. ",(0,a.kt)("br",null),"This event is triggered when the current listing content is changed, or listed items are modified."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellItems")," Contains all items in the listing.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListItemAdded"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListItemAdded event. This event is triggered when one or more items are added to the listing."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"objectVersion")," Object")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListItemRemoved"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListItemRemoved event. This event is triggered when one or more items are removed from the listing."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"listItem")," Either an array of ObjectVersionEx if non-folder objects are removed or a single ObjectVersionEx, in case folder is removed. ",(0,a.kt)("br",null),(0,a.kt)("strong",{parentName:"td"},"removedExternalFolder")," In case folder was removed, include information about the old external folder item being removed in case of")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListItemModified"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListItemModified event. ",(0,a.kt)("br",null),"This event is triggered when one or more of the items that are currently selected are modified."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"oldServerObjVer")," Array of old object versions. ",(0,a.kt)("br",null),(0,a.kt)("strong",{parentName:"td"},"newObjVer")," Array of new objects.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectedItemsChanged"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectedItemsChanged event. ",(0,a.kt)("br",null),"This event is triggered when one or more of the items that are currently selected are modified."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellItems")," Contains the selected items.")))))}s.isMDXComponent=!0;const o={toc:[]},d="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./ActivateListing/"},"ActivateListing")),(0,a.kt)("td",{parentName:"tr",align:null},"Makes this listing window the active listing in the shell frame.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./ActivateSelected/"},"ActivateSelected")),(0,a.kt)("td",{parentName:"tr",align:null},"Performs the default action for currently selected item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./AddListingItem/"},"AddListingItem")),(0,a.kt)("td",{parentName:"tr",align:null},"Adds a new item to the relevant listings. ",(0,a.kt)("br",null),"It is a new method added for vNext.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./AddObjectFile/"},"AddObjectFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Perform add file for MFD.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./RefreshListing/"},"RefreshListing")),(0,a.kt)("td",{parentName:"tr",align:null},"Refreshes the current listing.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./RefreshObject/"},"RefreshObject")),(0,a.kt)("td",{parentName:"tr",align:null},"Refreshes the specified object in the listing.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./RemoveListingItem/"},"RemoveListingItem")),(0,a.kt)("td",{parentName:"tr",align:null},"Removes an item or items in an array from the listing. ",(0,a.kt)("br",null),"It is a new method added for vNext.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./ReplaceFile/"},"ReplaceFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Perform file replace.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectFolder/"},"SelectFolder")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the selection to the folder item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectNextFolder/"},"SelectNextFolder")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the next folder item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectNextObject/"},"SelectNextObject")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the next object (object version) item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectNextObjectFile/"},"SelectNextObjectFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the next object file.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectObjectFile/"},"SelectObjectFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects the object (object version) item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectObjectOrObjectFileVersion/"},"SelectObjectOrObjectFileVersion")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects object or file version in the listing window.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectObjectVersion/"},"SelectObjectVersion")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects the object file item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectPrevFolder/"},"SelectPrevFolder")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the previous folder.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectPrevObject/"},"SelectPrevObject")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the previous object (object version) item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectPrevObjectFile/"},"SelectPrevObjectFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the previous object file item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetFolderOrObjectVersionSelectionStates/"},"SetFolderOrObjectVersionSelectionStates")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects or unselects both property folders and object versions.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetFolderSelectionStates/"},"SetFolderSelectionStates")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects or unselects property folders.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetObjectOrObjectFileVersionSelectionStates/"},"SetObjectOrObjectFileVersionSelectionStates")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects or unselects objects or object files.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetObjectVersionSelectionStates/"},"SetObjectVersionSelectionStates")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects or unselects object versions.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetVirtualSelection/"},"SetVirtualSelection")),(0,a.kt)("td",{parentName:"tr",align:null},"Overrides the items selection with a virtual selection. Items should be valid objects, otherwise the method will throw an exception ",(0,a.kt)("br",null),"and selection will not be changed.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./UnselectAll/"},"UnselectAll")),(0,a.kt)("td",{parentName:"tr",align:null},"Unselects the current selection.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./UpdateListingItem/"},"UpdateListingItem")),(0,a.kt)("td",{parentName:"tr",align:null},"Update the items in the listing. ",(0,a.kt)("br",null),"It is a new method added for vNext.")))))}m.isMDXComponent=!0;const p={toc:[]},c="wrapper";function g(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"CurrentPath"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Gets the current location as a path.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"CurrentSelection"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Interfaces/IShellItems/"},"IShellItems")),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Events"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Events/#ishelllistingevents"},"IShellListingEvents")),(0,a.kt)("td",{parentName:"tr",align:null},"Returns the event registering interface of the IShellListing interface.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"IsActive"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"boolean")),(0,a.kt)("td",{parentName:"tr",align:null},"Checks if this listing window is currently the active listing window.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Items"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Interfaces/IShellItems/"},"IShellItems")),(0,a.kt)("td",{parentName:"tr",align:null})))))}g.isMDXComponent=!0;const h={},k="IShellListing",u={unversionedId:"UIExt2/Interfaces/IShellListing/index",id:"UIExt2/Interfaces/IShellListing/index",title:"IShellListing",description:"Instances of IShellListing represent the Objects inside the Listing View tree in the M-Files Client application UI. The interface",source:"@site/docs/UIExt2/Interfaces/IShellListing/index.mdx",sourceDirName:"UIExt2/Interfaces/IShellListing",slug:"/UIExt2/Interfaces/IShellListing/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"GetObjectVersionsCount",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsCount/"},next:{title:"ActivateListing",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateListing/"}},N={},b=[{value:"Properties",id:"properties",level:2},{value:"Methods",id:"methods",level:2},{value:"Events",id:"events",level:2}],f={toc:b},v="wrapper";function S(e){let{components:t,...n}=e;return(0,a.kt)(v,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"ishelllisting"},"IShellListing"),(0,a.kt)("p",null,"Instances of IShellListing represent the Objects inside the Listing View tree in the M-Files Client application UI. The interface\nis available for example from ",(0,a.kt)("inlineCode",{parentName:"p"},"ActiveListing")," property of ",(0,a.kt)("a",{parentName:"p",href:"../IShellFrame/"},"IShellFrame"),"."),(0,a.kt)("p",null,"See the Overview chapter ",(0,a.kt)("a",{parentName:"p",href:"../../../Overview/ListingView"},"Listing View")," for more details how to operate the object."),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)(g,{components:n.components,mdxType:"Properties"}),(0,a.kt)("h2",{id:"methods"},"Methods"),(0,a.kt)(m,{components:n.components,mdxType:"Methods"}),(0,a.kt)("h2",{id:"events"},"Events"),(0,a.kt)(s,{components:n.components,mdxType:"Events"}))}S.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/70b9fe84.f6cec049.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/70b9fe84.f6cec049.js new file mode 100644 index 000000000..8eb716113 --- /dev/null +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/70b9fe84.f6cec049.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[1141],{3905:(e,t,n)=>{n.d(t,{Zo:()=>m,kt:()=>g});var r=n(67294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var o=r.createContext({}),d=function(e){var t=r.useContext(o),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},m=function(e){var t=d(e.components);return r.createElement(o.Provider,{value:t},e.children)},p="mdxType",c={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},h=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,l=e.originalType,o=e.parentName,m=s(e,["components","mdxType","originalType","parentName"]),p=d(n),h=a,g=p["".concat(o,".").concat(h)]||p[h]||c[h]||l;return n?r.createElement(g,i(i({ref:t},m),{},{components:n})):r.createElement(g,i({ref:t},m))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var l=n.length,i=new Array(l);i[0]=h;var s={};for(var o in t)hasOwnProperty.call(t,o)&&(s[o]=t[o]);s.originalType=e,s[p]="string"==typeof e?e:a,i[1]=s;for(var d=2;d{n.r(t),n.d(t,{assets:()=>N,contentTitle:()=>u,default:()=>y,frontMatter:()=>g,metadata:()=>k,toc:()=>b});var r=n(87462),a=(n(67294),n(3905));const l={toc:[]},i="wrapper";function s(e){let{components:t,...n}=e;return(0,a.kt)(i,(0,r.Z)({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Event"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"),(0,a.kt)("th",{parentName:"tr",align:null},"Arguments"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Started"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents started event."),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Stop"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents stopped event."),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectionChanged"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectionChanged event. ",(0,a.kt)("br",null),"This event is triggered when the selection in the listing view is set, changed or removed."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellItems")," Contains the selected items.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectNextObject"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectNextObject event. This event is triggered when the next object in the listing is selected."),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectPreviousObject"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectPreviousObject event. This event is triggered when the previous object in the listing is selected."),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectNextFolder"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectNextFolder event. This event is triggered when the next folder in the listing is selected."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"folderType")," type of the folder, which have been selected.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectPreviousFolder"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectPreviousFolder event. This event is triggered when the previous folder in the listing is selected."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"folderType")," type of the folder, which have been selected.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListingDeactivated"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListingDeactivated event. ",(0,a.kt)("br",null),"This event is triggered when the listing object becomes inactive and loses the input focus."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellListing")," The next active shell listing object. Can be null.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListingActivated"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListingActivated event. ",(0,a.kt)("br",null),"This event is triggered when the listing object becomes active and receives the input focus."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellListing")," The previous active shell listing object. Can be null.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ContentChanged"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ContentChanged event. ",(0,a.kt)("br",null),"This event is triggered when the current listing content is changed, or listed items are modified."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellItems")," Contains all items in the listing.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListItemAdded"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListItemAdded event. This event is triggered when one or more items are added to the listing."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"objectVersion")," Object")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListItemRemoved"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListItemRemoved event. This event is triggered when one or more items are removed from the listing."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"listItem")," Either an array of ObjectVersionEx if non-folder objects are removed or a single ObjectVersionEx, in case folder is removed. ",(0,a.kt)("br",null),(0,a.kt)("strong",{parentName:"td"},"removedExternalFolder")," In case folder was removed, include information about the old external folder item being removed in case of")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"ListItemModified"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents ListItemModified event. ",(0,a.kt)("br",null),"This event is triggered when one or more of the items that are currently selected are modified."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"oldServerObjVer")," Array of old object versions. ",(0,a.kt)("br",null),(0,a.kt)("strong",{parentName:"td"},"newObjVer")," Array of new objects.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"SelectedItemsChanged"),(0,a.kt)("td",{parentName:"tr",align:null},"Registers event handler for the IShellListingEvents SelectedItemsChanged event. ",(0,a.kt)("br",null),"This event is triggered when one or more of the items that are currently selected are modified."),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("strong",{parentName:"td"},"shellItems")," Contains the selected items.")))))}s.isMDXComponent=!0;const o={toc:[]},d="wrapper";function m(e){let{components:t,...n}=e;return(0,a.kt)(d,(0,r.Z)({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./ActivateListing/"},"ActivateListing")),(0,a.kt)("td",{parentName:"tr",align:null},"Makes this listing window the active listing in the shell frame.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./ActivateSelected/"},"ActivateSelected")),(0,a.kt)("td",{parentName:"tr",align:null},"Performs the default action for currently selected item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./AddListingItem/"},"AddListingItem")),(0,a.kt)("td",{parentName:"tr",align:null},"Adds a new item to the relevant listings. ",(0,a.kt)("br",null),"It is a new method added for vNext.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./AddObjectFile/"},"AddObjectFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Perform add file for MFD. ",(0,a.kt)("br",null)," ",(0,a.kt)("br",null),"If a data URL is provided it takes precedence and will be used as the added file ",(0,a.kt)("br",null),"(overriding fileToBeAdded). Data URLs must be base64-encoded, include a MIME type and ",(0,a.kt)("br",null),"the decoded payload must not exceed 64 MiB (67,108,864 bytes). When using a data URL you ",(0,a.kt)("br",null),"must also provide dataURLName (filename for the decoded file).")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./RefreshListing/"},"RefreshListing")),(0,a.kt)("td",{parentName:"tr",align:null},"Refreshes the current listing.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./RefreshObject/"},"RefreshObject")),(0,a.kt)("td",{parentName:"tr",align:null},"Refreshes the specified object in the listing.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./RemoveListingItem/"},"RemoveListingItem")),(0,a.kt)("td",{parentName:"tr",align:null},"Removes an item or items in an array from the listing. ",(0,a.kt)("br",null),"It is a new method added for vNext.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./ReplaceFile/"},"ReplaceFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Perform file replace. ",(0,a.kt)("br",null)," ",(0,a.kt)("br",null),"If a data URL is provided it takes precedence and will be used as the replacement file ",(0,a.kt)("br",null),"(overriding fileToBeReplaced). Data URLs must be base64-encoded, include a MIME type and ",(0,a.kt)("br",null),"the decoded payload must not exceed 64 MiB (67,108,864 bytes). When using a data URL you ",(0,a.kt)("br",null),"must also provide dataURLName (filename for the decoded file).")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectFolder/"},"SelectFolder")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the selection to the folder item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectNextFolder/"},"SelectNextFolder")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the next folder item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectNextObject/"},"SelectNextObject")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the next object (object version) item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectNextObjectFile/"},"SelectNextObjectFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the next object file.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectObjectFile/"},"SelectObjectFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects the object (object version) item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectObjectOrObjectFileVersion/"},"SelectObjectOrObjectFileVersion")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects object or file version in the listing window.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectObjectVersion/"},"SelectObjectVersion")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects the object file item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectPrevFolder/"},"SelectPrevFolder")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the previous folder.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectPrevObject/"},"SelectPrevObject")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the previous object (object version) item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SelectPrevObjectFile/"},"SelectPrevObjectFile")),(0,a.kt)("td",{parentName:"tr",align:null},"Moves the current selection to the previous object file item.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetFolderOrObjectVersionSelectionStates/"},"SetFolderOrObjectVersionSelectionStates")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects or unselects both property folders and object versions.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetFolderSelectionStates/"},"SetFolderSelectionStates")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects or unselects property folders.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetObjectOrObjectFileVersionSelectionStates/"},"SetObjectOrObjectFileVersionSelectionStates")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects or unselects objects or object files.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetObjectVersionSelectionStates/"},"SetObjectVersionSelectionStates")),(0,a.kt)("td",{parentName:"tr",align:null},"Selects or unselects object versions.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./SetVirtualSelection/"},"SetVirtualSelection")),(0,a.kt)("td",{parentName:"tr",align:null},"Overrides the items selection with a virtual selection. Items should be valid objects, otherwise the method will throw an exception ",(0,a.kt)("br",null),"and selection will not be changed.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./UnselectAll/"},"UnselectAll")),(0,a.kt)("td",{parentName:"tr",align:null},"Unselects the current selection.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"./UpdateListingItem/"},"UpdateListingItem")),(0,a.kt)("td",{parentName:"tr",align:null},"Update the items in the listing. ",(0,a.kt)("br",null),"It is a new method added for vNext.")))))}m.isMDXComponent=!0;const p={toc:[]},c="wrapper";function h(e){let{components:t,...n}=e;return(0,a.kt)(c,(0,r.Z)({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("table",null,(0,a.kt)("thead",{parentName:"table"},(0,a.kt)("tr",{parentName:"thead"},(0,a.kt)("th",{parentName:"tr",align:null},"Name"),(0,a.kt)("th",{parentName:"tr",align:null},"Type"),(0,a.kt)("th",{parentName:"tr",align:null},"Description"))),(0,a.kt)("tbody",{parentName:"table"},(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"CurrentPath"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"string")),(0,a.kt)("td",{parentName:"tr",align:null},"Gets the current location as a path.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"CurrentSelection"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Interfaces/IShellItems/"},"IShellItems")),(0,a.kt)("td",{parentName:"tr",align:null})),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Events"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Events/#ishelllistingevents"},"IShellListingEvents")),(0,a.kt)("td",{parentName:"tr",align:null},"Returns the event registering interface of the IShellListing interface.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"IsActive"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("inlineCode",{parentName:"td"},"boolean")),(0,a.kt)("td",{parentName:"tr",align:null},"Checks if this listing window is currently the active listing window.")),(0,a.kt)("tr",{parentName:"tbody"},(0,a.kt)("td",{parentName:"tr",align:null},"Items"),(0,a.kt)("td",{parentName:"tr",align:null},(0,a.kt)("a",{parentName:"td",href:"/UIExt2/Interfaces/IShellItems/"},"IShellItems")),(0,a.kt)("td",{parentName:"tr",align:null})))))}h.isMDXComponent=!0;const g={},u="IShellListing",k={unversionedId:"UIExt2/Interfaces/IShellListing/index",id:"UIExt2/Interfaces/IShellListing/index",title:"IShellListing",description:"Instances of IShellListing represent the Objects inside the Listing View tree in the M-Files Client application UI. The interface",source:"@site/docs/UIExt2/Interfaces/IShellListing/index.mdx",sourceDirName:"UIExt2/Interfaces/IShellListing",slug:"/UIExt2/Interfaces/IShellListing/",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"GetObjectVersionsCount",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellItems/GetObjectVersionsCount/"},next:{title:"ActivateListing",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/UIExt2/Interfaces/IShellListing/ActivateListing/"}},N={},b=[{value:"Properties",id:"properties",level:2},{value:"Methods",id:"methods",level:2},{value:"Events",id:"events",level:2}],f={toc:b},v="wrapper";function y(e){let{components:t,...n}=e;return(0,a.kt)(v,(0,r.Z)({},f,n,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"ishelllisting"},"IShellListing"),(0,a.kt)("p",null,"Instances of IShellListing represent the Objects inside the Listing View tree in the M-Files Client application UI. The interface\nis available for example from ",(0,a.kt)("inlineCode",{parentName:"p"},"ActiveListing")," property of ",(0,a.kt)("a",{parentName:"p",href:"../IShellFrame/"},"IShellFrame"),"."),(0,a.kt)("p",null,"See the Overview chapter ",(0,a.kt)("a",{parentName:"p",href:"../../../Overview/ListingView"},"Listing View")," for more details how to operate the object."),(0,a.kt)("h2",{id:"properties"},"Properties"),(0,a.kt)(h,{components:n.components,mdxType:"Properties"}),(0,a.kt)("h2",{id:"methods"},"Methods"),(0,a.kt)(m,{components:n.components,mdxType:"Methods"}),(0,a.kt)("h2",{id:"events"},"Events"),(0,a.kt)(s,{components:n.components,mdxType:"Events"}))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/736620ae.ed2476c4.js b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/736620ae.b605b4a0.js similarity index 77% rename from Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/736620ae.ed2476c4.js rename to Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/736620ae.b605b4a0.js index 54af9e512..c16895e8b 100644 --- a/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/736620ae.ed2476c4.js +++ b/Frameworks/User-Interface-Extensibility-Framework/Reference/assets/js/736620ae.b605b4a0.js @@ -1 +1 @@ -"use strict";(self.webpackChunkuix_2=self.webpackChunkuix_2||[]).push([[3258],{3905:(e,t,a)=>{a.d(t,{Zo:()=>l,kt:()=>h});var n=a(67294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function m(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function r(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var s=n.createContext({}),i=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):r(r({},t),e)),a},l=function(e){var t=i(e.components);return n.createElement(s.Provider,{value:t},e.children)},c="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},p=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,m=e.originalType,s=e.parentName,l=d(e,["components","mdxType","originalType","parentName"]),c=i(a),p=o,h=c["".concat(s,".").concat(p)]||c[p]||u[p]||m;return a?n.createElement(h,r(r({ref:t},l),{},{components:a})):n.createElement(h,r({ref:t},l))}));function h(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var m=a.length,r=new Array(m);r[0]=p;var d={};for(var s in t)hasOwnProperty.call(t,s)&&(d[s]=t[s]);d.originalType=e,d[c]="string"==typeof e?e:o,r[1]=d;for(var i=2;i{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>r,default:()=>u,frontMatter:()=>m,metadata:()=>d,toc:()=>i});var n=a(87462),o=(a(67294),a(3905));a(47713),a(9826),a(45274);const m={sidebar_position:6},r="Tabs",d={unversionedId:"Overview/Tabs",id:"Overview/Tabs",title:"Tabs",description:"The M-Files user interface typically shows two tabs on the right of the screen: Metadata and Preview. As users interact with the object listings (e.g. they select an object), these two tabs react and show the associated metadata and preview respectively.",source:"@site/docs/Overview/Tabs.mdx",sourceDirName:"Overview",slug:"/Overview/Tabs",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/Tabs",draft:!1,tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_position:6},sidebar:"tutorialSidebar",previous:{title:"Working with the Shell Listing",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/ListingView"},next:{title:"Installing Applications",permalink:"/Frameworks/User-Interface-Extensibility-Framework/Reference/Overview/InstallingApplications"}},s={},i=[{value:"Creating a New Tab",id:"creating-a-new-tab",level:2},{value:"Showing a dashboard in a tab",id:"showing-a-dashboard-in-a-tab",level:3},{value:"Passing data into the dashboard",id:"passing-data-into-the-dashboard",level:3},{value:"Passing data the dashboard opener",id:"passing-data-the-dashboard-opener",level:3},{value:"Selecting a Tab",id:"selecting-a-tab",level:2},{value:"Unselecting a Tab",id:"unselecting-a-tab",level:2},{value:"Removing a Tab",id:"removing-a-tab",level:2}],l={toc:i},c="wrapper";function u(e){let{components:t,...a}=e;return(0,o.kt)(c,(0,n.Z)({},l,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h1",{id:"tabs"},"Tabs"),(0,o.kt)("p",null,"The M-Files user interface typically shows two tabs on the right of the screen: Metadata and Preview. As users interact with the object listings (e.g. they select an object), these two tabs react and show the associated metadata and preview respectively."),(0,o.kt)("p",null,"The User Interface Extensibilty Framework allows third-party developers to add their own tabs alongside the built-in ones, and give you - the developer - control over how and when they are shown."),(0,o.kt)("h2",{id:"creating-a-new-tab"},"Creating a New Tab"),(0,o.kt)("p",null,"In most cases the Tab is created to the shellFrame.RightPane using the ",(0,o.kt)("inlineCode",{parentName:"p"},"AddTab")," method."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-javascript"},'// Create a new custom command using IShellFrame instance\nconst myTab = await shellFrame.RightPane.AddTab(\n "my-tab-id", // ID of the tab\n "My Tab Name", // Display name of the tab\n "_last" // Position of the tab\n);\n')),(0,o.kt)("h3",{id:"showing-a-dashboard-in-a-tab"},"Showing a dashboard in a tab"),(0,o.kt)("p",null,"Opening a new tab requires a ",(0,o.kt)("a",{parentName:"p",href:"../ApplicationStructure#dashboards"},"dashboard ID, which is defined in you application manifest file"),". This will\ncreate a new instance of ",(0,o.kt)("a",{parentName:"p",href:"../../UIExt2/Interfaces/IDashboard"},"IDashboard")," which lives inside an ",(0,o.kt)("inlineCode",{parentName:"p"},"