@social-mail/social-mail-client 1.2.760 → 1.2.762
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/channel/ChannelApp.pack.js +1 -1
- package/dist/public/channel/ChannelApp.pack.min.js +1 -1
- package/dist/public/channel/ChannelView.pack.js +1 -1
- package/dist/public/channel/ChannelView.pack.min.js +1 -1
- package/dist/public/preview/video/PreviewVideo.d.ts +6 -0
- package/dist/public/preview/video/PreviewVideo.d.ts.map +1 -0
- package/dist/public/preview/video/PreviewVideo.js +80 -0
- package/dist/public/preview/video/PreviewVideo.js.map +1 -0
- package/dist/public/preview/video/PreviewVideo.pack.js +13306 -0
- package/dist/public/preview/video/PreviewVideo.pack.js.map +1 -0
- package/dist/public/preview/video/PreviewVideo.pack.min.js +512 -0
- package/dist/public/preview/video/PreviewVideo.pack.min.js.map +1 -0
- package/dist/site-editor/editor/webComponentsPath.js +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.js +1 -1
- package/dist/site-editor-app/SiteEditorApp.pack.min.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/public/preview/video/PreviewVideo.tsx +68 -0
- package/src/site-editor/editor/webComponentsPath.ts +1 -1
|
@@ -28766,7 +28766,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/sleep", "@web-atoms/core/di
|
|
|
28766
28766
|
});
|
|
28767
28767
|
}
|
|
28768
28768
|
});
|
|
28769
|
-
WebComponents.path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.
|
|
28769
|
+
WebComponents.path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.157`;
|
|
28770
28770
|
}
|
|
28771
28771
|
};
|
|
28772
28772
|
});
|
|
@@ -1392,7 +1392,7 @@ html, body {
|
|
|
1392
1392
|
& .warning {
|
|
1393
1393
|
background-color: lightyellow;
|
|
1394
1394
|
}
|
|
1395
|
-
`.installLocal()}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/services/NotificationPopup");System.register(["tslib","../../App","../../Atom","../../core/AtomLoader","../../core/AtomUri","../../core/FormattedError","../../core/FormattedString","../../core/types","../../di/Inject","../../di/RegisterSingleton","../../di/ServiceCollection","../../services/JsonService","../../services/NavigationService","../../view-model/AtomWindowViewModel","../../web/core/AtomUI","../controls/AtomAlertWindow","../controls/AtomNotification","../controls/AtomWindow","../styles/AtomPopupStyle","../styles/AtomStyleSheet","../styles/StyleBuilder","./NotificationPopup","./PopupService"],(function(_export,_context){"use strict";var __awaiter,__decorate,__metadata,__param,App,Atom,AtomLoader,AtomUri,FormattedError,FormattedString,CancelToken,Inject,RegisterSingleton,Scope,ServiceCollection,JsonService,NavigationService,AtomWindowViewModel,AtomUI,AtomAlertWindow,AtomNotification,AtomWindow,AtomPopupStyle,AtomStyleSheet,cssNumberToString,NotificationPopup,PopupService,WindowService;return{setters:[function(_tslib){__awaiter=_tslib.__awaiter;__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__param=_tslib.__param},function(_App){App=_App.App},function(_Atom){Atom=_Atom.Atom},function(_coreAtomLoader){AtomLoader=_coreAtomLoader.AtomLoader},function(_coreAtomUri){AtomUri=_coreAtomUri.AtomUri},function(_coreFormattedError){FormattedError=_coreFormattedError.default},function(_coreFormattedString){FormattedString=_coreFormattedString.default},function(_coreTypes){CancelToken=_coreTypes.CancelToken},function(_diInject){Inject=_diInject.Inject},function(_diRegisterSingleton){RegisterSingleton=_diRegisterSingleton.RegisterSingleton},function(_diServiceCollection){Scope=_diServiceCollection.Scope;ServiceCollection=_diServiceCollection.ServiceCollection},function(_servicesJsonService){JsonService=_servicesJsonService.JsonService},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_viewModelAtomWindowViewModel){AtomWindowViewModel=_viewModelAtomWindowViewModel.AtomWindowViewModel},function(_webCoreAtomUI){AtomUI=_webCoreAtomUI.AtomUI},function(_controlsAtomAlertWindow){AtomAlertWindow=_controlsAtomAlertWindow.default},function(_controlsAtomNotification){AtomNotification=_controlsAtomNotification.default},function(_controlsAtomWindow){AtomWindow=_controlsAtomWindow.AtomWindow},function(_stylesAtomPopupStyle){AtomPopupStyle=_stylesAtomPopupStyle.AtomPopupStyle},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet},function(_stylesStyleBuilder){cssNumberToString=_stylesStyleBuilder.cssNumberToString},function(_NotificationPopup){NotificationPopup=_NotificationPopup.default},function(_PopupService){PopupService=_PopupService.default}],execute:function(){_export("WindowService",WindowService=class WindowService extends NavigationService{get title(){return window.document.title}set title(v){window.document.title=v}get location(){return new AtomUri(location.href)}set location(v){location.href=v.toString()}constructor(app,jsonService){super(app);this.jsonService=jsonService;this.popups=[];this.hostForElementFunc=[];this.lastPopupID=0;this.screen=app.screen;let st="desktop";if(/mobile|android|ios/i.test(window.navigator.userAgent)){st="mobile";if(/tablet/i.test(window.navigator.userAgent)){st="tablet"}}this.screen.screenType=st;if(window){const update=e=>{this.refreshScreen()};if(st!=="mobile"){window.addEventListener("resize",update);window.addEventListener("scroll",update);document.body.addEventListener("scroll",update);document.body.addEventListener("resize",update)}setTimeout((()=>{update(null)}),1e3)}}registerHostForWindow(f){this.hostForElementFunc.push(f);return{dispose:()=>{this.hostForElementFunc.remove(f)}}}navigate(url){location.href=url}back(){window.history.back()}register(id,type){ServiceCollection.instance.register(type,null,Scope.Transient,id)}confirm(message,title){return PopupService.confirm({message,title})}alert(message,title){if(!(message instanceof FormattedString||typeof message==="string")){if(message instanceof FormattedError){message=message.formattedMessage}else{message=message.message?message.message:message.toString()}}return PopupService.alert({message,title})}refresh(){location.reload()}getHostForElement(){const ce=PopupService.lastTarget;if(!ce){return null}for(const iterator of this.hostForElementFunc){const e=iterator(ce);if(e){return e}}return null}refreshScreen(){const height=this.screen.height=window.innerHeight||document.body.clientHeight;const width=this.screen.width=window.innerWidth||document.body.clientWidth;this.screen.scrollLeft=window.scrollX||document.body.scrollLeft||0;this.screen.scrollTop=window.scrollY||document.body.scrollTop||0;this.screen.orientation=width>height?"landscape":"portrait"}notify(message,title,type,delay){return __awaiter(this,void 0,void 0,(function*(){try{const notification=NotificationPopup({message,type});const cancelToken=new CancelToken(delay!==null&&delay!==void 0?delay:5e3);yield notification.showWindow(notification,{title,cancelToken})}catch(ex){console.error(ex)}}))}openWindow(url,options){return __awaiter(this,void 0,void 0,(function*(){yield Atom.delay(1);const lastTarget=PopupService.lastTarget;const{view:popup,returnPromise,disposables}=yield AtomLoader.loadView(url,this.app,true,(()=>this.app.resolve(AtomWindowViewModel,true)));if(options&&options.onInit){options.onInit(popup)}const cancelToken=options.cancelToken;if(cancelToken){if(cancelToken.cancelled){this.app.callLater((()=>{this.remove(popup,true)}))}cancelToken.registerForCancel((()=>{this.remove(popup,true)}))}const e=popup.element;let isPopup=true;if(popup instanceof AtomWindow){isPopup=false;e.style.opacity="0"}popup.registerDisposable({dispose:()=>{PopupService.lastTarget=lastTarget}});if(isPopup){const root=popup.element;const last=PopupService.lastTarget;const closePopup=et=>{let target=et.target;while(target){if(target===root||target===last){return}target=target.parentElement}this.remove(popup,true)};document.body.addEventListener("click",closePopup);popup.registerDisposable({dispose:()=>{document.body.removeEventListener("click",closePopup)}})}e._logicalParent=lastTarget;e.sourceUrl=url;const pvm=popup.viewModel;if(pvm){let ce=PopupService.lastTarget;if(ce){while(!ce.atomControl){ce=ce.parentElement;if(!ce){break}}if(ce&&ce.atomControl&&ce.atomControl.viewModel){pvm.parent=ce.atomControl.viewModel}}}const theme=this.app.get(AtomStyleSheet).getNamedStyle(AtomPopupStyle);e.style.zIndex=1e4+this.lastPopupID+"";const isNotification=popup instanceof AtomNotification;if(isPopup){const sr=AtomUI.screenOffset(PopupService.lastTarget);const x=sr.x;const y=sr.y;const h=sr.height;e.style.position="absolute";e.style.left=x+"px";e.style.top=y+h+"px";e.classList.add(theme.name);this.popups.push(popup);disposables.add((()=>{this.popups.remove(popup)}));document.body.appendChild(e);if(isNotification){e.style.opacity="0";this.centerElement(popup)}}else{const eHost=(options===null||options===void 0?void 0:options.modal)?null:this.getHostForElement();if(eHost){eHost.appendChild(e)}else{const host=document.createElement("div");document.body.appendChild(host);host.style.position="absolute";host.appendChild(e);disposables.add({dispose(){host.remove()}});this.refreshScreen();popup.bind(host,"styleLeft",[["this","scrollLeft"]],false,cssNumberToString,this.screen);popup.bind(host,"styleTop",[["this","scrollTop"]],false,cssNumberToString,this.screen);popup.bind(host,"styleWidth",[["this","width"]],false,cssNumberToString,this.screen);popup.bind(host,"styleHeight",[["this","height"]],false,cssNumberToString,this.screen)}}popup.bindEvent(document.body,"keyup",(keyboardEvent=>{if(keyboardEvent.key==="Escape"){this.app.runAsync((()=>this.remove(popup)))}}));disposables.add({dispose:()=>{e.innerHTML="";e.remove()}});return yield returnPromise}))}centerElement(c){const e=c.element;const parent=e.parentElement;if(parent===window||parent===document.body){setTimeout((()=>{const ew=(document.body.offsetWidth-e.offsetWidth)/2;const eh=window.scrollY+(window.innerHeight-e.offsetHeight)/2;e.style.left=`${ew}px`;e.style.top=`${eh}px`;e.style.removeProperty("opacity")}),200);return}if(parent.offsetWidth<=0||parent.offsetHeight<=0){setTimeout((()=>{this.centerElement(c)}),100);return}if(e.offsetWidth<=0||e.offsetHeight<=0){setTimeout((()=>{this.centerElement(c)}),100);return}const x=(parent.offsetWidth-e.offsetWidth)/2;const y=(parent.offsetHeight-e.offsetHeight)/2;e.style.left=`${x}px`;e.style.top=`${y}px`;e.style.removeProperty("opacity")}});WindowService.alertWindow=AtomAlertWindow;_export("WindowService",WindowService=__decorate([RegisterSingleton,__param(0,Inject),__param(1,Inject),__metadata("design:paramtypes",[App,JsonService])],WindowService))}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/services/WindowService");System.register(["tslib","../../App","../../core/Colors","../../di/Inject","../../di/RegisterSingleton","../../services/NavigationService","../styles/AtomStyleSheet"],(function(_export,_context){"use strict";var __decorate,__metadata,__param,App,Colors,Inject,RegisterSingleton,NavigationService,AtomStyleSheet,AtomTheme;return{setters:[function(_tslib){__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__param=_tslib.__param},function(_App){App=_App.App},function(_coreColors){Colors=_coreColors.default},function(_diInject){Inject=_diInject.Inject},function(_diRegisterSingleton){RegisterSingleton=_diRegisterSingleton.RegisterSingleton},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet}],execute:function(){_export("AtomTheme",AtomTheme=class AtomTheme extends AtomStyleSheet{constructor(app,navigationService){super(app,"atom-theme");this.navigationService=navigationService;this.bgColor=Colors.white;this.color=Colors.gray;this.hoverColor=Colors.lightGray;this.activeColor=Colors.lightBlue;this.selectedBgColor=Colors.blue;this.selectedColor=Colors.white;this.padding=5;setTimeout((()=>{window.addEventListener("resize",(()=>{setTimeout((()=>{this.pushUpdate()}),10)}));document.body.addEventListener("resize",(()=>{setTimeout((()=>{this.pushUpdate()}),10)}))}),1e3)}});_export("AtomTheme",AtomTheme=__decorate([RegisterSingleton,__param(0,Inject),__param(1,Inject),__metadata("design:paramtypes",[App,NavigationService])],AtomTheme))}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/styles/AtomTheme");System.register(["../App","../core/AtomOnce","../core/AtomUri","../di/ServiceCollection","../services/BusyIndicatorService","../services/NavigationService","./services/WebBusyIndicatorService","./services/WindowService","./styles/AtomStyleSheet","./styles/AtomTheme"],(function(_export,_context){"use strict";var App,AtomOnce,AtomUri,ServiceCollection,BusyIndicatorService,NavigationService,WebBusyIndicatorService,WindowService,AtomStyleSheet,AtomTheme,WebApp;_export("default",void 0);return{setters:[function(_App){App=_App.App},function(_coreAtomOnce){AtomOnce=_coreAtomOnce.AtomOnce},function(_coreAtomUri){AtomUri=_coreAtomUri.AtomUri},function(_diServiceCollection){ServiceCollection=_diServiceCollection.ServiceCollection},function(_servicesBusyIndicatorService){BusyIndicatorService=_servicesBusyIndicatorService.BusyIndicatorService},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_servicesWebBusyIndicatorService){WebBusyIndicatorService=_servicesWebBusyIndicatorService.WebBusyIndicatorService},function(_servicesWindowService){WindowService=_servicesWindowService.WindowService},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet},function(_stylesAtomTheme){AtomTheme=_stylesAtomTheme.AtomTheme}],execute:function(){_export("default",WebApp=class WebApp extends App{get parentElement(){return document.body}get root(){return this.mRoot}set root(v){const old=this.mRoot;if(old){old.dispose()}this.mRoot=v;if(!v){return}const pe=this.parentElement;const de=Array.from(pe.children);for(const iterator of de){iterator.remove()}pe.appendChild(v.element)}get theme(){return this.get(AtomStyleSheet)}set theme(v){this.put(AtomTheme,v);this.put(AtomStyleSheet,v)}get contextId(){var _a;(_a=this.mContextId)!==null&&_a!==void 0?_a:this.mContextId=parseInt((this.url.hash.contextId||"0").toString(),10);if(!this.mContextId){for(let index=0;index<100;index++){const cid=`contextId${index}`;const cidData=sessionStorage.getItem(`contextId${index}`);if(!cidData){this.mContextId=index;sessionStorage.setItem(cid,cid);this.url.hash.contextId=index;this.syncUrl();break}}}return`contextId_${this.mContextId}`}constructor(){super();this.hashUpdater=new AtomOnce;this.url=new AtomUri(location.href);this.put(NavigationService,this.resolve(WindowService));this.put(WebApp,this);this.put(BusyIndicatorService,this.resolve(WebBusyIndicatorService));ServiceCollection.instance.registerSingleton(AtomStyleSheet,(sp=>sp.resolve(AtomTheme)));window.addEventListener("hashchange",(()=>{this.hashUpdater.run((()=>{this.url=new AtomUri(location.href)}))}));this.initPromise=new Promise(((resolve,reject)=>{this.onReady(resolve)}))}updateDefaultStyle(textContent){if(this.styleElement){if(this.styleElement.textContent===textContent){return}}const ss=document.createElement("style");ss.textContent=textContent;if(this.styleElement){this.styleElement.remove()}document.head.appendChild(ss);this.styleElement=ss}syncUrl(){this.hashUpdater.run((()=>{const currentUrl=new AtomUri(location.href);const sourceHash=this.url.hash;const keyValues=[];let modified=false;for(const key in sourceHash){if(/^\_\$\_/.test(key)){continue}if(sourceHash.hasOwnProperty(key)){const element=sourceHash[key];const cv=currentUrl.hash[key];if(element!==undefined){keyValues.push({key,value:element})}if(cv===element){continue}modified=true}}if(!modified){return}const hash=keyValues.map((s=>`${s.key}=${encodeURIComponent(s.value)}`)).join("&");location.hash=hash}))}invokeReady(){if(document.readyState==="complete"){super.invokeReady();return}document.addEventListener("readystatechange",(e=>{super.invokeReady()}))}});(function(){if(typeof window.CustomEvent==="function"){return false}function CustomEvent(event,params){params=params||{bubbles:false,cancelable:false,detail:null};const evt=document.createEvent("CustomEvent");evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt}window.CustomEvent=CustomEvent})()}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/WebApp");System.register(["tslib","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/services/FetchBuilder"],(function(_export,_context){"use strict";var __awaiter,sleep,FetchBuilder,CustomElementsProxy,WebComponents,webComponentsInstalled,addAttributes;_export("WebComponents",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter},function(_webAtomsCoreDistCoreSleep){sleep=_webAtomsCoreDistCoreSleep.default},function(_webAtomsCoreDistServicesFetchBuilder){FetchBuilder=_webAtomsCoreDistServicesFetchBuilder.default}],execute:function(){webComponentsInstalled=Symbol("webComponentsInstalled");CustomElementsProxy=class CustomElementsProxy{constructor(elements=[]){this.elements=elements}define(name,factory){this.elements.push({name,factory})}};addAttributes=(target,values)=>{Object.defineProperty(target.prototype,"editableAttributes",{enumerable:true,configurable:true,get(){return values(this)}})};_export("WebComponents",WebComponents=class WebComponents{static run(frame,doc){return __awaiter(this,void 0,void 0,(function*(){if(doc[webComponentsInstalled]){return}doc[webComponentsInstalled]=true;const url=this.path+"/dist/editable.js";frame.sandbox.add("allow-scripts");const text=yield FetchBuilder.get(url).responseAsText();const proxy=new CustomElementsProxy;const win=doc.defaultView;const globals={window:win,document:win.document,Object:win.Object,Promise,console:win.console,Boolean:win.Boolean,String:win.String,Number:win.Number,Math:win.Math,Date:win.Date,Proxy:win.Proxy,Map:win.Map,Array:win.Array,RegExp:win.RegExp,PromiseRejectionEvent:win.PromiseRejectionEvent,setTimeout:(cb,n)=>setTimeout(cb,n),setInterval:(cb,n)=>setInterval(cb,n),clearTimeout:n=>clearTimeout(n),clearInterval:n=>clearInterval(n),Reflect:win.Reflect,requestAnimationFrame:win.requestAnimationFrame,requestIdleCallback:win.requestIdleCallback,Symbol:win.Symbol,HTMLElement:win.HTMLElement,MutationObserver:class extends win.MutationObserver{constructor(a){super(a)}},IntersectionObserver:class extends win.IntersectionObserver{constructor(a){super(a)}},customElements:proxy};win.HTMLElement.prototype.addEventListener=function(type,listener,options){return win.EventTarget.prototype.addEventListener.call(this,type,listener,options)};const keys=Object.keys(globals);const init=`${keys.map((x=>`var ${x} = globalWindow[${JSON.stringify(x)}]`)).join(";\n")}`;const sourceMappingURL=this.path+"/dist/editable.js.map";const script=`\n "use strict";\n ${init};\n Symbol.dispose ||= Symbol("dispose");\n ;${text.replace("//# sourceMappingURL=editable.js.map","//# sourceMappingURL="+sourceMappingURL)}\n `;const fx=new doc.defaultView.Function("globalWindow",script);fx.call(win,globals);addAttributes(win.HTMLElement,(()=>[{name:"title",type:"string",display:"Tool Tip"},{name:"lang",type:"lang",display:"Language"}]));addAttributes(win.HTMLAnchorElement,(()=>[{name:"href",type:"string",display:"Link"},{name:"target",type:"string",suggest:["_blank"],display:"Target"}]));addAttributes(win.HTMLImageElement,(()=>[{name:"src",type:"image",display:"Image"},{name:"alt",type:"string",display:"Alt"}]));addAttributes(win.HTMLVideoElement,(()=>[{name:"src",type:"video",display:"Video"},{name:"poster",type:"image",display:"Poster"},{name:"autoplay",type:"boolean",display:"Auto Play"},{name:"loop",type:"boolean",display:"Loop"},{name:"muted",type:"boolean",display:"Muted"}]));yield sleep(10);for(const{name,factory}of proxy.elements){doc.defaultView.customElements.define(name,factory)}frame.sandbox.remove("allow-scripts")}))}});WebComponents.path=`//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.156`}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/webComponentsPath");System.register(["@web-atoms/core/dist/style/styled","../../../common/TestMode"],(function(_export,_context){"use strict";var styled,AppLocation,channelViewStyle;return{setters:[function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default},function(_commonTestMode){AppLocation=_commonTestMode.AppLocation}],execute:function(){styled.css`
|
|
1395
|
+
`.installLocal()}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/services/NotificationPopup");System.register(["tslib","../../App","../../Atom","../../core/AtomLoader","../../core/AtomUri","../../core/FormattedError","../../core/FormattedString","../../core/types","../../di/Inject","../../di/RegisterSingleton","../../di/ServiceCollection","../../services/JsonService","../../services/NavigationService","../../view-model/AtomWindowViewModel","../../web/core/AtomUI","../controls/AtomAlertWindow","../controls/AtomNotification","../controls/AtomWindow","../styles/AtomPopupStyle","../styles/AtomStyleSheet","../styles/StyleBuilder","./NotificationPopup","./PopupService"],(function(_export,_context){"use strict";var __awaiter,__decorate,__metadata,__param,App,Atom,AtomLoader,AtomUri,FormattedError,FormattedString,CancelToken,Inject,RegisterSingleton,Scope,ServiceCollection,JsonService,NavigationService,AtomWindowViewModel,AtomUI,AtomAlertWindow,AtomNotification,AtomWindow,AtomPopupStyle,AtomStyleSheet,cssNumberToString,NotificationPopup,PopupService,WindowService;return{setters:[function(_tslib){__awaiter=_tslib.__awaiter;__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__param=_tslib.__param},function(_App){App=_App.App},function(_Atom){Atom=_Atom.Atom},function(_coreAtomLoader){AtomLoader=_coreAtomLoader.AtomLoader},function(_coreAtomUri){AtomUri=_coreAtomUri.AtomUri},function(_coreFormattedError){FormattedError=_coreFormattedError.default},function(_coreFormattedString){FormattedString=_coreFormattedString.default},function(_coreTypes){CancelToken=_coreTypes.CancelToken},function(_diInject){Inject=_diInject.Inject},function(_diRegisterSingleton){RegisterSingleton=_diRegisterSingleton.RegisterSingleton},function(_diServiceCollection){Scope=_diServiceCollection.Scope;ServiceCollection=_diServiceCollection.ServiceCollection},function(_servicesJsonService){JsonService=_servicesJsonService.JsonService},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_viewModelAtomWindowViewModel){AtomWindowViewModel=_viewModelAtomWindowViewModel.AtomWindowViewModel},function(_webCoreAtomUI){AtomUI=_webCoreAtomUI.AtomUI},function(_controlsAtomAlertWindow){AtomAlertWindow=_controlsAtomAlertWindow.default},function(_controlsAtomNotification){AtomNotification=_controlsAtomNotification.default},function(_controlsAtomWindow){AtomWindow=_controlsAtomWindow.AtomWindow},function(_stylesAtomPopupStyle){AtomPopupStyle=_stylesAtomPopupStyle.AtomPopupStyle},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet},function(_stylesStyleBuilder){cssNumberToString=_stylesStyleBuilder.cssNumberToString},function(_NotificationPopup){NotificationPopup=_NotificationPopup.default},function(_PopupService){PopupService=_PopupService.default}],execute:function(){_export("WindowService",WindowService=class WindowService extends NavigationService{get title(){return window.document.title}set title(v){window.document.title=v}get location(){return new AtomUri(location.href)}set location(v){location.href=v.toString()}constructor(app,jsonService){super(app);this.jsonService=jsonService;this.popups=[];this.hostForElementFunc=[];this.lastPopupID=0;this.screen=app.screen;let st="desktop";if(/mobile|android|ios/i.test(window.navigator.userAgent)){st="mobile";if(/tablet/i.test(window.navigator.userAgent)){st="tablet"}}this.screen.screenType=st;if(window){const update=e=>{this.refreshScreen()};if(st!=="mobile"){window.addEventListener("resize",update);window.addEventListener("scroll",update);document.body.addEventListener("scroll",update);document.body.addEventListener("resize",update)}setTimeout((()=>{update(null)}),1e3)}}registerHostForWindow(f){this.hostForElementFunc.push(f);return{dispose:()=>{this.hostForElementFunc.remove(f)}}}navigate(url){location.href=url}back(){window.history.back()}register(id,type){ServiceCollection.instance.register(type,null,Scope.Transient,id)}confirm(message,title){return PopupService.confirm({message,title})}alert(message,title){if(!(message instanceof FormattedString||typeof message==="string")){if(message instanceof FormattedError){message=message.formattedMessage}else{message=message.message?message.message:message.toString()}}return PopupService.alert({message,title})}refresh(){location.reload()}getHostForElement(){const ce=PopupService.lastTarget;if(!ce){return null}for(const iterator of this.hostForElementFunc){const e=iterator(ce);if(e){return e}}return null}refreshScreen(){const height=this.screen.height=window.innerHeight||document.body.clientHeight;const width=this.screen.width=window.innerWidth||document.body.clientWidth;this.screen.scrollLeft=window.scrollX||document.body.scrollLeft||0;this.screen.scrollTop=window.scrollY||document.body.scrollTop||0;this.screen.orientation=width>height?"landscape":"portrait"}notify(message,title,type,delay){return __awaiter(this,void 0,void 0,(function*(){try{const notification=NotificationPopup({message,type});const cancelToken=new CancelToken(delay!==null&&delay!==void 0?delay:5e3);yield notification.showWindow(notification,{title,cancelToken})}catch(ex){console.error(ex)}}))}openWindow(url,options){return __awaiter(this,void 0,void 0,(function*(){yield Atom.delay(1);const lastTarget=PopupService.lastTarget;const{view:popup,returnPromise,disposables}=yield AtomLoader.loadView(url,this.app,true,(()=>this.app.resolve(AtomWindowViewModel,true)));if(options&&options.onInit){options.onInit(popup)}const cancelToken=options.cancelToken;if(cancelToken){if(cancelToken.cancelled){this.app.callLater((()=>{this.remove(popup,true)}))}cancelToken.registerForCancel((()=>{this.remove(popup,true)}))}const e=popup.element;let isPopup=true;if(popup instanceof AtomWindow){isPopup=false;e.style.opacity="0"}popup.registerDisposable({dispose:()=>{PopupService.lastTarget=lastTarget}});if(isPopup){const root=popup.element;const last=PopupService.lastTarget;const closePopup=et=>{let target=et.target;while(target){if(target===root||target===last){return}target=target.parentElement}this.remove(popup,true)};document.body.addEventListener("click",closePopup);popup.registerDisposable({dispose:()=>{document.body.removeEventListener("click",closePopup)}})}e._logicalParent=lastTarget;e.sourceUrl=url;const pvm=popup.viewModel;if(pvm){let ce=PopupService.lastTarget;if(ce){while(!ce.atomControl){ce=ce.parentElement;if(!ce){break}}if(ce&&ce.atomControl&&ce.atomControl.viewModel){pvm.parent=ce.atomControl.viewModel}}}const theme=this.app.get(AtomStyleSheet).getNamedStyle(AtomPopupStyle);e.style.zIndex=1e4+this.lastPopupID+"";const isNotification=popup instanceof AtomNotification;if(isPopup){const sr=AtomUI.screenOffset(PopupService.lastTarget);const x=sr.x;const y=sr.y;const h=sr.height;e.style.position="absolute";e.style.left=x+"px";e.style.top=y+h+"px";e.classList.add(theme.name);this.popups.push(popup);disposables.add((()=>{this.popups.remove(popup)}));document.body.appendChild(e);if(isNotification){e.style.opacity="0";this.centerElement(popup)}}else{const eHost=(options===null||options===void 0?void 0:options.modal)?null:this.getHostForElement();if(eHost){eHost.appendChild(e)}else{const host=document.createElement("div");document.body.appendChild(host);host.style.position="absolute";host.appendChild(e);disposables.add({dispose(){host.remove()}});this.refreshScreen();popup.bind(host,"styleLeft",[["this","scrollLeft"]],false,cssNumberToString,this.screen);popup.bind(host,"styleTop",[["this","scrollTop"]],false,cssNumberToString,this.screen);popup.bind(host,"styleWidth",[["this","width"]],false,cssNumberToString,this.screen);popup.bind(host,"styleHeight",[["this","height"]],false,cssNumberToString,this.screen)}}popup.bindEvent(document.body,"keyup",(keyboardEvent=>{if(keyboardEvent.key==="Escape"){this.app.runAsync((()=>this.remove(popup)))}}));disposables.add({dispose:()=>{e.innerHTML="";e.remove()}});return yield returnPromise}))}centerElement(c){const e=c.element;const parent=e.parentElement;if(parent===window||parent===document.body){setTimeout((()=>{const ew=(document.body.offsetWidth-e.offsetWidth)/2;const eh=window.scrollY+(window.innerHeight-e.offsetHeight)/2;e.style.left=`${ew}px`;e.style.top=`${eh}px`;e.style.removeProperty("opacity")}),200);return}if(parent.offsetWidth<=0||parent.offsetHeight<=0){setTimeout((()=>{this.centerElement(c)}),100);return}if(e.offsetWidth<=0||e.offsetHeight<=0){setTimeout((()=>{this.centerElement(c)}),100);return}const x=(parent.offsetWidth-e.offsetWidth)/2;const y=(parent.offsetHeight-e.offsetHeight)/2;e.style.left=`${x}px`;e.style.top=`${y}px`;e.style.removeProperty("opacity")}});WindowService.alertWindow=AtomAlertWindow;_export("WindowService",WindowService=__decorate([RegisterSingleton,__param(0,Inject),__param(1,Inject),__metadata("design:paramtypes",[App,JsonService])],WindowService))}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/services/WindowService");System.register(["tslib","../../App","../../core/Colors","../../di/Inject","../../di/RegisterSingleton","../../services/NavigationService","../styles/AtomStyleSheet"],(function(_export,_context){"use strict";var __decorate,__metadata,__param,App,Colors,Inject,RegisterSingleton,NavigationService,AtomStyleSheet,AtomTheme;return{setters:[function(_tslib){__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__param=_tslib.__param},function(_App){App=_App.App},function(_coreColors){Colors=_coreColors.default},function(_diInject){Inject=_diInject.Inject},function(_diRegisterSingleton){RegisterSingleton=_diRegisterSingleton.RegisterSingleton},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet}],execute:function(){_export("AtomTheme",AtomTheme=class AtomTheme extends AtomStyleSheet{constructor(app,navigationService){super(app,"atom-theme");this.navigationService=navigationService;this.bgColor=Colors.white;this.color=Colors.gray;this.hoverColor=Colors.lightGray;this.activeColor=Colors.lightBlue;this.selectedBgColor=Colors.blue;this.selectedColor=Colors.white;this.padding=5;setTimeout((()=>{window.addEventListener("resize",(()=>{setTimeout((()=>{this.pushUpdate()}),10)}));document.body.addEventListener("resize",(()=>{setTimeout((()=>{this.pushUpdate()}),10)}))}),1e3)}});_export("AtomTheme",AtomTheme=__decorate([RegisterSingleton,__param(0,Inject),__param(1,Inject),__metadata("design:paramtypes",[App,NavigationService])],AtomTheme))}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/styles/AtomTheme");System.register(["../App","../core/AtomOnce","../core/AtomUri","../di/ServiceCollection","../services/BusyIndicatorService","../services/NavigationService","./services/WebBusyIndicatorService","./services/WindowService","./styles/AtomStyleSheet","./styles/AtomTheme"],(function(_export,_context){"use strict";var App,AtomOnce,AtomUri,ServiceCollection,BusyIndicatorService,NavigationService,WebBusyIndicatorService,WindowService,AtomStyleSheet,AtomTheme,WebApp;_export("default",void 0);return{setters:[function(_App){App=_App.App},function(_coreAtomOnce){AtomOnce=_coreAtomOnce.AtomOnce},function(_coreAtomUri){AtomUri=_coreAtomUri.AtomUri},function(_diServiceCollection){ServiceCollection=_diServiceCollection.ServiceCollection},function(_servicesBusyIndicatorService){BusyIndicatorService=_servicesBusyIndicatorService.BusyIndicatorService},function(_servicesNavigationService){NavigationService=_servicesNavigationService.NavigationService},function(_servicesWebBusyIndicatorService){WebBusyIndicatorService=_servicesWebBusyIndicatorService.WebBusyIndicatorService},function(_servicesWindowService){WindowService=_servicesWindowService.WindowService},function(_stylesAtomStyleSheet){AtomStyleSheet=_stylesAtomStyleSheet.AtomStyleSheet},function(_stylesAtomTheme){AtomTheme=_stylesAtomTheme.AtomTheme}],execute:function(){_export("default",WebApp=class WebApp extends App{get parentElement(){return document.body}get root(){return this.mRoot}set root(v){const old=this.mRoot;if(old){old.dispose()}this.mRoot=v;if(!v){return}const pe=this.parentElement;const de=Array.from(pe.children);for(const iterator of de){iterator.remove()}pe.appendChild(v.element)}get theme(){return this.get(AtomStyleSheet)}set theme(v){this.put(AtomTheme,v);this.put(AtomStyleSheet,v)}get contextId(){var _a;(_a=this.mContextId)!==null&&_a!==void 0?_a:this.mContextId=parseInt((this.url.hash.contextId||"0").toString(),10);if(!this.mContextId){for(let index=0;index<100;index++){const cid=`contextId${index}`;const cidData=sessionStorage.getItem(`contextId${index}`);if(!cidData){this.mContextId=index;sessionStorage.setItem(cid,cid);this.url.hash.contextId=index;this.syncUrl();break}}}return`contextId_${this.mContextId}`}constructor(){super();this.hashUpdater=new AtomOnce;this.url=new AtomUri(location.href);this.put(NavigationService,this.resolve(WindowService));this.put(WebApp,this);this.put(BusyIndicatorService,this.resolve(WebBusyIndicatorService));ServiceCollection.instance.registerSingleton(AtomStyleSheet,(sp=>sp.resolve(AtomTheme)));window.addEventListener("hashchange",(()=>{this.hashUpdater.run((()=>{this.url=new AtomUri(location.href)}))}));this.initPromise=new Promise(((resolve,reject)=>{this.onReady(resolve)}))}updateDefaultStyle(textContent){if(this.styleElement){if(this.styleElement.textContent===textContent){return}}const ss=document.createElement("style");ss.textContent=textContent;if(this.styleElement){this.styleElement.remove()}document.head.appendChild(ss);this.styleElement=ss}syncUrl(){this.hashUpdater.run((()=>{const currentUrl=new AtomUri(location.href);const sourceHash=this.url.hash;const keyValues=[];let modified=false;for(const key in sourceHash){if(/^\_\$\_/.test(key)){continue}if(sourceHash.hasOwnProperty(key)){const element=sourceHash[key];const cv=currentUrl.hash[key];if(element!==undefined){keyValues.push({key,value:element})}if(cv===element){continue}modified=true}}if(!modified){return}const hash=keyValues.map((s=>`${s.key}=${encodeURIComponent(s.value)}`)).join("&");location.hash=hash}))}invokeReady(){if(document.readyState==="complete"){super.invokeReady();return}document.addEventListener("readystatechange",(e=>{super.invokeReady()}))}});(function(){if(typeof window.CustomEvent==="function"){return false}function CustomEvent(event,params){params=params||{bubbles:false,cancelable:false,detail:null};const evt=document.createEvent("CustomEvent");evt.initCustomEvent(event,params.bubbles,params.cancelable,params.detail);return evt}window.CustomEvent=CustomEvent})()}}}));AmdLoader.instance.setup("@web-atoms/core/dist/web/WebApp");System.register(["tslib","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/services/FetchBuilder"],(function(_export,_context){"use strict";var __awaiter,sleep,FetchBuilder,CustomElementsProxy,WebComponents,webComponentsInstalled,addAttributes;_export("WebComponents",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter},function(_webAtomsCoreDistCoreSleep){sleep=_webAtomsCoreDistCoreSleep.default},function(_webAtomsCoreDistServicesFetchBuilder){FetchBuilder=_webAtomsCoreDistServicesFetchBuilder.default}],execute:function(){webComponentsInstalled=Symbol("webComponentsInstalled");CustomElementsProxy=class CustomElementsProxy{constructor(elements=[]){this.elements=elements}define(name,factory){this.elements.push({name,factory})}};addAttributes=(target,values)=>{Object.defineProperty(target.prototype,"editableAttributes",{enumerable:true,configurable:true,get(){return values(this)}})};_export("WebComponents",WebComponents=class WebComponents{static run(frame,doc){return __awaiter(this,void 0,void 0,(function*(){if(doc[webComponentsInstalled]){return}doc[webComponentsInstalled]=true;const url=this.path+"/dist/editable.js";frame.sandbox.add("allow-scripts");const text=yield FetchBuilder.get(url).responseAsText();const proxy=new CustomElementsProxy;const win=doc.defaultView;const globals={window:win,document:win.document,Object:win.Object,Promise,console:win.console,Boolean:win.Boolean,String:win.String,Number:win.Number,Math:win.Math,Date:win.Date,Proxy:win.Proxy,Map:win.Map,Array:win.Array,RegExp:win.RegExp,PromiseRejectionEvent:win.PromiseRejectionEvent,setTimeout:(cb,n)=>setTimeout(cb,n),setInterval:(cb,n)=>setInterval(cb,n),clearTimeout:n=>clearTimeout(n),clearInterval:n=>clearInterval(n),Reflect:win.Reflect,requestAnimationFrame:win.requestAnimationFrame,requestIdleCallback:win.requestIdleCallback,Symbol:win.Symbol,HTMLElement:win.HTMLElement,MutationObserver:class extends win.MutationObserver{constructor(a){super(a)}},IntersectionObserver:class extends win.IntersectionObserver{constructor(a){super(a)}},customElements:proxy};win.HTMLElement.prototype.addEventListener=function(type,listener,options){return win.EventTarget.prototype.addEventListener.call(this,type,listener,options)};const keys=Object.keys(globals);const init=`${keys.map((x=>`var ${x} = globalWindow[${JSON.stringify(x)}]`)).join(";\n")}`;const sourceMappingURL=this.path+"/dist/editable.js.map";const script=`\n "use strict";\n ${init};\n Symbol.dispose ||= Symbol("dispose");\n ;${text.replace("//# sourceMappingURL=editable.js.map","//# sourceMappingURL="+sourceMappingURL)}\n `;const fx=new doc.defaultView.Function("globalWindow",script);fx.call(win,globals);addAttributes(win.HTMLElement,(()=>[{name:"title",type:"string",display:"Tool Tip"},{name:"lang",type:"lang",display:"Language"}]));addAttributes(win.HTMLAnchorElement,(()=>[{name:"href",type:"string",display:"Link"},{name:"target",type:"string",suggest:["_blank"],display:"Target"}]));addAttributes(win.HTMLImageElement,(()=>[{name:"src",type:"image",display:"Image"},{name:"alt",type:"string",display:"Alt"}]));addAttributes(win.HTMLVideoElement,(()=>[{name:"src",type:"video",display:"Video"},{name:"poster",type:"image",display:"Poster"},{name:"autoplay",type:"boolean",display:"Auto Play"},{name:"loop",type:"boolean",display:"Loop"},{name:"muted",type:"boolean",display:"Muted"}]));yield sleep(10);for(const{name,factory}of proxy.elements){doc.defaultView.customElements.define(name,factory)}frame.sandbox.remove("allow-scripts")}))}});WebComponents.path=`//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.157`}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/webComponentsPath");System.register(["@web-atoms/core/dist/style/styled","../../../common/TestMode"],(function(_export,_context){"use strict";var styled,AppLocation,channelViewStyle;return{setters:[function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default},function(_commonTestMode){AppLocation=_commonTestMode.AppLocation}],execute:function(){styled.css`
|
|
1396
1396
|
|
|
1397
1397
|
box-sizing: border-box;
|
|
1398
1398
|
|
|
@@ -26684,7 +26684,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/sleep", "@web-atoms/core/di
|
|
|
26684
26684
|
});
|
|
26685
26685
|
}
|
|
26686
26686
|
});
|
|
26687
|
-
WebComponents.path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.
|
|
26687
|
+
WebComponents.path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.157`;
|
|
26688
26688
|
}
|
|
26689
26689
|
};
|
|
26690
26690
|
});
|
|
@@ -1068,7 +1068,7 @@ aside {
|
|
|
1068
1068
|
grid-column: 1 / span 3;
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
1071
|
-
`.installGlobal("post-summary");document.body.addEventListener("click",(e=>{let target=e.target;do{const href=target.tagName==="POST-SUMMARY"&&target.getAttribute("data-link");if(href){location.href=href;return}target=target.parentElement}while(target)}))}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/PostSummary");System.register(["tslib","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/services/FetchBuilder"],(function(_export,_context){"use strict";var __awaiter,sleep,FetchBuilder,CustomElementsProxy,WebComponents,webComponentsInstalled,addAttributes;_export("WebComponents",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter},function(_webAtomsCoreDistCoreSleep){sleep=_webAtomsCoreDistCoreSleep.default},function(_webAtomsCoreDistServicesFetchBuilder){FetchBuilder=_webAtomsCoreDistServicesFetchBuilder.default}],execute:function(){webComponentsInstalled=Symbol("webComponentsInstalled");CustomElementsProxy=class CustomElementsProxy{constructor(elements=[]){this.elements=elements}define(name,factory){this.elements.push({name,factory})}};addAttributes=(target,values)=>{Object.defineProperty(target.prototype,"editableAttributes",{enumerable:true,configurable:true,get(){return values(this)}})};_export("WebComponents",WebComponents=class WebComponents{static run(frame,doc){return __awaiter(this,void 0,void 0,(function*(){if(doc[webComponentsInstalled]){return}doc[webComponentsInstalled]=true;const url=this.path+"/dist/editable.js";frame.sandbox.add("allow-scripts");const text=yield FetchBuilder.get(url).responseAsText();const proxy=new CustomElementsProxy;const win=doc.defaultView;const globals={window:win,document:win.document,Object:win.Object,Promise,console:win.console,Boolean:win.Boolean,String:win.String,Number:win.Number,Math:win.Math,Date:win.Date,Proxy:win.Proxy,Map:win.Map,Array:win.Array,RegExp:win.RegExp,PromiseRejectionEvent:win.PromiseRejectionEvent,setTimeout:(cb,n)=>setTimeout(cb,n),setInterval:(cb,n)=>setInterval(cb,n),clearTimeout:n=>clearTimeout(n),clearInterval:n=>clearInterval(n),Reflect:win.Reflect,requestAnimationFrame:win.requestAnimationFrame,requestIdleCallback:win.requestIdleCallback,Symbol:win.Symbol,HTMLElement:win.HTMLElement,MutationObserver:class extends win.MutationObserver{constructor(a){super(a)}},IntersectionObserver:class extends win.IntersectionObserver{constructor(a){super(a)}},customElements:proxy};win.HTMLElement.prototype.addEventListener=function(type,listener,options){return win.EventTarget.prototype.addEventListener.call(this,type,listener,options)};const keys=Object.keys(globals);const init=`${keys.map((x=>`var ${x} = globalWindow[${JSON.stringify(x)}]`)).join(";\n")}`;const sourceMappingURL=this.path+"/dist/editable.js.map";const script=`\n "use strict";\n ${init};\n Symbol.dispose ||= Symbol("dispose");\n ;${text.replace("//# sourceMappingURL=editable.js.map","//# sourceMappingURL="+sourceMappingURL)}\n `;const fx=new doc.defaultView.Function("globalWindow",script);fx.call(win,globals);addAttributes(win.HTMLElement,(()=>[{name:"title",type:"string",display:"Tool Tip"},{name:"lang",type:"lang",display:"Language"}]));addAttributes(win.HTMLAnchorElement,(()=>[{name:"href",type:"string",display:"Link"},{name:"target",type:"string",suggest:["_blank"],display:"Target"}]));addAttributes(win.HTMLImageElement,(()=>[{name:"src",type:"image",display:"Image"},{name:"alt",type:"string",display:"Alt"}]));addAttributes(win.HTMLVideoElement,(()=>[{name:"src",type:"video",display:"Video"},{name:"poster",type:"image",display:"Poster"},{name:"autoplay",type:"boolean",display:"Auto Play"},{name:"loop",type:"boolean",display:"Loop"},{name:"muted",type:"boolean",display:"Muted"}]));yield sleep(10);for(const{name,factory}of proxy.elements){doc.defaultView.customElements.define(name,factory)}frame.sandbox.remove("allow-scripts")}))}});WebComponents.path=`//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.
|
|
1071
|
+
`.installGlobal("post-summary");document.body.addEventListener("click",(e=>{let target=e.target;do{const href=target.tagName==="POST-SUMMARY"&&target.getAttribute("data-link");if(href){location.href=href;return}target=target.parentElement}while(target)}))}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/public/channel/PostSummary");System.register(["tslib","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/services/FetchBuilder"],(function(_export,_context){"use strict";var __awaiter,sleep,FetchBuilder,CustomElementsProxy,WebComponents,webComponentsInstalled,addAttributes;_export("WebComponents",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter},function(_webAtomsCoreDistCoreSleep){sleep=_webAtomsCoreDistCoreSleep.default},function(_webAtomsCoreDistServicesFetchBuilder){FetchBuilder=_webAtomsCoreDistServicesFetchBuilder.default}],execute:function(){webComponentsInstalled=Symbol("webComponentsInstalled");CustomElementsProxy=class CustomElementsProxy{constructor(elements=[]){this.elements=elements}define(name,factory){this.elements.push({name,factory})}};addAttributes=(target,values)=>{Object.defineProperty(target.prototype,"editableAttributes",{enumerable:true,configurable:true,get(){return values(this)}})};_export("WebComponents",WebComponents=class WebComponents{static run(frame,doc){return __awaiter(this,void 0,void 0,(function*(){if(doc[webComponentsInstalled]){return}doc[webComponentsInstalled]=true;const url=this.path+"/dist/editable.js";frame.sandbox.add("allow-scripts");const text=yield FetchBuilder.get(url).responseAsText();const proxy=new CustomElementsProxy;const win=doc.defaultView;const globals={window:win,document:win.document,Object:win.Object,Promise,console:win.console,Boolean:win.Boolean,String:win.String,Number:win.Number,Math:win.Math,Date:win.Date,Proxy:win.Proxy,Map:win.Map,Array:win.Array,RegExp:win.RegExp,PromiseRejectionEvent:win.PromiseRejectionEvent,setTimeout:(cb,n)=>setTimeout(cb,n),setInterval:(cb,n)=>setInterval(cb,n),clearTimeout:n=>clearTimeout(n),clearInterval:n=>clearInterval(n),Reflect:win.Reflect,requestAnimationFrame:win.requestAnimationFrame,requestIdleCallback:win.requestIdleCallback,Symbol:win.Symbol,HTMLElement:win.HTMLElement,MutationObserver:class extends win.MutationObserver{constructor(a){super(a)}},IntersectionObserver:class extends win.IntersectionObserver{constructor(a){super(a)}},customElements:proxy};win.HTMLElement.prototype.addEventListener=function(type,listener,options){return win.EventTarget.prototype.addEventListener.call(this,type,listener,options)};const keys=Object.keys(globals);const init=`${keys.map((x=>`var ${x} = globalWindow[${JSON.stringify(x)}]`)).join(";\n")}`;const sourceMappingURL=this.path+"/dist/editable.js.map";const script=`\n "use strict";\n ${init};\n Symbol.dispose ||= Symbol("dispose");\n ;${text.replace("//# sourceMappingURL=editable.js.map","//# sourceMappingURL="+sourceMappingURL)}\n `;const fx=new doc.defaultView.Function("globalWindow",script);fx.call(win,globals);addAttributes(win.HTMLElement,(()=>[{name:"title",type:"string",display:"Tool Tip"},{name:"lang",type:"lang",display:"Language"}]));addAttributes(win.HTMLAnchorElement,(()=>[{name:"href",type:"string",display:"Link"},{name:"target",type:"string",suggest:["_blank"],display:"Target"}]));addAttributes(win.HTMLImageElement,(()=>[{name:"src",type:"image",display:"Image"},{name:"alt",type:"string",display:"Alt"}]));addAttributes(win.HTMLVideoElement,(()=>[{name:"src",type:"video",display:"Video"},{name:"poster",type:"image",display:"Poster"},{name:"autoplay",type:"boolean",display:"Auto Play"},{name:"loop",type:"boolean",display:"Loop"},{name:"muted",type:"boolean",display:"Muted"}]));yield sleep(10);for(const{name,factory}of proxy.elements){doc.defaultView.customElements.define(name,factory)}frame.sandbox.remove("allow-scripts")}))}});WebComponents.path=`//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.157`}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/webComponentsPath");System.register(["tslib","@web-atoms/core/dist/web/controls/AtomControl","@web-atoms/core/dist/core/XNode"],(function(_export,_context){"use strict";var __rest,AtomControl,XNode,labelPathSetter,valuePathSetter,valueSetter,refreshItems,itemsSetter;function Select(_a){var{items,labelPath,valuePath,value}=_a,a=__rest(_a,["items","labelPath","valuePath","value"]);a[labelPathSetter.property]=labelPath;a[valuePathSetter.property]=valuePath;a[valueSetter.property]=value;a[itemsSetter.property]=items;return XNode.create("select",Object.assign({},a))}_export("default",Select);return{setters:[function(_tslib){__rest=_tslib.__rest},function(_webAtomsCoreDistWebControlsAtomControl){AtomControl=_webAtomsCoreDistWebControlsAtomControl.AtomControl},function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default}],execute:function(){labelPathSetter=AtomControl.registerProperty("data-items","value",((ctrl,element,value)=>{element["labelPath"]=value}));valuePathSetter=AtomControl.registerProperty("data-items","value",((ctrl,element,value)=>{element["valuePath"]=value}));valueSetter=AtomControl.registerProperty("data-items","value",((ctrl,element,value)=>{var _a;element["initialValue"]=value;element["value"]=value;const select=element;let length=select.options.length;if(!length){setTimeout(refreshItems,1,element);return}const items=element["items"];if(!items){setTimeout(refreshItems,1,element);return}const vp=(_a=element["valuePath"])!==null&&_a!==void 0?_a:item=>{var _a;return(_a=item===null||item===void 0?void 0:item.value)!==null&&_a!==void 0?_a:item};let index=0;for(const item of items){const v=vp(item);if(v==value){select.selectedIndex=index;return}index++}setTimeout(refreshItems,1,element)}));refreshItems=(element,items)=>{var _a,_b;items!==null&&items!==void 0?items:items=element["items"];element.update=true;const old=element.selectedIndex;let cv=element["initialValue"];if(old!==-1){cv=element["value"]}element.options.length=0;const lp=(_a=element["labelPath"])!==null&&_a!==void 0?_a:item=>{var _a;return(_a=item===null||item===void 0?void 0:item.label)!==null&&_a!==void 0?_a:item};const vp=(_b=element["valuePath"])!==null&&_b!==void 0?_b:item=>{var _a;return(_a=item===null||item===void 0?void 0:item.value)!==null&&_a!==void 0?_a:item};let i=0;let si=-1;if(items===null||items===void 0?void 0:items.length){for(const iterator of items){const option=document.createElement("option");const label=lp(iterator);const value=vp(iterator);option.text=label;option.value=value;element.options.add(option);if(cv!==void 0){if(cv==value){si=i}}i++}}if(si!=-1){element.selectedIndex=si}element.update=false};itemsSetter=AtomControl.registerProperty("data-items","value",((ctrl,element,value)=>{element["items"]=value;setTimeout(refreshItems,1,element,value)}))}}}));AmdLoader.instance.setup("@web-atoms/web-controls/dist/basic/Select");System.register(["@web-atoms/core/dist/style/styled"],(function(_export,_context){"use strict";var styled;return{setters:[function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default}],execute:function(){styled.css`
|
|
1072
1072
|
|
|
1073
1073
|
display: inline-grid;
|
|
1074
1074
|
grid-template-rows: auto auto 1fr;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewVideo.d.ts","sourceRoot":"","sources":["../../../../src/public/preview/video/PreviewVideo.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAuC5E,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,WAAW;gBAErC,GAAG,KAAA,EAAC,CAAC,KAAA;IAKX,IAAI;CAkBb"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
System.register(["tslib", "@web-atoms/core/dist/core/XNode", "@web-atoms/core/dist/Pack", "@web-atoms/core/dist/style/styled", "@web-atoms/core/dist/web/controls/AtomControl", "@web-atoms/web-controls/dist/player/AtomVideoPlayer"], function (_export, _context) {
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var __awaiter, __decorate, __metadata, XNode, Pack, styled, AtomControl, AtomVideoPlayer, fileInfo, PreviewVideo;
|
|
5
|
+
return {
|
|
6
|
+
setters: [function (_tslib) {
|
|
7
|
+
__awaiter = _tslib.__awaiter;
|
|
8
|
+
__decorate = _tslib.__decorate;
|
|
9
|
+
__metadata = _tslib.__metadata;
|
|
10
|
+
}, function (_webAtomsCoreDistCoreXNode) {
|
|
11
|
+
XNode = _webAtomsCoreDistCoreXNode.default;
|
|
12
|
+
}, function (_webAtomsCoreDistPack) {
|
|
13
|
+
Pack = _webAtomsCoreDistPack.default;
|
|
14
|
+
}, function (_webAtomsCoreDistStyleStyled) {
|
|
15
|
+
styled = _webAtomsCoreDistStyleStyled.default;
|
|
16
|
+
}, function (_webAtomsCoreDistWebControlsAtomControl) {
|
|
17
|
+
AtomControl = _webAtomsCoreDistWebControlsAtomControl.AtomControl;
|
|
18
|
+
}, function (_webAtomsWebControlsDistPlayerAtomVideoPlayer) {
|
|
19
|
+
AtomVideoPlayer = _webAtomsWebControlsDistPlayerAtomVideoPlayer.default;
|
|
20
|
+
}],
|
|
21
|
+
execute: function () {
|
|
22
|
+
styled.css`
|
|
23
|
+
|
|
24
|
+
display: grid;
|
|
25
|
+
grid-template-columns: 1fr;
|
|
26
|
+
grid-template-rows: 1fr auto;
|
|
27
|
+
|
|
28
|
+
align-items: stretch;
|
|
29
|
+
justify-content: stretch;
|
|
30
|
+
justify-items: stretch;
|
|
31
|
+
|
|
32
|
+
& [video-player] {
|
|
33
|
+
grid-row: 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
& > footer {
|
|
37
|
+
grid-row: 2;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
`.installGlobal("[data-preview-video]");
|
|
42
|
+
fileInfo = window.fileInfo;
|
|
43
|
+
if (!fileInfo) {
|
|
44
|
+
fileInfo = window.fileInfo = {};
|
|
45
|
+
const url = new URL(location.href);
|
|
46
|
+
url.searchParams.forEach((v, k) => {
|
|
47
|
+
fileInfo[k] = v;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
PreviewVideo = class PreviewVideo extends AtomControl {
|
|
51
|
+
constructor(app, e) {
|
|
52
|
+
super(app, e);
|
|
53
|
+
this.pushInit();
|
|
54
|
+
}
|
|
55
|
+
init() {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
this.renderer = XNode.create("div", null, XNode.create(AtomVideoPlayer, {
|
|
58
|
+
source: fileInfo.url
|
|
59
|
+
}), XNode.create("footer", {
|
|
60
|
+
"data-layout": "row",
|
|
61
|
+
"data-align-items": "center",
|
|
62
|
+
"data-justify-content": "center",
|
|
63
|
+
"data-justify-items": "center",
|
|
64
|
+
"data-font-size": "x-small"
|
|
65
|
+
}, XNode.create("a", {
|
|
66
|
+
target: "_blank",
|
|
67
|
+
href: "https://socialmail.me"
|
|
68
|
+
}, "Powered by Social Mail"), XNode.create("a", {
|
|
69
|
+
target: "_blank",
|
|
70
|
+
href: "https://fontawesome.com/"
|
|
71
|
+
}, "Fonts by Font Awesome")));
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
PreviewVideo = __decorate([Pack, __metadata("design:paramtypes", [Object, Object])], PreviewVideo);
|
|
76
|
+
_export("default", PreviewVideo);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=PreviewVideo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["XNode","_webAtomsCoreDistCoreXNode","default","_webAtomsCoreDistPack","Pack","_webAtomsCoreDistStyleStyled","styled","_webAtomsCoreDistWebControlsAtomControl","AtomControl","_webAtomsWebControlsDistPlayerAtomVideoPlayer","AtomVideoPlayer","execute","css","installGlobal","fileInfo","window","url","URL","location","href","searchParams","forEach","v","k","PreviewVideo","constructor","app","e","pushInit","init","renderer","create","source","target","__decorate","_export"],"sources":["../../../../src/public/preview/video/PreviewVideo.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;MAAOA,KAAK,GAAAC,0BAAA,CAAAC,OAAA;IAAA,aAAAC,qBAAA;MACLC,IAAI,GAAAD,qBAAA,CAAAD,OAAA;IAAA,aAAAG,4BAAA;MACJC,MAAM,GAAAD,4BAAA,CAAAH,OAAA;IAAA,aAAAK,uCAAA;MACJC,WAAW,GAAAD,uCAAA,CAAXC,WAAW;IAAA,aAAAC,6CAAA;MACbC,eAAe,GAAAD,6CAAA,CAAAP,OAAA;IAAA;IAAAS,OAAA,WAAAA,CAAA;MAGlBL,MAAM,CAACM,GAAI;;;;;;;;;;;;;;;;;;;KAmBV,CAACC,aAAa,CAAC,sBAAsB,CAAC;MAGvCC,QAAQ,GAAuBC,MAAc,CAACD,QAAQ;MAE1D,IAAI,CAACA,QAAQ,EAAE;QACXA,QAAQ,GAAIC,MAAc,CAACD,QAAQ,GAAG,EAAE;QACxC,MAAME,GAAG,GAAG,IAAIC,GAAG,CAACC,QAAQ,CAACC,IAAI,CAAC;QAClCH,GAAG,CAACI,YAAY,CAACC,OAAO,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAI;UAC9BT,QAAQ,CAACS,CAAC,CAAC,GAAGD,CAAC;QACnB,CAAC,CAAC;;MAMeE,YAAY,GAAlB,MAAMA,YAAa,SAAQhB,WAAW;QAEjDiB,YAAYC,GAAG,EAACC,CAAC;UACb,KAAK,CAACD,GAAG,EAACC,CAAC,CAAC;UACZ,IAAI,CAACC,QAAQ,EAAE;QACnB;QAEMC,IAAIA,CAAA;;YACN,IAAI,CAACC,QAAQ,GAAG9B,KAAA,CAAA+B,MAAA,cACZ/B,KAAA,CAAA+B,MAAA,CAACrB,eAAe;cACZsB,MAAM,EAAElB,QAAQ,CAACE;YAAG,EAClB,EACNhB,KAAA,CAAA+B,MAAA;cAAA,eACgB,KAAK;cAAA,oBACA,QAAQ;cAAA,wBACJ,QAAQ;cAAA,sBACV,QAAQ;cAAA,kBACZ;YAAS,GAExB/B,KAAA,CAAA+B,MAAA;cAAGE,MAAM,EAAC,QAAQ;cAACd,IAAI,EAAC;YAAuB,4BAA2B,EAC1EnB,KAAA,CAAA+B,MAAA;cAAGE,MAAM,EAAC,QAAQ;cAACd,IAAI,EAAC;YAA0B,2BAA0B,CACvE,CACP;UACV,CAAC;;OAEJ;MAzBoBK,YAAY,GAAAU,UAAA,EADhC9B,IAAI,E,oDACgBoB,YAAY,CAyBhC;MAAAW,OAAA,YAzBoBX,YAAY;IAAA;EAAA;AAAA","ignoreList":[]}
|