diff --git a/templates/word_addin/1995fcd6d39cade7d871.js b/templates/word_addin/1995fcd6d39cade7d871.js new file mode 100644 index 0000000..b18cd4a --- /dev/null +++ b/templates/word_addin/1995fcd6d39cade7d871.js @@ -0,0 +1,2 @@ +/*! For license information please see 1995fcd6d39cade7d871.js.LICENSE.txt */ +function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new G(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",v={};function m(){}function g(){}function w(){}var x={};l(x,a,(function(){return this}));var E=Object.getPrototypeOf,b=E&&E(E(B([])));b&&b!==r&&n.call(b,a)&&(x=b);var T=w.prototype=m.prototype=Object.create(x);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,c){var u=s(t[o],t,i);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==_typeof(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=I(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=s(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function B(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:B(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function asyncGeneratorStep(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _asyncToGenerator(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){asyncGeneratorStep(i,n,o,a,c,"next",t)}function c(t){asyncGeneratorStep(i,n,o,a,c,"throw",t)}a(void 0)}))}}Office.onReady((function(t){t.host===Office.HostType.Word&&(loadVoices(),document.getElementById("sendTextButton").onclick=sendTextToTTS)}));var audio=document.getElementById("audioSource"),volumeControl=document.getElementById("volumeControl");function loadVoices(){var t=document.getElementById("serverIP").value,e=document.getElementById("portNumber").value,r="http://".concat(t,":").concat(e,"/api/voices");fetch(r).then((function(t){return t.json()})).then((function(t){var e=document.getElementById("voice");t.voices.forEach((function(t){var r=document.createElement("option");r.value=t,r.textContent=t,e.appendChild(r)}))})).catch((function(t){return console.error("Error fetching voices:",t)}))}function sendTextToTTS(){return _sendTextToTTS.apply(this,arguments)}function _sendTextToTTS(){return _sendTextToTTS=_asyncToGenerator(_regeneratorRuntime().mark((function t(){return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Word.run(function(){var t=_asyncToGenerator(_regeneratorRuntime().mark((function t(e){var r,n,o,i,a,c,u,l,f,s;return _regeneratorRuntime().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=e.document.getSelection()).load("text"),t.next=4,e.sync();case 4:n=r.text,o=document.getElementById("voice"),i=o.value,a=document.getElementById("language"),c=a.value,u=document.getElementById("serverIP").value,l=document.getElementById("portNumber").value,f=document.getElementById("audioSource"),s="text=".concat(n,"&voice=").concat(i,"&language=").concat(c,"&output_file=").concat("demo_output.wav","&streaming=").concat("true"),f.src="http://".concat(u,":").concat(l,"/tts-demo-request?").concat(s),f.load();case 17:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){console.error("Error:",t)}));case 2:case"end":return t.stop()}}),t)}))),_sendTextToTTS.apply(this,arguments)}volumeControl.addEventListener("input",(function(){audio.volume=volumeControl.value})); \ No newline at end of file diff --git a/templates/word_addin/1995fcd6d39cade7d871.js.LICENSE.txt b/templates/word_addin/1995fcd6d39cade7d871.js.LICENSE.txt new file mode 100644 index 0000000..ae386fb --- /dev/null +++ b/templates/word_addin/1995fcd6d39cade7d871.js.LICENSE.txt @@ -0,0 +1 @@ +/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ diff --git a/templates/word_addin/1fda685b81e1123773f6.css b/templates/word_addin/1fda685b81e1123773f6.css new file mode 100644 index 0000000..5f78c16 --- /dev/null +++ b/templates/word_addin/1fda685b81e1123773f6.css @@ -0,0 +1,80 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. + * See LICENSE in the project root for license information. + */ + + html, + body { + width: 100%; + height: 100%; + margin: 0; + padding: 0; + } + + ul { + margin: 0; + padding: 0; + } + + .ms-welcome__header { + padding: 20px; + padding-bottom: 30px; + padding-top: 100px; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + flex-direction: column; + align-items: center; + } + + .ms-welcome__main { + display: -webkit-flex; + display: flex; + -webkit-flex-direction: column; + flex-direction: column; + -webkit-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-align-items: center; + align-items: center; + -webkit-flex: 1 0 0; + flex: 1 0 0; + padding: 10px 20px; + } + + .ms-welcome__main > h2 { + width: 100%; + text-align: center; + } + + .ms-welcome__features { + list-style-type: none; + margin-top: 20px; + } + + .ms-welcome__features.ms-List .ms-ListItem { + padding-bottom: 20px; + display: -webkit-flex; + display: flex; + } + + .ms-welcome__features.ms-List .ms-ListItem > .ms-Icon { + margin-right: 10px; + } + + .ms-welcome__action.ms-Button--hero { + margin-top: 30px; + } + +.ms-Button.ms-Button--hero .ms-Button-label { + color: #0078d7; +} + +.ms-Button.ms-Button--hero:hover .ms-Button-label, +.ms-Button.ms-Button--hero:focus .ms-Button-label{ + color: #005a9e; + cursor: pointer; +} + +b { + font-weight: bold; +} \ No newline at end of file diff --git a/templates/word_addin/AllTalk Word Add-in.pdf b/templates/word_addin/AllTalk Word Add-in.pdf new file mode 100644 index 0000000..3f117a2 Binary files /dev/null and b/templates/word_addin/AllTalk Word Add-in.pdf differ diff --git a/templates/word_addin/assets/icon-128.png b/templates/word_addin/assets/icon-128.png new file mode 100644 index 0000000..94e2021 Binary files /dev/null and b/templates/word_addin/assets/icon-128.png differ diff --git a/templates/word_addin/assets/icon-16.png b/templates/word_addin/assets/icon-16.png new file mode 100644 index 0000000..4ea5009 Binary files /dev/null and b/templates/word_addin/assets/icon-16.png differ diff --git a/templates/word_addin/assets/icon-32.png b/templates/word_addin/assets/icon-32.png new file mode 100644 index 0000000..f3b1580 Binary files /dev/null and b/templates/word_addin/assets/icon-32.png differ diff --git a/templates/word_addin/assets/icon-64.png b/templates/word_addin/assets/icon-64.png new file mode 100644 index 0000000..b01cf27 Binary files /dev/null and b/templates/word_addin/assets/icon-64.png differ diff --git a/templates/word_addin/assets/icon-80.png b/templates/word_addin/assets/icon-80.png new file mode 100644 index 0000000..b0654f3 Binary files /dev/null and b/templates/word_addin/assets/icon-80.png differ diff --git a/templates/word_addin/assets/logo-filled.png b/templates/word_addin/assets/logo-filled.png new file mode 100644 index 0000000..60c0f01 Binary files /dev/null and b/templates/word_addin/assets/logo-filled.png differ diff --git a/templates/word_addin/commands.html b/templates/word_addin/commands.html new file mode 100644 index 0000000..6f3a200 --- /dev/null +++ b/templates/word_addin/commands.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/word_addin/commands.js b/templates/word_addin/commands.js new file mode 100644 index 0000000..04513c3 --- /dev/null +++ b/templates/word_addin/commands.js @@ -0,0 +1,2 @@ +!function(){var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),Office.onReady((function(){})),("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e.g?e.g:void 0).action=function(e){var n={type:Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage,message:"Performed action.",icon:"Icon.80x80",persistent:!0};Office.context.mailbox.item.notificationMessages.replaceAsync("action",n),e.completed()}}(); +//# sourceMappingURL=commands.js.map \ No newline at end of file diff --git a/templates/word_addin/commands.js.map b/templates/word_addin/commands.js.map new file mode 100644 index 0000000..0f94cef --- /dev/null +++ b/templates/word_addin/commands.js.map @@ -0,0 +1 @@ +{"version":3,"file":"commands.js","mappings":"YACA,IAAIA,EAAsB,CAAC,ECD3BA,EAAoBC,EAAI,WACvB,GAA0B,iBAAfC,WAAyB,OAAOA,WAC3C,IACC,OAAOC,MAAQ,IAAIC,SAAS,cAAb,EAChB,CAAE,MAAOC,GACR,GAAsB,iBAAXC,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCOxBC,OAAOC,SAAQ,WACb,KAuBuB,oBAATC,KACVA,KACkB,oBAAXH,OACPA,YACkB,IAAXI,EAAAA,EACPA,EAAAA,OACAC,GAMJC,OA5BF,SAAgBC,GACd,IAAMC,EAAU,CACdC,KAAMR,OAAOS,aAAaC,4BAA4BC,qBACtDJ,QAAS,oBACTK,KAAM,aACNC,YAAY,GAIdb,OAAOc,QAAQC,QAAQC,KAAKC,qBAAqBC,aAAa,SAAUX,GAGxED,EAAMa,WACR,C","sources":["webpack://office-addin-taskpane-js/webpack/bootstrap","webpack://office-addin-taskpane-js/webpack/runtime/global","webpack://office-addin-taskpane-js/./src/commands/commands.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","/*\n * Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\n * See LICENSE in the project root for license information.\n */\n\n/* global global, Office, self, window */\n\nOffice.onReady(() => {\n // If needed, Office.js is ready to be called\n});\n\n/**\n * Shows a notification when the add-in command is executed.\n * @param event {Office.AddinCommands.Event}\n */\nfunction action(event) {\n const message = {\n type: Office.MailboxEnums.ItemNotificationMessageType.InformationalMessage,\n message: \"Performed action.\",\n icon: \"Icon.80x80\",\n persistent: true,\n };\n\n // Show a notification message\n Office.context.mailbox.item.notificationMessages.replaceAsync(\"action\", message);\n\n // Be sure to indicate when the add-in command function is complete\n event.completed();\n}\n\nfunction getGlobal() {\n return typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : undefined;\n}\n\nconst g = getGlobal();\n\n// The add-in command functions need to be available in global scope\ng.action = action;\n"],"names":["__webpack_require__","g","globalThis","this","Function","e","window","Office","onReady","self","global","undefined","action","event","message","type","MailboxEnums","ItemNotificationMessageType","InformationalMessage","icon","persistent","context","mailbox","item","notificationMessages","replaceAsync","completed"],"sourceRoot":""} \ No newline at end of file diff --git a/templates/word_addin/manifest.xml b/templates/word_addin/manifest.xml new file mode 100644 index 0000000..5d1117d --- /dev/null +++ b/templates/word_addin/manifest.xml @@ -0,0 +1,79 @@ + + + 68b6ad53-4f72-42a8-a971-a9643c2f409a + 1.0.0.0 + AllTalk + en-US + + + + + + + https://www.contoso.com + + + + + + + + ReadWriteDocument + + + + + + + + + +