├── .gitignore ├── LICENSE ├── README.md ├── addins ├── CFSample │ ├── CFSample.xml │ ├── Images │ │ ├── Button16x16.png │ │ ├── Button32x32.png │ │ └── Button80x80.png │ ├── README.md │ ├── customfunctions.html │ ├── customfunctions.js │ └── customfunctions.json ├── CFSample5 │ ├── 18a320cd-8c62-4852-8959-df88fb8474eb.xml │ ├── 73da2e60-d61f-4538-97d0-9cf5e104186d-devcatalog.xml │ ├── ContextualTabDefine.json │ ├── Images │ │ ├── Button16x16.png │ │ ├── Button32x32.png │ │ └── Button80x80.png │ ├── README.md │ ├── copytodevcatalog.cmd │ ├── custom-functions.js │ ├── custom-functions.json │ └── sharedapp.html ├── cfMonitor │ ├── Content │ │ ├── OfficeThemes.css │ │ ├── fabric.components.css │ │ ├── fabric.components.min.css │ │ ├── fabric.components.rtl.css │ │ ├── fabric.components.rtl.min.css │ │ ├── fabric.css │ │ ├── fabric.min.css │ │ ├── fabric.rtl.css │ │ ├── fabric.rtl.min.css │ │ └── sass │ │ │ ├── Fabric.Animations.Output.scss │ │ │ ├── Fabric.Animations.RTL.Output.scss │ │ │ ├── Fabric.Color.Mixins.Output.scss │ │ │ ├── Fabric.Components.scss │ │ │ ├── Fabric.Grid.Output.scss │ │ │ ├── Fabric.Icons.Font.Output.scss │ │ │ ├── Fabric.Icons.Output.scss │ │ │ ├── Fabric.Icons.RTL.Output.scss │ │ │ ├── Fabric.RTL.scss │ │ │ ├── Fabric.Responsive.Utilities.Output.scss │ │ │ ├── Fabric.Typography.Fonts.Output.scss │ │ │ ├── Fabric.Typography.Language.Overrides.Output.scss │ │ │ ├── Fabric.Typography.Output.scss │ │ │ ├── Fabric.Utilities.Output.scss │ │ │ ├── Fabric.scss │ │ │ ├── _Fabric.Animations.RTL.scss │ │ │ ├── _Fabric.Animations.scss │ │ │ ├── _Fabric.Color.Mixins.scss │ │ │ ├── _Fabric.Color.Variables.scss │ │ │ ├── _Fabric.Common.scss │ │ │ ├── _Fabric.Grid.scss │ │ │ ├── _Fabric.Icons.scss │ │ │ ├── _Fabric.Mixins.scss │ │ │ ├── _Fabric.Responsive.Utilities.Variables.scss │ │ │ ├── _Fabric.Responsive.Variables.scss │ │ │ ├── _Fabric.Typography.Fonts.scss │ │ │ ├── _Fabric.Typography.Language.Overrides.scss │ │ │ ├── _Fabric.Typography.Variables.scss │ │ │ ├── _Fabric.Typography.scss │ │ │ ├── _Fabric.Utilities.scss │ │ │ ├── _Fabric.ZIndex.Variables.scss │ │ │ └── _Office.Color.Variables.scss │ ├── Images │ │ ├── AddinIcon.png │ │ ├── Button16x16.png │ │ ├── Button32x32.png │ │ ├── Button80x80.png │ │ └── Close.png │ ├── Scripts │ │ ├── FabricUI │ │ │ └── MessageBanner.js │ │ ├── jquery-1.9.1.intellisense.js │ │ ├── jquery-1.9.1.js │ │ ├── jquery-1.9.1.min.js │ │ ├── jquery-1.9.1.min.map │ │ ├── jquery.fabric.js │ │ └── jquery.fabric.min.js │ ├── cfActiveMonitor.xml │ ├── cfMonitor.css │ ├── cfMonitor.html │ ├── cfMonitor.js │ └── cfMonitorUDF.html ├── cfsample2 │ ├── Images │ │ ├── Button16x16.png │ │ ├── Button32x32.png │ │ └── Button80x80.png │ ├── README.md │ ├── b5d3b1f5-18b0-4a5b-824d-d46f2b6be076-devcatalog.xml │ ├── c5a33478-ba81-414d-ad52-804f5da8facf.xml │ ├── copytodevcatalog.cmd │ ├── custom-functions.js │ ├── custom-functions.json │ └── sharedapp.html ├── cfsample3 │ ├── README.md │ └── c268db15-61c2-42f9-ba95-a2de63292c46.xml ├── cfsample4 │ ├── README.md │ └── c378f3ac-d912-4479-b442-3bcb0625fc9f.xml ├── officejs2 │ ├── README.md │ ├── agave │ │ ├── Word-Home-v1.html │ │ ├── Word-Home-v2.html │ │ ├── Word-Manifest-v1.xml │ │ ├── Word-Manifest-v2.xml │ │ ├── app.js │ │ ├── home-v1.html │ │ ├── home-v2.html │ │ ├── manifest-v1.xml │ │ ├── manifest-v2.xml │ │ ├── wordApp.js │ │ ├── xdmproxy.html │ │ └── xdmproxy.js │ └── dist │ │ └── officejsv1 │ │ ├── ariatelemetry │ │ └── aria-web-telemetry.js │ │ ├── excel-web-16.00.js │ │ ├── excel-win32-16.01.js │ │ ├── office.js │ │ ├── office_strings.js │ │ ├── telemetry │ │ ├── oteljs.js │ │ └── oteljs_agave.js │ │ ├── word-web-16.00.js │ │ └── word-win32-16.01.js ├── outlook │ ├── AgaveErrorUX │ │ ├── AgaveErrorUx.debug.js │ │ ├── AgaveErrorUx.js │ │ ├── index.html │ │ └── style │ │ │ └── AgaveErrorUX.css │ ├── Home_olk.html │ ├── app_olk.js │ ├── en-us │ │ ├── outlook_strings.debug.js │ │ └── outlook_strings.js │ ├── outlook.debug.js │ ├── outlook.js │ └── telemetry │ │ ├── oteljs.js │ │ └── oteljs_agave.js ├── perf │ ├── README.md │ ├── assets │ │ ├── icon-16.png │ │ ├── icon-32.png │ │ ├── icon-80.png │ │ └── logo-filled.png │ ├── config │ │ └── customfunctions.json │ ├── customfunctions.html │ ├── customfunctionsPerfDriver.html │ ├── image │ │ ├── Button16x16.png │ │ ├── Button32x32.png │ │ └── Button80x80.png │ ├── manifest.xml │ └── src │ │ ├── customfunctions.js │ │ └── customfunctionsPerfDriver.js └── upgrade │ ├── README.md │ ├── upgrade.js │ ├── upgrade.json │ ├── upgrade_1366_768.png │ ├── upgrade_16.png │ ├── upgrade_300.png │ ├── upgrade_32.png │ ├── upgrade_80.png │ ├── upgrade_appcmd.html │ ├── upgrade_appcmd.xml │ ├── upgrade_shared.html │ └── upgrade_shared.xml ├── lib └── excel-codespace │ ├── agave │ ├── custom-function-forwarder.bundle.js │ ├── custom-function-forwarder.bundle.js.map │ ├── external │ │ ├── react-16-12-0 │ │ │ └── umd │ │ │ │ └── react.development.js │ │ └── react-dom-16-12-0 │ │ │ └── umd │ │ │ └── react-dom.development.js │ ├── images │ │ ├── button16x16.png │ │ ├── button32x32.png │ │ └── button80x80.png │ └── udf.json │ └── readme.md └── test.html /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015/2017 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # Visual Studio 2017 auto generated files 33 | Generated\ Files/ 34 | 35 | # MSTest test Results 36 | [Tt]est[Rr]esult*/ 37 | [Bb]uild[Ll]og.* 38 | 39 | # NUNIT 40 | *.VisualState.xml 41 | TestResult.xml 42 | 43 | # Build Results of an ATL Project 44 | [Dd]ebugPS/ 45 | [Rr]eleasePS/ 46 | dlldata.c 47 | 48 | # Benchmark Results 49 | BenchmarkDotNet.Artifacts/ 50 | 51 | # .NET Core 52 | project.lock.json 53 | project.fragment.lock.json 54 | artifacts/ 55 | **/Properties/launchSettings.json 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_i.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *.log 81 | *.vspscc 82 | *.vssscc 83 | .builds 84 | *.pidb 85 | *.svclog 86 | *.scc 87 | 88 | # Chutzpah Test files 89 | _Chutzpah* 90 | 91 | # Visual C++ cache files 92 | ipch/ 93 | *.aps 94 | *.ncb 95 | *.opendb 96 | *.opensdf 97 | *.sdf 98 | *.cachefile 99 | *.VC.db 100 | *.VC.VC.opendb 101 | 102 | # Visual Studio profiler 103 | *.psess 104 | *.vsp 105 | *.vspx 106 | *.sap 107 | 108 | # Visual Studio Trace Files 109 | *.e2e 110 | 111 | # TFS 2012 Local Workspace 112 | $tf/ 113 | 114 | # Guidance Automation Toolkit 115 | *.gpState 116 | 117 | # ReSharper is a .NET coding add-in 118 | _ReSharper*/ 119 | *.[Rr]e[Ss]harper 120 | *.DotSettings.user 121 | 122 | # JustCode is a .NET coding add-in 123 | .JustCode 124 | 125 | # TeamCity is a build add-in 126 | _TeamCity* 127 | 128 | # DotCover is a Code Coverage Tool 129 | *.dotCover 130 | 131 | # AxoCover is a Code Coverage Tool 132 | .axoCover/* 133 | !.axoCover/settings.json 134 | 135 | # Visual Studio code coverage results 136 | *.coverage 137 | *.coveragexml 138 | 139 | # NCrunch 140 | _NCrunch_* 141 | .*crunch*.local.xml 142 | nCrunchTemp_* 143 | 144 | # MightyMoose 145 | *.mm.* 146 | AutoTest.Net/ 147 | 148 | # Web workbench (sass) 149 | .sass-cache/ 150 | 151 | # Installshield output folder 152 | [Ee]xpress/ 153 | 154 | # DocProject is a documentation generator add-in 155 | DocProject/buildhelp/ 156 | DocProject/Help/*.HxT 157 | DocProject/Help/*.HxC 158 | DocProject/Help/*.hhc 159 | DocProject/Help/*.hhk 160 | DocProject/Help/*.hhp 161 | DocProject/Help/Html2 162 | DocProject/Help/html 163 | 164 | # Click-Once directory 165 | publish/ 166 | 167 | # Publish Web Output 168 | *.[Pp]ublish.xml 169 | *.azurePubxml 170 | # Note: Comment the next line if you want to checkin your web deploy settings, 171 | # but database connection strings (with potential passwords) will be unencrypted 172 | *.pubxml 173 | *.publishproj 174 | 175 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 176 | # checkin your Azure Web App publish settings, but sensitive information contained 177 | # in these scripts will be unencrypted 178 | PublishScripts/ 179 | 180 | # NuGet Packages 181 | *.nupkg 182 | # The packages folder can be ignored because of Package Restore 183 | **/[Pp]ackages/* 184 | # except build/, which is used as an MSBuild target. 185 | !**/[Pp]ackages/build/ 186 | # Uncomment if necessary however generally it will be regenerated when needed 187 | #!**/[Pp]ackages/repositories.config 188 | # NuGet v3's project.json files produces more ignorable files 189 | *.nuget.props 190 | *.nuget.targets 191 | 192 | # Microsoft Azure Build Output 193 | csx/ 194 | *.build.csdef 195 | 196 | # Microsoft Azure Emulator 197 | ecf/ 198 | rcf/ 199 | 200 | # Windows Store app package directories and files 201 | AppPackages/ 202 | BundleArtifacts/ 203 | Package.StoreAssociation.xml 204 | _pkginfo.txt 205 | *.appx 206 | 207 | # Visual Studio cache files 208 | # files ending in .cache can be ignored 209 | *.[Cc]ache 210 | # but keep track of directories ending in .cache 211 | !*.[Cc]ache/ 212 | 213 | # Others 214 | ClientBin/ 215 | ~$* 216 | *~ 217 | *.dbmdl 218 | *.dbproj.schemaview 219 | *.jfm 220 | *.pfx 221 | *.publishsettings 222 | orleans.codegen.cs 223 | 224 | # Including strong name files can present a security risk 225 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 226 | #*.snk 227 | 228 | # Since there are multiple workflows, uncomment next line to ignore bower_components 229 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 230 | #bower_components/ 231 | 232 | # RIA/Silverlight projects 233 | Generated_Code/ 234 | 235 | # Backup & report files from converting an old project file 236 | # to a newer Visual Studio version. Backup files are not needed, 237 | # because we have git ;-) 238 | _UpgradeReport_Files/ 239 | Backup*/ 240 | UpgradeLog*.XML 241 | UpgradeLog*.htm 242 | ServiceFabricBackup/ 243 | *.rptproj.bak 244 | 245 | # SQL Server files 246 | *.mdf 247 | *.ldf 248 | *.ndf 249 | 250 | # Business Intelligence projects 251 | *.rdl.data 252 | *.bim.layout 253 | *.bim_*.settings 254 | *.rptproj.rsuser 255 | 256 | # Microsoft Fakes 257 | FakesAssemblies/ 258 | 259 | # GhostDoc plugin setting file 260 | *.GhostDoc.xml 261 | 262 | # Node.js Tools for Visual Studio 263 | .ntvs_analysis.dat 264 | node_modules/ 265 | 266 | # Visual Studio 6 build log 267 | *.plg 268 | 269 | # Visual Studio 6 workspace options file 270 | *.opt 271 | 272 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 273 | *.vbw 274 | 275 | # Visual Studio LightSwitch build output 276 | **/*.HTMLClient/GeneratedArtifacts 277 | **/*.DesktopClient/GeneratedArtifacts 278 | **/*.DesktopClient/ModelManifest.xml 279 | **/*.Server/GeneratedArtifacts 280 | **/*.Server/ModelManifest.xml 281 | _Pvt_Extensions 282 | 283 | # Paket dependency manager 284 | .paket/paket.exe 285 | paket-files/ 286 | 287 | # FAKE - F# Make 288 | .fake/ 289 | 290 | # JetBrains Rider 291 | .idea/ 292 | *.sln.iml 293 | 294 | # CodeRush 295 | .cr/ 296 | 297 | # Python Tools for Visual Studio (PTVS) 298 | __pycache__/ 299 | *.pyc 300 | 301 | # Cake - Uncomment if you are using it 302 | # tools/** 303 | # !tools/packages.config 304 | 305 | # Tabs Studio 306 | *.tss 307 | 308 | # Telerik's JustMock configuration file 309 | *.jmconfig 310 | 311 | # BizTalk build output 312 | *.btp.cs 313 | *.btm.cs 314 | *.odx.cs 315 | *.xsd.cs 316 | 317 | # OpenCover UI analysis results 318 | OpenCover/ 319 | 320 | # Azure Stream Analytics local run output 321 | ASALocalRun/ 322 | 323 | # MSBuild Binary and Structured Log 324 | *.binlog 325 | 326 | # NVidia Nsight GPU debugger configuration file 327 | *.nvuser 328 | 329 | # MFractors (Xamarin productivity tool) working folder 330 | .mfractor/ 331 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | --- 2 | page_type: sample 3 | products: 4 | - office-365 5 | languages: 6 | - javascript 7 | extensions: 8 | contentType: samples 9 | createdDate: 7/25/2018 10:27:27 AM 10 | description: "Custom Functions - Special Add-in Samples" 11 | --- 12 | 13 | # Note 14 | The primary repo for Custom Functions-related samples, tools, and forums is [Excel-Custom-Functions](https://github.com/OfficeDev/Excel-Custom-Functions). 15 | 16 | # Custom Functions - Special Add-in Samples 17 | Custom Functions - Special Add-in Samples is a community driven effort that helps developers verify and understand some special features of the Office add-in platform. This repo contains add-in source code and manifests. Anyone can contribute. All add-ins in this repo should be fully functional. See the [addins](https://github.com/OfficeDev/custom-functions/tree/master/addins) subfolders for descriptions of the existing add-ins. 18 | 19 | ## Contributing 20 | This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com. 21 | 22 | When you submit a pull request, a CLA-bot will automatically determine whether you need to provide 23 | a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions 24 | provided by the bot. You will only need to do this once across all repos using our CLA. 25 | 26 | ## Code of Conduct 27 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 28 | For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or 29 | contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. 30 | -------------------------------------------------------------------------------- /addins/CFSample/Images/Button16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/CFSample/Images/Button16x16.png -------------------------------------------------------------------------------- /addins/CFSample/Images/Button32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/CFSample/Images/Button32x32.png -------------------------------------------------------------------------------- /addins/CFSample/Images/Button80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/CFSample/Images/Button80x80.png -------------------------------------------------------------------------------- /addins/CFSample/README.md: -------------------------------------------------------------------------------- 1 | # License 2 | See https://officedev.github.io/custom-functions/LICENSE 3 | 4 | # Purpose 5 | This add-in is used to test Custom Functions which contains different sample of functions like: DialogApi, OfficeStorage, streaming functions etc, along with a Taskpane which contain OfficeStorage API to get/set token from the storage. 6 | 7 | This add-in contains: 8 | - Custom Functions 9 | - A ShowTaskpane button 10 | 11 | # Maintainers 12 | [madhavagrawal17](https://github.com/madhavagrawal17) 13 | [ylu0826](https://github.com/ylu0826) 14 | -------------------------------------------------------------------------------- /addins/CFSample/customfunctions.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Custom Functions 8 | 9 | 10 | 11 | 37 | 38 | 39 | 40 | Thanks for trying custom functions for Excel! You've installed the sample functions, which start with the prefix CFSAMPLE. 41 | Try typing them into a cell (with or without this task pane - it isn't needed): 42 | 69 | 70 | Send token to custom function (key = "token") 71 |
72 | 73 | 74 |
75 | 76 | Receive token from custom function (key = "token") 77 |
78 | 79 | 80 |
81 | 82 |
83 | 84 | For more information, see https://aka.ms/customfunctions. 85 | 86 | 87 | -------------------------------------------------------------------------------- /addins/CFSample5/ContextualTabDefine.json: -------------------------------------------------------------------------------- 1 | { 2 | "actions": [ 3 | { 4 | "id": "executeWriteData", 5 | "type": "ExecuteFunction", 6 | "functionName": "writeData" 7 | }, 8 | { 9 | "id": "showTaskpaneResCFSample", 10 | "type": "ShowTaskpane" 11 | } 12 | ], 13 | "tabs": [ 14 | { 15 | "id":"CtxTab1", 16 | "label": "CtxTab1_label", 17 | "visible": true, 18 | "groups": [ 19 | { 20 | "id": "CustomGroup111", 21 | "label": "Group11Title", 22 | "icon": [ 23 | { 24 | "size": 16, 25 | "sourceLocation":"https://officedev.github.io/custom-functions/addins/CFSample5/Images/Button16x16.png" 26 | }, 27 | { 28 | "size": 32, 29 | "sourceLocation":"https://officedev.github.io/custom-functions/addins/CFSample5/Images/Button32x32.png" 30 | }, 31 | { 32 | "size": 80, 33 | "sourceLocation":"https://officedev.github.io/custom-functions/addins/CFSample5/Images/Button80x80.png" 34 | } 35 | ], 36 | "controls": [ 37 | { 38 | "type": "Button", 39 | "id": "CtxBt111", 40 | "enabled": false, 41 | "icon": [ 42 | { 43 | "size": 16, 44 | "sourceLocation":"https://officedev.github.io/custom-functions/addins/CFSample5/Images/Button16x16.png" 45 | }, 46 | { 47 | "size": 32, 48 | "sourceLocation":"https://officedev.github.io/custom-functions/addins/CFSample5/Images/Button16x16.png" 49 | }, 50 | { 51 | "size": 80, 52 | "sourceLocation":"https://officedev.github.io/custom-functions/addins/CFSample5/Images/Button80x80.png" 53 | } 54 | ], 55 | "label": "STP_CtxBt111", 56 | "toolTip": "Btn111ToolTip", 57 | "superTip": { 58 | "title": "Btn111SupertTipeTitle", 59 | "description": "Btn111SuperTipDesc" 60 | }, 61 | "actionId": "showTaskpaneResCFSample" 62 | }, 63 | { 64 | "type": "Button", 65 | "id": "CtxBt112", 66 | "enabled": true, 67 | "icon": [ 68 | { 69 | "size": 16, 70 | "sourceLocation":"https://officedev.github.io/custom-functions/addins/CFSample5/Images/Button16x16.png" 71 | }, 72 | { 73 | "size": 32, 74 | "sourceLocation":"https://officedev.github.io/custom-functions/addins/CFSample5/Images/Button16x16.png" 75 | }, 76 | { 77 | "size": 80, 78 | "sourceLocation":"https://officedev.github.io/custom-functions/addins/CFSample5/Images/Button80x80.png" 79 | } 80 | ], 81 | "label": "ExeFunc_CtxBt112", 82 | "toolTip": "Btn112ToolTip", 83 | "superTip": { 84 | "title": "Btn112SupertTipeTitle", 85 | "description": "Btn112SuperTipDesc" 86 | }, 87 | "actionId": "executeWriteData" 88 | } 89 | ] 90 | } 91 | ] 92 | } 93 | ] 94 | }; -------------------------------------------------------------------------------- /addins/CFSample5/Images/Button16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/CFSample5/Images/Button16x16.png -------------------------------------------------------------------------------- /addins/CFSample5/Images/Button32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/CFSample5/Images/Button32x32.png -------------------------------------------------------------------------------- /addins/CFSample5/Images/Button80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/CFSample5/Images/Button80x80.png -------------------------------------------------------------------------------- /addins/CFSample5/copytodevcatalog.cmd: -------------------------------------------------------------------------------- 1 | copy %~dp073da2e60-d61f-4538-97d0-9cf5e104186d-devcatalog.xml %SRCROOT%\richapi\Test\RichApiAgaveWeb\devcatalog\73da2e60-d61f-4538-97d0-9cf5e104186d.xml -------------------------------------------------------------------------------- /addins/CFSample5/custom-functions.js: -------------------------------------------------------------------------------- 1 |  2 | function SetRuntimeVisibleHelper(visible) { 3 | var p; 4 | if (visible) { 5 | p = Office.addin.showAsTaskpane(); 6 | } 7 | else { 8 | p = Office.addin.hide(); 9 | } 10 | 11 | return p.then(function () { 12 | return visible; 13 | }) 14 | .catch(function (error) { 15 | return error.code; 16 | }); 17 | } 18 | 19 | function SetStartupBehaviorHelper(state) { 20 | return Office.addin.setStartupBehavior(state) 21 | .then(function () { 22 | return state; 23 | }) 24 | .catch(function (error) { 25 | return error.code; 26 | }); 27 | } 28 | 29 | CustomFunctions.associate('GetCFDataRangeValue', function(address){ 30 | var context = new Excel.RequestContext(); 31 | var sheet = context.workbook.worksheets.getItemOrNullObject("CFData"); 32 | var range; 33 | return context.sync() 34 | .then(function() { 35 | if (sheet.isNullObject) { 36 | sheet = context.workbook.worksheets.add("CFData"); 37 | } 38 | return context.sync(); 39 | }) 40 | .then(function() { 41 | range = sheet.getRange(address); 42 | range.load(); 43 | return context.sync(); 44 | }) 45 | .then(function() { 46 | return range.values[0][0]; 47 | }); 48 | }); 49 | 50 | CustomFunctions.associate('GetRangeValue', function(address){ 51 | var context = new Excel.RequestContext(); 52 | var range = context.workbook.worksheets.getActiveWorksheet().getRange(address); 53 | range.load(); 54 | return context.sync() 55 | .then(function() { 56 | return range.values[0][0]; 57 | }); 58 | }); 59 | 60 | 61 | CustomFunctions.associate('SetRangeValue', function(address, value){ 62 | var context = new Excel.RequestContext(); 63 | var range = context.workbook.worksheets.getActiveWorksheet().getRange(address); 64 | range.values = [[value]]; 65 | range.load(); 66 | return context.sync() 67 | .then(function() { 68 | return range.values[0][0]; 69 | }); 70 | }); 71 | 72 | CustomFunctions.associate('GetValue', function() { 73 | if (typeof(g_sharedAppData) === 'object') { 74 | return g_sharedAppData.value; 75 | } 76 | 77 | return null; 78 | }); 79 | CustomFunctions.associate('SetValue', function(value) { 80 | if (typeof(g_sharedAppData) === 'object') { 81 | g_sharedAppData.value = value; 82 | return value; 83 | } 84 | 85 | return null; 86 | }); 87 | 88 | CustomFunctions.associate('GetRuntimeState', function() { 89 | // _getState() is the internal API and it's only for Microsoft engineer team internal testing purpose. Please do not use it. 90 | return Office.addin._getState().then(function (value) { 91 | return value; 92 | }) 93 | .catch(function (error) { 94 | return error.code; 95 | }); 96 | }); 97 | 98 | CustomFunctions.associate('GetVisibility', function() { 99 | return g_BgAppVisibilityState.value; 100 | }); 101 | 102 | CustomFunctions.associate('Show', function () { 103 | return SetRuntimeVisibleHelper(true); 104 | }); 105 | 106 | CustomFunctions.associate('DelayShow', function () { 107 | setTimeout(function () { 108 | return SetRuntimeVisibleHelper(true); 109 | }, 5000); 110 | }); 111 | 112 | CustomFunctions.associate('Hide', function () { 113 | return SetRuntimeVisibleHelper(false); 114 | }); 115 | 116 | CustomFunctions.associate('GetStartupBehavior', function() { 117 | return Office.addin.getStartupBehavior() 118 | .then(function (value) { 119 | if (typeof(g_BgAppRuntimeStartupState) === 'object') { 120 | g_BgAppRuntimeStartupState.value = value; 121 | } 122 | return value.toString(); 123 | }) 124 | .catch(function (error) { 125 | return error.code; 126 | }); 127 | }); 128 | 129 | 130 | 131 | CustomFunctions.associate('SetStartupBehavior', function (behavior) { 132 | return SetStartupBehaviorHelper(behavior); 133 | }); 134 | 135 | CustomFunctions.associate('ERROROUT', function (how) { 136 | if (how === 'throw') { 137 | throw { prop1: "Jabberwocky thrown" }; 138 | } 139 | else if (how === 'promise') { 140 | return Promise.reject({ prop1: "Jabberwocky rejected" }); 141 | } 142 | return undefined; 143 | }); 144 | -------------------------------------------------------------------------------- /addins/CFSample5/custom-functions.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": [ 3 | { 4 | "id": "GetCFDataRangeValue", 5 | "name": "GetCFDataRangeValue", 6 | "description": "Get range value from CFData sheet", 7 | "parameters": [ 8 | { 9 | "name": "address", 10 | "type": "string" 11 | } 12 | ] 13 | }, 14 | { 15 | "id": "GetRangeValue", 16 | "name": "GetRangeValue", 17 | "description": "Get range value", 18 | "parameters": [ 19 | { 20 | "name": "address", 21 | "type": "string" 22 | } 23 | ] 24 | }, 25 | { 26 | "id": "SetRangeValue", 27 | "name": "SetRangeValue", 28 | "description": "Set range value", 29 | "parameters": [ 30 | { 31 | "name": "address", 32 | "type": "string" 33 | }, 34 | { 35 | "name": "value" 36 | } 37 | ] 38 | }, 39 | { 40 | "id": "GetValue", 41 | "name": "GetValue", 42 | "description": "Get shared value" 43 | }, 44 | { 45 | "id": "SetValue", 46 | "name": "SetValue", 47 | "description": "Set shared value", 48 | "parameters": [ 49 | { 50 | "name": "value" 51 | } 52 | ] 53 | }, 54 | { 55 | "id": "Show", 56 | "name": "Show", 57 | "description": "Show taskpane" 58 | }, 59 | { 60 | "id": "DelayShow", 61 | "name": "DelayShow", 62 | "description": "DelayShow taskpane" 63 | }, 64 | { 65 | "id": "Hide", 66 | "name": "Hide", 67 | "description": "Show taskpane" 68 | }, 69 | { 70 | "id": "GetRuntimeState", 71 | "name": "GetRuntimeState", 72 | "description": "Get Runtime State" 73 | }, 74 | { 75 | "id": "GetVisibility", 76 | "name": "GetVisibility", 77 | "description": "Get visitiblity" 78 | }, 79 | { 80 | "id": "SetStartupBehavior", 81 | "name": "SetStartupBehavior", 82 | "description": "Set Runtime startup behavior", 83 | "parameters": [ 84 | { 85 | "name": "behavior", 86 | "type": "string" 87 | } 88 | ] 89 | }, 90 | { 91 | "id": "GetStartupBehavior", 92 | "name": "GetStartupBehavior", 93 | "description": "Get Runtime startup behavior" 94 | }, 95 | { 96 | "id": "ERROROUT", 97 | "name": "ERROROUT", 98 | "description": "Errors out", 99 | "helpUrl": "http://dev.office.com", 100 | "result": { 101 | "type": "number" 102 | }, 103 | "parameters": [ 104 | { 105 | "name": "how", 106 | "description": "'throw' | 'promise'", 107 | "type": "string" 108 | } 109 | ] 110 | } 111 | ] 112 | } 113 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/OfficeThemes.css: -------------------------------------------------------------------------------- 1 | /* The following classes describe the common theme information for office documents */ 2 | 3 | 4 | 5 | /* Basic Font and Background Colors for text */ 6 | .office-docTheme-primary-fontColor { color:#000000; } 7 | .office-docTheme-primary-bgColor { background-color:#ffffff; } 8 | .office-docTheme-secondary-fontColor { color: #000000; } 9 | .office-docTheme-secondary-bgColor { background-color: #ffffff; } 10 | 11 | 12 | /* Accent color definitions for fonts */ 13 | .office-contentAccent1-color { color:#5b9bd5; } 14 | .office-contentAccent2-color { color:#ed7d31; } 15 | .office-contentAccent3-color { color:#a5a5a5; } 16 | .office-contentAccent4-color { color:#ffc000; } 17 | .office-contentAccent5-color { color:#4472c4; } 18 | .office-contentAccent6-color { color:#70ad47; } 19 | 20 | /* Accent color for backgrounds */ 21 | .office-contentAccent1-bgColor { background-color:#5b9bd5; } 22 | .office-contentAccent2-bgColor { background-color:#ed7d31; } 23 | .office-contentAccent3-bgColor { background-color:#a5a5a5; } 24 | .office-contentAccent4-bgColor { background-color:#ffc000; } 25 | .office-contentAccent5-bgColor { background-color:#4472c4; } 26 | .office-contentAccent6-bgColor { background-color:#70ad47; } 27 | 28 | /* Accent color for borders */ 29 | .office-contentAccent1-borderColor { border-color:#5b9bd5; } 30 | .office-contentAccent2-borderColor { border-color:#ed7d31; } 31 | .office-contentAccent3-borderColor { border-color:#a5a5a5; } 32 | .office-contentAccent4-borderColor { border-color:#ffc000; } 33 | .office-contentAccent5-borderColor { border-color:#4472c4; } 34 | .office-contentAccent6-borderColor { border-color:#70ad47; } 35 | 36 | /* links */ 37 | .office-a {color: #0563c1; } 38 | .office-a:visited { color: #954f72; } 39 | 40 | /* Body Fonts */ 41 | .office-bodyFont-eastAsian { } /* East Asian name of the Font */ 42 | .office-bodyFont-latin { font-family:"Calibri"; } /* Latin name of the Font */ 43 | .office-bodyFont-script { } /* Script name of the Font */ 44 | .office-bodyFont-localized { font-family:"Calibri"; } /* Localized name of the Font. contains the default font name according to the culture currently used in Office */ 45 | 46 | /* Headers Font */ 47 | .office-headerFont-eastAsian { } 48 | .office-headerFont-latin { font-family:"Calibri Light"; } 49 | .office-headerFont-script { } 50 | .office-headerFont-localized { font-family:"Calibri Light"; } 51 | 52 | 53 | 54 | /* The following classes define the Office themes. This classes make sense for the taskpane apps */ 55 | 56 | /* Basic Font and Background Colors for PPT */ 57 | .office-officeTheme-primary-fontColor { color:#b83b1d; } 58 | .office-officeTheme-primary-bgColor { background-color:#dedede; } 59 | .office-officeTheme-secondary-fontColor { color:#262626; } 60 | .office-officeTheme-secondary-bgColor { background-color:#ffffff; } 61 | 62 | /* Basic Font and Background Colors for Outlook Web Access */ 63 | /* remove comments and delete other apps officeTheme classes to get OWA defaults 64 | .office-officeTheme-primary-fontColor { color:#ea4400; } 65 | .office-officeTheme-primary-bgColor { background-color:#ffffff; } 66 | .office-officeTheme-secondary-fontColor { color:#ffffff; } 67 | .office-officeTheme-secondary-bgColor { background-color:#ea4400; } 68 | */ -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.Animations.RTL.Output.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // RTL overrides for Fabric Animations 7 | 8 | 9 | @import "Fabric.Animations.Output"; 10 | @import "Fabric.Animations.RTL"; 11 | 12 | // slideRightIn40 13 | .ms-u-slideRightIn40 { 14 | @include ms-u-slideRightIn40; 15 | } 16 | 17 | // slideLeftIn40 18 | .ms-u-slideLeftIn40 { 19 | @include ms-u-slideLeftIn40; 20 | } 21 | 22 | // slideRightIn400 23 | .ms-u-slideRightIn400 { 24 | @include ms-u-slideRightIn400; 25 | } 26 | 27 | // slideLeftIn400 28 | .ms-u-slideLeftIn400 { 29 | @include ms-u-slideLeftIn400; 30 | } 31 | 32 | // slideRightOut40 33 | .ms-u-slideRightOut40 { 34 | @include ms-u-slideRightOut40; 35 | } 36 | 37 | // slideLeftOut40 38 | .ms-u-slideLeftOut40 { 39 | @include ms-u-slideLeftOut40; 40 | } 41 | 42 | // slideRightOut400 43 | .ms-u-slideRightOut400 { 44 | @include ms-u-slideRightOut400; 45 | } 46 | 47 | // slideLeftOut400 48 | .ms-u-slideLeftOut400 { 49 | @include ms-u-slideLeftOut400; 50 | } 51 | 52 | // rotate90deg 53 | .ms-u-rotate90deg { 54 | @include ms-u-rotate90deg; 55 | } 56 | 57 | // rotateN90deg 58 | .ms-u-rotateN90deg { 59 | @include ms-u-rotateN90deg; 60 | } 61 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.Components.scss: -------------------------------------------------------------------------------- 1 | @import 'Fabric.Common'; 2 | 3 | @import '../components/Breadcrumb/Breadcrumb'; 4 | @import '../components/Button/Button'; 5 | @import '../components/Callout/Callout'; 6 | @import '../components/ChoiceField/ChoiceField'; 7 | @import '../components/CommandBar/CommandBar'; 8 | @import '../components/ContextualMenu/ContextualMenu'; 9 | @import '../components/DatePicker/DatePicker'; 10 | @import '../components/Dialog/Dialog'; 11 | @import '../components/Dropdown/Dropdown'; 12 | @import '../components/Label/Label'; 13 | @import '../components/Link/Link'; 14 | @import '../components/List/List'; 15 | @import '../components/ListItem/ListItem'; 16 | @import '../components/MessageBanner/MessageBanner'; 17 | @import '../components/NavBar/NavBar'; 18 | @import '../components/OrgChart/OrgChart'; 19 | @import '../components/Overlay/Overlay'; 20 | @import '../components/Panel/Panel'; 21 | @import '../components/PeoplePicker/PeoplePicker'; 22 | @import '../components/Persona/Persona'; 23 | @import '../components/PersonaCard/PersonaCard'; 24 | @import '../components/Pivot/Pivot'; 25 | @import '../components/ProgressIndicator/ProgressIndicator'; 26 | @import '../components/SearchBox/SearchBox'; 27 | @import '../components/Spinner/Spinner'; 28 | @import '../components/Table/Table'; 29 | @import '../components/TextField/TextField'; 30 | @import '../components/Toggle/Toggle'; 31 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.Grid.Output.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Fluid 12-column grids for small, medium, and large devices 7 | 8 | @import "Fabric.Grid"; 9 | 10 | //== Grid container (same for all sizes) 11 | // 12 | .ms-Grid { 13 | @include ms-Grid; 14 | } 15 | 16 | //== Grid rows (pull first and last column out) 17 | // 18 | .ms-Grid-row { 19 | @include ms-Grid-row; 20 | } 21 | 22 | //== Grid cells 23 | // 24 | .ms-Grid-col { 25 | @include ms-Grid-col; 26 | } 27 | 28 | // For nested grids (a grid inside a column), removing the padding 29 | // so that the nested grid's columns go to the edge of the parent's. 30 | .ms-Grid-col .ms-Grid { 31 | padding: 0; 32 | } 33 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.Icons.Font.Output.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Icon font-family definition 7 | 8 | /* 9 | Your use of the content in the files referenced here are subject to the terms of the license at http://aka.ms/fabric-font-license 10 | */ 11 | 12 | @import "Fabric.Typography.Fonts"; 13 | 14 | @font-face { 15 | font-family: 'Office365Icons'; 16 | src: url('#{$ms-font-directory}/icons/office365icons.eot?'); 17 | src: url('#{$ms-font-directory}/icons/office365icons.eot?#iefix') format('embedded-opentype'), 18 | url('#{$ms-font-directory}/icons/office365icons.woff?') format('woff'), 19 | url('#{$ms-font-directory}/icons/office365icons.ttf?') format('truetype'), 20 | url('#{$ms-font-directory}/icons/office365icons.svg?#office365icons') format('svg'); 21 | font-weight: normal; 22 | font-style: normal; 23 | } 24 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.Icons.RTL.Output.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // RTL overrides for Fabricicons 7 | 8 | 9 | @import 'Fabric.Icons.Output'; 10 | 11 | // Flip icons with 'directionality' 12 | .ms-Icon--question, 13 | .ms-Icon--calendar, 14 | .ms-Icon--folder, 15 | .ms-Icon--chat, 16 | .ms-Icon--listBullets, 17 | .ms-Icon--folderMove, 18 | .ms-Icon--mailSend, 19 | .ms-Icon--reply, 20 | .ms-Icon--play, 21 | .ms-Icon--replyAll, 22 | .ms-Icon--refresh, 23 | .ms-Icon--questionReverse, 24 | .ms-Icon--notRecurring, 25 | .ms-Icon--tasks, 26 | .ms-Icon--check, 27 | .ms-Icon--arrowLeft, 28 | .ms-Icon--arrowRight, 29 | .ms-Icon--directions, 30 | .ms-Icon--caretLeft, 31 | .ms-Icon--caretRight, 32 | .ms-Icon--caretUpLeft, 33 | .ms-Icon--caretUpRight, 34 | .ms-Icon--caretDownRight, 35 | .ms-Icon--caretDownLeft, 36 | .ms-Icon--note, 37 | .ms-Icon--noteReply, 38 | .ms-Icon--noteForward, 39 | .ms-Icon--taskRecurring, 40 | .ms-Icon--documentReply, 41 | .ms-Icon--documentForward, 42 | .ms-Icon--reactivate, 43 | .ms-Icon--chevronLeft, 44 | .ms-Icon--chevronRight, 45 | .ms-Icon--notebook, 46 | .ms-Icon--chevronsLeft, 47 | .ms-Icon--chevronsRight, 48 | .ms-Icon--receiptForward, 49 | .ms-Icon--receiptReply, 50 | .ms-Icon--receiptCheck, 51 | .ms-Icon--eventShare, 52 | .ms-Icon--oofReply, 53 | .ms-Icon--voicemailReply, 54 | .ms-Icon--voicemailForward, 55 | .ms-Icon--post, 56 | .ms-Icon--toggle, 57 | .ms-Icon--late, 58 | .ms-Icon--eventRecurring, 59 | .ms-Icon--cart, 60 | .ms-Icon--socialListening, 61 | .ms-Icon--replyAlt, 62 | .ms-Icon--replyAllAlt, 63 | .ms-Icon--graph, 64 | .ms-Icon--pinLeft, 65 | .ms-Icon--chart, 66 | .ms-Icon--page, 67 | .ms-Icon--document, 68 | .ms-Icon--metadata, 69 | .ms-Icon--pointItem, 70 | .ms-Icon--dropdown, 71 | .ms-Icon--checkbox, 72 | .ms-Icon--reload, 73 | .ms-Icon--multiChoice, 74 | .ms-Icon--contactForm, 75 | .ms-Icon--inboxCheck, 76 | .ms-Icon--checkboxCheck, 77 | .ms-Icon--folderSearch, 78 | .ms-Icon--listCheck, 79 | .ms-Icon--listGroup, 80 | .ms-Icon--timeline 81 | .ms-Icon--mailCheck, 82 | .ms-Icon--listCheckbox, 83 | .ms-Icon--sunQuestion, 84 | .ms-Icon--chevronThinLeft, 85 | .ms-Icon--chevronThinRight, 86 | .ms-Icon--chevronThickLeft, 87 | .ms-Icon--chevronThickRight, 88 | .ms-Icon--documentLandscape, 89 | .ms-Icon--peopleCheck, 90 | .ms-Icon--caretLeftOutline, 91 | .ms-Icon--caretRightOutline, 92 | .ms-Icon--mailSync, 93 | .ms-Icon--peopleSync, 94 | .ms-Icon--checkPeople, 95 | .ms-Icon--sortLines, 96 | .ms-Icon--triangleRight:before, 97 | .ms-Icon--triangleLeft:before, 98 | .ms-Icon--contactPublic:before, 99 | .ms-Icon--triangleEmptyRight:before, 100 | .ms-Icon--triangleEmptyLeft:before, 101 | .ms-Icon--fileDocument:before, 102 | .ms-Icon--listGroup2:before, 103 | .ms-Icon--copy:before, 104 | .ms-Icon--sections:before, 105 | .ms-Icon--arrowUpRight:before, 106 | .ms-Icon--arrowDownRight:before, 107 | .ms-Icon--arrowDownLeft:before, 108 | .ms-Icon--arrowUpLeft:before, 109 | .ms-Icon--bundle:before { 110 | -moz-transform: scaleX(-1); 111 | -webkit-transform: scaleX(-1); 112 | -o-transform: scaleX(-1); 113 | transform: scaleX(-1); 114 | } -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.RTL.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // OSS Framework Design Language 5 | // -------------------------------------------------- 6 | // Fabric Core Module Loader (RTL) 7 | 8 | // Common utilities 9 | @import './Fabric.Utilities.Output'; 10 | @import './Fabric.ZIndex.Variables'; 11 | @import './Fabric.Mixins'; 12 | 13 | // Colors 14 | @import './Fabric.Color.Variables'; 15 | @import './Fabric.Color.Mixins.Output'; 16 | 17 | // Typography 18 | @import './Fabric.Typography.Variables'; 19 | @import './Fabric.Typography.Fonts.Output'; 20 | @import './Fabric.Typography.Output'; 21 | @import './Fabric.Typography.Language.Overrides.Output'; 22 | 23 | // Icons 24 | @import './Fabric.Icons.Font.Output'; 25 | @import './Fabric.Icons.RTL.Output'; 26 | 27 | // Animations 28 | @import './Fabric.Animations.RTL.Output'; 29 | 30 | // Responsive 31 | @import './Fabric.Responsive.Variables'; 32 | @import './Fabric.Responsive.Utilities.Output'; 33 | 34 | // Grid 35 | @import './Fabric.Grid.Output'; 36 | 37 | // Office colors 38 | @import './Office.Color.Variables'; -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.Typography.Fonts.Output.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Font definitions 7 | 8 | @import "Fabric.Typography.Fonts"; 9 | 10 | // Additional @font-face rules for the Leelawadee font. 11 | @font-face { 12 | font-family: "Leelawadee UI Bold"; 13 | src: url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Bold.eot?#iefix') format('embedded-opentype'), 14 | url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Bold.woff') format('woff'), 15 | url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Bold.ttf') format('truetype'), 16 | url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Bold#LeelawadeeUI-Bold') format('svg'); 17 | font-weight: normal; 18 | font-style: normal; 19 | } 20 | 21 | @font-face { 22 | font-family: "Leelawadee UI"; 23 | src: url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Regular.eot?#iefix') format('embedded-opentype'), 24 | url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Regular.woff') format('woff'), 25 | url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Regular.ttf') format('truetype'), 26 | url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Regular#LeelawadeeUI-Regular') format('svg'); 27 | font-weight: normal; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: "Leelawadee UI Semilight"; 33 | src: url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Semilight.eot?#iefix') format('embedded-opentype'), 34 | url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Semilight.woff') format('woff'), 35 | url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Semilight.ttf') format('truetype'), 36 | url('#{$ms-font-directory}/LeelawadeeUI-Thai/LeelawadeeUI-Semilight#LeelawadeeUI-Semilight') format('svg'); 37 | font-weight: normal; 38 | font-style: normal; 39 | } 40 | 41 | 42 | // Mixins to generate language-specific font faces. 43 | @include SegoeUIArabicLight; 44 | @include SegoeUIArabicRegular; 45 | @include SegoeUIArabicSemibold; 46 | @include SegoeUIArabicSemilight; 47 | 48 | @include SegoeUICyrillicLight; 49 | @include SegoeUICyrillicRegular; 50 | @include SegoeUICyrillicSemibold; 51 | @include SegoeUICyrillicSemilight; 52 | 53 | @include SegoeUIEastEuropeanLight; 54 | @include SegoeUIEastEuropeanRegular; 55 | @include SegoeUIEastEuropeanSemibold; 56 | @include SegoeUIEastEuropeanSemilight; 57 | 58 | @include SegoeUIGreekLight; 59 | @include SegoeUIGreekRegular; 60 | @include SegoeUIGreekSemibold; 61 | @include SegoeUIGreekSemilight; 62 | 63 | @include SegoeUIHebrewLight; 64 | @include SegoeUIHebrewRegular; 65 | @include SegoeUIHebrewSemibold; 66 | @include SegoeUIHebrewSemilight; 67 | 68 | @include SegoeUIVietnameseLight; 69 | @include SegoeUIVietnameseRegular; 70 | @include SegoeUIVietnameseSemibold; 71 | @include SegoeUIVietnameseSemilight; 72 | 73 | @include SegoeUIWestEuropeanLight; 74 | @include SegoeUIWestEuropeanRegular; 75 | @include SegoeUIWestEuropeanSemibold; 76 | @include SegoeUIWestEuropeanSemilight; -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.Typography.Language.Overrides.Output.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Language override definitions 7 | 8 | @import "./Fabric.Typography.Language.Overrides"; 9 | 10 | // Generate the override classes for non-distributed fonts. 11 | @include language-override-system-fonts(ja-JP, $ms-font-stack-japanese); 12 | @include language-override-system-fonts(ko-KR, $ms-font-stack-korean); 13 | @include language-override-system-fonts(ch-ZHS, $ms-font-stack-chinese-simplified); 14 | @include language-override-system-fonts(ch-ZHT, $ms-font-stack-chinese-traditional); 15 | @include language-override-system-fonts(hi-IN, $ms-font-stack-hindi); 16 | 17 | // Generate the override classes for web fonts. 18 | // Leelawadee 19 | // th-TH 20 | @include language-override-web-fonts(th-TH, $ms-font-family-semilight-leelawadee, $ms-font-family-semilight-leelawadee, $ms-font-family-regular-leelawadee, $ms-font-family-semibold-leelawadee); 21 | 22 | // Arabic 23 | // ar 24 | @include language-override-web-fonts(ar, $ms-font-family-light-arabic, $ms-font-family-semilight-arabic, $ms-font-family-regular-arabic, $ms-font-family-semibold-arabic); 25 | 26 | // Cyrillic 27 | // bg-BG, ru-RU, uk-UA 28 | @include language-override-web-fonts(bg-BG, $ms-font-family-light-cyrillic, $ms-font-family-semilight-cyrillic, $ms-font-family-regular-cyrillic, $ms-font-family-semibold-cyrillic); 29 | @include language-override-web-fonts(ru-RU, $ms-font-family-light-cyrillic, $ms-font-family-semilight-cyrillic, $ms-font-family-regular-cyrillic, $ms-font-family-semibold-cyrillic); 30 | @include language-override-web-fonts(uk-UA, $ms-font-family-light-cyrillic, $ms-font-family-semilight-cyrillic, $ms-font-family-regular-cyrillic, $ms-font-family-semibold-cyrillic); 31 | 32 | // East European 33 | // cs-CZ, et-EE, hr-HR, hu-HU, lt-LT, pl-PL, lt-sr-SP, tr-TR, sk-SK, kk-KZ 34 | @include language-override-web-fonts(cs-CZ, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 35 | @include language-override-web-fonts(et-EE, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 36 | @include language-override-web-fonts(hr-HR, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 37 | @include language-override-web-fonts(hu-HU, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 38 | @include language-override-web-fonts(lt-LT, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 39 | @include language-override-web-fonts(lv-LV, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 40 | @include language-override-web-fonts(pl-PL, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 41 | @include language-override-web-fonts(lt-sr-SP, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 42 | @include language-override-web-fonts(tr-TR, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 43 | @include language-override-web-fonts(sk-SK, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 44 | @include language-override-web-fonts(kk-KZ, $ms-font-family-light-eastEuropean, $ms-font-family-semilight-eastEuropean, $ms-font-family-regular-eastEuropean, $ms-font-family-semibold-eastEuropean); 45 | 46 | // Greek 47 | // el-GR 48 | @include language-override-web-fonts(el-GR, $ms-font-family-light-greek, $ms-font-family-semilight-greek, $ms-font-family-regular-greek, $ms-font-family-semibold-greek); 49 | 50 | // Hebrew 51 | // he-IL 52 | @include language-override-web-fonts(he-IL, $ms-font-family-light-hebrew, $ms-font-family-semilight-hebrew, $ms-font-family-regular-hebrew, $ms-font-family-semibold-hebrew); 53 | 54 | // Vietnamese 55 | // vi-VN 56 | @include language-override-web-fonts(vi-VN, $ms-font-family-light-vietnamese, $ms-font-family-semilight-vietnamese, $ms-font-family-regular-vietnamese, $ms-font-family-semibold-vietnamese); -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.Utilities.Output.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Utility classes and mixins used throughout Fabric. 7 | 8 | @import "Fabric.Utilities"; 9 | 10 | // The best box is a border box. 11 | .ms-u-borderBox, .ms-u-borderBox:before, .ms-u-borderBox:after { 12 | @include ms-u-borderBox; 13 | } 14 | 15 | // Ensures the block expands to the full height to enclose its floated childen. 16 | .ms-u-clearfix { 17 | @include ms-u-clearfix; 18 | } 19 | 20 | // Basic border-box, margin, and padding reset. 21 | .ms-u-normalize { 22 | @include ms-u-normalize; 23 | } 24 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/Fabric.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // Core Module Loader 6 | 7 | 8 | // Common utilities 9 | @import './Fabric.Utilities.Output'; 10 | @import './Fabric.ZIndex.Variables'; 11 | @import './Fabric.Mixins'; 12 | 13 | // Colors 14 | @import './Fabric.Color.Variables'; 15 | @import './Fabric.Color.Mixins.Output'; 16 | 17 | // Typography 18 | @import './Fabric.Typography.Variables'; 19 | @import './Fabric.Typography.Output'; 20 | @import './Fabric.Typography.Fonts.Output'; 21 | @import './Fabric.Typography.Language.Overrides.Output'; 22 | 23 | // Icons 24 | @import './Fabric.Icons.Font.Output'; 25 | @import './Fabric.Icons.Output'; 26 | 27 | // Animations 28 | @import './Fabric.Animations.Output'; 29 | 30 | // Responsive 31 | @import './Fabric.Responsive.Variables'; 32 | @import './Fabric.Responsive.Utilities.Variables'; 33 | @import './Fabric.Responsive.Utilities.Output'; 34 | 35 | // Grid 36 | @import './Fabric.Grid.Output'; 37 | 38 | // Office colors 39 | @import './Office.Color.Variables'; 40 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Animations.RTL.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // RTL overrides for Fabric Animations 7 | 8 | 9 | @import 'Fabric.Animations'; 10 | 11 | // slideRightIn40 12 | @mixin ms-u-slideRightIn40 { 13 | @include animationMix((fadeIn, slideLeft40), $ms-duration3, $ms-ease1); 14 | } 15 | 16 | // slideLeftIn40 17 | @mixin ms-u-slideLeftIn40 { 18 | @include animationMix((fadeIn, slideRight40), $ms-duration3, $ms-ease1); 19 | } 20 | 21 | // slideRightIn400 22 | @mixin ms-u-slideRightIn400 { 23 | @include animationMix((fadeIn, slideLeft400), $ms-duration3, $ms-ease1); 24 | } 25 | 26 | // slideLeftIn400 27 | @mixin ms-u-slideLeftIn400 { 28 | @include animationMix((fadeIn, slideRight400), $ms-duration3, $ms-ease1); 29 | } 30 | 31 | // slideRightOut40 32 | @mixin ms-u-slideRightOut40 { 33 | @include animationMix((fadeOut, slideLeftOut40), $ms-duration1, $ms-ease2); 34 | } 35 | 36 | // slideLeftOut40 37 | @mixin ms-u-slideLeftOut40 { 38 | @include animationMix((fadeOut, slideRightOut40), $ms-duration1, $ms-ease2); 39 | } 40 | 41 | // slideRightOut400 42 | @mixin ms-u-slideRightOut400 { 43 | @include animationMix((fadeOut, slideLeftOut400), $ms-duration1, $ms-ease2); 44 | } 45 | 46 | // slideLeftOut400 47 | @mixin ms-u-slideLeftOut400 { 48 | @include animationMix((fadeOut, slideRightOut400), $ms-duration1, $ms-ease2); 49 | } 50 | 51 | // rotate90deg 52 | @mixin ms-u-rotate90deg { 53 | @include animationMix(rotateN90, 0.1s, $ms-ease2); 54 | } 55 | 56 | // rotateN90deg 57 | @mixin ms-u-rotateN90deg { 58 | @include animationMix(rotate90, 0.1s, $ms-ease2); 59 | } 60 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Animations.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Fabric Animations 7 | 8 | 9 | // Note that all animation classes should begin with the "ms-u" utility prefix. 10 | // The original class names are deprecated and will be removed in a future release. 11 | 12 | // Variables 13 | $ms-ease1: cubic-bezier(0.1,0.9,0.2,1); 14 | $ms-ease2: cubic-bezier(0.1,0.25,0.75,0.9); 15 | $ms-duration1: 0.167s; 16 | $ms-duration2: 0.267s; 17 | $ms-duration3: 0.367s; 18 | $ms-duration4: 0.467s; 19 | 20 | 21 | // Animation mixin 22 | @mixin animationMix($ms-name, $ms-duration, $ms-ease: $ms-ease1, $ms-fillMode: both) { 23 | @include animationName($ms-name); 24 | @include animationDuration($ms-duration); 25 | @include animationTiming($ms-ease); 26 | @include animationFillMode($ms-fillMode); 27 | } 28 | 29 | // slideRightIn40 30 | @mixin ms-u-slideRightIn40 { 31 | @include animationMix((fadeIn, slideRightIn40), $ms-duration3, $ms-ease1); 32 | } 33 | 34 | // slideLeftIn40 35 | @mixin ms-u-slideLeftIn40 { 36 | @include animationMix((fadeIn, slideLeftIn40), $ms-duration3, $ms-ease1); 37 | } 38 | 39 | // slideRightIn400 40 | @mixin ms-u-slideRightIn400 { 41 | @include animationMix((fadeIn, slideRightIn400), $ms-duration3, $ms-ease1); 42 | } 43 | 44 | // slideLeftIn400 45 | @mixin ms-u-slideLeftIn400 { 46 | @include animationMix((fadeIn, slideLeft400), $ms-duration3, $ms-ease1); 47 | } 48 | 49 | // slideUpIn20 50 | @mixin ms-u-slideUpIn20 { 51 | @include animationMix((fadeIn, slideUpIn20), $ms-duration3, $ms-ease1); 52 | } 53 | 54 | // slideUpIn10 55 | @mixin ms-u-slideUpIn10 { 56 | @include animationMix((fadeIn, slideUpIn10), $ms-duration1, $ms-ease2); 57 | } 58 | 59 | // slideDownIn20 60 | @mixin ms-u-slideDownIn20 { 61 | @include animationMix((fadeIn, slideDownIn20), $ms-duration3, $ms-ease1); 62 | } 63 | 64 | // slideDownIn10 65 | @mixin ms-u-slideDownIn10 { 66 | @include animationMix((fadeIn, slideDownIn10), $ms-duration1, $ms-ease2); 67 | } 68 | 69 | // slideRightOut40 70 | @mixin ms-u-slideRightOut40 { 71 | @include animationMix((fadeOut, slideRightOut40), $ms-duration1, $ms-ease2); 72 | } 73 | 74 | // slideLeftOut40 75 | @mixin ms-u-slideLeftOut40 { 76 | @include animationMix((fadeOut, slideLeftOut40), $ms-duration1, $ms-ease2); 77 | } 78 | 79 | // slideRightOut400 80 | @mixin ms-u-slideRightOut400 { 81 | @include animationMix((fadeOut, slideRightOut400), $ms-duration1, $ms-ease2); 82 | } 83 | 84 | // slideLeftOut400 85 | @mixin ms-u-slideLeftOut400 { 86 | @include animationMix((fadeOut, slideLeftOut400), $ms-duration1, $ms-ease2); 87 | } 88 | 89 | // slideUpOut20 90 | @mixin ms-u-slideUpOut20 { 91 | @include animationMix((fadeOut, slideUpOut20), $ms-duration1, $ms-ease2); 92 | } 93 | 94 | // slideUpOut10 95 | @mixin ms-u-slideUpOut10 { 96 | @include animationMix((fadeOut, slideUpOut10), $ms-duration1, $ms-ease2); 97 | } 98 | 99 | // slideDownOut20 100 | @mixin ms-u-slideDownOut20 { 101 | @include animationMix((fadeOut, slideDownOut20), $ms-duration1, $ms-ease2); 102 | } 103 | 104 | // slideDownOut10 105 | @mixin ms-u-slideDownOut10 { 106 | @include animationMix((fadeOut, slideDownOut10), $ms-duration1, $ms-ease2); 107 | } 108 | 109 | // scaleUpIn100 110 | @mixin ms-u-scaleUpIn100 { 111 | @include animationMix((fadeIn, scaleUp100), $ms-duration3, $ms-ease1); 112 | } 113 | 114 | // scaleDownIn100 115 | @mixin ms-u-scaleDownIn100 { 116 | @include animationMix((fadeIn, scaleDown100), $ms-duration3, $ms-ease1); 117 | } 118 | 119 | // scaleUpOut103 120 | @mixin ms-u-scaleUpOut103 { 121 | @include animationMix((fadeOut, scaleUp103), $ms-duration1, $ms-ease2); 122 | } 123 | 124 | // scaleDownOut98 125 | @mixin ms-u-scaleDownOut98 { 126 | @include animationMix((fadeOut, scaleDown98), $ms-duration1, $ms-ease2); 127 | } 128 | 129 | // fadeIn 130 | @mixin ms-u-fadeIn400 { 131 | -webkit-animation-duration: $ms-duration3; 132 | -webkit-animation-name: fadeIn; 133 | -webkit-animation-fill-mode: both; 134 | animation-duration: $ms-duration3; 135 | animation-name: fadeIn; 136 | animation-fill-mode: both; 137 | } 138 | @mixin ms-u-fadeIn100 { 139 | @include ms-u-fadeIn400; 140 | -webkit-animation-duration: $ms-duration1; 141 | animation-duration: $ms-duration1; 142 | } 143 | @mixin ms-u-fadeIn200 { 144 | @include ms-u-fadeIn400; 145 | -webkit-animation-duration: $ms-duration2; 146 | animation-duration: $ms-duration2; 147 | } 148 | @mixin ms-u-fadeIn500 { 149 | @include ms-u-fadeIn400; 150 | -webkit-animation-duration: $ms-duration4; 151 | animation-duration: $ms-duration4; 152 | } 153 | 154 | // fadeOut 155 | @mixin ms-u-fadeOut400 { 156 | -webkit-animation-duration: $ms-duration3; 157 | -webkit-animation-name: fadeOut; 158 | -webkit-animation-fill-mode: both; 159 | animation-duration: $ms-duration3; 160 | animation-name: fadeOut; 161 | animation-fill-mode: both; 162 | } 163 | @mixin ms-u-fadeOut100 { 164 | @include ms-u-fadeOut400; 165 | -webkit-animation-duration: 0.1s; 166 | animation-duration: 0.1s; 167 | } 168 | @mixin ms-u-fadeOut200 { 169 | @include ms-u-fadeOut400; 170 | -webkit-animation-duration: $ms-duration1; 171 | animation-duration: $ms-duration1; 172 | } 173 | @mixin ms-u-fadeOut500 { 174 | @include ms-u-fadeOut400; 175 | -webkit-animation-duration: $ms-duration4; 176 | animation-duration: $ms-duration4; 177 | } 178 | 179 | // rotate90deg 180 | @mixin ms-u-rotate90deg { 181 | @include animationMix(rotate90, 0.1s, $ms-ease2); 182 | } 183 | 184 | // rotateN90deg 185 | @mixin ms-u-rotateN90deg { 186 | @include animationMix(rotateN90, 0.1s, $ms-ease2); 187 | } 188 | 189 | // expandCollapse400 190 | @mixin ms-u-expandCollapse400 { 191 | -webkit-transition: height $ms-duration3 $ms-ease2; 192 | transition: height $ms-duration3 $ms-ease2; 193 | } 194 | 195 | // expandCollapse200 196 | @mixin ms-u-expandCollapse200 { 197 | -webkit-transition: height $ms-duration1 $ms-ease2; 198 | transition: height $ms-duration1 $ms-ease2; 199 | } 200 | 201 | // expandCollapse100 202 | @mixin ms-u-expandCollapse100 { 203 | -webkit-transition: height 0.1s $ms-ease2; 204 | transition: height 0.1s $ms-ease2; 205 | } 206 | 207 | // delay100 208 | @mixin ms-u-delay100 { 209 | -webkit-animation-delay: $ms-duration1; 210 | animation-delay: $ms-duration1; 211 | } 212 | 213 | // delay200 214 | @mixin ms-u-delay200 { 215 | -webkit-animation-delay: 0.267s; 216 | animation-delay: 0.267s; 217 | } 218 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Color.Variables.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Fabric Core Color Variables 7 | 8 | 9 | //== Theme Colors 10 | // 11 | $ms-color-themeDarker: #004578; 12 | $ms-color-themeDark: #005a9e; 13 | $ms-color-themeDarkAlt: #106ebe; 14 | $ms-color-themePrimary: #0078d7; 15 | $ms-color-themeSecondary: #2b88d8; 16 | $ms-color-themeTertiary: #71afe5; 17 | $ms-color-themeLight: #c7e0f4; 18 | $ms-color-themeLighter: #deecf9; 19 | $ms-color-themeLighterAlt: #eff6fc; 20 | 21 | 22 | //== Grayscale Colors 23 | // 24 | $ms-color-black: #000000; 25 | $ms-color-neutralDark: #212121; 26 | $ms-color-neutralPrimary: #333333; 27 | $ms-color-neutralSecondary: #666666; 28 | $ms-color-neutralSecondaryAlt: #767676; 29 | $ms-color-neutralTertiary: #a6a6a6; 30 | $ms-color-neutralTertiaryAlt: #c8c8c8; 31 | $ms-color-neutralLight: #eaeaea; 32 | $ms-color-neutralLighter: #f4f4f4; 33 | $ms-color-neutralLighterAlt: #f8f8f8; 34 | $ms-color-white: #ffffff; 35 | 36 | 37 | //== Translucent Colors 38 | // 39 | $ms-color-blackTranslucent40: rgba(0,0,0,.4); 40 | $ms-color-whiteTranslucent40: rgba(255,255,255,.4); 41 | 42 | 43 | //== Core brand and accent colors 44 | // 45 | $ms-color-yellow: #ffb900; 46 | $ms-color-yellowLight: #fff100; 47 | $ms-color-orange: #d83b01; 48 | $ms-color-orangeLight: #ff8c00; 49 | $ms-color-redDark: #a80000; 50 | $ms-color-red: #e81123; 51 | $ms-color-magentaDark: #5c005c; 52 | $ms-color-magenta: #b4009e; 53 | $ms-color-magentaLight: #e3008c; 54 | $ms-color-purpleDark: #32145a; 55 | $ms-color-purple: #5c2d91; 56 | $ms-color-purpleLight: #b4a0ff; 57 | $ms-color-blueDark: #002050; 58 | $ms-color-blueMid: #00188f; 59 | $ms-color-blue: #0078d7; 60 | $ms-color-blueLight: #00bcf2; 61 | $ms-color-tealDark: #004b50; 62 | $ms-color-teal: #008272; 63 | $ms-color-tealLight: #00b294; 64 | $ms-color-greenDark: #004b1c; 65 | $ms-color-green: #107c10; 66 | $ms-color-greenLight: #bad80a; 67 | 68 | 69 | //== Other Colors 70 | // 71 | $ms-color-error: $ms-color-redDark; 72 | $ms-color-errorBackground: #fde7e9; 73 | $ms-color-success: $ms-color-green; 74 | $ms-color-successBackground: #dff6dd; 75 | $ms-color-alert: $ms-color-orange; 76 | $ms-color-alertBackground: $ms-color-neutralLighter; 77 | $ms-color-infoBackground: $ms-color-neutralLighter; 78 | $ms-color-info: $ms-color-green; 79 | $ms-color-orangeLighter: #ea4300; -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Common.scss: -------------------------------------------------------------------------------- 1 | @import "./Fabric.Animations"; 2 | @import "./Fabric.Color.Mixins"; 3 | @import "./Fabric.Color.Variables"; 4 | @import "./Fabric.Grid"; 5 | @import "./Fabric.Icons"; 6 | @import "./Fabric.Mixins"; 7 | @import './Fabric.Responsive.Utilities.Variables'; 8 | @import "./Fabric.Responsive.Variables"; 9 | @import "./Fabric.Typography"; 10 | @import "./Fabric.Typography.Fonts"; 11 | @import "./Fabric.Typography.Variables"; 12 | @import "./Fabric.Utilities"; 13 | @import "./Fabric.ZIndex.Variables"; 14 | @import "./Office.Color.Variables"; -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Grid.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Fluid 12-column grids for small, medium, and large devices 7 | 8 | 9 | //== Grid container (same for all sizes) 10 | // 11 | @mixin ms-Grid { 12 | @include ms-u-borderBox; 13 | @include ms-u-clearfix; 14 | padding: 0 8px; 15 | } 16 | 17 | //== Grid rows (pull first and last column out) 18 | // 19 | @mixin ms-Grid-row { 20 | margin: 0 -8px; 21 | @include ms-u-borderBox; 22 | @include ms-u-clearfix; 23 | } 24 | 25 | //== Grid cells 26 | // 27 | @mixin ms-Grid-col { 28 | position: relative; 29 | min-height: 1px; 30 | padding-left: 8px; 31 | padding-right: 8px; 32 | @include ms-u-borderBox; 33 | float: left; 34 | } -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Mixins.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Vendor-prefixed mixins 7 | 8 | 9 | // Border radius. 10 | @mixin border-radius($ms-radius: 5px) { 11 | border-radius: $ms-radius; 12 | background-clip: padding-box; 13 | } 14 | 15 | // Drop shadow. 16 | @mixin drop-shadow($ms-x-offset: 0, $ms-y-offset: 0, $ms-blur: 5px, $ms-spread: 0, $ms-alpha: 0.4) { 17 | box-shadow: $ms-x-offset $ms-y-offset $ms-blur $ms-spread rgba(0, 0, 0, $ms-alpha); 18 | } 19 | 20 | // Background gradient. 21 | @mixin background-gradient($ms-origin: left, $ms-start: #000, $ms-start-location: 0%, $ms-stop: #FFF, $ms-stop-location: 100%) { 22 | background-color: $ms-start; 23 | background-image: linear-gradient($ms-origin, $ms-start $ms-start-location, $ms-stop $ms-stop-location); 24 | } 25 | 26 | // Rotation. 27 | @mixin rotate($ms-deg) { 28 | transform: rotate($ms-deg); 29 | } 30 | 31 | // Reset button styles. 32 | @mixin button-reset() { 33 | background: none; 34 | border: 0; 35 | cursor: pointer; 36 | } 37 | 38 | @mixin resetAnimation() { 39 | -webkit-animation: none; 40 | -moz-animation: none; 41 | -ms-animation: none; 42 | -o-animation: none; 43 | animation: none; 44 | } 45 | 46 | @mixin resetBackface() { 47 | backface-visibility: visible; 48 | } 49 | 50 | @mixin resetBackground() { 51 | background: 0; 52 | background-clip: border-box; 53 | background-origin: padding-box; 54 | } 55 | 56 | @mixin resetBorder() { 57 | border: 0; 58 | border-collapse: separate; 59 | border-image: none; 60 | border-radius: 0; 61 | border-spacing: 0; 62 | } 63 | 64 | @mixin resetBoxShadow() { 65 | -webkit-box-shadow: none; 66 | -moz-box-shadow: none; 67 | box-shadow: none; 68 | } 69 | 70 | @mixin resetBoxSizing() { 71 | box-sizing: content-box; 72 | } 73 | 74 | @mixin resetColumns() { 75 | columns: auto; 76 | column-count: auto; 77 | column-fill: balance; 78 | column-gap: normal; 79 | column-rule: medium none currentColor; 80 | column-rule-color: currentColor; 81 | column-rule-style: none; 82 | column-rule-width: none; 83 | column-span: 1; 84 | column-width: auto; 85 | } 86 | 87 | 88 | // Fonts and Typography Resets 89 | @mixin resetFont() { 90 | font: normal; 91 | font-family: inherit; 92 | font-size: normal; 93 | font-style: normal; 94 | font-variant: normal; 95 | font-weight: normal; 96 | } 97 | 98 | @mixin resetTextStyling() { 99 | text-align: inherit; 100 | text-align-last: auto; 101 | text-decoration: none; 102 | text-decoration-color: inherit; 103 | text-decoration-line: none; 104 | text-decoration-style: solid; 105 | text-indent: 0; 106 | text-shadow: none; 107 | text-transform: none; 108 | line-height: normal; 109 | letter-spacing: normal; 110 | word-spacing: normal; 111 | } 112 | 113 | 114 | // Box Model Resets 115 | @mixin resetPadding() { 116 | padding: 0; 117 | } 118 | 119 | @mixin resetMargins() { 120 | margin: 0; 121 | } 122 | 123 | @mixin resetOverflow() { 124 | overflow: visible; 125 | } 126 | 127 | @mixin resetMax() { 128 | max-height: none; 129 | max-width: none; 130 | } 131 | 132 | @mixin resetMin() { 133 | min-height: 0; 134 | min-width: 0; 135 | } 136 | 137 | @mixin resetPositioning() { 138 | bottom: auto; 139 | left: auto; 140 | top: auto; 141 | left: auto; 142 | } 143 | 144 | @mixin resetFloat() { 145 | float: none; 146 | } 147 | 148 | @mixin resetHeight($ms-useMaxMin: false) { 149 | height: auto; 150 | @if $ms-useMaxMin == true { 151 | min-height: 0; 152 | max-height: 0; 153 | } 154 | } 155 | 156 | @mixin resetWidth($ms-useMaxMin: false) { 157 | width: auto; 158 | @if $ms-useMaxMin == true { 159 | min-width: 0; 160 | max-width: 0; 161 | } 162 | } 163 | 164 | @mixin resetPosition() { 165 | position: static; 166 | } 167 | 168 | @mixin resetPerspective() { 169 | -webkit-perspective: none; 170 | -webkit-perspective-origin: 50% 50%; 171 | perspective: none; 172 | perspective-origin: 50% 50%; 173 | 174 | } 175 | 176 | @mixin resetTransition() { 177 | -webkit-transition: none; 178 | transition: none; 179 | } 180 | 181 | @mixin resetListStyle() { 182 | list-style: none; 183 | } 184 | 185 | @mixin resetTransform() { 186 | -ms-transform: none; 187 | -webkit-transform: none; 188 | -webkit-transform-style: flat; 189 | transform: none; 190 | transform-style: flat; 191 | } 192 | 193 | @mixin resetOutline() { 194 | outline: 0; 195 | } 196 | 197 | @mixin resetPageBreak() { 198 | page-break-after: auto; 199 | page-break-before: auto; 200 | page-break-inside: auto; 201 | } 202 | 203 | @mixin resetDisplay() { 204 | display: block; 205 | } 206 | 207 | @mixin resetVerticalAlign() { 208 | vertical-align: baseline; 209 | } 210 | 211 | // Prevents the text within a block element from wrapping to second line. 212 | @mixin noWrap() { 213 | display: block; 214 | overflow: hidden; 215 | text-overflow: ellipsis; 216 | white-space: nowrap; 217 | } 218 | 219 | // Input placehoder 220 | @mixin input-placeholder { 221 | &::-webkit-input-placeholder, 222 | &::-moz-placeholder, 223 | &:-moz-placeholder, 224 | &:-ms-input-placeholder { 225 | @content; 226 | } 227 | } 228 | 229 | // Animations 230 | @mixin animationName($ms-name) { 231 | -webkit-animation-name: $ms-name; 232 | -moz-animation-name: $ms-name; 233 | -ms-animation-name: $ms-name; 234 | -o-animation-name: $ms-name; 235 | animation-name: $ms-name; 236 | } 237 | 238 | @mixin animationDuration($ms-duration) { 239 | -webkit-animation-duration: $ms-duration; 240 | -moz-animation-duration: $ms-duration; 241 | -ms-animation-duration: $ms-duration; 242 | -o-animation-duration: $ms-duration; 243 | } 244 | 245 | @mixin animationTiming($ms-function) { 246 | -webkit-animation-timing-function: $ms-function; 247 | -moz-animation-timing-function: $ms-function; 248 | -ms-animation-timing-function: $ms-function; 249 | -o-animation-timing-function: $ms-function; 250 | animation-timing-function: $ms-function; 251 | } 252 | 253 | @mixin animationFillMode($ms-mode) { 254 | -webkit-animation-fill-mode: $ms-mode; 255 | -moz-animation-fill-mode: $ms-mode; 256 | -ms-animation-fill-mode: $ms-mode; 257 | -o-animation-fill-mode: $ms-mode; 258 | animation-fill-mode: $ms-mode; 259 | } 260 | 261 | // Flexbox 262 | @mixin flexBox() { 263 | display: -ms-flexbox; 264 | display: -webkit-flex; 265 | display: flex; 266 | } 267 | 268 | @mixin alignItems($ms-mode) { 269 | -webkit-box-align: $ms-mode; 270 | -moz-box-align: $ms-mode; 271 | -ms-flex-align: $ms-mode; 272 | -webkit-align-items: $ms-mode; 273 | align-items: $ms-mode; 274 | } -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Responsive.Variables.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Fabric responsive variables 7 | 8 | 9 | //== Variables for responsive breakpoints 10 | // 11 | 12 | // Small screen / phone (320px - 479px) 13 | $ms-screen-sm-min: 320px; 14 | 15 | // Medium screen / tablet (480px - 639px) 16 | $ms-screen-md-min: 480px; 17 | 18 | // Large screen / tablet (640px - 1023px) 19 | $ms-screen-lg-min: 640px; 20 | 21 | // Extra large screen / tablet (1024px - 1365px) 22 | $ms-screen-xl-min: 1024px; 23 | 24 | // Extra extra large screen / desktop (1366px - 1919px) 25 | $ms-screen-xxl-min: 1366px; 26 | 27 | // Extra extra extra large screen / desktop (1366px and up) 28 | $ms-screen-xxxl-min: 1920px; 29 | 30 | // Set all maxes since order matters in SASS 31 | $ms-screen-sm-max: ($ms-screen-md-min - 1); 32 | $ms-screen-md-max: ($ms-screen-lg-min - 1); 33 | $ms-screen-lg-max: ($ms-screen-xl-min - 1); 34 | $ms-screen-xl-max: ($ms-screen-xxl-min - 1); 35 | $ms-screen-xxl-max: ($ms-screen-xxxl-min - 1); -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Typography.Fonts.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Font definitions 7 | 8 | 9 | // Font weights. 10 | $ms-light: "Segoe UI Light"; 11 | $ms-regular: "Segoe UI Regular"; 12 | $ms-semibold: "Segoe UI Semibold"; 13 | $ms-semilight: "Segoe UI Semilight"; 14 | 15 | 16 | // Font paths. 17 | $ms-font-directory: "https://appsforoffice.microsoft.com/fabric/fonts"; 18 | $ms-font-path-arabic: "SegoeUI-Arabic"; 19 | $ms-font-path-cyrillic: "SegoeUI-Cyrillic"; 20 | $ms-font-path-easteuropean: "SegoeUI-EastEuropean"; 21 | $ms-font-path-greek: "SegoeUI-Greek"; 22 | $ms-font-path-hebrew: "SegoeUI-Hebrew"; 23 | $ms-font-path-vietnamese: "SegoeUI-Vietnamese"; 24 | $ms-font-path-westeuropean: "SegoeUI-WestEuropean"; 25 | 26 | 27 | /* 28 | Your use of the content in the files referenced here are subject to the terms of the license at http://aka.ms/fabric-font-license 29 | */ 30 | 31 | // Mixins to generate @font-face rules for unique languages. 32 | @mixin SegoeUILight($ms-font-language, $ms-font-path) { 33 | @font-face { 34 | font-family: "#{$ms-light} #{$ms-font-language}"; 35 | src: local("Segoe UI Light"), 36 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Light.woff2') format('woff2'), 37 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Light.woff') format('woff'), 38 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Light.ttf') format('truetype'); 39 | font-weight: normal; 40 | font-style: normal; 41 | } 42 | } 43 | 44 | @mixin SegoeUIRegular($ms-font-language, $ms-font-path) { 45 | @font-face { 46 | font-family: "#{$ms-regular} #{$ms-font-language}"; 47 | src: local("Segoe UI"), 48 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Regular.woff2') format('woff2'), 49 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Regular.woff') format('woff'), 50 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Regular.ttf') format('truetype'); 51 | font-weight: normal; 52 | font-style: normal; 53 | } 54 | } 55 | 56 | @mixin SegoeUISemilight($ms-font-language, $ms-font-path) { 57 | @font-face { 58 | font-family: "#{$ms-semilight} #{$ms-font-language}"; 59 | src: local("Segoe UI Semilight"), 60 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Semilight.woff2') format('woff2'), 61 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Semilight.woff') format('woff'), 62 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Semilight.ttf') format('truetype'); 63 | font-weight: normal; 64 | font-style: normal; 65 | } 66 | } 67 | 68 | @mixin SegoeUISemibold($ms-font-language, $ms-font-path) { 69 | @font-face { 70 | font-family: "#{$ms-semibold} #{$ms-font-language}"; 71 | src: local("Segoe UI Semibold"), 72 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Semibold.woff2') format('woff2'), 73 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Semibold.woff') format('woff'), 74 | url('#{$ms-font-directory}/#{$ms-font-path}/SegoeUI-Semibold.ttf') format('truetype'); 75 | font-weight: normal; 76 | font-style: normal; 77 | } 78 | } 79 | 80 | // Mixins to generate language-specific font faces. 81 | @mixin SegoeUIArabicLight { 82 | @include SegoeUILight("Arabic", $ms-font-path-arabic); 83 | } 84 | @mixin SegoeUIArabicRegular { 85 | @include SegoeUIRegular("Arabic", $ms-font-path-arabic); 86 | } 87 | @mixin SegoeUIArabicSemibold { 88 | @include SegoeUISemibold("Arabic", $ms-font-path-arabic); 89 | } 90 | @mixin SegoeUIArabicSemilight { 91 | @include SegoeUISemilight("Arabic", $ms-font-path-arabic); 92 | } 93 | 94 | @mixin SegoeUICyrillicLight { 95 | @include SegoeUILight("Cyrillic", $ms-font-path-cyrillic); 96 | } 97 | @mixin SegoeUICyrillicRegular { 98 | @include SegoeUIRegular("Cyrillic", $ms-font-path-cyrillic); 99 | } 100 | @mixin SegoeUICyrillicSemibold { 101 | @include SegoeUISemibold("Cyrillic", $ms-font-path-cyrillic); 102 | } 103 | @mixin SegoeUICyrillicSemilight { 104 | @include SegoeUISemilight("Cyrillic", $ms-font-path-cyrillic); 105 | } 106 | 107 | @mixin SegoeUIEastEuropeanLight { 108 | @include SegoeUILight("EastEuropean", $ms-font-path-easteuropean); 109 | } 110 | @mixin SegoeUIEastEuropeanRegular { 111 | @include SegoeUIRegular("EastEuropean", $ms-font-path-easteuropean); 112 | } 113 | @mixin SegoeUIEastEuropeanSemibold { 114 | @include SegoeUISemibold("EastEuropean", $ms-font-path-easteuropean); 115 | } 116 | @mixin SegoeUIEastEuropeanSemilight { 117 | @include SegoeUISemilight("EastEuropean", $ms-font-path-easteuropean); 118 | } 119 | 120 | @mixin SegoeUIGreekLight { 121 | @include SegoeUILight("Greek", $ms-font-path-greek); 122 | } 123 | @mixin SegoeUIGreekRegular { 124 | @include SegoeUIRegular("Greek", $ms-font-path-greek); 125 | } 126 | @mixin SegoeUIGreekSemibold { 127 | @include SegoeUISemibold("Greek", $ms-font-path-greek); 128 | } 129 | @mixin SegoeUIGreekSemilight { 130 | @include SegoeUISemilight("Greek", $ms-font-path-greek); 131 | } 132 | 133 | @mixin SegoeUIHebrewLight { 134 | @include SegoeUILight("Hebrew", $ms-font-path-hebrew); 135 | } 136 | @mixin SegoeUIHebrewRegular { 137 | @include SegoeUIRegular("Hebrew", $ms-font-path-hebrew); 138 | } 139 | @mixin SegoeUIHebrewSemibold { 140 | @include SegoeUISemibold("Hebrew", $ms-font-path-hebrew); 141 | } 142 | @mixin SegoeUIHebrewSemilight { 143 | @include SegoeUISemilight("Hebrew", $ms-font-path-hebrew); 144 | } 145 | 146 | @mixin SegoeUIVietnameseLight { 147 | @include SegoeUILight("Vietnamese", $ms-font-path-vietnamese); 148 | } 149 | @mixin SegoeUIVietnameseRegular { 150 | @include SegoeUIRegular("Vietnamese", $ms-font-path-vietnamese); 151 | } 152 | @mixin SegoeUIVietnameseSemibold { 153 | @include SegoeUISemibold("Vietnamese", $ms-font-path-vietnamese); 154 | } 155 | @mixin SegoeUIVietnameseSemilight { 156 | @include SegoeUISemilight("Vietnamese", $ms-font-path-vietnamese); 157 | } 158 | 159 | @mixin SegoeUIWestEuropeanLight { 160 | @include SegoeUILight("WestEuropean", $ms-font-path-westeuropean); 161 | } 162 | @mixin SegoeUIWestEuropeanRegular { 163 | @include SegoeUIRegular("WestEuropean", $ms-font-path-westeuropean); 164 | } 165 | @mixin SegoeUIWestEuropeanSemibold { 166 | @include SegoeUISemibold("WestEuropean", $ms-font-path-westeuropean); 167 | } 168 | @mixin SegoeUIWestEuropeanSemilight { 169 | @include SegoeUISemilight("WestEuropean", $ms-font-path-westeuropean); 170 | } 171 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Typography.Language.Overrides.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Language override definitions 7 | 8 | 9 | // A mixin that overrides all of the font classes for languages that 10 | // use system fonts. A single font-family is used for all weights. 11 | @mixin language-override-system-fonts($ms-lang-code, $ms-font-family) { 12 | *[lang="#{$ms-lang-code}"] { 13 | .ms-font-mi, 14 | .ms-font-xs, 15 | .ms-font-s, 16 | .ms-font-s-plus, 17 | .ms-font-m, 18 | .ms-font-m-plus, 19 | .ms-font-l, 20 | .ms-font-xl, 21 | .ms-font-xxl, 22 | .ms-font-su, 23 | .ms-fontWeight-light, 24 | .ms-fontWeight-light-hover:hover, 25 | .ms-fontWeight-semilight, 26 | .ms-fontWeight-semilight-hover:hover, 27 | .ms-fontWeight-regular, 28 | .ms-fontWeight-regular-hover:hover, 29 | .ms-fontWeight-semibold, 30 | .ms-fontWeight-semibold-hover:hover { 31 | font-family: $ms-font-family; 32 | } 33 | } 34 | } 35 | 36 | // Base font stack. 37 | $ms-font-system-base: 'Segoe UI', Tahoma, Arial, sans-serif; 38 | 39 | // Variables for each of the non-distributed (native) font stacks. 40 | $ms-font-stack-japanese: 'Yu Gothic', 'Meiryo UI', Meiryo, 'MS Pgothic', Osaka, $ms-font-system-base; 41 | $ms-font-stack-korean: 'Malgun Gothic', Gulim, $ms-font-system-base; 42 | $ms-font-stack-chinese-simplified: 'Microsoft Yahei', Verdana, Simsun, $ms-font-system-base; 43 | $ms-font-stack-chinese-traditional: 'Microsoft Jhenghei', Pmingliu, $ms-font-system-base; 44 | $ms-font-stack-hindi: 'Nirmala UI', $ms-font-system-base; 45 | 46 | 47 | //== Web fonts 48 | // 49 | // A mixin that overrides all of the font classes for languages that use 50 | // distributed web fonts. These reference different fonts for each weight. 51 | @mixin language-override-web-fonts($ms-lang-code, $ms-font-family-light, $ms-font-family-semilight, $ms-font-family-regular, $ms-font-family-semibold) { 52 | *[lang="#{$ms-lang-code}"] { 53 | .ms-font-xl, 54 | .ms-font-xxl, 55 | .ms-fontWeight-light, 56 | .ms-fontWeight-light-hover:hover { 57 | font-family: $ms-font-family-light; 58 | } 59 | .ms-font-l, 60 | .ms-font-su, 61 | .ms-fontWeight-semilight, 62 | .ms-fontWeight-semilight-hover:hover { 63 | font-family: $ms-font-family-semilight; 64 | } 65 | .ms-fontWeight-regular, 66 | .ms-fontweight-regular-hover:hover { 67 | font-family: $ms-font-family-regular; 68 | } 69 | .ms-font-mi, 70 | .ms-fontWeight-semibold, 71 | .ms-fontWeight-semibold-hover:hover { 72 | font-family: $ms-font-family-semibold; 73 | } 74 | } 75 | } 76 | 77 | // Variables for each of the web font stacks. 78 | 79 | // East European 80 | $ms-font-family-light-eastEuropean: 'Segoe UI Light EastEuropean', $ms-font-family-light; 81 | $ms-font-family-semilight-eastEuropean: 'Segoe UI Semilight EastEuropean', $ms-font-family-semilight; 82 | $ms-font-family-regular-eastEuropean: 'Segoe UI Regular EastEuropean', $ms-font-family-regular; 83 | $ms-font-family-semibold-eastEuropean: 'Segoe UI Semibold EastEuropean', $ms-font-family-semibold; 84 | 85 | // Cyrillic 86 | $ms-font-family-light-cyrillic: 'Segoe UI Light Cyrillic', $ms-font-family-light; 87 | $ms-font-family-semilight-cyrillic: 'Segoe UI Semilight Cyrillic', $ms-font-family-semilight; 88 | $ms-font-family-regular-cyrillic: 'Segoe UI Regular Cyrillic', $ms-font-family-regular; 89 | $ms-font-family-semibold-cyrillic: 'Segoe UI Semibold Cyrillic', $ms-font-family-semibold; 90 | 91 | // Leelawadee 92 | $ms-font-family-semilight-leelawadee: 'Leelawadee UI Semilight', 'Kmer UI', $ms-font-family-semilight; 93 | $ms-font-family-regular-leelawadee: 'Leelawadee UI Regular', 'Kmer UI', $ms-font-family-regular; 94 | $ms-font-family-semibold-leelawadee: 'Leelawadee UI Bold', 'Kmer UI', $ms-font-family-semibold; 95 | 96 | // Arabic 97 | $ms-font-family-light-arabic: 'Segoe UI Light Arabic', $ms-font-family-light; 98 | $ms-font-family-semilight-arabic: 'Segoe UI Semilight Arabic', $ms-font-family-semilight; 99 | $ms-font-family-regular-arabic: 'Segoe UI Regular Arabic', $ms-font-family-regular; 100 | $ms-font-family-semibold-arabic: 'Segoe UI Semibold Arabic', $ms-font-family-semibold; 101 | 102 | // Greek 103 | $ms-font-family-light-greek: 'Segoe UI Light Greek', $ms-font-family-light; 104 | $ms-font-family-semilight-greek: 'Segoe UI Semilight Greek', $ms-font-family-semilight; 105 | $ms-font-family-regular-greek: 'Segoe UI Regular Greek', $ms-font-family-regular; 106 | $ms-font-family-semibold-greek: 'Segoe UI Semibold Greek', $ms-font-family-semibold; 107 | 108 | // Hebrew 109 | $ms-font-family-light-hebrew: 'Segoe UI Light Hebrew', $ms-font-family-light; 110 | $ms-font-family-semilight-hebrew: 'Segoe UI Semilight Hebrew', $ms-font-family-semilight; 111 | $ms-font-family-regular-hebrew: 'Segoe UI Regular Hebrew', $ms-font-family-regular; 112 | $ms-font-family-semibold-hebrew: 'Segoe UI Semibold Hebrew', $ms-font-family-semibold; 113 | 114 | // Vietnamese 115 | $ms-font-family-light-vietnamese: 'Segoe UI Light Vietnamese', $ms-font-family-light; 116 | $ms-font-family-semilight-vietnamese: 'Segoe UI Semilight Vietnamese', $ms-font-family-semilight; 117 | $ms-font-family-regular-vietnamese: 'Segoe UI Regular Vietnamese', $ms-font-family-regular; 118 | $ms-font-family-semibold-vietnamese: 'Segoe UI Semibold Vietnamese', $ms-font-family-semibold; -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Typography.Variables.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Fabric Core Typography variables 7 | 8 | 9 | $ms-font-family-light: 'Segoe UI Light WestEuropean', 'Segoe UI Light', 'Segoe UI', Tahoma, Arial, sans-serif; 10 | $ms-font-family-regular: 'Segoe UI Regular WestEuropean', 'Segoe UI', Tahoma, Arial, sans-serif; 11 | $ms-font-family-semilight: 'Segoe UI Semilight WestEuropean', 'Segoe UI Semilight', 'Segoe UI', Tahoma, Arial, sans-serif; 12 | $ms-font-family-semibold: 'Segoe UI Semibold WestEuropean', 'Segoe UI Semibold', 'Segoe UI', Tahoma, Arial, sans-serif; 13 | 14 | 15 | //== Type sizes 16 | // 17 | 18 | $ms-font-size-su: 42px; 19 | $ms-font-size-xxl: 28px; 20 | $ms-font-size-xl: 21px; 21 | $ms-font-size-l: 17px; 22 | $ms-font-size-m-plus: 15px; 23 | $ms-font-size-m: 14px; 24 | $ms-font-size-s-plus: 13px; 25 | $ms-font-size-s: 12px; 26 | $ms-font-size-xs: 11px; 27 | $ms-font-size-mi: 10px; 28 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.Utilities.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Utility classes and mixins used throughout Fabric. 7 | 8 | @import "Fabric.Mixins"; 9 | 10 | // The best box is a border box. 11 | @mixin ms-u-borderBox { 12 | box-sizing: border-box; 13 | } 14 | 15 | // Ensures the block expands to the full height to enclose its floated childen. 16 | 17 | @mixin ms-u-clearfix { 18 | *zoom: 1; 19 | &:before, 20 | &:after { 21 | display: table; 22 | content: ""; 23 | line-height: 0; 24 | } 25 | &:after { 26 | clear: both; 27 | } 28 | } 29 | 30 | // Basic border-box, margin, and padding reset. 31 | @mixin ms-u-normalize { 32 | @include ms-u-borderBox; 33 | @include resetMargins; 34 | @include resetPadding; 35 | @include resetBoxShadow; 36 | } 37 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Fabric.ZIndex.Variables.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Z-Index Layeringz 7 | 8 | 9 | // Base Layer Variables 10 | $ms-zIndex-0: 0; 11 | $ms-zIndex-1: 100; 12 | $ms-zIndex-2: 200; 13 | $ms-zIndex-3: 300; 14 | $ms-zIndex-4: 400; 15 | $ms-zIndex-5: 500; 16 | 17 | // Base Layer Modifier Variables 18 | $ms-zIndex-back: 0; 19 | $ms-zIndex-middle: 5; 20 | $ms-zIndex-front: 10; 21 | 22 | 23 | // Fabric Component Base Layer Assignments 24 | 25 | $ms-zIndex-Callout: $ms-zIndex-1; 26 | $ms-zIndex-ContextualMenu: $ms-zIndex-1; 27 | $ms-zIndex-Overlay: $ms-zIndex-2; 28 | $ms-zIndex-Panel: $ms-zIndex-3; 29 | $ms-zIndex-DatePicker: $ms-zIndex-3; 30 | $ms-zIndex-Dialog: $ms-zIndex-3; 31 | $ms-zIndex-PeoplePicker: $ms-zIndex-3; 32 | $ms-zIndex-Dropdown: $ms-zIndex-4; 33 | -------------------------------------------------------------------------------- /addins/cfMonitor/Content/sass/_Office.Color.Variables.scss: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | // 4 | // Office UI Fabric 5 | // -------------------------------------------------- 6 | // Office Core Color Variables 7 | 8 | 9 | //== Theme/Accent colors 10 | // 11 | // Colors used in Office 15 color pickers 12 | // These are deprecated as of Fabric 0.6 13 | 14 | $ms-color-officeAccent1: #FFFFFF; 15 | $ms-color-officeAccent2: #000000; 16 | $ms-color-officeAccent3: #E7E6E5; 17 | $ms-color-officeAccent4: #44546A; 18 | $ms-color-officeAccent5: #5B9BD5; 19 | $ms-color-officeAccent6: #ED7D31; 20 | $ms-color-officeAccent7: #A5A5A5; 21 | $ms-color-officeAccent8: #FFC001; 22 | $ms-color-officeAccent9: #4472C4; 23 | $ms-color-officeAccent10: #70AD47; 24 | 25 | $ms-color-presence-available: #5dd255; 26 | $ms-color-presence-away: #ffd200; 27 | $ms-color-presence-blocked-background: #dedede; 28 | $ms-color-presence-blocked-line: #c72d25; 29 | $ms-color-presence-busy-stripe-light: #e57a79; 30 | $ms-color-presence-busy-stripe-dark: #d00e0d; 31 | $ms-color-presence-busy-average: #d93b3b; 32 | $ms-color-presence-dnd-background: #c72d25; 33 | $ms-color-presence-dnd-line: #ffffff; 34 | $ms-color-presence-offline: #b6cfd8; 35 | -------------------------------------------------------------------------------- /addins/cfMonitor/Images/AddinIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/cfMonitor/Images/AddinIcon.png -------------------------------------------------------------------------------- /addins/cfMonitor/Images/Button16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/cfMonitor/Images/Button16x16.png -------------------------------------------------------------------------------- /addins/cfMonitor/Images/Button32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/cfMonitor/Images/Button32x32.png -------------------------------------------------------------------------------- /addins/cfMonitor/Images/Button80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/cfMonitor/Images/Button80x80.png -------------------------------------------------------------------------------- /addins/cfMonitor/Images/Close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/cfMonitor/Images/Close.png -------------------------------------------------------------------------------- /addins/cfMonitor/Scripts/FabricUI/MessageBanner.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE in the project root for license information. 2 | 3 | /** 4 | * MessageBanner component 5 | * 6 | * A component to display error messages 7 | * 8 | */ 9 | 10 | /** 11 | * @namespace fabric 12 | */ 13 | var fabric = fabric || {}; 14 | /** 15 | * 16 | * @param {HTMLElement} container - the target container for an instance of MessageBanner 17 | * @constructor 18 | */ 19 | fabric.MessageBanner = function (container) { 20 | this.container = container; 21 | this.init(); 22 | }; 23 | 24 | fabric.MessageBanner.prototype = (function () { 25 | 26 | var _clipper; 27 | var _bufferSize; 28 | var _textContainerMaxWidth = 700; 29 | var _clientWidth; 30 | var _textWidth; 31 | var _initTextWidth; 32 | var _chevronButton; 33 | var _errorBanner; 34 | var _actionButton; 35 | var _closeButton; 36 | var _bufferElementsWidth = 88; 37 | var _bufferElementsWidthSmall = 35; 38 | var SMALL_BREAK_POINT = 480; 39 | 40 | /** 41 | * sets styles on resize 42 | */ 43 | var _onResize = function () { 44 | _clientWidth = _errorBanner.offsetWidth; 45 | if (window.innerWidth >= SMALL_BREAK_POINT) { 46 | _resizeRegular(); 47 | } else { 48 | _resizeSmall(); 49 | } 50 | }; 51 | 52 | /** 53 | * resize above 480 pixel breakpoint 54 | */ 55 | var _resizeRegular = function () { 56 | if (_clientWidth - _bufferSize > _initTextWidth && _initTextWidth < _textContainerMaxWidth) { 57 | _textWidth = "auto"; 58 | _chevronButton.className = "ms-MessageBanner-expand"; 59 | _collapse(); 60 | } else { 61 | _textWidth = Math.min(_clientWidth - _bufferSize, _textContainerMaxWidth) + "px"; 62 | if (_chevronButton.className.indexOf("is-visible") === -1) { 63 | _chevronButton.className += " is-visible"; 64 | } 65 | } 66 | _clipper.style.width = _textWidth; 67 | }; 68 | 69 | /** 70 | * resize below 480 pixel breakpoint 71 | */ 72 | var _resizeSmall = function () { 73 | if (_clientWidth - (_bufferElementsWidthSmall + _closeButton.offsetWidth) > _initTextWidth) { 74 | _textWidth = "auto"; 75 | _collapse(); 76 | } else { 77 | _textWidth = _clientWidth - (_bufferElementsWidthSmall + _closeButton.offsetWidth) + "px"; 78 | } 79 | _clipper.style.width = _textWidth; 80 | }; 81 | /** 82 | * caches elements and values of the component 83 | * @param {Object} context - the context 84 | */ 85 | var _cacheDOM = function (context) { 86 | _errorBanner = context.container; 87 | _clipper = context.container.querySelector('.ms-MessageBanner-clipper'); 88 | _chevronButton = context.container.querySelector('.ms-MessageBanner-expand'); 89 | _actionButton = context.container.querySelector('.ms-MessageBanner-action'); 90 | _bufferSize = _actionButton.offsetWidth + _bufferElementsWidth; 91 | _closeButton = context.container.querySelector('.ms-MessageBanner-close'); 92 | }; 93 | 94 | /** 95 | * expands component to show full error message 96 | */ 97 | var _expand = function () { 98 | var icon = _chevronButton.querySelector('.ms-Icon'); 99 | _errorBanner.className += " is-expanded"; 100 | icon.className = "ms-Icon ms-Icon--chevronsUp"; 101 | }; 102 | 103 | /** 104 | * collapses component to only show truncated message 105 | */ 106 | var _collapse = function () { 107 | var icon = _chevronButton.querySelector('.ms-Icon'); 108 | _errorBanner.className = "ms-MessageBanner"; 109 | icon.className = "ms-Icon ms-Icon--chevronsDown"; 110 | }; 111 | 112 | var _toggleExpansion = function () { 113 | if (_errorBanner.className.indexOf("is-expanded") > -1) { 114 | _collapse(); 115 | } else { 116 | _expand(); 117 | } 118 | }; 119 | 120 | /** 121 | * hides banner when close button is clicked 122 | */ 123 | var _hideBanner = function () { 124 | if (_errorBanner.className.indexOf("hide") === -1) { 125 | _errorBanner.className += " hide"; 126 | setTimeout(function () { 127 | _errorBanner.className = "ms-MessageBanner is-hidden"; 128 | }, 500); 129 | } 130 | }; 131 | 132 | /** 133 | * shows banner if the banner is hidden 134 | */ 135 | var _showBanner = function () { 136 | _errorBanner.className = "ms-MessageBanner"; 137 | }; 138 | 139 | /** 140 | * sets handlers for resize and button click events 141 | */ 142 | var _setListeners = function () { 143 | window.addEventListener('resize', _onResize, false); 144 | _chevronButton.addEventListener("click", _toggleExpansion, false); 145 | _closeButton.addEventListener("click", _hideBanner, false); 146 | }; 147 | 148 | /** 149 | * initializes component 150 | */ 151 | var init = function () { 152 | _cacheDOM(this); 153 | _setListeners(); 154 | _clientWidth = _errorBanner.offsetWidth; 155 | _initTextWidth = _clipper.offsetWidth; 156 | _onResize(null); 157 | }; 158 | 159 | return { 160 | init: init, 161 | showBanner: _showBanner, 162 | hideBanner: _hideBanner, 163 | toggleExpansion: _toggleExpansion 164 | }; 165 | }()); 166 | -------------------------------------------------------------------------------- /addins/cfMonitor/cfMonitor.css: -------------------------------------------------------------------------------- 1 | /* Page-specific styling */ 2 | 3 | html { 4 | position: relative; 5 | min-height: 100%; 6 | } 7 | body { 8 | margin: 0 0 40px; /* bottom = footer height */ 9 | } 10 | .footer { 11 | position: absolute; 12 | left: 0; 13 | bottom: 0; 14 | height: 40px; 15 | width: 100%; 16 | } 17 | 18 | .padding { 19 | padding: 15px; 20 | } 21 | 22 | #notification-popup.ms-MessageBanner { 23 | position: absolute; 24 | left: 0px; 25 | bottom: 0px; 26 | text-align: left; 27 | height: inherit; 28 | min-width: inherit; 29 | } 30 | 31 | #notification-popup .ms-MessageBanner-text { 32 | margin: 0; 33 | padding: 18px 15px; 34 | min-width: inherit; 35 | } 36 | -------------------------------------------------------------------------------- /addins/cfMonitor/cfMonitor.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Excel Add-In with Commands Sample 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 |
22 |
23 |

