diff --git a/fluentui-ard/ControlTemplates.json b/fluentui-ard/ControlTemplates.json index cbf983b598ed642e2b0387806db92721701ddca3..ecd45d63c55c35538efd9d9663afc67419ce95f1 100644 --- a/fluentui-ard/ControlTemplates.json +++ b/fluentui-ard/ControlTemplates.json @@ -56,6 +56,20 @@ "OverridableProperties": {}, "Version": "1.6.0" }, + "htmlViewer": { + "CustomGroupControlTemplateName": "", + "FirstParty": true, + "Id": "http://microsoft.com/appmagic/htmlViewer", + "IsComponentTemplate": false, + "IsCustomGroupControlTemplate": false, + "IsPcfControl": false, + "IsPremiumPcfControl": false, + "IsWidgetTemplate": true, + "LastModifiedTimestamp": "0", + "Name": "htmlViewer", + "OverridableProperties": {}, + "Version": "2.1.0" + }, "icon": { "CustomGroupControlTemplateName": "", "FirstParty": true, diff --git a/fluentui-ard/Entropy/Entropy.json b/fluentui-ard/Entropy/Entropy.json index ecdf2c0e186419c687116e68ba668efa451814e4..e516e330bdc05f28ff3fff081cc76e838d28d441 100644 --- a/fluentui-ard/Entropy/Entropy.json +++ b/fluentui-ard/Entropy/Entropy.json @@ -7,6 +7,7 @@ "App": 1, "Banlabel1": 6, "chatbox1": 9, + "chatboxhtml": 24, "ConBan": 5, "ConFkt1": 10, "ConResp": 8, @@ -25,7 +26,7 @@ "DoesTestStepsMetadataExist": true, "FunctionParamsInvariantScripts": {}, "FunctionParamsInvariantScriptsOnInstances": {}, - "HeaderLastSavedDateTimeUTC": "01/15/2024 10:24:14", + "HeaderLastSavedDateTimeUTC": "01/15/2024 10:36:21", "IsLegacyComponentAllowGlobalScopeCase": false, "LocalConnectionIDReferences": { "14dd137e-3796-47e0-b40f-9268bee25980": "\"/providers/microsoft.powerapps/apis/shared_logicflows/connections/ec84356e395faa1b0fdf1c7e126b562e-c1654a69e558fc9f\"", @@ -55,11 +56,12 @@ "OrderTemplate": {}, "OrderXMLTemplate": { "groupContainer": 0, - "icon": 4, + "htmlViewer": 4, + "icon": 5, "image": 2, "label": 1, "text": 3, - "toggleSwitch": 5 + "toggleSwitch": 6 }, "OverridablePropertiesEntry": { "2082bd44-3dd1-43ad-9f56-e87204d4031a": {}, @@ -67,6 +69,7 @@ "App": {}, "Banlabel1": {}, "chatbox1": {}, + "chatboxhtml": {}, "ConBan": {}, "ConFkt1": {}, "ConResp": {}, @@ -90,20 +93,21 @@ "App": 0, "Banlabel1": 1, "chatbox1": 4, + "chatboxhtml": 5, "ConBan": 0, - "ConFkt1": 5, + "ConFkt1": 6, "ConResp": 3, - "ConSend": 10, - "Creativity1": 9, - "Eraser1": 8, - "Fktlabel1": 6, + "ConSend": 11, + "Creativity1": 10, + "Eraser1": 9, + "Fktlabel1": 7, "Host": 0, "Logo": 2, "Screen1": 3, - "send1": 12, - "SendMail1": 7, + "send1": 13, + "SendMail1": 8, "Test_7F478737223C4B69": 0, - "textinput1": 11 + "textinput1": 12 }, "ResourcesJsonIndices": { "Image-ard-logo": 1, @@ -116,6 +120,7 @@ "AnalysisLoadTime": 0.1128137, "ControlCount": { "groupContainer": 4, + "htmlViewer": 1, "icon": 3, "image": 1, "label": 2, diff --git a/fluentui-ard/Entropy/checksum.json b/fluentui-ard/Entropy/checksum.json index 671c799a6efcdaaab104086fd3e8158fdf8cc0e8..82231ff92734d4288bd84d57220664bd085729db 100644 --- a/fluentui-ard/Entropy/checksum.json +++ b/fluentui-ard/Entropy/checksum.json @@ -9,32 +9,32 @@ "Assets\\Images\\0001.png": "C8_D0WGiAaxVuIcUWpkdQuVcyQy/gSJZuMRDwL63zxJhAk=", "Assets\\Images\\0002.jpg": "C8_Tc/HGdQ62xbtBm/41G1l7DIpMm/RT0cgmhtJyanyURs=", "Controls\\1.json": "C8_/PwNEU6dV00x9Xr4Yt93zX1EmsxAh36PVgOdFy9WD8g=", - "Controls\\4.json": "C8_19R4qmW3tnu6Rg504LH/pRwMOOoeOhTN3lkt4sJAudo=", - "Header.json": "C8_OCA4BuMKRlTwKm40xg7YIcnaqqGaZMTPuLGPvqNcD5U=", - "Properties.json": "C8_h6DSGX2t7DCVqr0W9zVgKgZm6HMHtrtLOK7dWwj62Sw=", + "Controls\\4.json": "C8_xsCnY98d3iX0xQd1NBCURFekHEbBnZ9REoUQkgSLD9g=", + "Header.json": "C8_BfiYjP7NgEN0pkKlbve7OwsG5YUkL8rrVLOediZl0Zw=", + "Properties.json": "C8_Fia2ueuqd57Bi1j6LeDiXd9HISOlHOn61jyFAZhizL4=", "References\\DataSources.json": "C8_j1tKKAOYDTkGHfiN7TTDXqWDGAT05nDhkMTD/v32als=", "References\\ModernThemes.json": "C8_KDQJ/3t27vgKx25iCQB/PGqxkWE34ZB7Eyb+RxNxY0k=", "References\\Resources.json": "C8_UMTMqs1BZIxG/WCVvgkZm/xMB/Clxy5pUBUMWVF0nQY=", - "References\\Templates.json": "C8_ncYLbCcG9Fg3yhYQo5Q3ONl/lxkBYFl9NfZxgS4LDvQ=", + "References\\Templates.json": "C8_+4NS8mDYgUrMMg2B9xiKQHQggGncjl9JijSpN3c51mY=", "References\\Themes.json": "C8_zuMgLpz3IJQlVgGqo3GtyhriL3PR35GxXf+rtPR4Gfc=", "Resources\\PublishInfo.json": "C8_L9UhOWDoS/LUj0KodcbQiXLqewg00O5iSZA4+bCdTGs=" }, - "ClientStampedChecksum": "C8_cPexRlIdfNktsKdTVvZMbSQE04aSlkUJ8SA3+rKpPVc=", + "ClientStampedChecksum": "C8_QW6hgBwjr0po962iqfFQSvlnSsgUAklJafB7Wl6zV4A=", "ServerPerFileChecksums": { "AppCheckerResult.sarif": "C8_B7QS9IAuh4ZQDqU9CuerBDTo+JJ6k5lRsJWHDfDdz/U=", "AppTests\\2.json": "C8_omA4KVA0ye8qkU+fMWC8nSkoW42AEHM4XBnnYkUJCys=", "Assets\\Images\\0001.png": "C8_D0WGiAaxVuIcUWpkdQuVcyQy/gSJZuMRDwL63zxJhAk=", "Assets\\Images\\0002.jpg": "C8_Tc/HGdQ62xbtBm/41G1l7DIpMm/RT0cgmhtJyanyURs=", "Controls\\1.json": "C8_/PwNEU6dV00x9Xr4Yt93zX1EmsxAh36PVgOdFy9WD8g=", - "Controls\\4.json": "C8_19R4qmW3tnu6Rg504LH/pRwMOOoeOhTN3lkt4sJAudo=", - "Header.json": "C8_OCA4BuMKRlTwKm40xg7YIcnaqqGaZMTPuLGPvqNcD5U=", - "Properties.json": "C8_h6DSGX2t7DCVqr0W9zVgKgZm6HMHtrtLOK7dWwj62Sw=", + "Controls\\4.json": "C8_xsCnY98d3iX0xQd1NBCURFekHEbBnZ9REoUQkgSLD9g=", + "Header.json": "C8_BfiYjP7NgEN0pkKlbve7OwsG5YUkL8rrVLOediZl0Zw=", + "Properties.json": "C8_Fia2ueuqd57Bi1j6LeDiXd9HISOlHOn61jyFAZhizL4=", "References\\DataSources.json": "C8_j1tKKAOYDTkGHfiN7TTDXqWDGAT05nDhkMTD/v32als=", "References\\ModernThemes.json": "C8_KDQJ/3t27vgKx25iCQB/PGqxkWE34ZB7Eyb+RxNxY0k=", "References\\Resources.json": "C8_UMTMqs1BZIxG/WCVvgkZm/xMB/Clxy5pUBUMWVF0nQY=", - "References\\Templates.json": "C8_ncYLbCcG9Fg3yhYQo5Q3ONl/lxkBYFl9NfZxgS4LDvQ=", + "References\\Templates.json": "C8_+4NS8mDYgUrMMg2B9xiKQHQggGncjl9JijSpN3c51mY=", "References\\Themes.json": "C8_zuMgLpz3IJQlVgGqo3GtyhriL3PR35GxXf+rtPR4Gfc=", "Resources\\PublishInfo.json": "C8_L9UhOWDoS/LUj0KodcbQiXLqewg00O5iSZA4+bCdTGs=" }, - "ServerStampedChecksum": "C8_cPexRlIdfNktsKdTVvZMbSQE04aSlkUJ8SA3+rKpPVc=" + "ServerStampedChecksum": "C8_QW6hgBwjr0po962iqfFQSvlnSsgUAklJafB7Wl6zV4A=" } \ No newline at end of file diff --git a/fluentui-ard/Src/EditorState/Screen1.editorstate.json b/fluentui-ard/Src/EditorState/Screen1.editorstate.json index 9fab2de9ebab9eb2400e894125f52ec723faf644..7e91250509ae351851de26b3f95d589c10404a4f 100644 --- a/fluentui-ard/Src/EditorState/Screen1.editorstate.json +++ b/fluentui-ard/Src/EditorState/Screen1.editorstate.json @@ -827,6 +827,159 @@ "StyleName": "defaultTextStyle", "Type": "ControlInfo" }, + "chatboxhtml": { + "AllowAccessToGlobals": true, + "ControlPropertyState": [ + "DisplayMode", + "DisabledFill", + "Font", + "Color", + "Fill", + "BorderColor", + "DisabledBorderColor", + "PressedBorderColor", + "HoverBorderColor", + "BorderStyle", + { + "AFDDataSourceName": "", + "AutoRuleBindingEnabled": false, + "AutoRuleBindingString": "548", + "InvariantPropertyName": "Width", + "IsLockable": false, + "NameMapSourceSchema": "?" + }, + { + "AFDDataSourceName": "", + "AutoRuleBindingEnabled": false, + "AutoRuleBindingString": "666", + "InvariantPropertyName": "Height", + "IsLockable": false, + "NameMapSourceSchema": "?" + }, + { + "AFDDataSourceName": "", + "AutoRuleBindingEnabled": false, + "AutoRuleBindingString": "40", + "InvariantPropertyName": "X", + "IsLockable": false, + "NameMapSourceSchema": "?" + }, + { + "AFDDataSourceName": "", + "AutoRuleBindingEnabled": false, + "AutoRuleBindingString": "28.399999999999977", + "InvariantPropertyName": "Y", + "IsLockable": false, + "NameMapSourceSchema": "?" + }, + "ZIndex", + { + "AFDDataSourceName": "", + "AutoRuleBindingEnabled": false, + "AutoRuleBindingString": "\"Show your <b><font color=blue>HTML</font></b> text here.\"", + "InvariantPropertyName": "HtmlText", + "IsLockable": false, + "NameMapSourceSchema": "?" + } + ], + "HasDynamicProperties": false, + "IsAutoGenerated": false, + "IsComponentDefinition": false, + "IsDataControl": false, + "IsFromScreenLayout": false, + "IsGroupControl": false, + "IsLocked": false, + "LayoutName": "", + "MetaDataIDKey": "", + "Name": "chatboxhtml", + "OptimizeForDevices": "Off", + "ParentIndex": 1, + "PersistMetaDataIDKey": false, + "Properties": [ + { + "Category": "Data", + "PropertyName": "HtmlText", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "X", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "Height", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "Width", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "BorderStyle", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "DisabledBorderColor", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "BorderColor", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "Fill", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "Color", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "ZIndex", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "Y", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "Font", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "DisabledFill", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "DisplayMode", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "HoverBorderColor", + "RuleProviderType": "Unknown" + }, + { + "Category": "Design", + "PropertyName": "PressedBorderColor", + "RuleProviderType": "Unknown" + } + ], + "StyleName": "", + "Type": "ControlInfo" + }, "ConBan": { "AllowAccessToGlobals": true, "ControlPropertyState": [ diff --git a/fluentui-ard/Src/Screen1.fx.yaml b/fluentui-ard/Src/Screen1.fx.yaml index 2a6530b5ed162518da6e1b178f194f030af8da8f..157457581830b3c431ec51f03ddabceb55be449f 100644 --- a/fluentui-ard/Src/Screen1.fx.yaml +++ b/fluentui-ard/Src/Screen1.fx.yaml @@ -164,6 +164,7 @@ Screen1 As screen: AccessibleLabel: ="ALchatbox1" BorderColor: =RGBA(224, 24, 24, 1) BorderThickness: =0 + Color: =RGBA(0, 0, 0, 0) Default: =varResp DisabledBorderColor: =RGBA(255, 255, 255, 1) DisabledColor: =RGBA(161, 159, 157, 1) @@ -192,6 +193,14 @@ Screen1 As screen: Y: =ConResp.Height - (ConResp.Height - ConResp.Height/50) ZIndex: =1 + chatboxhtml As htmlViewer: + Height: =ConResp.Height - 2* (ConResp.Height/50) + HtmlText: =varResp + Width: =ConResp.Width - 2*(ConResp.Width/25) + X: =ConResp.Width - (ConResp.Width - ConResp.Width/25) + Y: =ConResp.Height - (ConResp.Height - ConResp.Height/50) + ZIndex: =2 + ConSend As groupContainer.manualLayoutContainer: BorderStyle: =BorderStyle.None DropShadow: =DropShadow.None @@ -260,7 +269,7 @@ Screen1 As screen: ) ); - If( + /*If( !IsBlank(textinput1.Text), Set( varResp, @@ -269,6 +278,16 @@ Screen1 As screen: Creativity ).assi & Char(10) ) + );*/ + If( + !IsBlank(textinput1.Text), + Set( + varResp, + varResp & "<br>" & textinput1.Text & "<br><br>" &"Assis: "& ConnectAzureOpenai.Run( + textinput1.Text, + Creativity + ).assi & "<br>" + ) ); Reset(textinput1); Notify( diff --git a/fluentui-ard/pkgs/htmlViewer_2.1.0.xml b/fluentui-ard/pkgs/htmlViewer_2.1.0.xml new file mode 100644 index 0000000000000000000000000000000000000000..ddf580aa507d1e00772831b573ad0e3fab7c982e --- /dev/null +++ b/fluentui-ard/pkgs/htmlViewer_2.1.0.xml @@ -0,0 +1,143 @@ +<widget xmlns="http://openajax.org/metadata" spec="1.0" id="http://microsoft.com/appmagic/htmlViewer" name="htmlViewer" jsClass="AppMagic.Controls.HtmlViewer" version="2.1.0" styleable="true" runtimeCost="1" xmlns:appMagic="http://schemas.microsoft.com/appMagic"> + <author name="Microsoft AppMagic" /> + <license type="text/html"><![CDATA[<p>TODO: Need license text here.</p>]]></license> + <description><![CDATA[HtmlViewer + Control description here.]]></description> + <requires> + <require type="css" src="css/htmlViewer.css" /> + <require type="javascript" src="js/htmlViewer.js" /> + </requires> + <appMagic:capabilities contextualViewsEnabled="true" autoBorders="true" autoPointerViewState="true" autoDisabledViewState="true" screenActiveAware="true" isVersionFlexible="true" /> + <content><![CDATA[ + <div class="appmagic-htmlviewer-container"> + <div class="appmagic-htmlviewer" + data-bind=" + disabled: viewState.displayMode() === AppMagic.Constants.DisplayMode.Disabled, + style: { + backgroundColor: fill, + paddingTop: properties.PaddingTop, + paddingRight: properties.PaddingRight, + paddingBottom: properties.PaddingBottom, + paddingLeft: properties.PaddingLeft, + webkitOverflowScrolling: controlWidget.isReplicable ? 'auto' : 'touch', + }"> + <div class="appmagic-htmlviewer-div" data-bind="style: { + overflowY: properties.AutoHeight() ? 'hidden' : 'auto' + }"> + <div class="appmagic-htmlviewer-content"></div> + </div> + </div> + <div class="appmagic-htmlviewer-disabled-overlay" + data-bind=" + visible: viewState.displayMode() === AppMagic.Constants.DisplayMode.Disabled, + style: { backgroundColor: properties.DisabledFill }"> + </div> + </div> + ]]></content> + <properties> + <property name="HtmlText" localizedName="##htmlViewer_HtmlText##" datatype="String" defaultValue="##HTMLViewer_DefaultValue_HtmlText##" isPrimaryInputProperty="true"> + <title>HtmlViewer contents</title> + <appMagic:category>data</appMagic:category> + <appMagic:displayName>##htmlViewer_HtmlText_DisplayName##</appMagic:displayName> + <appMagic:tooltip>##htmlViewer_HtmlText_Tooltip##</appMagic:tooltip> + </property> + <!-- This is not an 'Auto' property. This is for allowing the label to grow vertically to display the content --> + <property name="AutoHeight" localizedName="##CommonProperties_AutoHeight##" datatype="Boolean" defaultValue="false"> + <title>AutoHeight</title> + <appMagic:category>design</appMagic:category> + <appMagic:displayName>##CommonProperties_AutoHeight_DisplayName##</appMagic:displayName> + <appMagic:tooltip>##CommonProperties_AutoHeight_Tooltip##</appMagic:tooltip> + </property> + </properties> + <appMagic:includeProperties> + <!-- Data --> + <appMagic:includeProperty name="Tooltip" /> + <appMagic:includeProperty name="ContentLanguage" /> + <!-- Design --> + <appMagic:includeProperty name="DisplayMode" /> + <appMagic:includeProperty name="DisabledFill" defaultValue="RGBA(119, 119, 119, .4)" /> + <appMagic:includeProperty name="Font" /> + <appMagic:includeProperty name="Color" /> + <appMagic:includeProperty name="Size" phoneDefaultValue="24" /> + <appMagic:includeProperty name="Fill" defaultValue="RGBA(255, 255, 255, 0)" /> + <appMagic:includeProperty name="BorderColor" /> + <appMagic:includeProperty name="DisabledBorderColor" defaultValue="RGBA(56, 56, 56, 1)" /> + <appMagic:includeProperty name="PressedBorderColor" defaultValue="Self.BorderColor" hidden="true" /> + <appMagic:includeProperty name="HoverBorderColor" defaultValue="Self.BorderColor" /> + <appMagic:includeProperty name="BorderStyle" defaultValue="%BorderStyle.RESERVED%.None" /> + <appMagic:includeProperty name="BorderThickness" /> + <appMagic:includeProperty name="Visible" /> + <appMagic:includeProperty name="Width" defaultValue="200" phoneDefaultValue="560" /> + <appMagic:includeProperty name="Height" defaultValue="40" phoneDefaultValue="70" /> + <appMagic:includeProperty name="PaddingTop" defaultValue="5" /> + <appMagic:includeProperty name="PaddingRight" defaultValue="5" /> + <appMagic:includeProperty name="PaddingBottom" defaultValue="5" /> + <appMagic:includeProperty name="PaddingLeft" defaultValue="5" /> + <appMagic:includeProperty name="X" /> + <appMagic:includeProperty name="Y" /> + <!-- Behavior Properties --> + <appMagic:includeProperty name="OnSelect" direction="in" /> + <!-- Hidden properties --> + <appMagic:includeProperty name="minimumWidth" defaultValue="35" /> + <appMagic:includeProperty name="minimumHeight" defaultValue="35" /> + <appMagic:includeProperty name="maximumWidth" defaultValue="1366" /> + <appMagic:includeProperty name="maximumHeight" defaultValue="7680" /> + </appMagic:includeProperties> + <appMagic:propertyDependencies> + <appMagic:propertyDependency input="AutoHeight" output="Height" /> + </appMagic:propertyDependencies> + <appMagic:insertMetadata> + <appMagic:category name="Display" priority="20" /> + </appMagic:insertMetadata> + <!-- Display metadata providing property visibility, order, sections, and grouping in UI (e.g. properties panel) --> + <appMagic:displayMetadata> + <appMagic:section> + <appMagic:property name="HtmlText" /> + <appMagic:property name="Font" displayType="FontEnum" showInFloatie="true" /> + <appMagic:property name="Size" labelOverride="##FontSize_Property##" showInFloatie="true" /> + <appMagic:property name="AutoHeight" /> + <appMagic:property name="DisplayMode" /> + </appMagic:section> + <appMagic:section> + <appMagic:property name="Visible" /> + <appMagic:propertyGroup name="Position"> + <appMagic:property name="X" /> + <appMagic:property name="Y" /> + </appMagic:propertyGroup> + <appMagic:propertyGroup name="Size"> + <appMagic:property name="Width" /> + <appMagic:property name="Height" /> + </appMagic:propertyGroup> + <appMagic:propertyGroup name="Padding"> + <appMagic:property name="PaddingTop" labelOverride="##Padding_Top_Title##" /> + <appMagic:property name="PaddingBottom" labelOverride="##Padding_Bottom_Title##" /> + <appMagic:property name="PaddingLeft" labelOverride="##Padding_Left_Title##" /> + <appMagic:property name="PaddingRight" labelOverride="##Padding_Right_Title##" /> + </appMagic:propertyGroup> + </appMagic:section> + <appMagic:section> + <appMagic:propertyGroup name="Color"> + <appMagic:property name="Color" showInFloatie="true" /> + <appMagic:property name="Fill" showInFloatie="true" /> + </appMagic:propertyGroup> + <appMagic:propertyGroup name="Border"> + <appMagic:property name="BorderStyle" /> + <appMagic:property name="BorderThickness" /> + <appMagic:property name="BorderColor" /> + </appMagic:propertyGroup> + </appMagic:section> + <appMagic:section> + <appMagic:propertyGroup name="DisabledColor"> + <appMagic:property name="DisabledFill" /> + <appMagic:property name="DisabledBorderColor" /> + </appMagic:propertyGroup> + <appMagic:propertyGroup name="HoverColor"> + <appMagic:property name="HoverBorderColor" /> + </appMagic:propertyGroup> + <appMagic:property name="Tooltip" /> + </appMagic:section> + </appMagic:displayMetadata> + <appMagic:conversion from="2.0.0" to="2.1.0"> + <appMagic:conversionAction type="add" name="ContentLanguage" /> + </appMagic:conversion> +</widget> \ No newline at end of file