@stories-js/core
Version:
Stories web components to build stories
5 lines • 3.31 kB
JavaScript
var __awaiter=this&&this.__awaiter||function(t,n,e,r){function o(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,i){function a(t){try{c(r.next(t))}catch(n){i(n)}}function s(t){try{c(r["throw"](t))}catch(n){i(n)}}function c(t){t.done?e(t.value):o(t.value).then(a,s)}c((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(n){return c([t,n])}}function c(a){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:e.label++;return{value:a[1],done:false};case 5:e.label++;o=a[1];a=[0];continue;case 7:a=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){e=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){e.label=a[1];break}if(a[0]===6&&e.label<i[1]){e.label=i[1];i=a;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(a);break}if(i[2])e.ops.pop();e.trys.pop();continue}a=n.call(t,e)}catch(s){a=[6,s];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,n,e){if(e||arguments.length===2)for(var r=0,o=n.length,i;r<o;r++){if(i||!(r in n)){if(!i)i=Array.prototype.slice.call(n,0,r);i[r]=n[r]}}return t.concat(i||Array.prototype.slice.call(n))};
/*!
* (C) StoriesJS https://storiesjs.org - GPL-2.0 License
*/System.register(["./p-fbcb0011.system.js","./p-73ad0c01.system.js","./p-6a7c8a99.system.js","./p-8fe59c36.system.js","./p-3d5a0b0e.system.js"],(function(t){"use strict";var n,e,r,o,i,a,s;return{setters:[function(t){n=t.r;e=t.h;r=t.c;o=t.g},function(t){i=t.a},function(t){a=t.m},function(t){s=t.A},function(){}],execute:function(){var c=":host{display:block;height:100%}";var u=t("stories_addon_actions",function(){function t(t){var e=this;n(this,t);this.id="ADDON_ACTIONS";this.actions=[];this.onActions=function(t){e.actions=__spreadArray(__spreadArray([],e.actions,true),[t],false)}}t.prototype.title=function(){return"Actions"};t.prototype.storyContextChanged=function(t,n){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){console.log("AddonActions.storyContextChanged",t,n);this.actions=[];return[2]}))}))};t.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){i.registerAddon(this);a.on(s,this.onActions);return[2]}))}))};t.prototype.disconnectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){a.off(s,this.onActions);i.unregisterAddon(this);return[2]}))}))};t.prototype.render=function(){return e(r,null,e("ul",null,this.actions.map((function(t){return e("li",null,t.data.name)}))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());u.style=c}}}));
//# sourceMappingURL=p-e21a2efa.system.entry.js.map