<?xml version="1.0" encoding="utf-8"?>
  <finScript version="1.00" exportedUtcDate="2026-04-16T04:22:10.0000000">
    <CreatedUserId>Admin</CreatedUserId>
    <CreatedUtcDate>2026-04-16T04:01:58.4130000</CreatedUtcDate>
    <UpdatedUserId>Admin</UpdatedUserId>
    <UpdatedUtcDate>2026-04-16T04:21:19.7400000</UpdatedUtcDate>
    <ScriptId>J036796</ScriptId>
    <Description>finCC Theme Preview</Description>
    <ScriptType>HtmlWidget</ScriptType>
    <Active>true</Active>
    <AllowUI>false</AllowUI>
    <Bookmarks />
    <Category />
    <Code>' HtmlWidget_finCCThemePreview
Option Explicit On
Option Strict On

' #################################################################
' finPOWER Connect Cloud Theme Preview
' 
' (c) Copyright Intersoft Systems Limited 2025
' 
' Version: 1.01 (16/04/2026)
' 
' Usage: Internal
' #################################################################
' Version        Date  User     Job       Description
' -------  ----------  -------  --------  -------------------------
'    1.00  20/11/2025  ISS      J035914   Created
'    1.01  16/04/2026  ISS      J036796   Add style visibility hidden to frmMain div
' #################################################################

' Parameters
Private mDarkMode As Boolean
Private mThemeMainIsLight As Boolean

' Objects
Private mCombinedParameters As ISKeyValueList
Private mParameters As ISKeyValueList
Private mStartupParameters As ISKeyValueList

Public Function Main(eventId As String,
                     parametersJson As String,
                     startUpParametersJson As String,
                     hostingContext As isefinHtmlWidgetHostingContext,
                     requestInfo As finScriptRequestInfo,
                     ByRef returnValue As String) As Boolean

  ' Assume Success
  Main = True

  ' Get Parameters
  mParameters = finBL.CreateKeyValueList()
  mParameters.FromSimpleJsonString(parametersJson)
  mStartupParameters = finBL.CreateKeyValueList()
  mStartupParameters.FromSimpleJsonString(startUpParametersJson)

  ' Get Combined Parameters (Startup Parameters updated with event Parameters)
  mCombinedParameters = mStartupParameters.Clone()
  mCombinedParameters.UpdateFromKeyValueList(mParameters, True)

  ' Other Parameters
  With mCombinedParameters
    mDarkMode = .GetBoolean("DarkMode")
    mThemeMainIsLight = .GetBoolean("ThemeMainIsLight")
  End With

  ' Handle Events
  Select Case eventId
    Case ""
      ' Main event, i.e., return initial HTML content (excluding html and body tags)
      returnValue = ScriptInfo.TemplateText
      returnValue = Replace(returnValue, "&lt;%[DarkMode]%&gt;", LCase(CStr(mDarkMode)))
      returnValue = Replace(returnValue, "&lt;%[ThemeMainIsLight]%&gt;", LCase(CStr(mThemeMainIsLight)))
  End Select

End Function
</Code>
    <Language>VisualBasic</Language>
    <Notes />
    <PermissionKeyExecute />
    <RunWithoutPrompts>false</RunWithoutPrompts>
    <TemplateText>&lt;div id="frmMain" style="visibility:hidden"&gt;