Target Cell

24 | 25 |
26 |

Function to run

27 | 28 |
29 |
30 | 33 | 36 | 39 |

Result:

40 |

41 |
42 |
43 | 50 | 51 | 52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | 61 |
62 |
63 | 64 |
65 | 66 | 67 | -------------------------------------------------------------------------------- /addins/cfMonitor/cfMonitor.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | "use strict"; 3 | 4 | var cellToHighlight; 5 | var messageBanner; 6 | 7 | // The initialize function must be run each time a new page is loaded. 8 | Office.initialize = function (reason) { 9 | $(document).ready(function () { 10 | // Initialize the FabricUI notification mechanism and hide it 11 | var element = document.querySelector('.ms-MessageBanner'); 12 | messageBanner = new fabric.MessageBanner(element); 13 | messageBanner.hideBanner(); 14 | 15 | // Add a click event handler for the highlight button. 16 | $('#highlight-button').click(hightlightHighestValue); 17 | $("#recalc").click(recalc); 18 | $("#get-result").click(getResult); 19 | $("#run").click(runFunction); 20 | }); 21 | }; 22 | 23 | function recalc() { 24 | // Run a batch operation against the Excel object model 25 | Excel.run(function (ctx) { 26 | // Create a proxy object for the selected range and load its properties 27 | ctx.workbook.application.calculate(Excel.CalculationType.full); 28 | return ctx.sync(); 29 | }) 30 | .catch(errorHandler); 31 | } 32 | 33 | function getResult() { 34 | // Run a batch operation against the Excel object model 35 | Excel.run(function (ctx) { 36 | let address = document.getElementById("target-cell").value; 37 | let range = ctx.workbook.worksheets.getActiveWorksheet().getRange(address); 38 | range.load("values"); 39 | // Run the queued-up command, and return a promise to indicate task completion 40 | return ctx.sync() 41 | .then(function () { 42 | document.getElementById("result").textContent = range.values[0]; 43 | showNotification('The range.values is:', '"' + range.values + '"'); 44 | }) 45 | .then(ctx.sync); 46 | }) 47 | .catch(errorHandler); 48 | } 49 | 50 | function runFunction() { 51 | // Run a batch operation against the Excel object model 52 | Excel.run(function (ctx) { 53 | let address = document.getElementById("target-cell").value; 54 | let arrayOfFormulas = document.getElementById("function").value; 55 | let range = ctx.workbook.worksheets.getActiveWorksheet().getRange(address); 56 | range.formulas = arrayOfFormulas; 57 | range.load("formulas"); 58 | return ctx.sync() 59 | .then(function () { 60 | console.log(range.formulas); 61 | showNotification('The range.formulas is:', '"' + range.formulas + '"'); 62 | }) 63 | .then(ctx.sync); 64 | }) 65 | .catch(errorHandler); 66 | } 67 | 68 | // Helper function for treating errors 69 | function errorHandler(error) { 70 | // Always be sure to catch any accumulated errors that bubble up from the Excel.run execution 71 | showNotification("Error", error); 72 | console.log("Error: " + error); 73 | if (error instanceof OfficeExtension.Error) { 74 | console.log("Debug info: " + JSON.stringify(error.debugInfo)); 75 | } 76 | } 77 | 78 | // Helper function for displaying notifications 79 | function showNotification(header, content) { 80 | $("#notification-header").text(header); 81 | $("#notification-body").text(content); 82 | messageBanner.showBanner(); 83 | messageBanner.toggleExpansion(); 84 | } 85 | })(); 86 | -------------------------------------------------------------------------------- /addins/cfMonitor/cfMonitorUDF.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 |
15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /addins/cfsample2/Images/Button16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/cfsample2/Images/Button16x16.png -------------------------------------------------------------------------------- /addins/cfsample2/Images/Button32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/cfsample2/Images/Button32x32.png -------------------------------------------------------------------------------- /addins/cfsample2/Images/Button80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/cfsample2/Images/Button80x80.png -------------------------------------------------------------------------------- /addins/cfsample2/README.md: -------------------------------------------------------------------------------- 1 | # License 2 | See https://officedev.github.io/custom-functions/LICENSE 3 | 4 | # Purpose 5 | This add-in is used to test Shared Runtime with Custom Functions, Taskpane and App Commands. 6 | This add-in contains: 7 | - Custom Functions 8 | - A ShowTaskpane button 9 | - A UI-less ribbon button handler 10 | 11 | This Addin contains three components: 12 | 1. Taskpane: Contains six buttons, [Set/Read]Data - to set or get the value from the shared global variable g_sharedAppData', Show/Hide - to show or hide the taskpane and [Get/Set]StartupState - to get current Runtime startup behavior or set current Runtime Startup state to Load or None. 13 | 2. UI-less button handler: To update the value of shared global variable g_sharedAppData' to '2019'. 14 | 3. Custom Functions: Contain functions like [Set/Get]Value - to set or get the value from the shared global variable g_sharedAppData', Show/Hide - to show or hide the taskpane, [Get/Set]StartupBehavior - to get or set current Runtime startup behavior, [Get/Set]RangeValue set/get value for a Range. 15 | 16 | # Office.js 17 | Please reference the release version of office.js 18 | ```html 19 | 20 | ``` 21 | 22 | # Manifest Changes for Shared App 23 | Shared App is an HTML page that will be used for taskpane, app command and custom functions. To use Shared App feature, please update the manifest. For example, this addin's manifest added the following runtime definition under the Host element. 24 | ```xml 25 | 26 | 27 | 28 | ``` 29 | It declared one runtime and specify the runtime's url using resid. 30 | 31 | Then it declared that the custom function to use the shared runtime by 32 | ```xml 33 | 34 | 35 | 36 | ``` 37 | As it uses the same resid as the one declared in the runtime, the custom function will use the shared runtime. 38 | 39 | It also declared that the app command also use the shared runtime by 40 | ```xml 41 | 42 | ``` 43 | As it uses the same resid as the the one declared in the runtime, the app command will use the shared runtime. 44 | 45 | For taskpane, 46 | ```xml 47 | 48 | 49 | 50 | ``` 51 | As the ShowTaskpane actioin uses the same resid as the one declared in the runtime, the taskpane will use the shared runtime. 52 | 53 | # Preview API 54 | ## Visiblity related API 55 | ```js 56 | // Show the shared runtime 57 | await Office.addin.showAsTaskpane(); 58 | 59 | // Hide the shared runtime 60 | await Office.addin.hide(); 61 | 62 | // Add event handler when the taskpane visibility mode is changed. 63 | var handlerRemove = await Office.addin.onVisibilityModeChanged(function(args) { 64 | console.log('Visibility is changed to ' + args.visibilityMode) 65 | }); 66 | 67 | // Remove the handler 68 | await handlerRemove(); 69 | ``` 70 | 71 | // To know the initial visibility mode. 72 | Office.onReady(function(hostInfo) { 73 | if (hostInfo.addin) { // it works on desktop client. It will work on Excel online once the code is deployed. 74 | console.log(hostInfo.addin.visibilityMode); 75 | } 76 | }) 77 | 78 | ## Startup behavior 79 | ```js 80 | // Set the runtime to be loaded when the document is opened next time 81 | await Office.addin.setStartupBehavior(Office.StartupBehavior.load); 82 | 83 | // Reset the startup behavior 84 | await Office.addin.setStartupBehavior(Office.StartupBehavior.none); 85 | 86 | // Get the startup behavior settings 87 | var behavior = await Office.addin.getStartupBehavior(); 88 | ``` 89 | # Dev Machine 90 | When test the addin on the dev machine, we could copy the manifest to dev catalog and the use `http-server --cors` to start the webside. 91 | 92 | # Maintainers 93 | [madhavagrawal17](https://github.com/madhavagrawal17) 94 | [ylu0826](https://github.com/ylu0826) 95 | [shaofengzhu](https://github.com/shaofengzhu) 96 | -------------------------------------------------------------------------------- /addins/cfsample2/copytodevcatalog.cmd: -------------------------------------------------------------------------------- 1 | copy %~dp0b5d3b1f5-18b0-4a5b-824d-d46f2b6be076-devcatalog.xml %SRCROOT%\richapi\Test\RichApiAgaveWeb\devcatalog\b5d3b1f5-18b0-4a5b-824d-d46f2b6be076.xml -------------------------------------------------------------------------------- /addins/cfsample2/custom-functions.js: -------------------------------------------------------------------------------- 1 |  2 | function SetRuntimeVisibleHelper(visible) { 3 | var p; 4 | if (visible) { 5 | p = Office.addin.showAsTaskpane(); 6 | } 7 | else { 8 | p = Office.addin.hide(); 9 | } 10 | 11 | return p.then(function () { 12 | return visible; 13 | }) 14 | .catch(function (error) { 15 | return error.code; 16 | }); 17 | } 18 | 19 | function SetStartupBehaviorHelper(state) { 20 | return Office.addin.setStartupBehavior(state) 21 | .then(function () { 22 | return state; 23 | }) 24 | .catch(function (error) { 25 | return error.code; 26 | }); 27 | } 28 | 29 | CustomFunctions.associate('GetCFDataRangeValue', function(address){ 30 | var context = new Excel.RequestContext(); 31 | var sheet = context.workbook.worksheets.getItemOrNullObject("CFData"); 32 | var range; 33 | return context.sync() 34 | .then(function() { 35 | if (sheet.isNullObject) { 36 | sheet = context.workbook.worksheets.add("CFData"); 37 | } 38 | return context.sync(); 39 | }) 40 | .then(function() { 41 | range = sheet.getRange(address); 42 | range.load(); 43 | return context.sync(); 44 | }) 45 | .then(function() { 46 | return range.values[0][0]; 47 | }); 48 | }); 49 | 50 | CustomFunctions.associate('GetRangeValue', function(address){ 51 | var context = new Excel.RequestContext(); 52 | var range = context.workbook.worksheets.getActiveWorksheet().getRange(address); 53 | range.load(); 54 | return context.sync() 55 | .then(function() { 56 | return range.values[0][0]; 57 | }); 58 | }); 59 | 60 | 61 | CustomFunctions.associate('SetRangeValue', function(address, value){ 62 | var context = new Excel.RequestContext(); 63 | var range = context.workbook.worksheets.getActiveWorksheet().getRange(address); 64 | range.values = [[value]]; 65 | range.load(); 66 | return context.sync() 67 | .then(function() { 68 | return range.values[0][0]; 69 | }); 70 | }); 71 | 72 | CustomFunctions.associate('GetValue', function() { 73 | if (typeof(g_sharedAppData) === 'object') { 74 | return g_sharedAppData.value; 75 | } 76 | 77 | return null; 78 | }); 79 | CustomFunctions.associate('SetValue', function(value) { 80 | if (typeof(g_sharedAppData) === 'object') { 81 | g_sharedAppData.value = value; 82 | return value; 83 | } 84 | 85 | return null; 86 | }); 87 | 88 | CustomFunctions.associate('GetRuntimeState', function() { 89 | // _getState() is the internal API and it's only for Microsoft engineer team internal testing purpose. Please do not use it. 90 | return Office.addin._getState().then(function (value) { 91 | return value; 92 | }) 93 | .catch(function (error) { 94 | return error.code; 95 | }); 96 | }); 97 | 98 | CustomFunctions.associate('GetVisibility', function() { 99 | return g_BgAppVisibilityState.value; 100 | }); 101 | 102 | CustomFunctions.associate('Show', function () { 103 | return SetRuntimeVisibleHelper(true); 104 | }); 105 | 106 | CustomFunctions.associate('DelayShow', function () { 107 | setTimeout(function () { 108 | return SetRuntimeVisibleHelper(true); 109 | }, 5000); 110 | }); 111 | 112 | CustomFunctions.associate('Hide', function () { 113 | return SetRuntimeVisibleHelper(false); 114 | }); 115 | 116 | CustomFunctions.associate('GetStartupBehavior', function() { 117 | return Office.addin.getStartupBehavior() 118 | .then(function (value) { 119 | if (typeof(g_BgAppRuntimeStartupState) === 'object') { 120 | g_BgAppRuntimeStartupState.value = value; 121 | } 122 | return value.toString(); 123 | }) 124 | .catch(function (error) { 125 | return error.code; 126 | }); 127 | }); 128 | 129 | 130 | 131 | CustomFunctions.associate('SetStartupBehavior', function (behavior) { 132 | return SetStartupBehaviorHelper(behavior); 133 | }); 134 | 135 | CustomFunctions.associate('ERROROUT', function (how) { 136 | if (how === 'throw') { 137 | throw { prop1: "Jabberwocky thrown" }; 138 | } 139 | else if (how === 'promise') { 140 | return Promise.reject({ prop1: "Jabberwocky rejected" }); 141 | } 142 | return undefined; 143 | }); 144 | -------------------------------------------------------------------------------- /addins/cfsample2/custom-functions.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": [ 3 | { 4 | "id": "GetCFDataRangeValue", 5 | "name": "GetCFDataRangeValue", 6 | "description": "Get range value from CFData sheet", 7 | "parameters": [ 8 | { 9 | "name": "address", 10 | "type": "string" 11 | } 12 | ] 13 | }, 14 | { 15 | "id": "GetRangeValue", 16 | "name": "GetRangeValue", 17 | "description": "Get range value", 18 | "parameters": [ 19 | { 20 | "name": "address", 21 | "type": "string" 22 | } 23 | ] 24 | }, 25 | { 26 | "id": "SetRangeValue", 27 | "name": "SetRangeValue", 28 | "description": "Set range value", 29 | "parameters": [ 30 | { 31 | "name": "address", 32 | "type": "string" 33 | }, 34 | { 35 | "name": "value" 36 | } 37 | ] 38 | }, 39 | { 40 | "id": "GetValue", 41 | "name": "GetValue", 42 | "description": "Get shared value" 43 | }, 44 | { 45 | "id": "SetValue", 46 | "name": "SetValue", 47 | "description": "Set shared value", 48 | "parameters": [ 49 | { 50 | "name": "value" 51 | } 52 | ] 53 | }, 54 | { 55 | "id": "Show", 56 | "name": "Show", 57 | "description": "Show taskpane" 58 | }, 59 | { 60 | "id": "DelayShow", 61 | "name": "DelayShow", 62 | "description": "DelayShow taskpane" 63 | }, 64 | { 65 | "id": "Hide", 66 | "name": "Hide", 67 | "description": "Show taskpane" 68 | }, 69 | { 70 | "id": "GetRuntimeState", 71 | "name": "GetRuntimeState", 72 | "description": "Get Runtime State" 73 | }, 74 | { 75 | "id": "GetVisibility", 76 | "name": "GetVisibility", 77 | "description": "Get visitiblity" 78 | }, 79 | { 80 | "id": "SetStartupBehavior", 81 | "name": "SetStartupBehavior", 82 | "description": "Set Runtime startup behavior", 83 | "parameters": [ 84 | { 85 | "name": "behavior", 86 | "type": "string" 87 | } 88 | ] 89 | }, 90 | { 91 | "id": "GetStartupBehavior", 92 | "name": "GetStartupBehavior", 93 | "description": "Get Runtime startup behavior" 94 | }, 95 | { 96 | "id": "ERROROUT", 97 | "name": "ERROROUT", 98 | "description": "Errors out", 99 | "helpUrl": "http://dev.office.com", 100 | "result": { 101 | "type": "number" 102 | }, 103 | "parameters": [ 104 | { 105 | "name": "how", 106 | "description": "'throw' | 'promise'", 107 | "type": "string" 108 | } 109 | ] 110 | } 111 | ] 112 | } 113 | -------------------------------------------------------------------------------- /addins/cfsample3/README.md: -------------------------------------------------------------------------------- 1 | # Purpose 2 | This add-in is used to test a single, shared, runtime for its components. The add-in contains: 3 | - A ShowTaskpane button 4 | - A UI-less ribbon button handler 5 | 6 | # Maintainers 7 | ylu0826 madhavagrawal17 -------------------------------------------------------------------------------- /addins/cfsample4/README.md: -------------------------------------------------------------------------------- 1 | # Purpose 2 | This add-in is used to test a single, shared, runtime for its components. The add-in contains: 3 | - Custom Functions 4 | - A UI-less ribbon button handler 5 | 6 | # Maintainers 7 | ylu0826 madhavagrawal17 -------------------------------------------------------------------------------- /addins/officejs2/README.md: -------------------------------------------------------------------------------- 1 | # License 2 | See https://officedev.github.io/custom-functions/LICENSE 3 | 4 | # Purpose 5 | This folder contains four add-ins - [OfficeJs1-Sample-Excel](https://github.com/OfficeDev/custom-functions/blob/master/addins/officejs2/agave/manifest-v1.xml), [OfficeJs2-Sample-Excel](https://github.com/OfficeDev/custom-functions/blob/master/addins/officejs2/agave/manifest-v2.xml),[OfficeJs1-Sample-Word](https://github.com/OfficeDev/custom-functions/blob/master/addins/officejs2/agave/Word-manifest-v1.xml), [OfficeJs2-Sample-Word](https://github.com/OfficeDev/custom-functions/blob/master/addins/officejs2/agave/Word-manifest-v2.xml). All of the four add-ins contains a "show taskpane button" which could call basic RichApi to make sure office.js is initilized successfully. 6 | 7 | The difference between V1 and V2 is: 8 | In V1 addin, https://appsforoffice.microsoft.com/lib/beta/hosted/office.js is referenced; 9 | In V2 addin, https://appsforoffice.microsoft.com/lib/beta/hosted/word.js or https://appsforoffice.microsoft.com/lib/beta/hosted/excel.js is referenced for perfomance optimization. 10 | 11 | # Maintainers 12 | [JiayuanL](https://github.com/JiayuanL) 13 | [shaofengzhu](https://github.com/shaofengzhu) -------------------------------------------------------------------------------- /addins/officejs2/agave/Word-Home-v1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Word Office.js V1 5 | 9 | 10 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |
21 |
22 | 23 |
24 |
25 |
26 | the following code: 27 |
28 |
29 | 30 |
31 |
32 |
33 | Logs: 34 |
35 |
36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /addins/officejs2/agave/Word-Home-v2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Word Office.js V2 5 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 |
17 | 18 |
19 |
20 |
21 | the following code: 22 |
23 |
24 | 25 |
26 |
27 |
28 | Logs: 29 |
30 |
31 |
32 | 33 | 44 | 45 | -------------------------------------------------------------------------------- /addins/officejs2/agave/Word-Manifest-v1.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | d640bf0a-d79d-4432-957d-993760d5b33a 8 | 1.0.0.0 9 | Microsoft Office Platform Team 10 | en-US 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ReadWriteDocument 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | <!-- Description of the Getting Started callout. resid points to a LongString resource --> 30 | <Description resid="OEP.GetStarted.Description"/> 31 | 32 | <!-- Point to a url resource which details how the add-in should be used. --> 33 | <LearnMoreUrl resid="OEP.GetStarted.LearnMoreUrl"/> 34 | </GetStarted> 35 | 36 | <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 37 | Think of the FunctionFile as the code behind ExecuteFunction. --> 38 | <FunctionFile resid="OEP.SharedRuntime.Url" /> 39 | 40 | <!-- PrimaryCommandSurface is the main Office Ribbon. --> 41 | <ExtensionPoint xsi:type="PrimaryCommandSurface"> 42 | <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. --> 43 | <CustomTab id="OEP.TabJupyter"> 44 | <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. --> 45 | <Group id="OEP.Group1"> 46 | <!-- Label for your group. resid must point to a ShortString resource. --> 47 | <Label resid="OEP.Group1Label" /> 48 | <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. --> 49 | <!-- Use PNG icons. All URLs on the resources section must use HTTPS. --> 50 | <Icon> 51 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 52 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 53 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 54 | </Icon> 55 | <!-- Control. It can be of type "Button" or "Menu". --> 56 | <Control xsi:type="Button" id="OEP.TaskpaneButton"> 57 | <Label resid="OEP.TaskpaneButton.Label" /> 58 | <Supertip> 59 | <!-- ToolTip title. resid must point to a ShortString resource. --> 60 | <Title resid="OEP.TaskpaneButton.Label" /> 61 | <!-- ToolTip description. resid must point to a LongString resource. --> 62 | <Description resid="OEP.TaskpaneButton.Tooltip" /> 63 | </Supertip> 64 | <Icon> 65 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 66 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 67 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 68 | </Icon> 69 | 70 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 71 | <Action xsi:type="ShowTaskpane"> 72 | <TaskpaneId>CodeEditor</TaskpaneId> 73 | <!-- Provide a url resource id for the location that will be displayed on the task pane. --> 74 | <SourceLocation resid="OEP.SharedRuntime.Url" /> 75 | </Action> 76 | </Control> 77 | </Group> 78 | <Label resid="OEP.JupyterTab.Label" /> 79 | </CustomTab> 80 | </ExtensionPoint> 81 | </DesktopFormFactor> 82 | </Host> 83 | </Hosts> 84 | <Resources> 85 | <bt:Images> 86 | <bt:Image id="OEP.tpicon_16x16" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button16x16.png" /> 87 | <bt:Image id="OEP.tpicon_32x32" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button32x32.png" /> 88 | <bt:Image id="OEP.tpicon_80x80" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button80x80.png" /> 89 | </bt:Images> 90 | <bt:Urls> 91 | <bt:Url id="OEP.SharedRuntime.Url" DefaultValue="https://officedev.github.io/custom-functions/addins/officejs2/agave/Word-Home-v1.html" /> 92 | <bt:Url id="OEP.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" /> 93 | </bt:Urls> 94 | <bt:ShortStrings> 95 | <bt:String id="OEP.UDF.Namespace" DefaultValue="OfficeJs1Sample" /> 96 | <bt:String id="OEP.TaskpaneButton.Label" DefaultValue="Show Taskpane" /> 97 | <bt:String id="OEP.Group1Label" DefaultValue="OfficeJs1-Sample" /> 98 | <bt:String id="OEP.GetStarted.Title" DefaultValue="OfficeJs1-Sample" /> 99 | <bt:String id="OEP.JupyterTab.Label" DefaultValue="OfficeJs1 (Sample)" /> 100 | </bt:ShortStrings> 101 | <bt:LongStrings> 102 | <bt:String id="OEP.TaskpaneButton.Tooltip" DefaultValue="Click to show task pane" /> 103 | <bt:String id="OEP.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the Jupyter tab and click the 'Code Editor' button to get started." /> 104 | </bt:LongStrings> 105 | </Resources> 106 | </VersionOverrides> 107 | </OfficeApp> -------------------------------------------------------------------------------- /addins/officejs2/agave/Word-Manifest-v2.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 | xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" 5 | xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" 6 | xsi:type="TaskPaneApp"> 7 | <Id>14d055ab-8a88-4ae2-bb03-db099e8908a1</Id> 8 | <Version>1.0.0.0</Version> 9 | <ProviderName>Microsoft Office Platform Team</ProviderName> 10 | <DefaultLocale>en-US</DefaultLocale> 11 | <DisplayName DefaultValue="OfficeJs2-Sample-word" /> 12 | <Description DefaultValue="OfficeJs2 (word Sample)" /> 13 | <Hosts> 14 | <Host Name="Document" /> 15 | </Hosts> 16 | <DefaultSettings> 17 | <SourceLocation DefaultValue="https://officedev.github.io/custom-functions/addins/officejs2/agave/Word-Home-v2.html"/> 18 | </DefaultSettings> 19 | <Permissions>ReadWriteDocument</Permissions> 20 | <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0"> 21 | <Hosts> 22 | <Host xsi:type="Document"> 23 | <DesktopFormFactor> 24 | <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."--> 25 | <GetStarted> 26 | <!-- Title of the Getting Started callout. resid points to a ShortString resource --> 27 | <Title resid="OEP.GetStarted.Title"/> 28 | 29 | <!-- Description of the Getting Started callout. resid points to a LongString resource --> 30 | <Description resid="OEP.GetStarted.Description"/> 31 | 32 | <!-- Point to a url resource which details how the add-in should be used. --> 33 | <LearnMoreUrl resid="OEP.GetStarted.LearnMoreUrl"/> 34 | </GetStarted> 35 | 36 | <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 37 | Think of the FunctionFile as the code behind ExecuteFunction. --> 38 | <FunctionFile resid="OEP.SharedRuntime.Url" /> 39 | 40 | <!-- PrimaryCommandSurface is the main Office Ribbon. --> 41 | <ExtensionPoint xsi:type="PrimaryCommandSurface"> 42 | <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. --> 43 | <CustomTab id="OEP.TabJupyter"> 44 | <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. --> 45 | <Group id="OEP.Group1"> 46 | <!-- Label for your group. resid must point to a ShortString resource. --> 47 | <Label resid="OEP.Group1Label" /> 48 | <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. --> 49 | <!-- Use PNG icons. All URLs on the resources section must use HTTPS. --> 50 | <Icon> 51 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 52 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 53 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 54 | </Icon> 55 | <!-- Control. It can be of type "Button" or "Menu". --> 56 | <Control xsi:type="Button" id="OEP.TaskpaneButton"> 57 | <Label resid="OEP.TaskpaneButton.Label" /> 58 | <Supertip> 59 | <!-- ToolTip title. resid must point to a ShortString resource. --> 60 | <Title resid="OEP.TaskpaneButton.Label" /> 61 | <!-- ToolTip description. resid must point to a LongString resource. --> 62 | <Description resid="OEP.TaskpaneButton.Tooltip" /> 63 | </Supertip> 64 | <Icon> 65 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 66 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 67 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 68 | </Icon> 69 | 70 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 71 | <Action xsi:type="ShowTaskpane"> 72 | <TaskpaneId>CodeEditor</TaskpaneId> 73 | <!-- Provide a url resource id for the location that will be displayed on the task pane. --> 74 | <SourceLocation resid="OEP.SharedRuntime.Url" /> 75 | </Action> 76 | </Control> 77 | </Group> 78 | <Label resid="OEP.JupyterTab.Label" /> 79 | </CustomTab> 80 | </ExtensionPoint> 81 | </DesktopFormFactor> 82 | </Host> 83 | </Hosts> 84 | <Resources> 85 | <bt:Images> 86 | <bt:Image id="OEP.tpicon_16x16" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button16x16.png" /> 87 | <bt:Image id="OEP.tpicon_32x32" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button32x32.png" /> 88 | <bt:Image id="OEP.tpicon_80x80" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button80x80.png" /> 89 | </bt:Images> 90 | <bt:Urls> 91 | <bt:Url id="OEP.SharedRuntime.Url" DefaultValue="https://officedev.github.io/custom-functions/addins/officejs2/agave/Word-Home-v2.html" /> 92 | <bt:Url id="OEP.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" /> 93 | </bt:Urls> 94 | <bt:ShortStrings> 95 | <bt:String id="OEP.UDF.Namespace" DefaultValue="OfficeJs2Sample" /> 96 | <bt:String id="OEP.TaskpaneButton.Label" DefaultValue="Show Taskpane" /> 97 | <bt:String id="OEP.Group1Label" DefaultValue="OfficeJs2-Sample" /> 98 | <bt:String id="OEP.GetStarted.Title" DefaultValue="OfficeJs2-Sample" /> 99 | <bt:String id="OEP.JupyterTab.Label" DefaultValue="OfficeJs2 (Sample)" /> 100 | </bt:ShortStrings> 101 | <bt:LongStrings> 102 | <bt:String id="OEP.TaskpaneButton.Tooltip" DefaultValue="Click to show task pane" /> 103 | <bt:String id="OEP.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the Jupyter tab and click the 'Code Editor' button to get started." /> 104 | </bt:LongStrings> 105 | </Resources> 106 | </VersionOverrides> 107 | </OfficeApp> -------------------------------------------------------------------------------- /addins/officejs2/agave/home-v1.html: -------------------------------------------------------------------------------- 1 | <html> 2 | 3 | <head> 4 | <title>Office.js V1 5 | 9 | 10 | 18 | 21 | 22 | 25 | 26 | 27 | 28 |
29 | 30 |
31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 |
43 |
44 | the following code: 45 |
46 |
47 | 48 |
49 |
50 |
51 | Logs: 52 |
53 |
54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /addins/officejs2/agave/home-v2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Office.js V2 5 | 9 | 10 | 24 | 27 | 28 | 31 | 32 | 33 | 34 |
35 | 36 |
37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
48 |
49 |
50 | the following code: 51 |
52 |
53 | 54 |
55 |
56 |
57 | Logs: 58 |
59 |
60 |
61 | 62 | 63 | -------------------------------------------------------------------------------- /addins/officejs2/agave/manifest-v1.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | bf1280cb-5b38-4929-80c5-de075f265394 8 | 1.0.0.0 9 | Microsoft Office Platform Team 10 | en-US 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | ReadWriteDocument 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | <!-- Description of the Getting Started callout. resid points to a LongString resource --> 30 | <Description resid="OEP.GetStarted.Description"/> 31 | 32 | <!-- Point to a url resource which details how the add-in should be used. --> 33 | <LearnMoreUrl resid="OEP.GetStarted.LearnMoreUrl"/> 34 | </GetStarted> 35 | 36 | <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 37 | Think of the FunctionFile as the code behind ExecuteFunction. --> 38 | <FunctionFile resid="OEP.SharedRuntime.Url" /> 39 | 40 | <!-- PrimaryCommandSurface is the main Office Ribbon. --> 41 | <ExtensionPoint xsi:type="PrimaryCommandSurface"> 42 | <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. --> 43 | <CustomTab id="OEP.TabJupyter"> 44 | <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. --> 45 | <Group id="OEP.Group1"> 46 | <!-- Label for your group. resid must point to a ShortString resource. --> 47 | <Label resid="OEP.Group1Label" /> 48 | <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. --> 49 | <!-- Use PNG icons. All URLs on the resources section must use HTTPS. --> 50 | <Icon> 51 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 52 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 53 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 54 | </Icon> 55 | <!-- Control. It can be of type "Button" or "Menu". --> 56 | <Control xsi:type="Button" id="OEP.TaskpaneButton"> 57 | <Label resid="OEP.TaskpaneButton.Label" /> 58 | <Supertip> 59 | <!-- ToolTip title. resid must point to a ShortString resource. --> 60 | <Title resid="OEP.TaskpaneButton.Label" /> 61 | <!-- ToolTip description. resid must point to a LongString resource. --> 62 | <Description resid="OEP.TaskpaneButton.Tooltip" /> 63 | </Supertip> 64 | <Icon> 65 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 66 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 67 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 68 | </Icon> 69 | 70 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 71 | <Action xsi:type="ShowTaskpane"> 72 | <TaskpaneId>CodeEditor</TaskpaneId> 73 | <!-- Provide a url resource id for the location that will be displayed on the task pane. --> 74 | <SourceLocation resid="OEP.SharedRuntime.Url" /> 75 | </Action> 76 | </Control> 77 | </Group> 78 | <Label resid="OEP.JupyterTab.Label" /> 79 | </CustomTab> 80 | </ExtensionPoint> 81 | </DesktopFormFactor> 82 | </Host> 83 | </Hosts> 84 | <Resources> 85 | <bt:Images> 86 | <bt:Image id="OEP.tpicon_16x16" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button16x16.png" /> 87 | <bt:Image id="OEP.tpicon_32x32" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button32x32.png" /> 88 | <bt:Image id="OEP.tpicon_80x80" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button80x80.png" /> 89 | </bt:Images> 90 | <bt:Urls> 91 | <bt:Url id="OEP.SharedRuntime.Url" DefaultValue="https://officedev.github.io/custom-functions/addins/officejs2/agave/home-v1.html" /> 92 | <bt:Url id="OEP.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" /> 93 | </bt:Urls> 94 | <bt:ShortStrings> 95 | <bt:String id="OEP.UDF.Namespace" DefaultValue="OfficeJs1Sample" /> 96 | <bt:String id="OEP.TaskpaneButton.Label" DefaultValue="Show Taskpane" /> 97 | <bt:String id="OEP.Group1Label" DefaultValue="OfficeJs1-Sample" /> 98 | <bt:String id="OEP.GetStarted.Title" DefaultValue="OfficeJs1-Sample" /> 99 | <bt:String id="OEP.JupyterTab.Label" DefaultValue="OfficeJs1 (Sample)" /> 100 | </bt:ShortStrings> 101 | <bt:LongStrings> 102 | <bt:String id="OEP.TaskpaneButton.Tooltip" DefaultValue="Click to show task pane" /> 103 | <bt:String id="OEP.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the Jupyter tab and click the 'Code Editor' button to get started." /> 104 | </bt:LongStrings> 105 | </Resources> 106 | </VersionOverrides> 107 | </OfficeApp> 108 | -------------------------------------------------------------------------------- /addins/officejs2/agave/manifest-v2.xml: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" 3 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 | xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" 5 | xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" 6 | xsi:type="TaskPaneApp"> 7 | <Id>f18a17b1-9cb1-48ae-bc91-f6a667a27f2e</Id> 8 | <Version>1.0.0.0</Version> 9 | <ProviderName>Microsoft Office Platform Team</ProviderName> 10 | <DefaultLocale>en-US</DefaultLocale> 11 | <DisplayName DefaultValue="OfficeJs2-Sample" /> 12 | <Description DefaultValue="OfficeJs2 (Sample)" /> 13 | <Hosts> 14 | <Host Name="Workbook" /> 15 | </Hosts> 16 | <DefaultSettings> 17 | <SourceLocation DefaultValue="https://officedev.github.io/custom-functions/addins/officejs2/agave/home-v2.html"/> 18 | </DefaultSettings> 19 | <Permissions>ReadWriteDocument</Permissions> 20 | <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0"> 21 | <Hosts> 22 | <Host xsi:type="Workbook"> 23 | <DesktopFormFactor> 24 | <!--"This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install."--> 25 | <GetStarted> 26 | <!-- Title of the Getting Started callout. resid points to a ShortString resource --> 27 | <Title resid="OEP.GetStarted.Title"/> 28 | 29 | <!-- Description of the Getting Started callout. resid points to a LongString resource --> 30 | <Description resid="OEP.GetStarted.Description"/> 31 | 32 | <!-- Point to a url resource which details how the add-in should be used. --> 33 | <LearnMoreUrl resid="OEP.GetStarted.LearnMoreUrl"/> 34 | </GetStarted> 35 | 36 | <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 37 | Think of the FunctionFile as the code behind ExecuteFunction. --> 38 | <FunctionFile resid="OEP.SharedRuntime.Url" /> 39 | 40 | <!-- PrimaryCommandSurface is the main Office Ribbon. --> 41 | <ExtensionPoint xsi:type="PrimaryCommandSurface"> 42 | <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. --> 43 | <CustomTab id="OEP.TabJupyter"> 44 | <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. --> 45 | <Group id="OEP.Group1"> 46 | <!-- Label for your group. resid must point to a ShortString resource. --> 47 | <Label resid="OEP.Group1Label" /> 48 | <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. --> 49 | <!-- Use PNG icons. All URLs on the resources section must use HTTPS. --> 50 | <Icon> 51 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 52 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 53 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 54 | </Icon> 55 | <!-- Control. It can be of type "Button" or "Menu". --> 56 | <Control xsi:type="Button" id="OEP.TaskpaneButton"> 57 | <Label resid="OEP.TaskpaneButton.Label" /> 58 | <Supertip> 59 | <!-- ToolTip title. resid must point to a ShortString resource. --> 60 | <Title resid="OEP.TaskpaneButton.Label" /> 61 | <!-- ToolTip description. resid must point to a LongString resource. --> 62 | <Description resid="OEP.TaskpaneButton.Tooltip" /> 63 | </Supertip> 64 | <Icon> 65 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 66 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 67 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 68 | </Icon> 69 | 70 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 71 | <Action xsi:type="ShowTaskpane"> 72 | <TaskpaneId>CodeEditor</TaskpaneId> 73 | <!-- Provide a url resource id for the location that will be displayed on the task pane. --> 74 | <SourceLocation resid="OEP.SharedRuntime.Url" /> 75 | </Action> 76 | </Control> 77 | </Group> 78 | <Label resid="OEP.JupyterTab.Label" /> 79 | </CustomTab> 80 | </ExtensionPoint> 81 | </DesktopFormFactor> 82 | </Host> 83 | </Hosts> 84 | <Resources> 85 | <bt:Images> 86 | <bt:Image id="OEP.tpicon_16x16" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button16x16.png" /> 87 | <bt:Image id="OEP.tpicon_32x32" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button32x32.png" /> 88 | <bt:Image id="OEP.tpicon_80x80" DefaultValue="https://officedev.github.io/custom-functions/addins/CFSample/Images/Button80x80.png" /> 89 | </bt:Images> 90 | <bt:Urls> 91 | <bt:Url id="OEP.SharedRuntime.Url" DefaultValue="https://officedev.github.io/custom-functions/addins/officejs2/agave/home-v2.html" /> 92 | <bt:Url id="OEP.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" /> 93 | </bt:Urls> 94 | <bt:ShortStrings> 95 | <bt:String id="OEP.UDF.Namespace" DefaultValue="OfficeJs2Sample" /> 96 | <bt:String id="OEP.TaskpaneButton.Label" DefaultValue="Show Taskpane" /> 97 | <bt:String id="OEP.Group1Label" DefaultValue="OfficeJs2-Sample" /> 98 | <bt:String id="OEP.GetStarted.Title" DefaultValue="OfficeJs2-Sample" /> 99 | <bt:String id="OEP.JupyterTab.Label" DefaultValue="OfficeJs2 (Sample)" /> 100 | </bt:ShortStrings> 101 | <bt:LongStrings> 102 | <bt:String id="OEP.TaskpaneButton.Tooltip" DefaultValue="Click to show task pane" /> 103 | <bt:String id="OEP.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the Jupyter tab and click the 'Code Editor' button to get started." /> 104 | </bt:LongStrings> 105 | </Resources> 106 | </VersionOverrides> 107 | </OfficeApp> -------------------------------------------------------------------------------- /addins/officejs2/agave/wordApp.js: -------------------------------------------------------------------------------- 1 | var _bodyOnLoadCalled = false; 2 | var _pendingLogs = []; 3 | function BodyOnLoad() { 4 | _bodyOnLoadCalled = true; 5 | for (var i = 0; i < _pendingLogs.length; i++) { 6 | log(_pendingLogs[i]); 7 | } 8 | } 9 | 10 | function log(text) { 11 | if (!_bodyOnLoadCalled) { 12 | _pendingLogs.push(text); 13 | return; 14 | } 15 | var div = document.createElement('div'); 16 | div.appendChild(document.createTextNode(text)); 17 | document.getElementById('DivLog').appendChild(div); 18 | } 19 | 20 | Office.onReady(function (hostAndPlatform) { 21 | _perfData.officeOnReadyApp = performance.now(); 22 | _perfData.officeOnReadyAppDuration = _perfData.officeOnReadyApp - _perfData.start; 23 | log(JSON.stringify(_perfData)); 24 | if (typeof(OSFPerformance) !== 'undefined') { 25 | log('OSFPerformance'); 26 | log(JSON.stringify(OSFPerformance)); 27 | } 28 | 29 | log(Office.context.displayLanguage); 30 | log(hostAndPlatform.host); 31 | log(hostAndPlatform.platform); 32 | }); 33 | 34 | Office.onReady(function (hostAndPlatform) { 35 | log('[SecondOnReady] platform=' + hostAndPlatform.platform); 36 | }); 37 | 38 | function BtnRunClick() { 39 | var code = document.getElementById("TxtCode").value; 40 | eval(code); 41 | } 42 | 43 | function BtnReloadClick() { 44 | window.location.reload(true); 45 | } 46 | function BtnTestClick() { 47 | Word.run(function (context) { 48 | 49 | var textSample = 'This is an example of the insert text method. This is a method ' + 50 | 'which allows users to insert text into a selection. It can insert text into a ' + 51 | 'relative location or it can overwrite the current selection. Since the ' + 52 | 'getSelection method returns a range object, look up the range object documentation ' + 53 | 'for everything you can do with a selection.'; 54 | 55 | // Create a range proxy object for the current selection. 56 | var range = context.document.getSelection(); 57 | 58 | // Queue a command to insert text at the end of the selection. 59 | range.insertText(textSample, Word.InsertLocation.end); 60 | 61 | // Synchronize the document state by executing the queued commands, 62 | // and return a promise to indicate task completion. 63 | return context.sync().then(function () { 64 | log('Inserted the text at the end of the selection.'); 65 | }); 66 | }) 67 | .catch(function (error) { 68 | log('Error: ' + JSON.stringify(error)); 69 | if (error instanceof OfficeExtension.Error) { 70 | log('Debug info: ' + JSON.stringify(error.debugInfo)); 71 | } 72 | }); 73 | 74 | } 75 | 76 | function BtnClearLogClick() { 77 | document.getElementById('DivLog').innerHTML = ''; 78 | } -------------------------------------------------------------------------------- /addins/officejs2/agave/xdmproxy.html: -------------------------------------------------------------------------------- 1 | <html> 2 | 3 | <head> 4 | <title>perf proxy 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | -------------------------------------------------------------------------------- /addins/officejs2/agave/xdmproxy.js: -------------------------------------------------------------------------------- 1 | var appContext = {}; 2 | window.addEventListener("message", receiveMessage, false); 3 | var XdmMessagePackager = (function () { 4 | function XdmMessagePackager() { 5 | } 6 | XdmMessagePackager.envelope = function (messageObject, serializerVersion) { 7 | if (typeof (messageObject) === "object") { 8 | messageObject._serializerVersion = 1; 9 | } 10 | return JSON.stringify(messageObject); 11 | }; 12 | XdmMessagePackager.unenvelope = function (messageObject, serializerVersion) { 13 | return JSON.parse(messageObject); 14 | }; 15 | return XdmMessagePackager; 16 | }()); 17 | function receiveMessage(e) { 18 | if (e.data != '') { 19 | var messageObject; 20 | var serializerVersion = 1; 21 | var serializedMessage = e.data; 22 | try { 23 | messageObject = XdmMessagePackager.unenvelope(serializedMessage, 1); 24 | serializerVersion = messageObject._serializerVersion != null ? messageObject._serializerVersion : serializerVersion; 25 | } 26 | catch (ex) { 27 | return; 28 | } 29 | if (messageObject._actionName == "HostAppContextAsync") { 30 | appContext = messageObject; 31 | appContext._actionName = "ContextActivationManager_getAppContextAsync"; 32 | } 33 | else if (messageObject._actionName == "ContextActivationManager_getAppContextAsync") 34 | { 35 | var requestJson = XdmMessagePackager.unenvelope(e.data, 1); 36 | appContext._conversationId = requestJson._conversationId; 37 | e.source.postMessage(XdmMessagePackager.envelope(appContext, 1), e.origin); 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /addins/outlook/AgaveErrorUX/AgaveErrorUx.debug.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/outlook/AgaveErrorUX/AgaveErrorUx.debug.js -------------------------------------------------------------------------------- /addins/outlook/AgaveErrorUX/AgaveErrorUx.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/outlook/AgaveErrorUX/AgaveErrorUx.js -------------------------------------------------------------------------------- /addins/outlook/AgaveErrorUX/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/outlook/AgaveErrorUX/index.html -------------------------------------------------------------------------------- /addins/outlook/AgaveErrorUX/style/AgaveErrorUX.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/outlook/AgaveErrorUX/style/AgaveErrorUX.css -------------------------------------------------------------------------------- /addins/outlook/Home_olk.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 |
28 | 29 |
30 | 31 | 32 | -------------------------------------------------------------------------------- /addins/outlook/app_olk.js: -------------------------------------------------------------------------------- 1 | function getSubject() { 2 | Office.context.mailbox.item.subject.getAsync(callback); 3 | 4 | function callback(asyncResult) { 5 | var subject = asyncResult.value; 6 | writeResult("GetSubject result is: "+ subject); 7 | } 8 | } 9 | 10 | function setSubject() { 11 | Office.context.mailbox.item.subject.setAsync("New subject!", function (asyncResult) { 12 | if (asyncResult.status === "failed") { 13 | console.log("Action failed with error: " + asyncResult.error.message); 14 | writeResult("Set subject Action failed with error: " + asyncResult.error.message); 15 | } 16 | else { 17 | writeResult("SetSubject done."); 18 | } 19 | }); 20 | } 21 | 22 | function getUserProfile() { 23 | writeResult(Office.context.mailbox.userProfile.displayname); 24 | } 25 | 26 | function getRestId() { 27 | let itemId = Office.context.mailbox.item.itemId; 28 | let restId = Office.context.mailbox.convertToRestId(itemId, Office.MailboxEnums.RestVersion.v2_0); 29 | writeResult(restId); 30 | } 31 | 32 | function getLanguage() { 33 | writeResult(Office.context.displayLanguage); 34 | } 35 | 36 | function closeContainer() { 37 | Office.context.ui.closeContainer(); 38 | } 39 | 40 | function clearResult() { 41 | document.getElementById("result").value = ""; 42 | } 43 | 44 | function writeResult(result) { 45 | document.getElementById("result").value += ("\n" +result); 46 | } 47 | 48 | Office.initialize = function (reason) {}; 49 | Office.onReady(function(info) {}); -------------------------------------------------------------------------------- /addins/outlook/en-us/outlook_strings.debug.js: -------------------------------------------------------------------------------- 1 | _u = typeof _u === "object" ? _u : {}; 2 | _u.ExtensibilityStrings = _u.ExtensibilityStrings || {}; 3 | 4 | _u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text='The selected item has been changed.'; 5 | _u.ExtensibilityStrings.l_ActionsDefinitionMultipleActionsError_Text='Only a single action is currently supported.'; 6 | _u.ExtensibilityStrings.l_ActionsDefinitionWrongNotificationMessageError_Text='Actions can\'t be defined for this notification message type.'; 7 | _u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text='The attachment cannot be deleted from the item.'; 8 | _u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text='The user removed the attachment before upload has completed.'; 9 | _u.ExtensibilityStrings.l_AttachmentErrorName_Text='Attachment Error'; 10 | _u.ExtensibilityStrings.l_AttachmentExceededSize_Text='The attachment cannot be added because it is too big.'; 11 | _u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text='One or more of the attachment IDs is too long.'; 12 | _u.ExtensibilityStrings.l_AttachmentNameTooLong_Text='One or more of the attachment names is too long.'; 13 | _u.ExtensibilityStrings.l_AttachmentNotSupported_Text='The attachment type is not supported.'; 14 | _u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text='The attachment cannot be added to the item.'; 15 | _u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text='One or more of the attachment URLs is too long.'; 16 | _u.ExtensibilityStrings.l_CallSaveAsyncBeforeToken_Text='The token can\'t be retrieved until the item is saved.'; 17 | _u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text='Attachments cannot be added while the full reply or forward is being retrieved from the server.'; 18 | _u.ExtensibilityStrings.l_CannotPersistPropertyInUnsavedDraftError_Text='Notifications can\'t be persisted in unsaved drafts. Save the item before you call this API.'; 19 | _u.ExtensibilityStrings.l_CursorPositionChanged_Text='The user changed the position of the cursor while the data was being inserted.'; 20 | _u.ExtensibilityStrings.l_DataWriteErrorName_Text='Data Write Error'; 21 | _u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text='The attachment cannot be deleted because attachment with the attachment index cannot be found.'; 22 | _u.ExtensibilityStrings.l_DisplayNameTooLong_Text='One or more of the display names provided is too long.'; 23 | _u.ExtensibilityStrings.l_DisplayReplyFormHtmlBodyRequired_Text='The \'htmlBody\' is required.'; 24 | _u.ExtensibilityStrings.l_DuplicateNotificationKey_Text='A notification with the provided key already exists.'; 25 | _u.ExtensibilityStrings.l_Duplicate_Category_Error_Text='One of the categories provided is already in the master category list.'; 26 | _u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text='Elevated permission is required to call the method: \'{0}\'.'; 27 | _u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text='Elevated permission is required to access protected members of the JavaScript API for Office.'; 28 | _u.ExtensibilityStrings.l_EmailAddressTooLong_Text='One or more of the email addresses provided is too long.'; 29 | _u.ExtensibilityStrings.l_EwsRequestOversized_Text='The request exceeds the 1 MB size limit. Please modify your EWS request.'; 30 | _u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text='Attachments cannot be added because the message already has the maximum number of attachments'; 31 | _u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text='The HTML santization has failed.'; 32 | _u.ExtensibilityStrings.l_Insufficient_Item_Permissions_Text='The user doesn\'t have the permissions required to perform this operation.'; 33 | _u.ExtensibilityStrings.l_InternalFormatError_Text='There was an internal format error.'; 34 | _u.ExtensibilityStrings.l_InternalProtocolError_Text='Internal protocol error: \'{0}\'.'; 35 | _u.ExtensibilityStrings.l_Internal_Server_Error_Text='The Exchange server returned an error. Please look at the diagnostics object for more information.'; 36 | _u.ExtensibilityStrings.l_Internet_Not_Connected_Error_Text='The user is no longer connected to the network. Please check your network connection and try again.'; 37 | _u.ExtensibilityStrings.l_InvalidActionType_Text='The value of the parameter \'actionType\' is invalid. The accepted value is \"showTaskPane\".'; 38 | _u.ExtensibilityStrings.l_InvalidAttachmentId_Text='The attachment ID was invalid.'; 39 | _u.ExtensibilityStrings.l_InvalidAttachmentPath_Text='The attachment path was invalid.'; 40 | _u.ExtensibilityStrings.l_InvalidCommandIdError_Text='The value of the parameter \'commandId\' is invalid.'; 41 | _u.ExtensibilityStrings.l_InvalidDate_Text='The input doesn\'t resolve to a valid date.'; 42 | _u.ExtensibilityStrings.l_InvalidEndTime_Text='The end time cannot be before the start time.'; 43 | _u.ExtensibilityStrings.l_InvalidEventDates_Text='The end date occurs before the start date.'; 44 | _u.ExtensibilityStrings.l_InvalidParameterValueError_Text='The value of the \'{0}\' parameter is invalid.'; 45 | _u.ExtensibilityStrings.l_InvalidSelection_Text='The selection is invalid.'; 46 | _u.ExtensibilityStrings.l_InvalidTime_Text='The input doesn\'t resolve to a valid time.'; 47 | _u.ExtensibilityStrings.l_Invalid_Category_Error_Text='Invalid categories were provided.'; 48 | _u.ExtensibilityStrings.l_Item_Not_Saved_Error_Text='The id can\'t be retrieved until the item is saved.'; 49 | _u.ExtensibilityStrings.l_MessageInDifferentStoreError_Text='The EWS ID can\'t be retrieved because the message is saved in a different store.'; 50 | _u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text='No valid recipients were provided.'; 51 | _u.ExtensibilityStrings.l_NotificationKeyNotFound_Text='There are no notifications with the provided key.'; 52 | _u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text='The parameter \'{0}\' is mandatory and it can\'t be null or empty.'; 53 | _u.ExtensibilityStrings.l_NumberOfNotificationsExceeded_Text='The notification couldn\'t be added because the notification limit has been reached.'; 54 | _u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text='The total number of recipients in the field can\'t exceed {0}.'; 55 | _u.ExtensibilityStrings.l_OffsetNotfound_Text='An offset for this time stamp couldn\'t be found.'; 56 | _u.ExtensibilityStrings.l_Olk_Http_Error_Text='The request has failed. Please look at the diagnostics object for the HTTP error code.'; 57 | _u.ExtensibilityStrings.l_ParameterValueTooLongError_Text='The value of the \'{0}\' parameter is too long. The maximum number of characters is \'{1}\'.'; 58 | _u.ExtensibilityStrings.l_ParametersNotAsExpected_Text='The given parameters do not match the expected format.'; 59 | _u.ExtensibilityStrings.l_PersistedNotificationArrayReadError_Text='The API call you made failed because the persisted notifications couldn\'t be retrieved.'; 60 | _u.ExtensibilityStrings.l_PersistedNotificationArraySaveError_Text='The API call you made failed because notifications couldn\'t be persisted.'; 61 | _u.ExtensibilityStrings.l_RecurrenceErrorMaxOccurrences_Text='The recurring series exceeds the maximum limit of 999 occurrences.'; 62 | _u.ExtensibilityStrings.l_RecurrenceErrorZeroOccurrences_Text='The recurring series has no occurrences in the specified date range.'; 63 | _u.ExtensibilityStrings.l_RecurrenceInvalidTimeZone_Text='The specified time zone is not supported.'; 64 | _u.ExtensibilityStrings.l_RecurrenceUnsupportedAlternateCalendar_Text='The recurrence pattern was set by the user using an alternate calendar that is not supported.'; 65 | _u.ExtensibilityStrings.l_Recurrence_Error_Instance_SetAsync_Text='A recurrence pattern can\'t be set for a single occurrence in a series.'; 66 | _u.ExtensibilityStrings.l_Recurrence_Error_Properties_Invalid_Text='The recurrence pattern isn\'t valid. Please check that the specified recurrence properties align with the recurrence type.'; 67 | _u.ExtensibilityStrings.l_SaveError_Text='Connection error occurred while trying to save the item on the server.'; 68 | 69 | 70 | -------------------------------------------------------------------------------- /addins/outlook/en-us/outlook_strings.js: -------------------------------------------------------------------------------- 1 | _u = typeof _u === "object" ? _u : {};_u.ExtensibilityStrings = _u.ExtensibilityStrings || {};_u.ExtensibilityStrings=function(){};if (_u.ExtensibilityStrings.registerClass) _u.ExtensibilityStrings.registerClass("_u.ExtensibilityStrings");_u.ExtensibilityStrings.l_APICallFailedDueToItemChange_Text="The selected item has been changed.";_u.ExtensibilityStrings.l_ActionsDefinitionMultipleActionsError_Text="Only a single action is currently supported.";_u.ExtensibilityStrings.l_ActionsDefinitionWrongNotificationMessageError_Text="Actions can't be defined for this notification message type.";_u.ExtensibilityStrings.l_AttachmentDeleteGeneralFailure_Text="The attachment cannot be deleted from the item.";_u.ExtensibilityStrings.l_AttachmentDeletedBeforeUploadCompletes_Text="The user removed the attachment before upload has completed.";_u.ExtensibilityStrings.l_AttachmentErrorName_Text="Attachment Error";_u.ExtensibilityStrings.l_AttachmentExceededSize_Text="The attachment cannot be added because it is too big.";_u.ExtensibilityStrings.l_AttachmentItemIdTooLong_Text="One or more of the attachment IDs is too long.";_u.ExtensibilityStrings.l_AttachmentNameTooLong_Text="One or more of the attachment names is too long.";_u.ExtensibilityStrings.l_AttachmentNotSupported_Text="The attachment type is not supported.";_u.ExtensibilityStrings.l_AttachmentUploadGeneralFailure_Text="The attachment cannot be added to the item.";_u.ExtensibilityStrings.l_AttachmentUrlTooLong_Text="One or more of the attachment URLs is too long.";_u.ExtensibilityStrings.l_CallSaveAsyncBeforeToken_Text="The token can't be retrieved until the item is saved.";_u.ExtensibilityStrings.l_CannotAddAttachmentBeforeUpgrade_Text="Attachments cannot be added while the full reply or forward is being retrieved from the server.";_u.ExtensibilityStrings.l_CannotPersistPropertyInUnsavedDraftError_Text="Notifications can't be persisted in unsaved drafts. Save the item before you call this API.";_u.ExtensibilityStrings.l_CursorPositionChanged_Text="The user changed the position of the cursor while the data was being inserted.";_u.ExtensibilityStrings.l_DataWriteErrorName_Text="Data Write Error";_u.ExtensibilityStrings.l_DeleteAttachmentDoesNotExist_Text="The attachment cannot be deleted because attachment with the attachment index cannot be found.";_u.ExtensibilityStrings.l_DisplayNameTooLong_Text="One or more of the display names provided is too long.";_u.ExtensibilityStrings.l_DisplayReplyFormHtmlBodyRequired_Text="The 'htmlBody' is required.";_u.ExtensibilityStrings.l_DuplicateNotificationKey_Text="A notification with the provided key already exists.";_u.ExtensibilityStrings.l_Duplicate_Category_Error_Text="One of the categories provided is already in the master category list.";_u.ExtensibilityStrings.l_ElevatedPermissionNeededForMethod_Text="Elevated permission is required to call the method: '{0}'.";_u.ExtensibilityStrings.l_ElevatedPermissionNeeded_Text="Elevated permission is required to access protected members of the JavaScript API for Office.";_u.ExtensibilityStrings.l_EmailAddressTooLong_Text="One or more of the email addresses provided is too long.";_u.ExtensibilityStrings.l_EwsRequestOversized_Text="The request exceeds the 1 MB size limit. Please modify your EWS request.";_u.ExtensibilityStrings.l_ExceededMaxNumberOfAttachments_Text="Attachments cannot be added because the message already has the maximum number of attachments";_u.ExtensibilityStrings.l_HtmlSanitizationFailure_Text="The HTML santization has failed.";_u.ExtensibilityStrings.l_Insufficient_Item_Permissions_Text="The user doesn't have the permissions required to perform this operation.";_u.ExtensibilityStrings.l_InternalFormatError_Text="There was an internal format error.";_u.ExtensibilityStrings.l_InternalProtocolError_Text="Internal protocol error: '{0}'.";_u.ExtensibilityStrings.l_Internal_Server_Error_Text="The Exchange server returned an error. Please look at the diagnostics object for more information.";_u.ExtensibilityStrings.l_Internet_Not_Connected_Error_Text="The user is no longer connected to the network. Please check your network connection and try again.";_u.ExtensibilityStrings.l_InvalidActionType_Text="The value of the parameter 'actionType' is invalid. The accepted value is \"showTaskPane\".";_u.ExtensibilityStrings.l_InvalidAttachmentId_Text="The attachment ID was invalid.";_u.ExtensibilityStrings.l_InvalidAttachmentPath_Text="The attachment path was invalid.";_u.ExtensibilityStrings.l_InvalidCommandIdError_Text="The value of the parameter 'commandId' is invalid.";_u.ExtensibilityStrings.l_InvalidDate_Text="The input doesn't resolve to a valid date.";_u.ExtensibilityStrings.l_InvalidEndTime_Text="The end time cannot be before the start time.";_u.ExtensibilityStrings.l_InvalidEventDates_Text="The end date occurs before the start date.";_u.ExtensibilityStrings.l_InvalidParameterValueError_Text="The value of the '{0}' parameter is invalid.";_u.ExtensibilityStrings.l_InvalidSelection_Text="The selection is invalid.";_u.ExtensibilityStrings.l_InvalidTime_Text="The input doesn't resolve to a valid time.";_u.ExtensibilityStrings.l_Invalid_Category_Error_Text="Invalid categories were provided.";_u.ExtensibilityStrings.l_Item_Not_Saved_Error_Text="The id can't be retrieved until the item is saved.";_u.ExtensibilityStrings.l_MessageInDifferentStoreError_Text="The EWS ID can't be retrieved because the message is saved in a different store.";_u.ExtensibilityStrings.l_NoValidRecipientsProvided_Text="No valid recipients were provided.";_u.ExtensibilityStrings.l_NotificationKeyNotFound_Text="There are no notifications with the provided key.";_u.ExtensibilityStrings.l_NullOrEmptyParameterError_Text="The parameter '{0}' is mandatory and it can't be null or empty.";_u.ExtensibilityStrings.l_NumberOfNotificationsExceeded_Text="The notification couldn't be added because the notification limit has been reached.";_u.ExtensibilityStrings.l_NumberOfRecipientsExceeded_Text="The total number of recipients in the field can't exceed {0}.";_u.ExtensibilityStrings.l_OffsetNotfound_Text="An offset for this time stamp couldn't be found.";_u.ExtensibilityStrings.l_Olk_Http_Error_Text="The request has failed. Please look at the diagnostics object for the HTTP error code.";_u.ExtensibilityStrings.l_ParameterValueTooLongError_Text="The value of the '{0}' parameter is too long. The maximum number of characters is '{1}'.";_u.ExtensibilityStrings.l_ParametersNotAsExpected_Text="The given parameters do not match the expected format.";_u.ExtensibilityStrings.l_PersistedNotificationArrayReadError_Text="The API call you made failed because the persisted notifications couldn't be retrieved.";_u.ExtensibilityStrings.l_PersistedNotificationArraySaveError_Text="The API call you made failed because notifications couldn't be persisted.";_u.ExtensibilityStrings.l_RecurrenceErrorMaxOccurrences_Text="The recurring series exceeds the maximum limit of 999 occurrences.";_u.ExtensibilityStrings.l_RecurrenceErrorZeroOccurrences_Text="The recurring series has no occurrences in the specified date range.";_u.ExtensibilityStrings.l_RecurrenceInvalidTimeZone_Text="The specified time zone is not supported.";_u.ExtensibilityStrings.l_RecurrenceUnsupportedAlternateCalendar_Text="The recurrence pattern was set by the user using an alternate calendar that is not supported.";_u.ExtensibilityStrings.l_Recurrence_Error_Instance_SetAsync_Text="A recurrence pattern can't be set for a single occurrence in a series.";_u.ExtensibilityStrings.l_Recurrence_Error_Properties_Invalid_Text="The recurrence pattern isn't valid. Please check that the specified recurrence properties align with the recurrence type.";_u.ExtensibilityStrings.l_SaveError_Text="Connection error occurred while trying to save the item on the server." -------------------------------------------------------------------------------- /addins/perf/README.md: -------------------------------------------------------------------------------- 1 | # Purpose 2 | This add-in is used to test the perforamace of Custom Functions. In order . 3 | 4 | This Addin contains two components: 5 | 1. Taskpane: Contains automation mode and manual mode. 6 | - The automation mode requires to load a test worksheet. 7 | - The automation mode calculated the customfunction execution time based on the given input provided in the taskpane. 8 | 2. Custom Functions: Contains functions with different complexity. 9 | 10 | # Maintainer 11 | [ylu0826](https://github.com/ylu0826) 12 | -------------------------------------------------------------------------------- /addins/perf/assets/icon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/perf/assets/icon-16.png -------------------------------------------------------------------------------- /addins/perf/assets/icon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/perf/assets/icon-32.png -------------------------------------------------------------------------------- /addins/perf/assets/icon-80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/perf/assets/icon-80.png -------------------------------------------------------------------------------- /addins/perf/assets/logo-filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/perf/assets/logo-filled.png -------------------------------------------------------------------------------- /addins/perf/config/customfunctions.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": [ 3 | { 4 | "id": "MORTGAGEPAYMENTJS", 5 | "name": "MORTGAGEPAYMENTJS", 6 | "description": "Computes the mortgage payment", 7 | "helpUrl": "http://dev.office.com", 8 | "result": { 9 | "type": "number", 10 | "dimensionality": "scalar" 11 | }, 12 | "parameters": [ 13 | { 14 | "name": "principalAmount", 15 | "description": "Number", 16 | "type": "number", 17 | "dimensionality": "scalar" 18 | }, 19 | { 20 | "name": "interestRate", 21 | "description": "Number", 22 | "type": "number", 23 | "dimensionality": "scalar" 24 | }, 25 | { 26 | "name": "numberOfMonths", 27 | "description": "Number", 28 | "type": "number", 29 | "dimensionality": "scalar" 30 | } 31 | ], 32 | "options": { 33 | "sync": false, 34 | "stream": false 35 | } 36 | }, 37 | { 38 | "id": "SYNCMORTGAGEPAYMENTJS", 39 | "name": "SYNCMORTGAGEPAYMENTJS", 40 | "description": "Computes the mortgage payment", 41 | "helpUrl": "http://dev.office.com", 42 | "result": { 43 | "type": "number", 44 | "dimensionality": "scalar" 45 | }, 46 | "parameters": [ 47 | { 48 | "name": "principalAmount", 49 | "description": "Number", 50 | "type": "number", 51 | "dimensionality": "scalar" 52 | }, 53 | { 54 | "name": "interestRate", 55 | "description": "Number", 56 | "type": "number", 57 | "dimensionality": "scalar" 58 | }, 59 | { 60 | "name": "numberOfMonths", 61 | "description": "Number", 62 | "type": "number", 63 | "dimensionality": "scalar" 64 | } 65 | ], 66 | "options": { 67 | "sync": true, 68 | "stream": false 69 | } 70 | }, 71 | { 72 | "id": "FINDNTHPRIMEJS", 73 | "name": "FINDNTHPRIMEJS", 74 | "description": "Finds the nth prime", 75 | "helpUrl": "http://dev.office.com", 76 | "result": { 77 | "type": "number", 78 | "dimensionality": "scalar" 79 | }, 80 | "parameters": [ 81 | { 82 | "name": "n", 83 | "description": "Nth prime", 84 | "type": "number", 85 | "dimensionality": "matrix" 86 | } 87 | ], 88 | "options": { 89 | "sync": false, 90 | "stream": false 91 | } 92 | }, 93 | { 94 | "id": "SYNCFINDNTHPRIMEJS", 95 | "name": "SYNCFINDNTHPRIMEJS", 96 | "description": "Finds the nth prime", 97 | "helpUrl": "http://dev.office.com", 98 | "result": { 99 | "type": "number", 100 | "dimensionality": "scalar" 101 | }, 102 | "parameters": [ 103 | { 104 | "name": "n", 105 | "description": "Nth prime", 106 | "type": "number", 107 | "dimensionality": "matrix" 108 | } 109 | ], 110 | "options": { 111 | "sync": true, 112 | "stream": false 113 | } 114 | }, 115 | { 116 | "id": "BUBBLESORTJS", 117 | "name": "BUBBLESORTJS", 118 | "description": "Finds how many swaps will be performed to sort the input numbers", 119 | "helpUrl": "http://dev.office.com", 120 | "result": { 121 | "type": "number", 122 | "dimensionality": "scalar" 123 | }, 124 | "parameters": [ 125 | { 126 | "name": "numbers", 127 | "description": "Numbers to perform bubble sort on", 128 | "type": "number", 129 | "dimensionality": "matrix" 130 | } 131 | ], 132 | "options": { 133 | "sync": false, 134 | "stream": false 135 | } 136 | }, 137 | { 138 | "id": "SYNCBUBBLESORTJS", 139 | "name": "SYNCBUBBLESORTJS", 140 | "description": "Finds how many swaps will be performed to sort the input numbers", 141 | "helpUrl": "http://dev.office.com", 142 | "result": { 143 | "type": "number", 144 | "dimensionality": "scalar" 145 | }, 146 | "parameters": [ 147 | { 148 | "name": "numbers", 149 | "description": "Numbers to perform bubble sort on", 150 | "type": "number", 151 | "dimensionality": "matrix" 152 | } 153 | ], 154 | "options": { 155 | "sync": true, 156 | "stream": false 157 | } 158 | }, 159 | { 160 | "id": "ADDRANGEJS", 161 | "name": "ADDRANGEJS", 162 | "description": "Adds all the number in the range", 163 | "helpUrl": "http://dev.office.com", 164 | "result": { 165 | "type": "number" 166 | }, 167 | "parameters": [ 168 | { 169 | "name": "range", 170 | "description": "all the range", 171 | "type": "number", 172 | "dimensionality": "matrix" 173 | } 174 | ], 175 | "options": { 176 | "sync": false, 177 | "stream": false 178 | } 179 | }, 180 | { 181 | "id": "SYNCADDRANGEJS", 182 | "name": "SYNCADDRANGEJS", 183 | "description": "Adds all the number in the range", 184 | "helpUrl": "http://dev.office.com", 185 | "result": { 186 | "type": "number" 187 | }, 188 | "parameters": [ 189 | { 190 | "name": "range", 191 | "description": "all the range", 192 | "type": "number", 193 | "dimensionality": "matrix" 194 | } 195 | ], 196 | "options": { 197 | "sync": true, 198 | "stream": false 199 | } 200 | }, 201 | { 202 | "id": "ADDSTRINGRANGEJS", 203 | "name": "ADDSTRINGRANGEJS", 204 | "description": "Adds all strings length in the range", 205 | "helpUrl": "http://dev.office.com", 206 | "result": { 207 | "type": "number" 208 | }, 209 | "parameters": [ 210 | { 211 | "name": "range", 212 | "description": "all the range", 213 | "type": "string", 214 | "dimensionality": "matrix" 215 | } 216 | ], 217 | "options": { 218 | "sync": false, 219 | "stream": false 220 | } 221 | }, 222 | { 223 | "id": "SYNCADDSTRINGRANGEJS", 224 | "name": "SYNCADDSTRINGRANGEJS", 225 | "description": "Adds all strings length in the range", 226 | "helpUrl": "http://dev.office.com", 227 | "result": { 228 | "type": "number" 229 | }, 230 | "parameters": [ 231 | { 232 | "name": "range", 233 | "description": "all the range", 234 | "type": "string", 235 | "dimensionality": "matrix" 236 | } 237 | ], 238 | "options": { 239 | "sync": true, 240 | "stream": false 241 | } 242 | }, 243 | { 244 | "id": "NESTEDLOOPJS", 245 | "name": "NESTEDLOOPJS", 246 | "description": "Get double loop count based on the input", 247 | "helpUrl": "http://dev.office.com", 248 | "result": { 249 | "type": "number" 250 | }, 251 | "parameters": [ 252 | { 253 | "name": "n", 254 | "description": "loop count input", 255 | "type": "number", 256 | "dimensionality": "scalar" 257 | } 258 | ], 259 | "options": { 260 | "sync": false, 261 | "stream": false 262 | } 263 | }, 264 | { 265 | "id": "SYNCNESTEDLOOPJS", 266 | "name": "SYNCNESTEDLOOPJS", 267 | "description": "Get double loop count based on the input", 268 | "helpUrl": "http://dev.office.com", 269 | "result": { 270 | "type": "number" 271 | }, 272 | "parameters": [ 273 | { 274 | "name": "n", 275 | "description": "loop count input", 276 | "type": "number", 277 | "dimensionality": "scalar" 278 | } 279 | ], 280 | "options": { 281 | "sync": true, 282 | "stream": false 283 | } 284 | } 285 | ] 286 | } 287 | -------------------------------------------------------------------------------- /addins/perf/customfunctions.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 25 | 26 | 27 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /addins/perf/customfunctionsPerfDriver.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 20 | 21 | 32 | 33 | 34 |
35 |

