@silexlabs/silex 3.0.0-alpha.121 → 3.0.0-alpha.122
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/client/js/main.js
CHANGED
|
@@ -228,7 +228,7 @@ var silex;(()=>{var t={99:function(t){"undefined"!=typeof globalThis?globalThis:
|
|
|
228
228
|
@click=${()=>this.editor.Commands.stop(wr)}
|
|
229
229
|
>Close</button>
|
|
230
230
|
</footer>
|
|
231
|
-
`}}displayPending(t,e){this.errorMessage=null,this.renderDialog(t,e)}displayError(t,e,n){console.info(t),this.errorMessage=t,this.renderDialog(e,n)}async closeDialog(){this.isOpen=!1,this.renderDialog(null,null),this.sender&&this.sender.set("active",0),this.sender=null}async toggleDialog(){this.isOpen?this.closeDialog():this.openDialog()}async openDialog(){this.isOpen=!0;const t=this.editor.Panels.getPanel("options")?.view.el.querySelector(".publish-button");if(t){const e=t.getBoundingClientRect(),n=450,r=20,o=50;this.move({left:e.right-n-r,top:e.bottom+10,width:n,minHeight:o})}else console.error("Unable to find publish button");this.renderDialog(null,Wr.STATUS_NONE)}}var Cr;function Sr(t,e){t.Pages.getAll().forEach((t=>{t.getMainComponent().onAll((t=>e(t)))}))}!function(t){t.STARTUP_START="silex:startup:start",t.STARTUP_END="silex:startup:end",t.GRAPESJS_START="silex:grapesjs:start",t.GRAPESJS_END="silex:grapesjs:end",t.PUBLISH_START="silex:publish:start",t.PUBLISH_DATA="silex:publish:data",t.PUBLISH_END="silex:publish:end",t.PUBLISH_ERROR="silex:publish:error",t.PUBLISH_LOGIN_START="silex:publish:login:start",t.PUBLISH_LOGIN_END="silex:publish:login:end",t.ASSET_WRITE_END="silex:asset:write:end",t.WRITE_END="silex:write:end"}(Cr||(Cr={}));const Or="tmp-pre-publication-transformer-tohtml",Tr="tmp-pre-publication-transformer-src",Er="tmp-pre-publication-transformer-attributes-src",kr="tmp-pre-publication-transformer-inline-css",Ar="tmp-pre-publication-transformer-href",Pr="tmp-pre-publication-transformer-tocss",jr={renderComponent:(t,e)=>e(),renderCssRule:(t,e)=>e(),transformPath:(t,e)=>t,transformPermalink(t,e,n){switch(n){case Ae.HTML:return t;case Ae.CSS:return`../${t.replace(/^\//,"")}`;default:throw new Error(`Unknown initiator ${n}`)}},transformFile:t=>t};function Mr(t,e){const n=e["background-image"],r=n?.match(/url\(["']?(.*?)["']?\)/)?.pop();return r?{...e,"background-image":`url(${Lr(t,r,ke.ASSET,Ae.CSS)})`}:e}function Lr(t,e,n,r){return t.getModel().get("config").publicationTransformers.reduce(((t,e)=>{try{return e.transformPermalink?e.transformPermalink(t,n,r)??t:t}catch(e){return console.error("Publication transformer: error transforming path",t,e),t}}),e)}function Nr(t,e,n){return t.getModel().get("config").publicationTransformers.reduce(((t,e)=>{try{return e.transformPath?e.transformPath(t,n)??t:t}catch(e){return console.error("Publication transformer: error transforming path",t,e),t}}),e)}const Ir=window.location.pathname.replace(/\/$/,""),Dr=window.location.origin;function $r(t,e,n){if(t.startsWith("/assets")){const r=new URL(t,Dr);return r.pathname=r.pathname.replace(/^\/assets/,""),r.pathname=`${Ir}${rn}${gn}${xn}${r.pathname}`,r.searchParams.set("websiteId",e),r.searchParams.set("connectorId",n),`${decodeURIComponent(r.pathname)}${r.search}`}return console.warn("storedToDisplayed: path is not a stored path",t),t}function Rr(t){const e=`${Ir}${rn}${gn}${xn}`;if(t.startsWith(e)){const n=new URL(t,Dr);n.pathname=n.pathname.replace(new RegExp(`^${e}`),""),n.pathname=`${Ir}/assets${n.pathname}`,n.searchParams.delete("websiteId"),n.searchParams.delete("connectorId");const r="/"+n.toString().replace(new RegExp(`^${Dr}${Ir}`),"").replace(/^\//,"");return decodeURIComponent(r)}return console.warn("displayedToStored: path is not a displayed path",t),t}const Hr={transformPath(t,e){if(e===ke.ASSET)return Rr(t)},transformPermalink(t,e){if(e===ke.ASSET)return Rr(t)}};function Fr(t,e,n){const r=t.attributes?.src?{...t,attributes:{...t.attributes,src:$r(t.attributes.src,e,n)}}:t;return r.components&&(r.components=r.components.map((t=>Fr(t,e,n)))),r}function Vr(t){const e=t.attributes?.src?{...t,attributes:{...t.attributes,src:Rr(t.attributes.src)}}:t;return e.components&&(e.components=e.components.map((t=>Vr(t)))),e}const Ur="publish",Br="publish-login",zr="publish-logout";var Wr;function qr(t,e){t.PublicationManager=new Yr(t,e)}function Gr(t){switch(t){case je.IN_PROGRESS:return Wr.STATUS_PENDING;case je.ERROR:return Wr.STATUS_ERROR;case je.SUCCESS:return Wr.STATUS_SUCCESS}throw new Error(`Unknown job status ${t}`)}!function(t){t.STATUS_NONE="STATUS_NONE",t.STATUS_PENDING="STATUS_PENDING",t.STATUS_ERROR="STATUS_ERROR",t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_LOGGED_OUT="STATUS_AUTH_ERROR"}(Wr||(Wr={}));const Kr=window.location.origin+window.location.pathname.replace(/\/$/,"");class Yr{editor;dialog;_settings;get settings(){return this._settings}set settings(t){this._settings=t,this.dialog&&(this.dialog.settings=t)}options;job=null;status=Wr.STATUS_NONE;constructor(t,e){this.editor=t,this.options={appendTo:"options",...e},t.on("storage:start:store",(t=>{t.publication=this.settings})),t.on("storage:end:load",(t=>{this.settings=t.publication??{},De({type:Pe.HOSTING,connectorId:this.settings.connector?.connectorId}).then((t=>{})).catch((t=>{this.status=Wr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError("Please login",this.job,this.status)}))})),t.Commands.add(Ur,(()=>this.startPublication())),t.Commands.add(Br,((t,e,n)=>this.goLogin(n))),t.Commands.add(zr,(()=>this.goLogout())),this.options.appendTo?this.dialog=new xr(t,{appendTo:this.options.appendTo}):console.info("PublicationUi is disabled because no appendTo option is set")}async goLogin(t){if(t.isLoggedIn)return this.settings={...this.settings,connector:t},this.status=Wr.STATUS_NONE,this.editor.store(null),void(this.dialog&&this.dialog.displayPending(this.job,this.status));this.settings={},this.status=Wr.STATUS_LOGGED_OUT,this.dialog&&this.dialog.displayPending(this.job,this.status);const e=t.connectorId,n=t.type;return window.open(t.oauthUrl||`${Kr}${rn}${on}${cn}?connectorId=${e}&type=${n}`,"_blank"),new Promise((e=>{const n=async e=>{const r=e.data;"login"===r?.type&&(window.removeEventListener("message",n),r.error?(this.status=Wr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError(r.message,this.job,this.status)):(this.editor.trigger(Cr.PUBLISH_LOGIN_END),this.settings.connector=t,this.settings.options=r.options,this.status=Wr.STATUS_NONE,this.editor.store(null),this.dialog&&this.dialog.displayPending(this.job,this.status)))};window.addEventListener("message",n,!1)}))}async goLogout(){try{await $e({type:Pe.HOSTING,connectorId:this.settings.connector.connectorId}),this.settings={},this.dialog&&this.dialog.displayPending(this.job,this.status)}catch(t){console.error("logout error",t),this.status=Wr.STATUS_ERROR,this.dialog&&this.dialog.displayError(t.message,this.job,this.status)}}async startPublication(){if(this.status===Wr.STATUS_PENDING)throw new Error("Publication is already in progress");this.status=Wr.STATUS_PENDING,this.job=null,this.dialog&&this.dialog.displayPending(this.job,this.status),this.editor.trigger(Cr.PUBLISH_START);const t=this.editor.getModel().get("user");if(!t)throw new Error("User not logged in to a storage connector");if(!this.settings.connector?.connectorId)throw new Error("User not logged in to a hosting connector");const e=this.options.websiteId,n=t.storage.connectorId;this.setPublicationTransformers();const r=this.editor.getProjectData(),o=this.editor.getModel().get("settings"),i=(await this.getHtmlFiles(o)).flatMap((t=>[{path:t.htmlPath,content:t.html,type:ke.HTML},{path:t.cssPath,content:t.css,type:ke.CSS}])).concat(r.assets.map((t=>{const e=Nr(this.editor,t.src,ke.ASSET),n=Rr(t.src).replace(/^\/assets\//,"");return{...t,path:e,src:n,type:ke.ASSET}}))),a={...r,assets:r.assets.map((t=>({...t,src:Rr(t.src)}))),settings:o,publication:this.settings,files:i};this.resetPublicationTransformers(),function(t,e){const n=t.getModel().get("config");e.files=n.publicationTransformers.reduce(((t,n)=>t.map(((t,r)=>{try{return e.pages[r],n.transformFile?n.transformFile(t)??t:t}catch(e){return console.error("Publication transformer: error transforming file",t,e),t}}))),e.files)}(this.editor,a),this.editor.trigger(Cr.PUBLISH_DATA,a);try{const[t,r]=await Re({websiteId:e,hostingId:this.settings.connector.connectorId,storageId:n,data:a,options:this.settings.options});this.job=r,this.status=Gr(this.job.status),this.trackProgress()}catch(t){return console.error("publish error",t),401===t.code||401===t.httpStatusCode?(this.status=Wr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError("Please login.",this.job,this.status)):(this.status=Wr.STATUS_ERROR,this.dialog&&this.dialog.displayError(`An error occured, your site is not published. ${t.message}`,this.job,this.status)),this.editor.trigger(Cr.PUBLISH_ERROR,{success:!1,message:t.message}),void this.editor.trigger(Cr.PUBLISH_END,{success:!1,message:t.message})}}async getHtmlFiles(t){return this.editor.Pages.getAll().map((e=>{const n=e.get("settings");function r(e){return(n||{})[e]||(t||[])[e]||""}const o=e.getMainComponent(),i=vr(e.get("name")),a=`/css/${i}.css`,s=`/${i}.html`,l=Lr(this.editor,a,ke.CSS,Ae.HTML),c=Nr(this.editor,a,ke.CSS),u=Nr(this.editor,s,ke.HTML),p=this.editor.getHtml({component:o});return{html:`<!DOCTYPE html>\n<html lang="${r("lang")}">\n<head>\n<link rel="stylesheet" href="${l}" />\n${t?.head||""}\n${n?.head||""}\n<title>${r("title")}</title>\n<link rel="icon" href="${r("favicon")}" />\n${["description","og:title","og:description","og:image"].map((t=>`<meta name="${t}" property="${t}" content="${r(t)}"/>`)).join("\n")}\n</head>\n${p}\n</html>`,css:this.editor.getCss({component:o}),cssPath:c,htmlPath:u}}))}async trackProgress(){try{this.job=await He({jobId:this.job.jobId}),this.status=Gr(this.job.status)}catch(t){return this.status=Wr.STATUS_ERROR,this.dialog&&this.dialog.displayError(`An error occured, your site is not published. ${t.message}`,this.job,this.status),this.editor.trigger(Cr.PUBLISH_END,{success:!1,message:t.message}),void this.editor.trigger(Cr.PUBLISH_ERROR,{success:!1,message:t.message})}this.job.status===je.IN_PROGRESS?setTimeout((()=>this.trackProgress()),2e3):this.editor.trigger(Cr.PUBLISH_END,{success:this.job.status===je.SUCCESS,message:this.job.message}),this.dialog&&this.dialog.displayPending(this.job,this.status)}setPublicationTransformers(){!function(t){const e=t.getModel().get("config");Sr(t,(n=>{if(n.get(Or))console.warn("Publication transformer: HTML transform already altered",n);else{const r=n.toHTML.bind(n);n[Or]=n.toHTML;const o=n.getStyle.bind(n);n[kr]=n.getStyle;const i=n.get("attributes").href;if(i?.startsWith("./")&&(n[Ar]=i,n.set("attributes",{...n.get("attributes"),href:Lr(t,i,ke.HTML,Ae.HTML)})),n.get("attributes").src){n[Tr]=n.get("attributes").src;const e=Lr(t,n.get("attributes").src,ke.ASSET,Ae.HTML);n.set("attributes",{...n.get("attributes"),src:e})}if(n.get("src")){n[Er]=n.get("src");const e=Lr(t,n.get("src"),ke.ASSET,Ae.HTML);n.set("src",e)}n.toHTML=()=>e.publicationTransformers.reduce(((t,e)=>{try{return e.renderComponent?e.renderComponent(n,(()=>t))??t:t}catch(e){return console.error("Publication transformer: error rendering component",n,e),t}}),r()),n.getStyle=()=>Mr(t,o())}}))}(this.editor),function(t){const e=t.getModel().get("config");t.Css.getAll().forEach((n=>{if(n[Pr])console.warn("Publication transformer: CSS transform already altered",n);else{const r=n.getStyle.bind(n);n[Pr]=n.getStyle,n.getStyle=()=>{try{const n=Mr(t,r()),o=e.publicationTransformers.reduce(((t,e)=>({...e.renderCssRule?e.renderCssRule(t,(()=>n))??t:t})),n);return o}catch(t){return console.error("Publication transformer: error rendering style",n,t),r()}}}}))}(this.editor)}resetPublicationTransformers(){!function(t){Sr(t,(t=>{t[Or]&&(t.toHTML=t[Or],delete t[Or]),t[kr]&&(t.getStyle=t[kr],delete t[kr]),t[Tr]&&(t.set("attributes",{...t.get("attributes"),src:t[Tr]}),delete t[Tr]),t[Er]&&(t.set("src",t[Er]),delete t[Er]),t[Ar]&&(t.set("attributes",{...t.get("attributes"),href:t[Ar]}),delete t[Ar])}))}(this.editor),function(t){t.Css.getAll().forEach((t=>{t[Pr]&&(t.getStyle=t[Pr],delete t[Pr])}))}(this.editor)}}const Xr=[{name:"./project-bar",value:nr},{name:"grapesjs-style-bg",value:zn()},{name:"./settings",value:(t,e)=>{try{sr="3.0.0-alpha.121"}catch(t){}console.info("Silex version:",sr),t.Commands.add(ar,{run:(e,n,{page:r})=>{ir=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{n?.set&&n.set("active",0),t.stopCommand(ar)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),qt(Et`
|
|
231
|
+
`}}displayPending(t,e){this.errorMessage=null,this.renderDialog(t,e)}displayError(t,e,n){console.info(t),this.errorMessage=t,this.renderDialog(e,n)}async closeDialog(){this.isOpen=!1,this.renderDialog(null,null),this.sender&&this.sender.set("active",0),this.sender=null}async toggleDialog(){this.isOpen?this.closeDialog():this.openDialog()}async openDialog(){this.isOpen=!0;const t=this.editor.Panels.getPanel("options")?.view.el.querySelector(".publish-button");if(t){const e=t.getBoundingClientRect(),n=450,r=20,o=50;this.move({left:e.right-n-r,top:e.bottom+10,width:n,minHeight:o})}else console.error("Unable to find publish button");this.renderDialog(null,Wr.STATUS_NONE)}}var Cr;function Sr(t,e){t.Pages.getAll().forEach((t=>{t.getMainComponent().onAll((t=>e(t)))}))}!function(t){t.STARTUP_START="silex:startup:start",t.STARTUP_END="silex:startup:end",t.GRAPESJS_START="silex:grapesjs:start",t.GRAPESJS_END="silex:grapesjs:end",t.PUBLISH_START="silex:publish:start",t.PUBLISH_DATA="silex:publish:data",t.PUBLISH_END="silex:publish:end",t.PUBLISH_ERROR="silex:publish:error",t.PUBLISH_LOGIN_START="silex:publish:login:start",t.PUBLISH_LOGIN_END="silex:publish:login:end",t.ASSET_WRITE_END="silex:asset:write:end",t.WRITE_END="silex:write:end"}(Cr||(Cr={}));const Or="tmp-pre-publication-transformer-tohtml",Tr="tmp-pre-publication-transformer-src",Er="tmp-pre-publication-transformer-attributes-src",kr="tmp-pre-publication-transformer-inline-css",Ar="tmp-pre-publication-transformer-href",Pr="tmp-pre-publication-transformer-tocss",jr={renderComponent:(t,e)=>e(),renderCssRule:(t,e)=>e(),transformPath:(t,e)=>t,transformPermalink(t,e,n){switch(n){case Ae.HTML:return t;case Ae.CSS:return`../${t.replace(/^\//,"")}`;default:throw new Error(`Unknown initiator ${n}`)}},transformFile:t=>t};function Mr(t,e){const n=e["background-image"],r=n?.match(/url\(["']?(.*?)["']?\)/)?.pop();return r?{...e,"background-image":`url(${Lr(t,r,ke.ASSET,Ae.CSS)})`}:e}function Lr(t,e,n,r){return t.getModel().get("config").publicationTransformers.reduce(((t,e)=>{try{return e.transformPermalink?e.transformPermalink(t,n,r)??t:t}catch(e){return console.error("Publication transformer: error transforming path",t,e),t}}),e)}function Nr(t,e,n){return t.getModel().get("config").publicationTransformers.reduce(((t,e)=>{try{return e.transformPath?e.transformPath(t,n)??t:t}catch(e){return console.error("Publication transformer: error transforming path",t,e),t}}),e)}const Ir=window.location.pathname.replace(/\/$/,""),Dr=window.location.origin;function $r(t,e,n){if(t.startsWith("/assets")){const r=new URL(t,Dr);return r.pathname=r.pathname.replace(/^\/assets/,""),r.pathname=`${Ir}${rn}${gn}${xn}${r.pathname}`,r.searchParams.set("websiteId",e),r.searchParams.set("connectorId",n),`${decodeURIComponent(r.pathname)}${r.search}`}return console.warn("storedToDisplayed: path is not a stored path",t),t}function Rr(t){const e=`${Ir}${rn}${gn}${xn}`;if(t.startsWith(e)){const n=new URL(t,Dr);n.pathname=n.pathname.replace(new RegExp(`^${e}`),""),n.pathname=`${Ir}/assets${n.pathname}`,n.searchParams.delete("websiteId"),n.searchParams.delete("connectorId");const r="/"+n.toString().replace(new RegExp(`^${Dr}${Ir}`),"").replace(/^\//,"");return decodeURIComponent(r)}return console.warn("displayedToStored: path is not a displayed path",t),t}const Hr={transformPath(t,e){if(e===ke.ASSET)return Rr(t)},transformPermalink(t,e){if(e===ke.ASSET)return Rr(t)}};function Fr(t,e,n){const r=t.attributes?.src?{...t,attributes:{...t.attributes,src:$r(t.attributes.src,e,n)}}:t;return r.components&&(r.components=r.components.map((t=>Fr(t,e,n)))),r}function Vr(t){const e=t.attributes?.src?{...t,attributes:{...t.attributes,src:Rr(t.attributes.src)}}:t;return e.components&&(e.components=e.components.map((t=>Vr(t)))),e}const Ur="publish",Br="publish-login",zr="publish-logout";var Wr;function qr(t,e){t.PublicationManager=new Yr(t,e)}function Gr(t){switch(t){case je.IN_PROGRESS:return Wr.STATUS_PENDING;case je.ERROR:return Wr.STATUS_ERROR;case je.SUCCESS:return Wr.STATUS_SUCCESS}throw new Error(`Unknown job status ${t}`)}!function(t){t.STATUS_NONE="STATUS_NONE",t.STATUS_PENDING="STATUS_PENDING",t.STATUS_ERROR="STATUS_ERROR",t.STATUS_SUCCESS="STATUS_SUCCESS",t.STATUS_LOGGED_OUT="STATUS_AUTH_ERROR"}(Wr||(Wr={}));const Kr=window.location.origin+window.location.pathname.replace(/\/$/,"");class Yr{editor;dialog;_settings;get settings(){return this._settings}set settings(t){this._settings=t,this.dialog&&(this.dialog.settings=t)}options;job=null;status=Wr.STATUS_NONE;constructor(t,e){this.editor=t,this.options={appendTo:"options",...e},t.on("storage:start:store",(t=>{t.publication=this.settings})),t.on("storage:end:load",(t=>{this.settings=t.publication??{},De({type:Pe.HOSTING,connectorId:this.settings.connector?.connectorId}).then((t=>{})).catch((t=>{this.status=Wr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError("Please login",this.job,this.status)}))})),t.Commands.add(Ur,(()=>this.startPublication())),t.Commands.add(Br,((t,e,n)=>this.goLogin(n))),t.Commands.add(zr,(()=>this.goLogout())),this.options.appendTo?this.dialog=new xr(t,{appendTo:this.options.appendTo}):console.info("PublicationUi is disabled because no appendTo option is set")}async goLogin(t){if(t.isLoggedIn)return this.settings={...this.settings,connector:t},this.status=Wr.STATUS_NONE,this.editor.store(null),void(this.dialog&&this.dialog.displayPending(this.job,this.status));this.settings={},this.status=Wr.STATUS_LOGGED_OUT,this.dialog&&this.dialog.displayPending(this.job,this.status);const e=t.connectorId,n=t.type;return window.open(t.oauthUrl||`${Kr}${rn}${on}${cn}?connectorId=${e}&type=${n}`,"_blank"),new Promise((e=>{const n=async e=>{const r=e.data;"login"===r?.type&&(window.removeEventListener("message",n),r.error?(this.status=Wr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError(r.message,this.job,this.status)):(this.editor.trigger(Cr.PUBLISH_LOGIN_END),this.settings.connector=t,this.settings.options=r.options,this.status=Wr.STATUS_NONE,this.editor.store(null),this.dialog&&this.dialog.displayPending(this.job,this.status)))};window.addEventListener("message",n,!1)}))}async goLogout(){try{await $e({type:Pe.HOSTING,connectorId:this.settings.connector.connectorId}),this.settings={},this.dialog&&this.dialog.displayPending(this.job,this.status)}catch(t){console.error("logout error",t),this.status=Wr.STATUS_ERROR,this.dialog&&this.dialog.displayError(t.message,this.job,this.status)}}async startPublication(){if(this.status===Wr.STATUS_PENDING)throw new Error("Publication is already in progress");this.status=Wr.STATUS_PENDING,this.job=null,this.dialog&&this.dialog.displayPending(this.job,this.status),this.editor.trigger(Cr.PUBLISH_START);const t=this.editor.getModel().get("user");if(!t)throw new Error("User not logged in to a storage connector");if(!this.settings.connector?.connectorId)throw new Error("User not logged in to a hosting connector");const e=this.options.websiteId,n=t.storage.connectorId;this.setPublicationTransformers();const r=this.editor.getProjectData(),o=this.editor.getModel().get("settings"),i=(await this.getHtmlFiles(o)).flatMap((t=>[{path:t.htmlPath,content:t.html,type:ke.HTML},{path:t.cssPath,content:t.css,type:ke.CSS}])).concat(r.assets.map((t=>{const e=Nr(this.editor,t.src,ke.ASSET),n=Rr(t.src).replace(/^\/assets\//,"");return{...t,path:e,src:n,type:ke.ASSET}}))),a={...r,assets:r.assets.map((t=>({...t,src:Rr(t.src)}))),settings:o,publication:this.settings,files:i};this.resetPublicationTransformers(),function(t,e){const n=t.getModel().get("config");e.files=n.publicationTransformers.reduce(((t,n)=>t.map(((t,r)=>{try{return e.pages[r],n.transformFile?n.transformFile(t)??t:t}catch(e){return console.error("Publication transformer: error transforming file",t,e),t}}))),e.files)}(this.editor,a),this.editor.trigger(Cr.PUBLISH_DATA,a);try{const[t,r]=await Re({websiteId:e,hostingId:this.settings.connector.connectorId,storageId:n,data:a,options:this.settings.options});this.job=r,this.status=Gr(this.job.status),this.trackProgress()}catch(t){return console.error("publish error",t),401===t.code||401===t.httpStatusCode?(this.status=Wr.STATUS_LOGGED_OUT,this.settings={},this.dialog&&this.dialog.displayError("Please login.",this.job,this.status)):(this.status=Wr.STATUS_ERROR,this.dialog&&this.dialog.displayError(`An error occured, your site is not published. ${t.message}`,this.job,this.status)),this.editor.trigger(Cr.PUBLISH_ERROR,{success:!1,message:t.message}),void this.editor.trigger(Cr.PUBLISH_END,{success:!1,message:t.message})}}async getHtmlFiles(t){return this.editor.Pages.getAll().map((e=>{const n=e.get("settings");function r(e){return(n||{})[e]||(t||[])[e]||""}const o=e.getMainComponent(),i=vr(e.get("name")),a=`/css/${i}.css`,s=`/${i}.html`,l=Lr(this.editor,a,ke.CSS,Ae.HTML),c=Nr(this.editor,a,ke.CSS),u=Nr(this.editor,s,ke.HTML),p=this.editor.getHtml({component:o});return{html:`<!DOCTYPE html>\n<html lang="${r("lang")}">\n<head>\n<meta charset="UTF-8">\n<link rel="stylesheet" href="${l}" />\n${t?.head||""}\n${n?.head||""}\n<title>${r("title")}</title>\n<link rel="icon" href="${r("favicon")}" />\n${["description","og:title","og:description","og:image"].map((t=>`<meta name="${t}" property="${t}" content="${r(t)}"/>`)).join("\n")}\n</head>\n${p}\n</html>`,css:this.editor.getCss({component:o}),cssPath:c,htmlPath:u}}))}async trackProgress(){try{this.job=await He({jobId:this.job.jobId}),this.status=Gr(this.job.status)}catch(t){return this.status=Wr.STATUS_ERROR,this.dialog&&this.dialog.displayError(`An error occured, your site is not published. ${t.message}`,this.job,this.status),this.editor.trigger(Cr.PUBLISH_END,{success:!1,message:t.message}),void this.editor.trigger(Cr.PUBLISH_ERROR,{success:!1,message:t.message})}this.job.status===je.IN_PROGRESS?setTimeout((()=>this.trackProgress()),2e3):this.editor.trigger(Cr.PUBLISH_END,{success:this.job.status===je.SUCCESS,message:this.job.message}),this.dialog&&this.dialog.displayPending(this.job,this.status)}setPublicationTransformers(){!function(t){const e=t.getModel().get("config");Sr(t,(n=>{if(n.get(Or))console.warn("Publication transformer: HTML transform already altered",n);else{const r=n.toHTML.bind(n);n[Or]=n.toHTML;const o=n.getStyle.bind(n);n[kr]=n.getStyle;const i=n.get("attributes").href;if(i?.startsWith("./")&&(n[Ar]=i,n.set("attributes",{...n.get("attributes"),href:Lr(t,i,ke.HTML,Ae.HTML)})),n.get("attributes").src){n[Tr]=n.get("attributes").src;const e=Lr(t,n.get("attributes").src,ke.ASSET,Ae.HTML);n.set("attributes",{...n.get("attributes"),src:e})}if(n.get("src")){n[Er]=n.get("src");const e=Lr(t,n.get("src"),ke.ASSET,Ae.HTML);n.set("src",e)}n.toHTML=()=>e.publicationTransformers.reduce(((t,e)=>{try{return e.renderComponent?e.renderComponent(n,(()=>t))??t:t}catch(e){return console.error("Publication transformer: error rendering component",n,e),t}}),r()),n.getStyle=()=>Mr(t,o())}}))}(this.editor),function(t){const e=t.getModel().get("config");t.Css.getAll().forEach((n=>{if(n[Pr])console.warn("Publication transformer: CSS transform already altered",n);else{const r=n.getStyle.bind(n);n[Pr]=n.getStyle,n.getStyle=()=>{try{const n=Mr(t,r()),o=e.publicationTransformers.reduce(((t,e)=>({...e.renderCssRule?e.renderCssRule(t,(()=>n))??t:t})),n);return o}catch(t){return console.error("Publication transformer: error rendering style",n,t),r()}}}}))}(this.editor)}resetPublicationTransformers(){!function(t){Sr(t,(t=>{t[Or]&&(t.toHTML=t[Or],delete t[Or]),t[kr]&&(t.getStyle=t[kr],delete t[kr]),t[Tr]&&(t.set("attributes",{...t.get("attributes"),src:t[Tr]}),delete t[Tr]),t[Er]&&(t.set("src",t[Er]),delete t[Er]),t[Ar]&&(t.set("attributes",{...t.get("attributes"),href:t[Ar]}),delete t[Ar])}))}(this.editor),function(t){t.Css.getAll().forEach((t=>{t[Pr]&&(t.getStyle=t[Pr],delete t[Pr])}))}(this.editor)}}const Xr=[{name:"./project-bar",value:nr},{name:"grapesjs-style-bg",value:zn()},{name:"./settings",value:(t,e)=>{try{sr="3.0.0-alpha.122"}catch(t){}console.info("Silex version:",sr),t.Commands.add(ar,{run:(e,n,{page:r})=>{ir=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{n?.set&&n.set("active",0),t.stopCommand(ar)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),qt(Et`
|
|
232
232
|
<p>The page settings will override site settings, <a href="https://github.com/silexlabs/Silex/wiki/Settings" target="_blank">more info about settings here</a>.</p>
|
|
233
233
|
<form class="silex-form">
|
|
234
234
|
<h2>General settings</h2>
|
|
@@ -318,6 +318,7 @@ export class PublicationManager {
|
|
|
318
318
|
html: `<!DOCTYPE html>
|
|
319
319
|
<html lang="${getSetting('lang')}">
|
|
320
320
|
<head>
|
|
321
|
+
<meta charset="UTF-8">
|
|
321
322
|
<link rel="stylesheet" href="${cssPermalink}" />
|
|
322
323
|
${siteSettings?.head || ''}
|
|
323
324
|
${pageSettings?.head || ''}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicationManager.js","sourceRoot":"","sources":["../../../../../src/ts/client/grapesjs/PublicationManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAsG,kBAAkB,EAAiB,aAAa,EAAiB,SAAS,EAAE,SAAS,EAAkH,MAAM,aAAa,CAAA;AAEvU,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MA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,CAAA;YACtF,OAAM;SACP;QACD,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,WAAW,EAAE;YAC7C,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,IAAI,CAAC,CAAA;SAC7C;aAAM;YACL,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAA;SAC5H;QACD,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAA;IAClE,CAAC;IAEO,0BAA0B;QAChC,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC7B,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAEO,4BAA4B;QAClC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAClC,mBAAmB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAClC,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -331,6 +331,7 @@ export class PublicationManager {
|
|
|
331
331
|
html: `<!DOCTYPE html>
|
|
332
332
|
<html lang="${getSetting('lang')}">
|
|
333
333
|
<head>
|
|
334
|
+
<meta charset="UTF-8">
|
|
334
335
|
<link rel="stylesheet" href="${cssPermalink}" />
|
|
335
336
|
${siteSettings?.head || ''}
|
|
336
337
|
${pageSettings?.head || ''}
|