&lt;style&gt;
  html {
    font-family: var(--font-family-normal);
  }
  
  body {
    background-color: white;  
  }

  h1 {
    color: var(--nav-top-action-icon);  
    font-size: var(--font-size-h3);
    padding: 4px;
  }

  .modes {
    display: flex;
    flex-direction: row;
  }
  
  .mode {
    margin: 4px;
    flex-grow: 0;
    
    &amp;:first-child {
      margin-right: 0;
    }
    
    div.variables {
      display: flex;
      flex-direction: row;
      margin-bottom: 8px 8px 24px 8px;
    }
    
    ul {
      display: flex;
      flex-direction: column;
      font-size: 11px;
      font-weight: bold;
      float: left;
      margin: 0 4px 0 4px;
      padding: 0;
      
      &gt; li {
        color: white;
        text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
        cursor: pointer;
        display: flex;
        line-height: 24px;
        margin: 0;
        padding: 0 4px 0 4px;
        min-width: 140px;
      }
    }
  }
  
  .preview {
    color: var(--text-regular-default);
    background-color: var(--background-default);
    display: flex;
    border: 1px solid var(--border-default);
    border-radius: 4px;
    flex-grow: 1;
    margin: 3px 4px 4px 4px;
    min-height: 400px;
    position: relative;
    
    /* Top bar */
    div.is-nav-top {
      height: var(--nav-top-height);
      max-height: var(--nav-top-height);
      padding: var(--spacing-xs);
      position:absolute;
      top:0;
      width:100%;
      z-index:3;
      background-color: var(--nav-top-background);
      color: var(--nav-top-action-icon);
      display:flex;
      flex-direction:row;
      
      ul.menu {
        color: var(--nav-top-action-icon);
        font-family: fa-light;
        font-size: var(--icon-m);
        font-weight: 400;
        display: flex;
        flex-direction:row;
        justify-content: flex-end;
        align-items: flex-start;
        flex: 1 0 0;
        list-style:none;
        margin:0;
        gap: var(--spacing-xs);
    
        &gt; li {
          background-color: var(--nav-top-action-background);
          border-radius: var(--border-1x);
          cursor: pointer;
          line-height: var(--spacing-xxl);
          min-width: var(--spacing-xxl);
          height: var(--spacing-xxl);
          position: relative;
          text-align: center;
          margin: 0;
    
          &amp;#navFavourites {
            &amp;:before {
              content: "\f005"; // fa-star
            }
          }
          &amp;#navAdd {
            &amp;:before {
              content: "\f067"; // fa-plus
            }
          }
          &amp;#navNotifications {
            &amp;:before {
              content: "\f27a"; // fa-message
            }
          }
          &amp;#navUser {
            &amp;:before {
              content: "\f2bd"; // fa-user-circle
            }
          }
        }
      }
    }
    
   /* Side bar */
    div.is-nav-side {
      position:absolute;
      top:0;
      left:0;
      bottom:0;
      margin-top: var(--nav-top-height);
      width: var(--nav-side-width);
      min-width: var(--nav-side-width);
      z-index: 1;
      background-color: var(--nav-side-background);
      display: flex;
      flex-direction: column;
      justify-content: stretch;
      
      &gt; div.is-main-views &gt; ul {
        display: flex;
        flex-direction: column;
        justify-content:stretch;
        align-items: flex-start;
        align-self: stretch;
        padding: var(--spacing-xs);
        margin: 0;
        list-style: none;
        height: 100%;
        //overflow-y: hidden; //auto;
        overflow-x: hidden;
        scrollbar-width: thin !important;
        white-space: nowrap;
  
        &gt; li {
          border-radius: var(--border-1x);
          color: var(--nav-side-action-icon-default) !important;
          cursor: pointer;
          display: flex;
          flex-direction: row;
          width: var(--spacing-xxl);
          height: var(--spacing-xxl);
          justify-content: center;
          align-items: center;
          font-family: fa-light;
          font-size: var(--icon-ml);
          font-weight: normal;
          gap: var(--spacing-xs);
          margin-top: var(--spacing-xxs);
          margin-bottom: var(--spacing-xxs);
          position: relative;
          
          &amp;[active='true'] {
            background-color: var(--nav-side-action-background-selected);
            color: var(--nav-side-action-icon-selected) !important;
  
            &gt; div.is-nav-icon {
              color: var(--nav-side-action-icon-selected) !important;
              font-family: fa-solid;
            }
          }
          
  
          &amp;:first-child {
            margin-top: 0 !important;
          }
  
          &amp;:hover {
            background-color: var(--nav-side-action-background-hovered);
            color: var(--nav-side-action-icon-selected) !important;
          }
          
          &gt; div.is-nav-icon {
            padding: var(--spacing-xxs);
            font-size: var(--icon-ml);
            height: var(--spacing-xxl);
            min-width: var(--spacing-xxl);
            max-width: var(--spacing-xxl);
            width: var(--spacing-xxl);
            text-align: center;
            position: relative;
            
            /* Main view icons */
            &amp;.is-icon-mono-home:before { content: "\f015"; }
            &amp;.is-icon-mono-records:before { content: "\e0cb"; }
            &amp;.is-icon-mono-search:before { content: "\f002"; }
            &amp;.is-icon-mono-tasks:before { content: "\f316"; }
            &amp;.is-icon-mono-reporting:before { content: "\f643"; }
            &amp;.is-icon-mono-processes:before { content: "\f144"; }
            &amp;.is-icon-mono-administration:before { content: "\f505"; }
            &amp;.is-icon-mono-servers:before { content: "\e695"; }
            &amp;.is-icon-mono-portals:before { content: "\f390"; }
          }
        }
      }
    }    
    
    /* Content */
    div.is-content-main {
      background-color: var(--background-default);
      color: var(--text-regular-default);
      position:absolute;
      top:0;
      left: var(--nav-side-width);;
      right:0;
      bottom:0;
      margin-top: var(--nav-top-height);
    }
  }
