@social-mail/social-mail-client 1.2.677 → 1.2.679

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.
@@ -48751,7 +48751,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/sleep", "@web-atoms/core/di
48751
48751
  });
48752
48752
  }
48753
48753
  });
48754
- WebComponents.path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.140`;
48754
+ WebComponents.path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.141`;
48755
48755
  }
48756
48756
  };
48757
48757
  });
@@ -3908,7 +3908,7 @@ display: grid;
3908
3908
  }
3909
3909
 
3910
3910
 
3911
- `.installGlobal("bread-crum");selectedProperty=AtomControl.registerProperty("selected-property","v1",((ac,e,value)=>{e.innerHTML="";if(!value){return}let start=value;if(!(start===null||start===void 0?void 0:start.ownerDocument)){return}const body=start.ownerDocument.body;while(start&&start!==body.parentElement){const typeName=start.className||start.getAttribute("styler-layout");const name=typeName?start.tagName+"("+typeName+")":start.tagName;const button=document.createElement("button");button.textContent=name;button["currentElement"]=start;e.insertAdjacentElement("afterbegin",button);start=start.parentElement;if(start===body){break}}}));onBreadCrumClick=({target})=>{const editor=AtomControl.from(target);const ce=target["currentElement"];if(ce){editor.selection.update(ce)}}}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/BreadCrum");System.register(["@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/XNode","@web-atoms/web-controls/dist/basic/Select"],(function(_export,_context){"use strict";var Bind,XNode,Select;function LanguageDropDown(){return XNode.create(Select,{"style-max-width":"80px","style-border":"none","style-display":Bind.oneWay((c=>!!c.languages)),items:Bind.oneWay((c=>{var _a;return(_a=c.languages)!==null&&_a!==void 0?_a:void 0})),labelPath:x=>x.label,valuePath:x=>x.value,value:Bind.twoWaysImmediate((c=>c.language))})}_export("default",LanguageDropDown);return{setters:[function(_webAtomsCoreDistCoreBind){Bind=_webAtomsCoreDistCoreBind.default},function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsWebControlsDistBasicSelect){Select=_webAtomsWebControlsDistBasicSelect.default}],execute:function(){}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/LanguageDropDown");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.140`}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/webComponentsPath");System.register(["@web-atoms/core/dist/core/AtomBinder"],(function(_export,_context){"use strict";var AtomBinder,UndoRedo;_export("default",void 0);return{setters:[function(_webAtomsCoreDistCoreAtomBinder){AtomBinder=_webAtomsCoreDistCoreAtomBinder.AtomBinder}],execute:function(){_export("default",UndoRedo=class UndoRedo{constructor(doc,page){this.page=page;this.undoStack=[];this.redoStack=[];this.changed=false;this.canUndo=false;this.canRedo=false;this.silent=false;this.observer=new MutationObserver((x=>this.observe(x)));this.observer.observe(doc,{childList:true,subtree:true,attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true})}observe(records){if(this.silent){return}if(!this.changed){AtomBinder.refreshValue(this.page,"modifiedDocument");this.page.element.dispatchEvent(new CustomEvent("htmlPageChanged",{detail:null,bubbles:true}));this.changed=true}this.canUndo=true;this.canRedo=false;this.redoStack.length=0;const undo=[];const redo=[];for(const x of records){const target=x.target;const node=x.target;switch(x.type){case"attributes":const value=target.getAttributeNS(x.attributeNamespace,x.attributeName);if(value===x.oldValue){break}undo.splice(0,0,(()=>target.setAttributeNS(x.attributeNamespace,x.attributeName,x.oldValue)));redo.push((()=>target.setAttributeNS(x.attributeNamespace,x.attributeName,value)));break;case"characterData":const data=node.data;if(data===x.oldValue){break}undo.splice(0,0,(()=>node.data=x.oldValue));redo.push((()=>node.data=data));break;case"childList":const{addedNodes,removedNodes,previousSibling,nextSibling}=x;for(let index=0;index<addedNodes.length;index++){const added=addedNodes[index];let{parentNode}=added;undo.splice(0,0,(()=>added.parentNode.removeChild(added)));if(previousSibling){redo.push((()=>previousSibling.parentNode?parentNode.insertBefore(added,previousSibling.nextSibling):parentNode.append(added)));continue}if(nextSibling){parentNode!==null&&parentNode!==void 0?parentNode:parentNode=nextSibling.parentNode;redo.push((()=>parentNode.insertBefore(added,nextSibling)));continue}redo.push((()=>target.append(added)))}for(let index=0;index<removedNodes.length;index++){const removed=removedNodes[index];redo.splice(0,0,(()=>removed.parentNode.removeChild(removed)));if(previousSibling){undo.push((()=>previousSibling.nextSibling?previousSibling.parentNode.insertBefore(removed,previousSibling.nextSibling):previousSibling.parentElement.append(removed)));continue}if(nextSibling){undo.push((()=>nextSibling.parentNode.insertBefore(removed,nextSibling)));continue}undo.push((()=>target.append(removed)))}break}}if(undo.length&&redo.length){this.undoStack.push({undo,redo})}}dispose(){this.observer.disconnect();this.observer=null}undo(){if(!this.undoStack.length){this.canUndo=false;return}this.silent=true;const change=this.undoStack.pop();this.redoStack.push(change);this.canRedo=true;for(const element of change.undo){element()}this.canUndo=this.undoStack.length>0;setTimeout((()=>this.silent=false),10)}redo(){if(!this.redoStack.length){this.canRedo=false;return}this.silent=true;const change=this.redoStack.pop();this.undoStack.push(change);this.canUndo=true;for(const element of change.redo){element()}this.canRedo=this.redoStack.length>0;setTimeout((()=>this.silent=false),10)}})}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/UndoRedo");System.register(["tslib"],(function(_export,_context){"use strict";var __awaiter,DuplexStream,DomHelper;_export("default",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter}],execute:function(){DuplexStream=class DuplexStream{constructor(element){this.index=-1;this.array=[];const all=element.querySelectorAll("*");for(let index=0;index<all.length;index++){const e=all[index];this.array.push({e,text:e.innerHTML})}}next(){const index=this.index++;if(index>=this.array.length){return{done:true}}return{index,value:this.array[index]}}reset(index){this.index=index}};_export("default",DomHelper=class DomHelper{static applyChanges(target,src){return __awaiter(this,void 0,void 0,(function*(){const persist=[];for(const element of Array.from(target.head.children)){if(element.hasAttribute("remove-when-save")){persist.push(element);continue}if(element.tagName==="BASE"){persist.push(element)}}target.head.innerHTML=src.head.innerHTML;for(const element of persist){target.head.insertAdjacentElement("afterbegin",element)}target.body.innerHTML=src.body.innerHTML}))}})}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/DomHelper");System.register(["tslib","@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/style/styled","@web-atoms/core/dist/view-model/Action","@web-atoms/core/dist/web/controls/AtomControl","../drag-drop/DragDropHelper","../toolbars/UndoRedoToolbar","../blocks/WrapGrid","../toolbars/EditorToolbar","../properties/Properties","../styler/StylerSet","./SelectedElement","@web-atoms/core/dist/core/AtomBinder","../blocks/ImageBox","../blocks/RowBox","../blocks/ColumnBox","../blocks/VerticalImageBox","../blocks/Image","../blocks/ImageCard","../blocks/TextBox","../blocks/Card","../blocks/List","../blocks/Components","@web-atoms/core/dist/core/types","../blocks/Buttons","../blocks/Columns2","../blocks/Columns3","../blocks/RightImageBox","@web-atoms/core/dist/web/core/AtomUI","../blocks/PriceBox","@web-atoms/core/dist/core/BindableProperty","../blocks/Billboard","../blocks/OutlineText","../blocks/Carousel","../blocks/ImageGallery","@web-atoms/web-controls/dist/basic/InlinePopup","../blocks/VideoPlayer","../blocks/BackgroundVideo","../blocks/TextMask","../blocks/MarqueeText","../blocks/ImageGrid","../blocks/BoxFrame","../blocks/InjectBox","../blocks/PDFFlipBook","../blocks/PDFViewer","../blocks/Banner","./BreadCrum","./LanguageDropDown","./webComponentsPath","./UndoRedo","./DomHelper"],(function(_export,_context){"use strict";var __awaiter,__decorate,__metadata,__rest,Bind,XNode,sleep,styled,Action,AtomControl,InstallDragDropHelper,UndoRedoToolbar,WrapGrid,EditorToolbar,Properties,StylerSet,SelectedElement,AtomBinder,ImageBox,RowBox,ColumnBox,VerticalImageBox,Image,ImageCard,TextBox,Card,List,BlogComponent,TypeWriterComponent,CancelToken,UMD,ImageLink,LinkButton,Columns2,Columns3,RightImageBox,descendentElementIterator,PriceTable,BindableProperty,Billboard,OutlineText,Carousel,ImageGallery,InlinePopupButton,VideoPlayer,BackgroundVideo,TextMask,MarqueeText,ImageGrid,BoxFrame,InjectBox,PDFFlipBook,PDFViewer,Banner,BreadCrum,LanguageDropDown,WebComponents,UndoRedo,DomHelper,HtmlPageEditor,desktopWidth,tabletWidth,mobileWidth,languageSymbol;_export("default",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter;__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__rest=_tslib.__rest},function(_webAtomsCoreDistCoreBind){Bind=_webAtomsCoreDistCoreBind.default},function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsCoreDistCoreSleep){sleep=_webAtomsCoreDistCoreSleep.default},function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default},function(_webAtomsCoreDistViewModelAction){Action=_webAtomsCoreDistViewModelAction.default},function(_webAtomsCoreDistWebControlsAtomControl){AtomControl=_webAtomsCoreDistWebControlsAtomControl.AtomControl},function(_dragDropDragDropHelper){InstallDragDropHelper=_dragDropDragDropHelper.InstallDragDropHelper},function(_toolbarsUndoRedoToolbar){UndoRedoToolbar=_toolbarsUndoRedoToolbar.default},function(_blocksWrapGrid){WrapGrid=_blocksWrapGrid.WrapGrid},function(_toolbarsEditorToolbar){EditorToolbar=_toolbarsEditorToolbar.default},function(_propertiesProperties){Properties=_propertiesProperties.default},function(_stylerStylerSet){StylerSet=_stylerStylerSet.StylerSet},function(_SelectedElement){SelectedElement=_SelectedElement.SelectedElement},function(_webAtomsCoreDistCoreAtomBinder){AtomBinder=_webAtomsCoreDistCoreAtomBinder.AtomBinder},function(_blocksImageBox){ImageBox=_blocksImageBox.ImageBox},function(_blocksRowBox){RowBox=_blocksRowBox.RowBox},function(_blocksColumnBox){ColumnBox=_blocksColumnBox.ColumnBox},function(_blocksVerticalImageBox){VerticalImageBox=_blocksVerticalImageBox.VerticalImageBox},function(_blocksImage){Image=_blocksImage.Image},function(_blocksImageCard){ImageCard=_blocksImageCard.ImageCard},function(_blocksTextBox){TextBox=_blocksTextBox.TextBox},function(_blocksCard){Card=_blocksCard.Card},function(_blocksList){List=_blocksList.List},function(_blocksComponents){BlogComponent=_blocksComponents.BlogComponent;TypeWriterComponent=_blocksComponents.TypeWriterComponent},function(_webAtomsCoreDistCoreTypes){CancelToken=_webAtomsCoreDistCoreTypes.CancelToken;UMD=_webAtomsCoreDistCoreTypes.UMD},function(_blocksButtons){ImageLink=_blocksButtons.ImageLink;LinkButton=_blocksButtons.LinkButton},function(_blocksColumns){Columns2=_blocksColumns.Columns2},function(_blocksColumns2){Columns3=_blocksColumns2.Columns3},function(_blocksRightImageBox){RightImageBox=_blocksRightImageBox.RightImageBox},function(_webAtomsCoreDistWebCoreAtomUI){descendentElementIterator=_webAtomsCoreDistWebCoreAtomUI.descendentElementIterator},function(_blocksPriceBox){PriceTable=_blocksPriceBox.PriceTable},function(_webAtomsCoreDistCoreBindableProperty){BindableProperty=_webAtomsCoreDistCoreBindableProperty.BindableProperty},function(_blocksBillboard){Billboard=_blocksBillboard.Billboard},function(_blocksOutlineText){OutlineText=_blocksOutlineText.OutlineText},function(_blocksCarousel){Carousel=_blocksCarousel.Carousel},function(_blocksImageGallery){ImageGallery=_blocksImageGallery.ImageGallery},function(_webAtomsWebControlsDistBasicInlinePopup){InlinePopupButton=_webAtomsWebControlsDistBasicInlinePopup.InlinePopupButton},function(_blocksVideoPlayer){VideoPlayer=_blocksVideoPlayer.VideoPlayer},function(_blocksBackgroundVideo){BackgroundVideo=_blocksBackgroundVideo.BackgroundVideo},function(_blocksTextMask){TextMask=_blocksTextMask.TextMask},function(_blocksMarqueeText){MarqueeText=_blocksMarqueeText.MarqueeText},function(_blocksImageGrid){ImageGrid=_blocksImageGrid.ImageGrid},function(_blocksBoxFrame){BoxFrame=_blocksBoxFrame.BoxFrame},function(_blocksInjectBox){InjectBox=_blocksInjectBox.InjectBox},function(_blocksPDFFlipBook){PDFFlipBook=_blocksPDFFlipBook.PDFFlipBook},function(_blocksPDFViewer){PDFViewer=_blocksPDFViewer.PDFViewer},function(_blocksBanner){Banner=_blocksBanner.Banner},function(_BreadCrum){BreadCrum=_BreadCrum.default},function(_LanguageDropDown){LanguageDropDown=_LanguageDropDown.default},function(_webComponentsPath){WebComponents=_webComponentsPath.WebComponents},function(_UndoRedo){UndoRedo=_UndoRedo.default},function(_DomHelper){DomHelper=_DomHelper.default}],execute:function(){styled.css`
3911
+ `.installGlobal("bread-crum");selectedProperty=AtomControl.registerProperty("selected-property","v1",((ac,e,value)=>{e.innerHTML="";if(!value){return}let start=value;if(!(start===null||start===void 0?void 0:start.ownerDocument)){return}const body=start.ownerDocument.body;while(start&&start!==body.parentElement){const typeName=start.className||start.getAttribute("styler-layout");const name=typeName?start.tagName+"("+typeName+")":start.tagName;const button=document.createElement("button");button.textContent=name;button["currentElement"]=start;e.insertAdjacentElement("afterbegin",button);start=start.parentElement;if(start===body){break}}}));onBreadCrumClick=({target})=>{const editor=AtomControl.from(target);const ce=target["currentElement"];if(ce){editor.selection.update(ce)}}}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/BreadCrum");System.register(["@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/XNode","@web-atoms/web-controls/dist/basic/Select"],(function(_export,_context){"use strict";var Bind,XNode,Select;function LanguageDropDown(){return XNode.create(Select,{"style-max-width":"80px","style-border":"none","style-display":Bind.oneWay((c=>!!c.languages)),items:Bind.oneWay((c=>{var _a;return(_a=c.languages)!==null&&_a!==void 0?_a:void 0})),labelPath:x=>x.label,valuePath:x=>x.value,value:Bind.twoWaysImmediate((c=>c.language))})}_export("default",LanguageDropDown);return{setters:[function(_webAtomsCoreDistCoreBind){Bind=_webAtomsCoreDistCoreBind.default},function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsWebControlsDistBasicSelect){Select=_webAtomsWebControlsDistBasicSelect.default}],execute:function(){}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/LanguageDropDown");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.141`}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/webComponentsPath");System.register(["@web-atoms/core/dist/core/AtomBinder"],(function(_export,_context){"use strict";var AtomBinder,UndoRedo;_export("default",void 0);return{setters:[function(_webAtomsCoreDistCoreAtomBinder){AtomBinder=_webAtomsCoreDistCoreAtomBinder.AtomBinder}],execute:function(){_export("default",UndoRedo=class UndoRedo{constructor(doc,page){this.page=page;this.undoStack=[];this.redoStack=[];this.changed=false;this.canUndo=false;this.canRedo=false;this.silent=false;this.observer=new MutationObserver((x=>this.observe(x)));this.observer.observe(doc,{childList:true,subtree:true,attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true})}observe(records){if(this.silent){return}if(!this.changed){AtomBinder.refreshValue(this.page,"modifiedDocument");this.page.element.dispatchEvent(new CustomEvent("htmlPageChanged",{detail:null,bubbles:true}));this.changed=true}this.canUndo=true;this.canRedo=false;this.redoStack.length=0;const undo=[];const redo=[];for(const x of records){const target=x.target;const node=x.target;switch(x.type){case"attributes":const value=target.getAttributeNS(x.attributeNamespace,x.attributeName);if(value===x.oldValue){break}undo.splice(0,0,(()=>target.setAttributeNS(x.attributeNamespace,x.attributeName,x.oldValue)));redo.push((()=>target.setAttributeNS(x.attributeNamespace,x.attributeName,value)));break;case"characterData":const data=node.data;if(data===x.oldValue){break}undo.splice(0,0,(()=>node.data=x.oldValue));redo.push((()=>node.data=data));break;case"childList":const{addedNodes,removedNodes,previousSibling,nextSibling}=x;for(let index=0;index<addedNodes.length;index++){const added=addedNodes[index];let{parentNode}=added;undo.splice(0,0,(()=>added.parentNode.removeChild(added)));if(previousSibling){redo.push((()=>previousSibling.parentNode?parentNode.insertBefore(added,previousSibling.nextSibling):parentNode.append(added)));continue}if(nextSibling){parentNode!==null&&parentNode!==void 0?parentNode:parentNode=nextSibling.parentNode;redo.push((()=>parentNode.insertBefore(added,nextSibling)));continue}redo.push((()=>target.append(added)))}for(let index=0;index<removedNodes.length;index++){const removed=removedNodes[index];redo.splice(0,0,(()=>removed.parentNode.removeChild(removed)));if(previousSibling){undo.push((()=>previousSibling.nextSibling?previousSibling.parentNode.insertBefore(removed,previousSibling.nextSibling):previousSibling.parentElement.append(removed)));continue}if(nextSibling){undo.push((()=>nextSibling.parentNode.insertBefore(removed,nextSibling)));continue}undo.push((()=>target.append(removed)))}break}}if(undo.length&&redo.length){this.undoStack.push({undo,redo})}}dispose(){this.observer.disconnect();this.observer=null}undo(){if(!this.undoStack.length){this.canUndo=false;return}this.silent=true;const change=this.undoStack.pop();this.redoStack.push(change);this.canRedo=true;for(const element of change.undo){element()}this.canUndo=this.undoStack.length>0;setTimeout((()=>this.silent=false),10)}redo(){if(!this.redoStack.length){this.canRedo=false;return}this.silent=true;const change=this.redoStack.pop();this.undoStack.push(change);this.canUndo=true;for(const element of change.redo){element()}this.canRedo=this.redoStack.length>0;setTimeout((()=>this.silent=false),10)}})}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/UndoRedo");System.register(["tslib"],(function(_export,_context){"use strict";var __awaiter,DuplexStream,DomHelper;_export("default",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter}],execute:function(){DuplexStream=class DuplexStream{constructor(element){this.index=-1;this.array=[];const all=element.querySelectorAll("*");for(let index=0;index<all.length;index++){const e=all[index];this.array.push({e,text:e.innerHTML})}}next(){const index=this.index++;if(index>=this.array.length){return{done:true}}return{index,value:this.array[index]}}reset(index){this.index=index}};_export("default",DomHelper=class DomHelper{static applyChanges(target,src){return __awaiter(this,void 0,void 0,(function*(){const persist=[];for(const element of Array.from(target.head.children)){if(element.hasAttribute("remove-when-save")){persist.push(element);continue}if(element.tagName==="BASE"){persist.push(element)}}target.head.innerHTML=src.head.innerHTML;for(const element of persist){target.head.insertAdjacentElement("afterbegin",element)}target.body.innerHTML=src.body.innerHTML}))}})}}}));AmdLoader.instance.setup("@social-mail/social-mail-client/dist/site-editor/editor/DomHelper");System.register(["tslib","@web-atoms/core/dist/core/Bind","@web-atoms/core/dist/core/XNode","@web-atoms/core/dist/core/sleep","@web-atoms/core/dist/style/styled","@web-atoms/core/dist/view-model/Action","@web-atoms/core/dist/web/controls/AtomControl","../drag-drop/DragDropHelper","../toolbars/UndoRedoToolbar","../blocks/WrapGrid","../toolbars/EditorToolbar","../properties/Properties","../styler/StylerSet","./SelectedElement","@web-atoms/core/dist/core/AtomBinder","../blocks/ImageBox","../blocks/RowBox","../blocks/ColumnBox","../blocks/VerticalImageBox","../blocks/Image","../blocks/ImageCard","../blocks/TextBox","../blocks/Card","../blocks/List","../blocks/Components","@web-atoms/core/dist/core/types","../blocks/Buttons","../blocks/Columns2","../blocks/Columns3","../blocks/RightImageBox","@web-atoms/core/dist/web/core/AtomUI","../blocks/PriceBox","@web-atoms/core/dist/core/BindableProperty","../blocks/Billboard","../blocks/OutlineText","../blocks/Carousel","../blocks/ImageGallery","@web-atoms/web-controls/dist/basic/InlinePopup","../blocks/VideoPlayer","../blocks/BackgroundVideo","../blocks/TextMask","../blocks/MarqueeText","../blocks/ImageGrid","../blocks/BoxFrame","../blocks/InjectBox","../blocks/PDFFlipBook","../blocks/PDFViewer","../blocks/Banner","./BreadCrum","./LanguageDropDown","./webComponentsPath","./UndoRedo","./DomHelper"],(function(_export,_context){"use strict";var __awaiter,__decorate,__metadata,__rest,Bind,XNode,sleep,styled,Action,AtomControl,InstallDragDropHelper,UndoRedoToolbar,WrapGrid,EditorToolbar,Properties,StylerSet,SelectedElement,AtomBinder,ImageBox,RowBox,ColumnBox,VerticalImageBox,Image,ImageCard,TextBox,Card,List,BlogComponent,TypeWriterComponent,CancelToken,UMD,ImageLink,LinkButton,Columns2,Columns3,RightImageBox,descendentElementIterator,PriceTable,BindableProperty,Billboard,OutlineText,Carousel,ImageGallery,InlinePopupButton,VideoPlayer,BackgroundVideo,TextMask,MarqueeText,ImageGrid,BoxFrame,InjectBox,PDFFlipBook,PDFViewer,Banner,BreadCrum,LanguageDropDown,WebComponents,UndoRedo,DomHelper,HtmlPageEditor,desktopWidth,tabletWidth,mobileWidth,languageSymbol;_export("default",void 0);return{setters:[function(_tslib){__awaiter=_tslib.__awaiter;__decorate=_tslib.__decorate;__metadata=_tslib.__metadata;__rest=_tslib.__rest},function(_webAtomsCoreDistCoreBind){Bind=_webAtomsCoreDistCoreBind.default},function(_webAtomsCoreDistCoreXNode){XNode=_webAtomsCoreDistCoreXNode.default},function(_webAtomsCoreDistCoreSleep){sleep=_webAtomsCoreDistCoreSleep.default},function(_webAtomsCoreDistStyleStyled){styled=_webAtomsCoreDistStyleStyled.default},function(_webAtomsCoreDistViewModelAction){Action=_webAtomsCoreDistViewModelAction.default},function(_webAtomsCoreDistWebControlsAtomControl){AtomControl=_webAtomsCoreDistWebControlsAtomControl.AtomControl},function(_dragDropDragDropHelper){InstallDragDropHelper=_dragDropDragDropHelper.InstallDragDropHelper},function(_toolbarsUndoRedoToolbar){UndoRedoToolbar=_toolbarsUndoRedoToolbar.default},function(_blocksWrapGrid){WrapGrid=_blocksWrapGrid.WrapGrid},function(_toolbarsEditorToolbar){EditorToolbar=_toolbarsEditorToolbar.default},function(_propertiesProperties){Properties=_propertiesProperties.default},function(_stylerStylerSet){StylerSet=_stylerStylerSet.StylerSet},function(_SelectedElement){SelectedElement=_SelectedElement.SelectedElement},function(_webAtomsCoreDistCoreAtomBinder){AtomBinder=_webAtomsCoreDistCoreAtomBinder.AtomBinder},function(_blocksImageBox){ImageBox=_blocksImageBox.ImageBox},function(_blocksRowBox){RowBox=_blocksRowBox.RowBox},function(_blocksColumnBox){ColumnBox=_blocksColumnBox.ColumnBox},function(_blocksVerticalImageBox){VerticalImageBox=_blocksVerticalImageBox.VerticalImageBox},function(_blocksImage){Image=_blocksImage.Image},function(_blocksImageCard){ImageCard=_blocksImageCard.ImageCard},function(_blocksTextBox){TextBox=_blocksTextBox.TextBox},function(_blocksCard){Card=_blocksCard.Card},function(_blocksList){List=_blocksList.List},function(_blocksComponents){BlogComponent=_blocksComponents.BlogComponent;TypeWriterComponent=_blocksComponents.TypeWriterComponent},function(_webAtomsCoreDistCoreTypes){CancelToken=_webAtomsCoreDistCoreTypes.CancelToken;UMD=_webAtomsCoreDistCoreTypes.UMD},function(_blocksButtons){ImageLink=_blocksButtons.ImageLink;LinkButton=_blocksButtons.LinkButton},function(_blocksColumns){Columns2=_blocksColumns.Columns2},function(_blocksColumns2){Columns3=_blocksColumns2.Columns3},function(_blocksRightImageBox){RightImageBox=_blocksRightImageBox.RightImageBox},function(_webAtomsCoreDistWebCoreAtomUI){descendentElementIterator=_webAtomsCoreDistWebCoreAtomUI.descendentElementIterator},function(_blocksPriceBox){PriceTable=_blocksPriceBox.PriceTable},function(_webAtomsCoreDistCoreBindableProperty){BindableProperty=_webAtomsCoreDistCoreBindableProperty.BindableProperty},function(_blocksBillboard){Billboard=_blocksBillboard.Billboard},function(_blocksOutlineText){OutlineText=_blocksOutlineText.OutlineText},function(_blocksCarousel){Carousel=_blocksCarousel.Carousel},function(_blocksImageGallery){ImageGallery=_blocksImageGallery.ImageGallery},function(_webAtomsWebControlsDistBasicInlinePopup){InlinePopupButton=_webAtomsWebControlsDistBasicInlinePopup.InlinePopupButton},function(_blocksVideoPlayer){VideoPlayer=_blocksVideoPlayer.VideoPlayer},function(_blocksBackgroundVideo){BackgroundVideo=_blocksBackgroundVideo.BackgroundVideo},function(_blocksTextMask){TextMask=_blocksTextMask.TextMask},function(_blocksMarqueeText){MarqueeText=_blocksMarqueeText.MarqueeText},function(_blocksImageGrid){ImageGrid=_blocksImageGrid.ImageGrid},function(_blocksBoxFrame){BoxFrame=_blocksBoxFrame.BoxFrame},function(_blocksInjectBox){InjectBox=_blocksInjectBox.InjectBox},function(_blocksPDFFlipBook){PDFFlipBook=_blocksPDFFlipBook.PDFFlipBook},function(_blocksPDFViewer){PDFViewer=_blocksPDFViewer.PDFViewer},function(_blocksBanner){Banner=_blocksBanner.Banner},function(_BreadCrum){BreadCrum=_BreadCrum.default},function(_LanguageDropDown){LanguageDropDown=_LanguageDropDown.default},function(_webComponentsPath){WebComponents=_webComponentsPath.WebComponents},function(_UndoRedo){UndoRedo=_UndoRedo.default},function(_DomHelper){DomHelper=_DomHelper.default}],execute:function(){styled.css`
3912
3912
  display: grid;
3913
3913
  grid-template-columns: auto 1fr auto;
3914
3914
  grid-template-rows: auto 1fr auto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@social-mail/social-mail-client",
3
- "version": "1.2.677",
3
+ "version": "1.2.679",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -207,7 +207,7 @@ const css = styled.css `
207
207
  }
208
208
  `.installLocal();
209
209
 
210
- export default class StoreProductDetailPage extends ContentPage<{ storeItemID }> {
210
+ export default class StoreProductDetailPage extends ContentPage<{ storeItemID, name }> {
211
211
  @InjectProperty
212
212
  entityService: EntityService;
213
213
 
@@ -219,7 +219,12 @@ export default class StoreProductListPage extends ContentPage {
219
219
  )}
220
220
  itemRenderer={(item: IStoreItem) => {
221
221
  const name = item.name || item.variantFor?.name || item.name;
222
- const href = StoreCommands.productDetail.displayRoute(item) + "/" + Slugger.slug(item.storeItemID, name);
222
+ const storeItemID = item.variantFor?.storeItemID || item.storeItemID;
223
+ const slug = Slugger.slug(item.storeItemID, name);
224
+ const href = StoreCommands.productDetail.displayRoute({
225
+ storeItemID,
226
+ name: slug
227
+ });
223
228
  return <div class="store-item">
224
229
  <a
225
230
  class="name"
@@ -28,7 +28,7 @@ const addAttributes = (target, values: (x: any) => IEditableAttribute[]) => {
28
28
 
29
29
  export class WebComponents {
30
30
 
31
- static path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.140`;
31
+ static path = `//cdn.jsdelivr.net/npm/@social-mail/web-components@1.0.141`;
32
32
 
33
33
  // Not working in Chrome, Works well in Firefox
34
34
  // static async run2(frame: HTMLIFrameElement, doc: Document) {