Automated Mode

36 |

This mode only works in the custom function perf document since it has dependencies on the sheets. Tests will be run based on the data from 'Input' sheet.

37 |

38 |

Trigger Input Test Set (Aync Only)

39 |

Write results to:

40 | Output_Before
41 | Output_After
42 |

43 |

44 | 45 |

46 |

47 |

Trigger Test by TestID (Lab only)

48 | Async Execution
49 | Execute Stress Test
50 | Test ID:
51 |

52 |
53 |
54 |
55 |

Manual Mode (Async Only)

56 |

This mode works in any document. Test will run based on the input data from the below form.

57 |

58 |

Step 1 - Create test data (bubblesort only, onetime only)

59 | 60 |

61 |

62 |

Step 2 - Update the settings as required

63 | Number of functions:
64 | Number of iterations:
65 | Number of functions on each row:
66 | Timeout (ms) for each iteration:
67 |

68 |

69 |

Step 3 - Select function to run

70 | Calculate Mortgage
71 | Loan amount , interest rate , number of months

72 | Bubble Sort of numbers

73 | Find th Prime number
74 |

75 |

76 |

Step 4 - Run the test

77 | 78 |

79 |
80 |

81 |

Results:

82 |
83 |

84 |
85 | 86 | 87 | -------------------------------------------------------------------------------- /addins/perf/image/Button16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/perf/image/Button16x16.png -------------------------------------------------------------------------------- /addins/perf/image/Button32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/perf/image/Button32x32.png -------------------------------------------------------------------------------- /addins/perf/image/Button80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/perf/image/Button80x80.png -------------------------------------------------------------------------------- /addins/perf/src/customfunctions.js: -------------------------------------------------------------------------------- 1 | function swap(numbers, i, j) { 2 | var temp = numbers[i]; 3 | numbers[i] = numbers[j]; 4 | numbers[j] = temp; 5 | } 6 | function mortgagePaymentJS(principalAmount, interestRate, numberOfMonths) { 7 | interestRate = (interestRate / 100) / 12; 8 | var irr = Math.pow(1 + interestRate, numberOfMonths); 9 | return interestRate * principalAmount * irr / (irr - 1); 10 | } 11 | function bubbleSortJS(array) { 12 | var numbers = []; 13 | for (var i = 0; i < array.length; ++i) { 14 | for (var j = 0; j < array[i].length; ++j) { 15 | numbers.push(array[i][j]); 16 | } 17 | } 18 | var numberOfSwaps = 0; 19 | var length = numbers.length; 20 | for (var i = 0; i < length - 1; i++) { 21 | for (var j = 0; j < length - i - 1; j++) { 22 | if (numbers[j] > numbers[j + 1]) { 23 | numberOfSwaps++; 24 | swap(numbers, j, j + 1); 25 | } 26 | } 27 | } 28 | return numberOfSwaps; 29 | } 30 | function isPrimeNumber(current, vectorPrimes) { 31 | var length = vectorPrimes.length; 32 | for (var i = 0; i < length; i++) { 33 | if ((current % vectorPrimes[i]) == 0) { 34 | return false; 35 | } 36 | } 37 | return true; 38 | } 39 | function findNthPrimeJS(n) { 40 | if (n <= 0) { 41 | return 0; 42 | } 43 | var count = 0; 44 | var current = 1; 45 | var vectorPrimes = []; 46 | do { 47 | current++; 48 | if (isPrimeNumber(current, vectorPrimes)) { 49 | vectorPrimes.push(current); 50 | count++; 51 | } 52 | } while (count < n); 53 | return current; 54 | } 55 | function addRangeJS(range) { 56 | var sum = 0; 57 | for (var i = 0; i < range.length; ++i) { 58 | for (var j = 0; j < range[i].length; ++j) { 59 | sum += range[i][j]; 60 | } 61 | } 62 | return sum; 63 | } 64 | function addStringRangeJS(range) { 65 | var sum = 0; 66 | for (var i = 0; i < range.length; ++i) { 67 | for (var j = 0; j < range[i].length; ++j) { 68 | sum += range[i][j].length; 69 | } 70 | } 71 | return sum; 72 | } 73 | function nestedLoopJS(n) { 74 | var sum = 0; 75 | for (var i = 0; i < n; ++i) { 76 | for (var j = 0; j < n; ++j) { 77 | sum++; 78 | } 79 | } 80 | return sum; 81 | } 82 | CustomFunctionMappings.MORTGAGEPAYMENTJS = mortgagePaymentJS; 83 | CustomFunctionMappings.SYNCMORTGAGEPAYMENTJS = mortgagePaymentJS; 84 | CustomFunctionMappings.FINDNTHPRIMEJS = findNthPrimeJS; 85 | CustomFunctionMappings.SYNCFINDNTHPRIMEJS = findNthPrimeJS; 86 | CustomFunctionMappings.BUBBLESORTJS = bubbleSortJS; 87 | CustomFunctionMappings.SYNCBUBBLESORTJS = bubbleSortJS; 88 | CustomFunctionMappings.ADDRANGEJS = addRangeJS; 89 | CustomFunctionMappings.SYNCADDRANGEJS = addRangeJS; 90 | CustomFunctionMappings.ADDSTRINGRANGEJS = addStringRangeJS; 91 | CustomFunctionMappings.SYNCADDSTRINGRANGEJS = addStringRangeJS; 92 | CustomFunctionMappings.NESTEDLOOPJS = nestedLoopJS; 93 | CustomFunctionMappings.SYNCNESTEDLOOPJS = nestedLoopJS; 94 | -------------------------------------------------------------------------------- /addins/upgrade/README.md: -------------------------------------------------------------------------------- 1 | # License 2 | See https://officedev.github.io/custom-functions/LICENSE 3 | 4 | # Purpose 5 | This folder contains two almost identical add-ins - [Upgrade App Commands](https://github.com/OfficeDev/custom-functions/blob/master/addins/upgrade/upgrade_appcmd.xml) and [Upgrade Shared Runtime](https://github.com/OfficeDev/custom-functions/blob/master/addins/upgrade/upgrade_shared.xml). Each of these two add-ins contains: 6 | - Custom Functions 7 | - A UI-less ribbon button handler 8 | - A ShowTaskpane button 9 | 10 | The only difference between these two add-ins is that Upgrade App Commands is a 'classic' add-in that uses a separate JavaScirpt runtime for each of the above three features, while Upgrade Shared Runtime uses a single, shared, runtime for all three components. 11 | 12 | The effect of that difference is that when the shared value in Upgrade App Commands is changed through any one of the three components that change is not visible to any of the other components, while when the shared value in Upgrade Shared Runtime is changed through any component, the change is visible to the other two components. 13 | 14 | Additionally, these add-ins have unusual versions, which makes them suitable for testing of the upgrade experience. 15 | 16 | # Maintainers 17 | [zlatko-michailov](https://github.com/zlatko-michailov) 18 | -------------------------------------------------------------------------------- /addins/upgrade/upgrade.js: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | function getVersion() { 5 | return "18.7.24.2"; 6 | } 7 | 8 | function getConst() { 9 | return 42; 10 | } 11 | 12 | function streamSequence(init, step, count, ms, context) { 13 | if (count > 0) { 14 | delay(function() { 15 | context.setResult(init); 16 | streamSequence(init + step, step, count - 1, ms, context); 17 | }, ms); 18 | } 19 | } 20 | 21 | function delay(func, ms) { 22 | return new Promise(function(resolve) { 23 | setTimeout(function() { 24 | resolve(func()); 25 | }, ms); 26 | }); 27 | } 28 | 29 | function getSharedValue() { 30 | if (typeof(g_sharedState) === 'object') { 31 | return g_sharedState.value; 32 | } 33 | 34 | return null; 35 | } 36 | 37 | function setSharedValue(value) { 38 | if (typeof(g_sharedState) === 'object') { 39 | g_sharedState.value = value; 40 | return value; 41 | } 42 | 43 | return null; 44 | } 45 | 46 | function getRuntimeState() { 47 | return OfficeRuntime.currentRuntime.getState(); 48 | } 49 | 50 | function setRuntimeState(value) { 51 | return OfficeRuntime.currentRuntime.setState(value); 52 | } 53 | 54 | CustomFunctions.associate('VERSIONSYNC', getVersion); 55 | CustomFunctions.associate('VERSIONASYNC', getVersion); 56 | CustomFunctions.associate('VERSIONDELAYED', function(ms) { return delay(getVersion, ms); }); 57 | 58 | CustomFunctions.associate('CONSTSYNC', getConst); 59 | CustomFunctions.associate('CONSTASYNC', getConst); 60 | CustomFunctions.associate('CONSTDELAYED', function(ms) { return delay(getConst, ms); }); 61 | 62 | CustomFunctions.associate('STREAMSEQUENCE', streamSequence); 63 | 64 | CustomFunctions.associate('GETSHAREDVALUE', getSharedValue); 65 | CustomFunctions.associate('SETSHAREDVALUE', setSharedValue); 66 | 67 | CustomFunctions.associate('GETRUNTIMESTATE', getRuntimeState); 68 | CustomFunctions.associate('SETRUNTIMESTATE', setRuntimeState); 69 | -------------------------------------------------------------------------------- /addins/upgrade/upgrade.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": [ 3 | { 4 | "id": "VERSIONSYNC", 5 | "name": "VERSION_SYNC", 6 | "result": { 7 | "type": "string", 8 | "dimensionality": "scalar" 9 | }, 10 | "parameters": [ 11 | ], 12 | "options": { 13 | "sync": true 14 | } 15 | }, 16 | 17 | { 18 | "id": "VERSIONASYNC", 19 | "name": "VERSION_ASYNC", 20 | "result": { 21 | "type": "string", 22 | "dimensionality": "scalar" 23 | }, 24 | "parameters": [ 25 | ], 26 | "options": { 27 | "sync": false 28 | } 29 | }, 30 | 31 | { 32 | "id": "VERSIONDELAYED", 33 | "name": "VERSION_DELAYED", 34 | "result": { 35 | "type": "string", 36 | "dimensionality": "scalar" 37 | }, 38 | "parameters": [ 39 | { 40 | "name": "ms", 41 | "type": "number", 42 | "dimensionality": "scalar" 43 | } 44 | ], 45 | "options": { 46 | "sync": false 47 | } 48 | }, 49 | 50 | { 51 | "id": "CONSTSYNC", 52 | "name": "CONST_SYNC", 53 | "result": { 54 | "type": "string", 55 | "dimensionality": "scalar" 56 | }, 57 | "parameters": [ 58 | ], 59 | "options": { 60 | "sync": true 61 | } 62 | }, 63 | 64 | { 65 | "id": "CONSTASYNC", 66 | "name": "CONST_ASYNC", 67 | "result": { 68 | "type": "string", 69 | "dimensionality": "scalar" 70 | }, 71 | "parameters": [ 72 | ], 73 | "options": { 74 | "sync": false 75 | } 76 | }, 77 | 78 | { 79 | "id": "CONSTDELAYED", 80 | "name": "CONST_DELAYED", 81 | "result": { 82 | "type": "string", 83 | "dimensionality": "scalar" 84 | }, 85 | "parameters": [ 86 | { 87 | "name": "ms", 88 | "type": "number", 89 | "dimensionality": "scalar" 90 | } 91 | ], 92 | "options": { 93 | "sync": false 94 | } 95 | }, 96 | 97 | { 98 | "id": "STREAMSEQUENCE", 99 | "name": "STREAM_SEQUENCE", 100 | "result": { 101 | "type": "any", 102 | "dimensionality": "scalar" 103 | }, 104 | "parameters": [ 105 | { 106 | "name": "init", 107 | "type": "number", 108 | "dimensionality": "scalar" 109 | }, 110 | { 111 | "name": "step", 112 | "type": "number", 113 | "dimensionality": "scalar" 114 | }, 115 | { 116 | "name": "count", 117 | "type": "number", 118 | "dimensionality": "scalar" 119 | }, 120 | { 121 | "name": "ms", 122 | "type": "number", 123 | "dimensionality": "scalar" 124 | } 125 | ], 126 | "options": { 127 | "sync": false, 128 | "stream": true 129 | } 130 | }, 131 | 132 | { 133 | "id": "GETSHAREDVALUE", 134 | "name": "GETSHAREDVALUE", 135 | "result": { 136 | "type": "any", 137 | "dimensionality": "scalar" 138 | }, 139 | "parameters": [ 140 | ], 141 | "options": { 142 | "sync": false 143 | } 144 | }, 145 | 146 | { 147 | "id": "SETSHAREDVALUE", 148 | "name": "SETSHAREDVALUE", 149 | "result": { 150 | "type": "any", 151 | "dimensionality": "scalar" 152 | }, 153 | "parameters": [ 154 | { 155 | "name": "value", 156 | "type": "any", 157 | "dimensionality": "scalar" 158 | } 159 | ], 160 | "options": { 161 | "sync": false 162 | } 163 | }, 164 | 165 | { 166 | "id": "GETRUNTIMESTATE", 167 | "name": "GETRUNTIMESTATE", 168 | "result": { 169 | "type": "string", 170 | "dimensionality": "scalar" 171 | }, 172 | "parameters": [ 173 | ], 174 | "options": { 175 | "sync": false 176 | } 177 | }, 178 | 179 | { 180 | "id": "SETRUNTIMESTATE", 181 | "name": "SETRUNTIMESTATE", 182 | "result": { 183 | "type": "string", 184 | "dimensionality": "scalar" 185 | }, 186 | "parameters": [ 187 | { 188 | "name": "value", 189 | "type": "string", 190 | "dimensionality": "scalar" 191 | } 192 | ], 193 | "options": { 194 | "sync": false 195 | } 196 | } 197 | 198 | ] 199 | } 200 | -------------------------------------------------------------------------------- /addins/upgrade/upgrade_1366_768.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/upgrade/upgrade_1366_768.png -------------------------------------------------------------------------------- /addins/upgrade/upgrade_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/upgrade/upgrade_16.png -------------------------------------------------------------------------------- /addins/upgrade/upgrade_300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/upgrade/upgrade_300.png -------------------------------------------------------------------------------- /addins/upgrade/upgrade_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/upgrade/upgrade_32.png -------------------------------------------------------------------------------- /addins/upgrade/upgrade_80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/addins/upgrade/upgrade_80.png -------------------------------------------------------------------------------- /addins/upgrade/upgrade_appcmd.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | Upgrade App Commands 8 | 9 | 10 | 11 | 12 | 30 | 31 | 32 |

