From 3f35c06c28307fd252c7e5be29ecccab77c3d075 Mon Sep 17 00:00:00 2001 From: gavinbarron Date: Wed, 4 Oct 2023 21:24:34 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20microsof?= =?UTF-8?q?tgraph/microsoft-graph-toolkit@342fa6eba1f0ce5288ca55e079c16f9d?= =?UTF-8?q?5f53f441=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next/pr/2756/iframe.html | 2 +- ...f1.iframe.bundle.js => main.3a617c60.iframe.bundle.js} | 8 ++++---- ...NSE.txt => main.3a617c60.iframe.bundle.js.LICENSE.txt} | 0 ...e.bundle.js.map => main.3a617c60.iframe.bundle.js.map} | 2 +- next/pr/2756/mgt.storybook.js | 2 +- next/pr/2756/project.json | 2 +- next/pr/2756/sb-addons/storybook-1/manager-bundle.js | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) rename next/pr/2756/{main.8bf149f1.iframe.bundle.js => main.3a617c60.iframe.bundle.js} (99%) rename next/pr/2756/{main.8bf149f1.iframe.bundle.js.LICENSE.txt => main.3a617c60.iframe.bundle.js.LICENSE.txt} (100%) rename next/pr/2756/{main.8bf149f1.iframe.bundle.js.map => main.3a617c60.iframe.bundle.js.map} (99%) diff --git a/next/pr/2756/iframe.html b/next/pr/2756/iframe.html index 488033e665..71bf9f0c7d 100644 --- a/next/pr/2756/iframe.html +++ b/next/pr/2756/iframe.html @@ -497,4 +497,4 @@ import './663.eb106124.iframe.bundle.js'; - import './main.8bf149f1.iframe.bundle.js'; \ No newline at end of file + import './main.3a617c60.iframe.bundle.js'; \ No newline at end of file diff --git a/next/pr/2756/main.8bf149f1.iframe.bundle.js b/next/pr/2756/main.3a617c60.iframe.bundle.js similarity index 99% rename from next/pr/2756/main.8bf149f1.iframe.bundle.js rename to next/pr/2756/main.3a617c60.iframe.bundle.js index 30e180c534..6a640b4a41 100644 --- a/next/pr/2756/main.8bf149f1.iframe.bundle.js +++ b/next/pr/2756/main.3a617c60.iframe.bundle.js @@ -1,5 +1,5 @@ -/*! For license information please see main.8bf149f1.iframe.bundle.js.LICENSE.txt */ -(self.webpackChunkroot=self.webpackChunkroot||[]).push([[179],{"./.storybook/addons/codeEditorAddon/codeAddon.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>withCodeEditor});var _templateObject,_templateObject2,_templateObject3,_templateObject4,external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("@storybook/preview-api"),IProvider=__webpack_require__("./packages/mgt-element/dist/es6/providers/IProvider.js"),lit=__webpack_require__("./node_modules/lit/index.js"),editor_api=__webpack_require__("include-loader!./node_modules/monaco-editor/esm/vs/editor/editor.api.js");function _typeof(o){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}function _createForOfIteratorHelper(o,allowArrayLike){var it="undefined"!=typeof Symbol&&o[Symbol.iterator]||o["@@iterator"];if(!it){if(Array.isArray(o)||(it=function _unsupportedIterableToArray(o,minLen){if(!o)return;if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);"Object"===n&&o.constructor&&(n=o.constructor.name);if("Map"===n||"Set"===n)return Array.from(o);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen)}(o))||allowArrayLike&&o&&"number"==typeof o.length){it&&(o=it);var i=0,F=function F(){};return{s:F,n:function n(){return i>=o.length?{done:!0}:{done:!1,value:o[i++]}},e:function e(_e){throw _e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var err,normalCompletion=!0,didErr=!1;return{s:function s(){it=it.call(o)},n:function n(){var step=it.next();return normalCompletion=step.done,step},e:function e(_e2){didErr=!0,err=_e2},f:function f(){try{normalCompletion||null==it.return||it.return()}finally{if(didErr)throw err}}}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=new Array(len);i=tabs.length&&(_this.tabFocus=0)):"ArrowLeft"===e.key&&(_this.tabFocus--,_this.tabFocus<0&&(_this.tabFocus=tabs.length-1)),tabs[_this.tabFocus].setAttribute("tabindex",0),tabs[_this.tabFocus].focus())})),_this.internalFiles=[],_this.fileTypes=["html","js","css"],_this.autoFormat=!0,_this.editorRoot=document.createElement("div"),_this.editorRoot.setAttribute("slot","editor"),_this.editorRoot.style.height="100%",_this.tabFocus=0,_this.updateCurrentFile=function debounce(func,wait,immediate){var timeout;return function(){var context=this,args=arguments,callNow=immediate&&!timeout;clearTimeout(timeout),timeout=setTimeout((function later(){timeout=null,immediate||func.apply(context,args)}),wait),callNow&&func.apply(context,args)}}((function(){_this.files[_this.currentType]=_this.editor.getValue();var event=new CustomEvent("fileUpdated");_this.dispatchEvent(event)}),1e3),_this.setupEditor(_this.editorRoot),_this.appendChild(_this.editorRoot),_this.handleResize=_this.handleResize.bind(_assertThisInitialized(_this)),_this.showTab(_this.fileTypes[0]),_this}return function _createClass(Constructor,protoProps,staticProps){return protoProps&&_defineProperties(Constructor.prototype,protoProps),staticProps&&_defineProperties(Constructor,staticProps),Object.defineProperty(Constructor,"prototype",{writable:!1}),Constructor}(EditorElement,[{key:"files",get:function get(){return this.internalFiles},set:function set(value){var oldValue=this.files;this.internalFiles=value;var _step,_iterator=_createForOfIteratorHelper(this.fileTypes);try{for(_iterator.s();!(_step=_iterator.n()).done;){var type=_step.value;this.editorState[type].model.setValue(this.files[type]+"\n")}}catch(err){_iterator.e(err)}finally{_iterator.f()}this.showTab(this.currentType),this.requestUpdate("files",oldValue)}},{key:"setupEditor",value:function setupEditor(htmlElement){var _this2=this;this.editorState={js:{model:editor_api.editor.createModel("","javascript"),state:null},css:{model:editor_api.editor.createModel("","css"),state:null},html:{model:editor_api.editor.createModel("","html"),state:null}},this.currentEditorState=this.editorState.html,this.editor=editor_api.editor.create(htmlElement,{model:this.currentEditorState.model,scrollBeyondLastLine:!1,readOnly:!0,minimap:{enabled:!1}}),this.editor.addCommand(editor_api.KeyCode.Escape,(function(){_this2.editor.updateOptions({readOnly:!0}),_this2.shadowRoot.getElementById(_this2.currentType).focus()}));var changeViewZones=function changeViewZones(){_this2.editor.changeViewZones((function(changeAccessor){var domNode=document.createElement("div");changeAccessor.addZone({afterLineNumber:0,heightInLines:1,domNode})}))};this.editor.onDidChangeModel(changeViewZones),changeViewZones(),this.editor.onDidChangeModelContent((function(){_this2.updateCurrentFile()}))}},{key:"layout",value:function layout(){this.editorRoot.style.height="calc(".concat(this.style.height," - 38px)"),this.editor.layout()}},{key:"handleResize",value:function handleResize(){this.editorRoot.style.height="".concat(this.clientHeight-38,"px"),this.editor.layout()}},{key:"connectedCallback",value:function connectedCallback(){var _this3=this;_get(_getPrototypeOf(EditorElement.prototype),"connectedCallback",this).call(this),this.editor.layout(),window.addEventListener("resize",this.handleResize),setTimeout((function(_){_this3.editor.layout()}),2)}},{key:"disconnectedCallback",value:function disconnectedCallback(){this.editor.dispose(),window.removeEventListener("resize",this.handleResize)}},{key:"showTab",value:function showTab(type){this.editor.updateOptions({readOnly:!1}),this.currentType=type,this.files&&void 0!==this.files[type]&&(this.currentEditorState.state=this.editor.saveViewState(),this.currentEditorState=this.editorState[type],this.editor.setModel(this.currentEditorState.model),this.editor.restoreViewState(this.currentEditorState.state)),this.autoFormat&&this.editor.getAction("editor.action.formatDocument").run()}},{key:"render",value:function render(){var _this4=this;return(0,lit.dy)(_templateObject||(_templateObject=_taggedTemplateLiteral(['\n
\n
\n ','\n
\n \n \n
\n ',"\n \n "])),this.tabKeyDown,this.fileTypes.map((function(type){return(0,lit.dy)(_templateObject2||(_templateObject2=_taggedTemplateLiteral(['\n \n ',"\n \n "])),type===_this4.currentType?0:-1,(function(_){return _this4.showTab(type)}),type,type===_this4.currentType,"tab-".concat(type),type)})),"tab-".concat(this.currentType),this.currentType,this.fileTypes.map((function(type){return type!==_this4.currentType?(0,lit.dy)(_templateObject3||(_templateObject3=_taggedTemplateLiteral(['\n \n '])),"tab-".concat(type),type):""})))}}],[{key:"styles",get:function get(){return(0,lit.iv)(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n :host {\n display: block;\n height: 100%;\n }\n\n .root {\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: rgb(243, 243, 243);\n }\n\n .editor-root {\n flex-basis: 100%;\n }\n\n .tab {\n background-color: rgb(236, 236, 236);\n color: #616161;\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n font-size: 11px;\n font-weight: 400;\n padding: 8px 18px;\n display: inline-block;\n cursor: pointer;\n user-select: none;\n margin: 0px -2px 0px 0px;\n border: 1px solid transparent;\n }\n\n .tab[aria-selected='true'] {\n background-color: white;\n color: rgb(51, 51, 51);\n font-weight: 600;\n border: 2px solid transparent;\n text-decoration: underline;\n }\n "])))}},{key:"properties",get:function get(){return{files:{type:Array,attribute:!1},currentType:{type:String}}}}]),EditorElement}(lit.oi);customElements.define("mgt-sb-editor",EditorElement);function codeAddon_typeof(o){return codeAddon_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},codeAddon_typeof(o)}function _regeneratorRuntime(){_regeneratorRuntime=function _regeneratorRuntime(){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 define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{define({},"")}catch(t){define=function define(t,e,r){return t[e]=r}}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,(function(){return this}));var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach((function(e){define(t,e,(function(t){return this._invoke(e,t)}))}))}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==codeAddon_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){invoke("next",t,i,a)}),(function(t){invoke("throw",t,i,a)})):e.resolve(h).then((function(t){u.value=t,i(u)}),(function(t){return invoke("throw",t,i,a)}))}a(c.arg)}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e((function(e,r){invoke(t,n,e,r)}))}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){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=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done}}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg)}}}function maybeInvokeDelegate(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,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;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,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function pushTryEntry(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 resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0)}function values(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 next(){for(;++o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){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),resetTryEntry(r),y}},catch:function _catch(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;resetTryEntry(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg),value=info.value}catch(error){return void reject(error)}info.done?resolve(value):Promise.resolve(value).then(_next,_throw)}var scriptRegex=/]*>([\s\S]*?)<\/script>/gm,styleRegex=/]*>([\s\S]*?)<\/style>/gm,withCodeEditor=(0,external_STORYBOOK_MODULE_PREVIEW_API_.makeDecorator)({name:"withCodeEditor",parameterName:"myParameter",skipIfNoParametersOrOptions:!1,wrapper:function wrapper(getStory,context,_ref){var storyHtml,options=_ref.options,forOptions=!!options&&options.disableThemeToggle,title=["Custom CSS Properties","Theme"].includes(context.name)||context.title.toLowerCase().includes("templating"),disableThemeToggle=forOptions||context&&title,story=getStory(context),root=document.createElement("div"),storyElementWrapper=document.createElement("div");storyHtml=story.strings?story.strings[0]:story.innerHTML;var scriptMatches=scriptRegex.exec(storyHtml),scriptCode=scriptMatches&&scriptMatches.length>1?scriptMatches[1].trim():"",styleMatches=styleRegex.exec(storyHtml),styleCode=styleMatches&&styleMatches.length>1?styleMatches[1].trim():"";storyHtml=storyHtml.replace(styleRegex,"").replace(scriptRegex,"").replace(/\n?\n?/g,"").trim();var editor=new EditorElement;editor.files={html:storyHtml,js:scriptCode,css:styleCode};var getContent=function(){var _ref2=function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise((function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value)}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err)}_next(void 0)}))}}(_regeneratorRuntime().mark((function _callee(url,json){var content,response;return _regeneratorRuntime().wrap((function _callee$(_context){for(;;)switch(_context.prev=_context.next){case 0:if(content="",!url){_context.next=18;break}return _context.next=4,fetch(url);case 4:if(!(response=_context.sent).ok){_context.next=17;break}if(!json){_context.next=12;break}return _context.next=9,response.json();case 9:content=_context.sent,_context.next=15;break;case 12:return _context.next=14,response.text();case 14:content=_context.sent;case 15:_context.next=18;break;case 17:console.warn("🦒: Can't get content from '".concat(url,"'"));case 18:return _context.abrupt("return",content);case 19:case"end":return _context.stop()}}),_callee)})));return function getContent(_x,_x2){return _ref2.apply(this,arguments)}}();if("Editor"===context.name&&function isNotIframed(){try{return null!=window.top.location.href||null!=window.top.location.href}catch(err){return!1}}()){var manifestUrl=new URLSearchParams(window.top.location.search).get("manifest");(function isValid(manifestUrl){return manifestUrl&&manifestUrl.startsWith("https://raw.githubusercontent.com/pnp/mgt-samples/main/")})(manifestUrl)&&getContent(manifestUrl,!0).then((function(manifest){Promise.all([getContent(manifest[0].preview.html),getContent(manifest[0].preview.js),getContent(manifest[0].preview.css)]).then((function(values){editor.files={html:values[0],js:values[1],css:values[2]}}))}))}var themeToggleCss=disableThemeToggle?"":"\n body {\n background-color: var(--fill-color);\n color: var(--neutral-foreground-rest);\n font-family: var(--body-font);\n padding: 0 12px;\n }\n header {\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n padding: 0 0 12px 0;\n }\n",themeToggle=disableThemeToggle?"":'\n
\n \n
\n',providerInitCode='\n import {Providers, MockProvider} from "'.concat("./mgt.storybook.js",'";\n Providers.globalProvider = new MockProvider(true);\n ');external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel().on("mgt/setProvider",(function(params){params.state===IProvider.Aw.SignedIn&&"MgtMockProvider"===params.name?providerInitCode='\n import { Providers, MockProvider } from "'.concat("./mgt.storybook.js",'";\n Providers.globalProvider = new MockProvider(true);\n '):params.state===IProvider.Aw.SignedIn&&"MgtMsal2Provider"===params.name&&(providerInitCode='\n import { Providers, Msal2Provider, LoginType } from "'.concat("./mgt.storybook.js",'";\n Providers.globalProvider = new Msal2Provider({\n clientId: "').concat("9aeac104-a6b6-45ca-bb7c-bf7c3083eeb2",'",\n loginType: LoginType.Popup,\n redirectUri: "').concat(window.location.origin,"/").concat("blank.html",'"\n });')),loadEditorContent()}));var loadEditorContent=function loadEditorContent(){var storyElement=document.createElement("iframe");storyElement.addEventListener("load",(function(){var doc=storyElement.contentDocument,_editor$files=editor.files,html=_editor$files.html,css=_editor$files.css,js=_editor$files.js;js=js.replace(/import \{([^\}]+)\}\s+from\s+['"]@microsoft\/mgt\x2d([^\}]+)['"];/gm,"import {$1} from '".concat("./mgt.storybook.js","';"));var docContent='\n \n \n -`;PersonCardAdditionalDetails.parameters={...PersonCardAdditionalDetails.parameters,docs:{...PersonCardAdditionalDetails.parameters?.docs,source:{originalSource:'() => html`\n \n \n \n
\n (Hover on person to view Person Card)\n
\n`',...PersonCardAdditionalDetails.parameters?.docs?.source}}},AgendaEventTemplate.parameters={...AgendaEventTemplate.parameters,docs:{...AgendaEventTemplate.parameters?.docs,source:{originalSource:'() => html`\n \n \n \n\n