&lt;/style&gt;

&lt;div class="modes"&gt;

  &lt;div class="mode"&gt;
    &lt;div class="variables"&gt;
      &lt;ul&gt;
        &lt;li style="background-color:var(--background-default)"&gt;background-default&lt;/li&gt;
        &lt;li style="background-color:var(--background-editable)"&gt;background-editable&lt;/li&gt;
        &lt;li&gt;&lt;/li&gt;
      
        &lt;li style="background-color:var(--ctrl-selected-item)"&gt;ctrl-selected-item&lt;/li&gt;
        &lt;li style="background-color:var(--ctrl-selected-item-background)"&gt;ctrl-selected-item-background&lt;/li&gt;
        &lt;li&gt;&lt;/li&gt;
        
        &lt;li style="background-color:var(--is-text-on-primary)"&gt;is-text-on-primary&lt;/li&gt;
        &lt;li style="background-color:var(--is-text-on-secondary)"&gt;is-text-on-secondary&lt;/li&gt;
        &lt;li&gt;&lt;/li&gt;
      &lt;/ul&gt;
    
      &lt;ul&gt;
        &lt;li style="background-color:var(--theme-primary-500)"&gt;theme-primary-500&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-400)"&gt;theme-primary-400&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-300)"&gt;theme-primary-300&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-200)"&gt;theme-primary-200&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-100)"&gt;theme-primary-100&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-50)"&gt;theme-primary-50&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-600)"&gt;theme-primary-600&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-700)"&gt;theme-primary-700&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-800)"&gt;theme-primary-800&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-900)"&gt;theme-primary-900&lt;/li&gt;
        &lt;li style="background-color:var(--theme-primary-950)"&gt;theme-primary-950&lt;/li&gt;
      &lt;/ul&gt;
    
      &lt;ul&gt;
        &lt;li style="background-color:var(--theme-secondary-500)"&gt;theme-secondary-500&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-400)"&gt;theme-secondary-400&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-300)"&gt;theme-secondary-300&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-200)"&gt;theme-secondary-200&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-100)"&gt;theme-secondary-100&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-50)"&gt;theme-secondary-50&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-600)"&gt;theme-secondary-600&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-700)"&gt;theme-secondary-700&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-800)"&gt;theme-secondary-800&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-900)"&gt;theme-secondary-900&lt;/li&gt;
        &lt;li style="background-color:var(--theme-secondary-950)"&gt;theme-secondary-950&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="preview" variable="background-default"&gt;
    &lt;!-- TOP BAR --&gt;
    &lt;div class="is-nav-top"&gt;
      &lt;h1 id="lblTitle"&gt;Normal&lt;/h1&gt;
      &lt;ul class="menu"&gt;
        &lt;li id="navFavourites"&gt;&lt;/li&gt;
        &lt;li id="navAdd"&gt;&lt;/li&gt;
        &lt;li id="navNotifications"&gt;&lt;/li&gt;
        &lt;li id="navUser"&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    
    &lt;!-- SIDE BAR --&gt;
    &lt;div class="is-nav-side"&gt;
      &lt;div class="is-main-views"&gt;
        &lt;ul&gt;
          &lt;li active="true"&gt;&lt;div class="is-icon-mono-home is-nav-icon"&gt;&lt;/div&gt;&lt;/li&gt;
          &lt;li&gt;&lt;div class="is-icon-mono-search is-nav-icon"&gt;&lt;/div&gt;&lt;/li&gt;
          &lt;li&gt;&lt;div class="is-icon-mono-records is-nav-icon"&gt;&lt;/div&gt;&lt;/li&gt;
          &lt;li&gt;&lt;div class="is-icon-mono-tasks is-nav-icon"&gt;&lt;/div&gt;&lt;/li&gt;
          &lt;li&gt;&lt;div class="is-icon-mono-reporting is-nav-icon"&gt;&lt;/div&gt;&lt;/li&gt;
          &lt;li&gt;&lt;div class="is-icon-mono-processes is-nav-icon"&gt;&lt;/div&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="is-content-main"&gt;
      &lt;!-- MODAL --&gt;
      &lt;div class="is-modal" style="width:300px; height:180px; margin-top:8px; margin-left:8px;"&gt;
        &lt;div class="is-modal-title"&gt;Modal Form&lt;/div&gt;
        &lt;div class="is-modal-body" style="padding-left:8px; background-color: var(--background-default) !important;"&gt;
          &lt;p&gt;This is a modal form.&lt;/p&gt;
        &lt;/div&gt;
        &lt;div class="is-modal-footer"&gt;
          &lt;ul class="is-modal-dialog-buttons main"&gt;
            &lt;li&gt;&lt;button class="is-button ok"&gt;OK&lt;/button&gt;&lt;/li&gt;&lt;li&gt;&lt;button class="is-button"&gt;Cancel&lt;/button&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      
    &lt;/div&gt;
    
  &lt;/div&gt;