Upgrade App Commands

33 | 34 |   35 | 36 |
37 | 38 | 39 |   40 | 41 |
42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /addins/upgrade/upgrade_appcmd.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 273fda25-ce49-4912-8d31-609d483b7e38 8 | 18.7.24.4 9 | Microsoft 10 | en-US 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ReadWriteDocument 23 | 24 | 25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | <!-- Description of the Getting Started callout. resid points to a LongString resource --> 50 | <Description resid="OEP.GetStarted.Description"/> 51 | 52 | <!-- Point to a url resource which details how the add-in should be used. --> 53 | <LearnMoreUrl resid="OEP.GetStarted.LearnMoreUrl"/> 54 | </GetStarted> 55 | 56 | <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 57 | Think of the FunctionFile as the code behind ExecuteFunction. --> 58 | <FunctionFile resid="OEP.CustomFunctions.Page" /> 59 | 60 | <!-- PrimaryCommandSurface is the main Office Ribbon. --> 61 | <ExtensionPoint xsi:type="PrimaryCommandSurface"> 62 | <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. --> 63 | <OfficeTab id="TabHome"> 64 | <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. --> 65 | <Group id="OEP.Group1"> 66 | <!-- Label for your group. resid must point to a ShortString resource. --> 67 | <Label resid="OEP.Group1Label" /> 68 | <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. --> 69 | <!-- Use PNG icons. All URLs on the resources section must use HTTPS. --> 70 | <Icon> 71 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 72 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 73 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 74 | </Icon> 75 | 76 | <Control xsi:type="Button" id="OEP.TestFuncButton"> 77 | <Label resid="OEP.TestFuncButton.Label" /> 78 | <Supertip> 79 | <!-- ToolTip title. resid must point to a ShortString resource. --> 80 | <Title resid="OEP.TestFuncButton.Label" /> 81 | <!-- ToolTip description. resid must point to a LongString resource. --> 82 | <Description resid="OEP.TestFuncButton.Tooltip" /> 83 | </Supertip> 84 | <Icon> 85 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 86 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 87 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 88 | </Icon> 89 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 90 | <Action xsi:type="ExecuteFunction"> 91 | <FunctionName>updateSharedValue</FunctionName> 92 | </Action> 93 | </Control> 94 | 95 | <!-- Control. It can be of type "Button" or "Menu". --> 96 | <Control xsi:type="Button" id="OEP.TaskpaneButton"> 97 | <Label resid="OEP.TaskpaneButton.Label" /> 98 | <Supertip> 99 | <!-- ToolTip title. resid must point to a ShortString resource. --> 100 | <Title resid="OEP.TaskpaneButton.Label" /> 101 | <!-- ToolTip description. resid must point to a LongString resource. --> 102 | <Description resid="OEP.TaskpaneButton.Tooltip" /> 103 | </Supertip> 104 | <Icon> 105 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 106 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 107 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 108 | </Icon> 109 | 110 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 111 | <Action xsi:type="ShowTaskpane"> 112 | <TaskpaneId>Office.AutoShowTaskpaneWithDocument</TaskpaneId> 113 | <!-- Provide a url resource id for the location that will be displayed on the task pane. --> 114 | <SourceLocation resid="OEP.CustomFunctions.Page" /> 115 | </Action> 116 | </Control> 117 | </Group> 118 | </OfficeTab> 119 | </ExtensionPoint> 120 | </DesktopFormFactor> 121 | 122 | </Host> 123 | </Hosts> 124 | <Resources> 125 | <bt:Images> 126 | <bt:Image id="OEP.tpicon_16x16" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade_16.png" /> 127 | <bt:Image id="OEP.tpicon_32x32" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade_32.png" /> 128 | <bt:Image id="OEP.tpicon_80x80" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade_80.png" /> 129 | </bt:Images> 130 | <bt:Urls> 131 | <bt:Url id="OEP.CustomFunctions.Metadata" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade.json" /> 132 | <bt:Url id="OEP.CustomFunctions.Script" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade.js" /> 133 | <bt:Url id="OEP.CustomFunctions.Page" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade_appcmd.html" /> 134 | <bt:Url id="OEP.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" /> 135 | </bt:Urls> 136 | <bt:ShortStrings> 137 | <bt:String id="OEP.TaskpaneButton.Label" DefaultValue="Show Taskpane" /> 138 | <bt:String id="OEP.TestFuncButton.Label" DefaultValue="Set Shared Value" /> 139 | <bt:String id="OEP.Group1Label" DefaultValue="Upgrade App Commands" /> 140 | <bt:String id="OEP.GetStarted.Title" DefaultValue="Upgrade App Commands" /> 141 | <bt:String id="OEP.CustomFunctions.Namespace" DefaultValue="MICROSOFT.OFFICE.TEST.UPGRADE" /> 142 | </bt:ShortStrings> 143 | <bt:LongStrings> 144 | <bt:String id="OEP.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" /> 145 | <bt:String id="OEP.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." /> 146 | <bt:String id="OEP.TestFuncButton.Tooltip" DefaultValue="Test AppCmd button" /> 147 | </bt:LongStrings> 148 | </Resources> 149 | </VersionOverrides> 150 | </OfficeApp> -------------------------------------------------------------------------------- /addins/upgrade/upgrade_shared.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <meta charset="UTF-8" /> 5 | <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> 6 | <meta http-equiv="Expires" content="0" /> 7 | <title>Upgrade Shared Runtime 8 | 9 | 10 | 11 | 12 | 30 | 31 | 32 |

