Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/GroupDocs.Viewer.UI.API/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,4 @@ builder.Services.AddSingleton<ISearchTermResolver, MySearchTermResolver>();

![GroupDocs.Viewer.UI - Custom search term](https://raw.githubusercontent.com/groupdocs-viewer/groupdocs-viewer.github.io/master/resources/image/ui/custom-search-term.png)

**NOTE:** This feature works only when rendering to HTML. The service should be registered before you register the self-hosted or cloud API for it to take effect. By default, [SearchTermResolver.cs](./SearchTermResolution/Implementation/SearchTermResolver.cs) is registered. This class provides a default implementation that returns an empty string.

**NOTE:** This feature works only when rendering to HTML and when `PreloadPages` is set to `0` which means all the pages are preloaded. The service should be registered before you register the self-hosted or cloud API for it to take effect. By default, [SearchTermResolver.cs](./SearchTermResolution/Implementation/SearchTermResolver.cs) is registered. This class provides a default implementation that returns an empty string.
88 changes: 62 additions & 26 deletions src/GroupDocs.Viewer.UI.Core/Configuration/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,115 +4,151 @@ public class Config
{
/// <summary>
/// Rendering mode for the UI.
/// Possible values: "RenderingMode.Html", "RenderingMode.Image".
/// Default value is "RenderingMode.Html".
/// Possible values: <c>RenderingMode.Html</c>, <c>RenderingMode.Image</c>.
/// Default value: <c>RenderingMode.Html</c>.
/// </summary>
public RenderingMode RenderingMode { get; set; } = RenderingMode.Html;

/// <summary>
/// When enabled app will use pre-generated static content via GET requests.
/// Default value is false.
/// When enabled, the app uses pre-generated static content via GET requests.
/// Default value: <c>false</c>.
/// </summary>
public bool StaticContentMode { get; set; } = false;

/// <summary>
/// File to load by default
/// File to load by default. Set this property to a relative file path or a file ID.
/// By default, no file is loaded unless this property is set or a file name is specified
/// through the <c>file</c> query string parameter, e.g., <c>file=annual-review.docx</c>.
/// </summary>
public string InitialFile { get; set; }

/// <summary>
/// Number of pages to preload
/// </summary>
/// Number of pages to preload. Default value: <c>3</c>.
/// Set to <c>0</c> to render all pages at once.
/// This property also determines how many pages are loaded in subsequent requests.
/// The UI respects scroll direction: when scrolling down, the next pages are loaded;
/// when scrolling up, the previous pages are loaded.
/// </summary>
/// <remarks>
/// <para>If you're using the API without the UI, you can control this setting
/// in the service configuration:</para>
/// <code>
/// using GroupDocs.Viewer.UI.Core.Configuration;
///
/// var builder = WebApplication.CreateBuilder(args);
///
/// builder.Services
/// .AddOptions&lt;Config&gt;()
/// .Configure&lt;IConfiguration&gt;((config, configuration) =>
/// {
/// config.PreloadPages = 0; // Preload all pages at once
/// });
/// </code>
/// </remarks>
public int PreloadPages { get; set; } = 3;

/// <summary>
// Initial zoom level. The default value is not specified; the UI automatically sets the zoom level.
/// Initial zoom level. If not specified, the UI automatically sets the zoom level.
/// </summary>
public ZoomLevel InitialZoom { get; set; }

/// <summary>
/// Enable or disable right-click context menu
/// Enable or disable the right-click context menu.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableContextMenu { get; set; } = true;

/// <summary>
/// Enable or disable clickable links in documents
/// Enable or disable clickable links in documents.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableHyperlinks { get; set; } = true;

/* Control Visibility Settings */

/// <summary>
/// Show or hide header
/// Show or hide the header.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableHeader { get; set; } = true;

/// <summary>
/// Show or hide header
/// Show or hide the toolbar.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableToolbar { get; set; } = true;

/// <summary>
/// Show or hide filename
/// Show or hide the file name.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableFileName { get; set; } = true;

/// <summary>
/// Show or hide thumbnails pane
/// Show or hide the thumbnails pane.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableThumbnails { get; set; } = true;

/// <summary>
/// Show or hide zoom controls
/// Show or hide the zoom controls.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableZoom { get; set; } = true;

/// <summary>
/// Show or hide page navigation menu
/// Show or hide the page navigation menu.
/// Default value: <c>true</c>.
/// </summary>
public bool EnablePageSelector { get; set; } = true;

/// <summary>
/// Show or hide search control
/// Show or hide the search control.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableSearch { get; set; } = true;

/// <summary>
/// Show or hide "Print" button
/// Show or hide the "Print" button.
/// Default value: <c>true</c>.
/// </summary>
public bool EnablePrint { get; set; } = true;

/// <summary>
/// Show or hide "Download PDF" button
/// Show or hide the "Download PDF" button.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableDownloadPdf { get; set; } = true;

/// <summary>
/// Show or hide "Present" button
/// Show or hide the "Present" button.
/// Default value: <c>true</c>.
/// </summary>
public bool EnablePresentation { get; set; } = true;

/// <summary>
/// Show or hide "File Browser" button
/// Show or hide the "File Browser" button.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableFileBrowser { get; set; } = true;

/// <summary>
/// Show or hide "Upload File" button
/// Show or hide the "Upload File" button.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableFileUpload { get; set; } = true;



/* Language and Localization Settings */

/// <summary>
/// Show or hide language menu
/// Show or hide the language menu.
/// Default value: <c>true</c>.
/// </summary>
public bool EnableLanguageSelector { get; set; } = true;

/// <summary>
/// Default language code. Default value is "en".
/// Default language code.
/// Default value: <c>en</c>.
/// </summary>
public LanguageCode DefaultLanguage { get; set; } = LanguageCode.English;

Expand Down
446 changes: 446 additions & 0 deletions src/GroupDocs.Viewer.UI/App/chunk-INJWMVGV.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/GroupDocs.Viewer.UI/App/main.js

Large diffs are not rendered by default.

Loading