&lt;/div&gt;


&lt;script&gt;
var darkMode = &lt;%[DarkMode]%&gt;;
var themeMainIsLight = &lt;%[ThemeMainIsLight]%&gt;;
  
  // Initialise
$(function () {
  // Dark Mode?
  if (darkMode) {
    $("#lblTitle").text("Dark Mode");
    $("html").addClass("is-dark");
  }
  if (themeMainIsLight) {
    $("html").addClass("theme-main-light");
  }
  $("html").addClass("is-spa-app");

  // Handle events
  $("div.variables &gt; ul &gt; li").on("click",
    function (e) {
      var text = $(this).text();
      if (text) _widget.ControlCallback("Variable", text);
    }
  );
  
  // Show content
  $("div#frmMain").css("visibility", "");
});
&lt;/script&gt;
</TemplateText>
    <TemplateTextBookmarks />
    <UniqueId>xOqXeY+1iEmirkrAvIOf9w</UniqueId>
    <AllowRefresh>true</AllowRefresh>
    <Caption />
    <HtmlWidgetAllowInitialEventCaching>false</HtmlWidgetAllowInitialEventCaching>
    <HtmlWidgetMaxHeight>0</HtmlWidgetMaxHeight>
    <HtmlWidgetMaxWidth>0</HtmlWidgetMaxWidth>
    <HtmlWidgetDarkModeNotSupported>false</HtmlWidgetDarkModeNotSupported>
    <HtmlWidgetNeverApplyStyling>false</HtmlWidgetNeverApplyStyling>
    <HtmlWidgetResourceChartsApex>false</HtmlWidgetResourceChartsApex>
    <HtmlWidgetResourceCssSummaryPage2>false</HtmlWidgetResourceCssSummaryPage2>
    <HtmlWidgetResourceCssWidget>true</HtmlWidgetResourceCssWidget>
    <HtmlWidgetResourceJQuery>true</HtmlWidgetResourceJQuery>
    <HtmlWidgetResourceJQueryVersion />
    <HtmlWidgetShowParameterEntry>false</HtmlWidgetShowParameterEntry>
    <HtmlWidgetSpecialEventGetFolderCount>false</HtmlWidgetSpecialEventGetFolderCount>
    <HtmlWidgetSpecialEventShowAsSummaryPage>false</HtmlWidgetSpecialEventShowAsSummaryPage>
    <HtmlWidgetSummaryPageObjectType>None</HtmlWidgetSummaryPageObjectType>
    <Icon />
    <RestrictedOriginsListEnabled>false</RestrictedOriginsListEnabled>
    <RunAsAdministrator>false</RunAsAdministrator>
    <WebServiceName />
    <WebServiceAllowAnonymous>false</WebServiceAllowAnonymous>
    <WebServiceSendDebugInformation>false</WebServiceSendDebugInformation>
    <ShowInMenu>None</ShowInMenu>
    <ParametersType>Custom</ParametersType>
    <Parameters>
      <ISParameterDefs version="1.00">
        <Parameters>
          <Parameter name="DarkMode" type="Boolean">
            <BlankTip />
            <Caption />
            <StandaloneOnly>false</StandaloneOnly>
            <TooltipText />
            <DefaultValueExpression />
            <Enabled>true</Enabled>
            <HideDescription>false</HideDescription>
            <IndentLevel>0</IndentLevel>
            <NonPersistable>false</NonPersistable>
            <ReadOnly>false</ReadOnly>
            <ReadOnly2>false</ReadOnly2>
            <Value>False</Value>
            <Visible>true</Visible>
          </Parameter>
          <Parameter name="ThemeMainIsLight" type="Boolean">
            <BlankTip />
            <Caption />
            <StandaloneOnly>false</StandaloneOnly>
            <TooltipText />
            <DefaultValueExpression />
            <Enabled>true</Enabled>
            <HideDescription>false</HideDescription>
            <IndentLevel>0</IndentLevel>
            <NonPersistable>false</NonPersistable>
            <ReadOnly>false</ReadOnly>
            <ReadOnly2>false</ReadOnly2>
            <Value>False</Value>
            <Visible>true</Visible>
          </Parameter>
        </Parameters>
      </ISParameterDefs>
    </Parameters>
  </finScript>