Upgrade Shared Runtime

33 | 34 |   35 | 36 |
37 | 38 | 39 |   40 | 41 |
42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /addins/upgrade/upgrade_shared.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | f5900b5c-7095-42c4-9ecc-fee58e5fe6e2 8 | 18.7.24.4 9 | Microsoft 10 | en-US 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | ReadWriteDocument 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | <!-- Description of the Getting Started callout. resid points to a LongString resource --> 55 | <Description resid="OEP.GetStarted.Description"/> 56 | 57 | <!-- Point to a url resource which details how the add-in should be used. --> 58 | <LearnMoreUrl resid="OEP.GetStarted.LearnMoreUrl"/> 59 | </GetStarted> 60 | 61 | <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 62 | Think of the FunctionFile as the code behind ExecuteFunction. --> 63 | <FunctionFile resid="OEP.CustomFunctions.Page" /> 64 | 65 | <!-- PrimaryCommandSurface is the main Office Ribbon. --> 66 | <ExtensionPoint xsi:type="PrimaryCommandSurface"> 67 | <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. --> 68 | <OfficeTab id="TabHome"> 69 | <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. --> 70 | <Group id="OEP.Group1"> 71 | <!-- Label for your group. resid must point to a ShortString resource. --> 72 | <Label resid="OEP.Group1Label" /> 73 | <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. --> 74 | <!-- Use PNG icons. All URLs on the resources section must use HTTPS. --> 75 | <Icon> 76 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 77 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 78 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 79 | </Icon> 80 | 81 | <Control xsi:type="Button" id="OEP.TestFuncButton"> 82 | <Label resid="OEP.TestFuncButton.Label" /> 83 | <Supertip> 84 | <!-- ToolTip title. resid must point to a ShortString resource. --> 85 | <Title resid="OEP.TestFuncButton.Label" /> 86 | <!-- ToolTip description. resid must point to a LongString resource. --> 87 | <Description resid="OEP.TestFuncButton.Tooltip" /> 88 | </Supertip> 89 | <Icon> 90 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 91 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 92 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 93 | </Icon> 94 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 95 | <Action xsi:type="ExecuteFunction"> 96 | <FunctionName>updateSharedValue</FunctionName> 97 | </Action> 98 | </Control> 99 | 100 | <!-- Control. It can be of type "Button" or "Menu". --> 101 | <Control xsi:type="Button" id="OEP.TaskpaneButton"> 102 | <Label resid="OEP.TaskpaneButton.Label" /> 103 | <Supertip> 104 | <!-- ToolTip title. resid must point to a ShortString resource. --> 105 | <Title resid="OEP.TaskpaneButton.Label" /> 106 | <!-- ToolTip description. resid must point to a LongString resource. --> 107 | <Description resid="OEP.TaskpaneButton.Tooltip" /> 108 | </Supertip> 109 | <Icon> 110 | <bt:Image size="16" resid="OEP.tpicon_16x16" /> 111 | <bt:Image size="32" resid="OEP.tpicon_32x32" /> 112 | <bt:Image size="80" resid="OEP.tpicon_80x80" /> 113 | </Icon> 114 | 115 | <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. --> 116 | <Action xsi:type="ShowTaskpane"> 117 | <TaskpaneId>Office.AutoShowTaskpaneWithDocument</TaskpaneId> 118 | <!-- Provide a url resource id for the location that will be displayed on the task pane. --> 119 | <SourceLocation resid="OEP.CustomFunctions.Page" /> 120 | </Action> 121 | </Control> 122 | </Group> 123 | </OfficeTab> 124 | </ExtensionPoint> 125 | </DesktopFormFactor> 126 | 127 | </Host> 128 | </Hosts> 129 | <Resources> 130 | <bt:Images> 131 | <bt:Image id="OEP.tpicon_16x16" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade_16.png" /> 132 | <bt:Image id="OEP.tpicon_32x32" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade_32.png" /> 133 | <bt:Image id="OEP.tpicon_80x80" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade_80.png" /> 134 | </bt:Images> 135 | <bt:Urls> 136 | <bt:Url id="OEP.CustomFunctions.Metadata" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade.json" /> 137 | <bt:Url id="OEP.CustomFunctions.Script" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade.js" /> 138 | <bt:Url id="OEP.CustomFunctions.Page" DefaultValue="https://officedev.github.io/custom-functions/addins/upgrade/upgrade_shared.html?cfns=sharedapp" /> 139 | <bt:Url id="OEP.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" /> 140 | </bt:Urls> 141 | <bt:ShortStrings> 142 | <bt:String id="OEP.TaskpaneButton.Label" DefaultValue="Show Taskpane" /> 143 | <bt:String id="OEP.TestFuncButton.Label" DefaultValue="Set Shared Value" /> 144 | <bt:String id="OEP.Group1Label" DefaultValue="Upgrade Shared Runtime" /> 145 | <bt:String id="OEP.GetStarted.Title" DefaultValue="Upgrade Shared Runtime" /> 146 | <bt:String id="OEP.CustomFunctions.Namespace" DefaultValue="MICROSOFT.OFFICE.TEST.UPGRADE.SHARED" /> 147 | </bt:ShortStrings> 148 | <bt:LongStrings> 149 | <bt:String id="OEP.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" /> 150 | <bt:String id="OEP.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." /> 151 | <bt:String id="OEP.TestFuncButton.Tooltip" DefaultValue="Test AppCmd button" /> 152 | </bt:LongStrings> 153 | </Resources> 154 | </VersionOverrides> 155 | </OfficeApp> -------------------------------------------------------------------------------- /lib/excel-codespace/agave/images/button16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/lib/excel-codespace/agave/images/button16x16.png -------------------------------------------------------------------------------- /lib/excel-codespace/agave/images/button32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/lib/excel-codespace/agave/images/button32x32.png -------------------------------------------------------------------------------- /lib/excel-codespace/agave/images/button80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OfficeDev/custom-functions/6dc3d8f237589d4aaadef9982fba770b6f3ec712/lib/excel-codespace/agave/images/button80x80.png -------------------------------------------------------------------------------- /lib/excel-codespace/agave/udf.json: -------------------------------------------------------------------------------- 1 | { 2 | "functions": [ 3 | { 4 | "id": "python", 5 | "name": "PYTHON", 6 | "description": "Run Python Code", 7 | "parameters": [ 8 | { 9 | "name": "code", 10 | "type": "string" 11 | } 12 | ] 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /lib/excel-codespace/readme.md: -------------------------------------------------------------------------------- 1 | # The library used by Excel Codespace 2 | -------------------------------------------------------------------------------- /test.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html> 3 | <head> 4 | <meta charset="UTF-8" /> 5 | <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> 6 | <meta http-equiv="Expires" content="0" /> 7 | <title>Test 8 | 9 | 10 | 11 | 12 | 13 | --------------------------------------------------------------------------------