@burst/frontend-editing
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -54,4 +54,4 @@ 'use strict'; | ||
return (React__namespace.createElement(React__namespace.Fragment, null, | ||
React__namespace.createElement("div", { onClick: hide, style: { position: 'fixed', zIndex: 40, width: '100%', height: '100%', backgroundColor: 'rgba(0, 0, 0, 0.5)', top: 0, right: 0, cursor: 'pointer' } }), | ||
React__namespace.createElement("iframe", { src: src.toString(), style: { position: 'fixed', top: 0, right: 0, resize: 'horizontal', overflowX: 'scroll', overflowY: 'hidden', overscrollBehaviorX: 'contain', zIndex: 50, width: '70%', height: '100%', backgroundColor: 'white' } }))); | ||
React__namespace.createElement("div", { onClick: hide, style: { position: 'fixed', zIndex: 9998, width: '100%', height: '100%', backgroundColor: 'rgba(0, 0, 0, 0.5)', top: 0, right: 0, cursor: 'pointer' } }), | ||
React__namespace.createElement("iframe", { src: src.toString(), style: { position: 'fixed', top: 0, right: 0, resize: 'horizontal', overflowX: 'scroll', overflowY: 'hidden', overscrollBehaviorX: 'contain', zIndex: 9999, width: '70%', height: '100%', backgroundColor: 'white' } }))); | ||
} | ||
@@ -58,0 +58,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@radix-ui/react-dialog"),r=require("next/router");function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=n(e),o=n(t);function a(e){var t,n=e.id,o=e.type,a=e.cmsUrl,l=e.token,c=e.onSave,u=e.hide,d=r.useRouter();i.useEffect((function(){function e(e){"object"==typeof e.data&&"SUBMIT_FORM"===e.data.type&&c()}return window.addEventListener("message",e,!1),function(){return window.removeEventListener("message",e,!1)}}));var s=new URL(a+"/frontend-editing/edit/"+o+"/"+n+"/"+(null!==(t=null==d?void 0:d.locale)&&void 0!==t?t:"en"));return"string"==typeof l&&s.searchParams.set("jwt",l),i.createElement(i.Fragment,null,i.createElement("div",{onClick:u,style:{position:"fixed",zIndex:40,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",top:0,right:0,cursor:"pointer"}}),i.createElement("iframe",{src:s.toString(),style:{position:"fixed",top:0,right:0,resize:"horizontal",overflowX:"scroll",overflowY:"hidden",overscrollBehaviorX:"contain",zIndex:50,width:"70%",height:"100%",backgroundColor:"white"}}))}var l=function(e){var t,r=null!==(t=e.size)&&void 0!==t?t:24;return i.createElement("svg",{width:r,height:r,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{margin:"auto",height:"auto"}},i.createElement("path",{d:"M14.6626 2.87675L13.0766 1.29175C12.6876 0.90275 12.0516 0.90275 11.6626 1.29175L10.3696 2.58475L13.3696 5.58475L14.6626 4.29175C15.0516 3.90275 15.0516 3.26575 14.6626 2.87675Z",fill:"#FD2CA8"}),i.createElement("path",{d:"M2.36714 10.5861L5.36694 13.5859L12.3655 6.58734L9.36574 3.58754L2.36714 10.5861Z",fill:"#FFE203"}),i.createElement("path",{d:"M1.0256 14.6098C0.9386 14.8718 1.0806 15.0068 1.3416 14.9218L3.3426 14.2548L1.6926 12.6088L1.0256 14.6098Z",fill:"#000000"}))};exports.default=function(t){var r=t.id,n=t.type,c=t.cmsUrl,u=t.token,d=t.children,s=t.color,f=t.absolute,h=void 0===f||f,m=e.useState(!1),v=m[0],g=m[1],p=window.matchMedia("(max-width: 1024px)"),w=e.useState(p.matches),E=w[0],y=w[1];e.useEffect((function(){var e=function(e){y(e.matches)};return p.addEventListener("change",e),function(){return p.removeEventListener("change",e)}}));var L=function(e){return{position:h?"absolute":"relative",display:"flex",justifyContent:e?"center":"flex-end",height:"32p",width:"100%"}},x=function(e){return{display:"flex",transform:"scale(1.25)",borderRadius:"50%",cursor:"pointer",zIndex:10,backgroundColor:null!=s?s:"#808080",width:"3.5rem",height:"3.5rem",right:e?"":"0",marginRight:e?"":"5rem",marginTop:e?"":"2rem"}};return i.createElement(o.Root,null,i.createElement("div",{onClick:function(){return g(!0)},style:L(E)},i.createElement(o.Trigger,{asChild:!0},i.createElement("div",{style:x(E)},i.createElement(l,null)))),d,v&&i.createElement(o.Overlay,{style:{overflowY:"hidden"}},i.createElement(o.Content,{asChild:!0},i.createElement(a,{id:r,type:n,cmsUrl:c,token:u,hide:function(){return g(!1)},onSave:function(){return e=function(){return g(!1)},setTimeout((function(){return e()}),100),void setTimeout((function(){var e=new URL(window.location.toString());window.location.replace(e.toString())}),500);var e}}))))}; | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@radix-ui/react-dialog"),r=require("next/router");function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=n(e),o=n(t);function a(e){var t,n=e.id,o=e.type,a=e.cmsUrl,l=e.token,c=e.onSave,u=e.hide,d=r.useRouter();i.useEffect((function(){function e(e){"object"==typeof e.data&&"SUBMIT_FORM"===e.data.type&&c()}return window.addEventListener("message",e,!1),function(){return window.removeEventListener("message",e,!1)}}));var s=new URL(a+"/frontend-editing/edit/"+o+"/"+n+"/"+(null!==(t=null==d?void 0:d.locale)&&void 0!==t?t:"en"));return"string"==typeof l&&s.searchParams.set("jwt",l),i.createElement(i.Fragment,null,i.createElement("div",{onClick:u,style:{position:"fixed",zIndex:9998,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",top:0,right:0,cursor:"pointer"}}),i.createElement("iframe",{src:s.toString(),style:{position:"fixed",top:0,right:0,resize:"horizontal",overflowX:"scroll",overflowY:"hidden",overscrollBehaviorX:"contain",zIndex:9999,width:"70%",height:"100%",backgroundColor:"white"}}))}var l=function(e){var t,r=null!==(t=e.size)&&void 0!==t?t:24;return i.createElement("svg",{width:r,height:r,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{margin:"auto",height:"auto"}},i.createElement("path",{d:"M14.6626 2.87675L13.0766 1.29175C12.6876 0.90275 12.0516 0.90275 11.6626 1.29175L10.3696 2.58475L13.3696 5.58475L14.6626 4.29175C15.0516 3.90275 15.0516 3.26575 14.6626 2.87675Z",fill:"#FD2CA8"}),i.createElement("path",{d:"M2.36714 10.5861L5.36694 13.5859L12.3655 6.58734L9.36574 3.58754L2.36714 10.5861Z",fill:"#FFE203"}),i.createElement("path",{d:"M1.0256 14.6098C0.9386 14.8718 1.0806 15.0068 1.3416 14.9218L3.3426 14.2548L1.6926 12.6088L1.0256 14.6098Z",fill:"#000000"}))};exports.default=function(t){var r=t.id,n=t.type,c=t.cmsUrl,u=t.token,d=t.children,s=t.color,f=t.absolute,h=void 0===f||f,m=e.useState(!1),v=m[0],g=m[1],p=window.matchMedia("(max-width: 1024px)"),w=e.useState(p.matches),E=w[0],y=w[1];e.useEffect((function(){var e=function(e){y(e.matches)};return p.addEventListener("change",e),function(){return p.removeEventListener("change",e)}}));var L=function(e){return{position:h?"absolute":"relative",display:"flex",justifyContent:e?"center":"flex-end",height:"32p",width:"100%"}},x=function(e){return{display:"flex",transform:"scale(1.25)",borderRadius:"50%",cursor:"pointer",zIndex:10,backgroundColor:null!=s?s:"#808080",width:"3.5rem",height:"3.5rem",right:e?"":"0",marginRight:e?"":"5rem",marginTop:e?"":"2rem"}};return i.createElement(o.Root,null,i.createElement("div",{onClick:function(){return g(!0)},style:L(E)},i.createElement(o.Trigger,{asChild:!0},i.createElement("div",{style:x(E)},i.createElement(l,null)))),d,v&&i.createElement(o.Overlay,{style:{overflowY:"hidden"}},i.createElement(o.Content,{asChild:!0},i.createElement(a,{id:r,type:n,cmsUrl:c,token:u,hide:function(){return g(!1)},onSave:function(){return e=function(){return g(!1)},setTimeout((function(){return e()}),100),void setTimeout((function(){var e=new URL(window.location.toString());window.location.replace(e.toString())}),500);var e}}))))}; | ||
//# sourceMappingURL=frontend-editing.production.cjs.min.js.map |
@@ -1,2 +0,2 @@ | ||
import*as e from"react";import{useState as t,useEffect as n}from"react";import*as r from"@radix-ui/react-dialog";import{useRouter as i}from"next/router";function o(t){var n,r=t.id,o=t.type,a=t.cmsUrl,l=t.token,c=t.onSave,d=t.hide,u=i();e.useEffect((function(){function e(e){"object"==typeof e.data&&"SUBMIT_FORM"===e.data.type&&c()}return window.addEventListener("message",e,!1),function(){return window.removeEventListener("message",e,!1)}}));var s=new URL(a+"/frontend-editing/edit/"+o+"/"+r+"/"+(null!==(n=null==u?void 0:u.locale)&&void 0!==n?n:"en"));return"string"==typeof l&&s.searchParams.set("jwt",l),e.createElement(e.Fragment,null,e.createElement("div",{onClick:d,style:{position:"fixed",zIndex:40,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",top:0,right:0,cursor:"pointer"}}),e.createElement("iframe",{src:s.toString(),style:{position:"fixed",top:0,right:0,resize:"horizontal",overflowX:"scroll",overflowY:"hidden",overscrollBehaviorX:"contain",zIndex:50,width:"70%",height:"100%",backgroundColor:"white"}}))}var a=function(t){var n,r=null!==(n=t.size)&&void 0!==n?n:24;return e.createElement("svg",{width:r,height:r,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{margin:"auto",height:"auto"}},e.createElement("path",{d:"M14.6626 2.87675L13.0766 1.29175C12.6876 0.90275 12.0516 0.90275 11.6626 1.29175L10.3696 2.58475L13.3696 5.58475L14.6626 4.29175C15.0516 3.90275 15.0516 3.26575 14.6626 2.87675Z",fill:"#FD2CA8"}),e.createElement("path",{d:"M2.36714 10.5861L5.36694 13.5859L12.3655 6.58734L9.36574 3.58754L2.36714 10.5861Z",fill:"#FFE203"}),e.createElement("path",{d:"M1.0256 14.6098C0.9386 14.8718 1.0806 15.0068 1.3416 14.9218L3.3426 14.2548L1.6926 12.6088L1.0256 14.6098Z",fill:"#000000"}))};function l(i){var l=i.id,c=i.type,d=i.cmsUrl,u=i.token,s=i.children,m=i.color,h=i.absolute,f=void 0===h||h,v=t(!1),g=v[0],p=v[1],w=window.matchMedia("(max-width: 1024px)"),E=t(w.matches),L=E[0],y=E[1];n((function(){var e=function(e){y(e.matches)};return w.addEventListener("change",e),function(){return w.removeEventListener("change",e)}}));var x=function(e){return{position:f?"absolute":"relative",display:"flex",justifyContent:e?"center":"flex-end",height:"32p",width:"100%"}},C=function(e){return{display:"flex",transform:"scale(1.25)",borderRadius:"50%",cursor:"pointer",zIndex:10,backgroundColor:null!=m?m:"#808080",width:"3.5rem",height:"3.5rem",right:e?"":"0",marginRight:e?"":"5rem",marginTop:e?"":"2rem"}};return e.createElement(r.Root,null,e.createElement("div",{onClick:function(){return p(!0)},style:x(L)},e.createElement(r.Trigger,{asChild:!0},e.createElement("div",{style:C(L)},e.createElement(a,null)))),s,g&&e.createElement(r.Overlay,{style:{overflowY:"hidden"}},e.createElement(r.Content,{asChild:!0},e.createElement(o,{id:l,type:c,cmsUrl:d,token:u,hide:function(){return p(!1)},onSave:function(){return e=function(){return p(!1)},setTimeout((function(){return e()}),100),void setTimeout((function(){var e=new URL(window.location.toString());window.location.replace(e.toString())}),500);var e}}))))}export{l as default}; | ||
import*as e from"react";import{useState as t,useEffect as n}from"react";import*as r from"@radix-ui/react-dialog";import{useRouter as i}from"next/router";function o(t){var n,r=t.id,o=t.type,a=t.cmsUrl,l=t.token,c=t.onSave,d=t.hide,u=i();e.useEffect((function(){function e(e){"object"==typeof e.data&&"SUBMIT_FORM"===e.data.type&&c()}return window.addEventListener("message",e,!1),function(){return window.removeEventListener("message",e,!1)}}));var s=new URL(a+"/frontend-editing/edit/"+o+"/"+r+"/"+(null!==(n=null==u?void 0:u.locale)&&void 0!==n?n:"en"));return"string"==typeof l&&s.searchParams.set("jwt",l),e.createElement(e.Fragment,null,e.createElement("div",{onClick:d,style:{position:"fixed",zIndex:9998,width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",top:0,right:0,cursor:"pointer"}}),e.createElement("iframe",{src:s.toString(),style:{position:"fixed",top:0,right:0,resize:"horizontal",overflowX:"scroll",overflowY:"hidden",overscrollBehaviorX:"contain",zIndex:9999,width:"70%",height:"100%",backgroundColor:"white"}}))}var a=function(t){var n,r=null!==(n=t.size)&&void 0!==n?n:24;return e.createElement("svg",{width:r,height:r,viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",style:{margin:"auto",height:"auto"}},e.createElement("path",{d:"M14.6626 2.87675L13.0766 1.29175C12.6876 0.90275 12.0516 0.90275 11.6626 1.29175L10.3696 2.58475L13.3696 5.58475L14.6626 4.29175C15.0516 3.90275 15.0516 3.26575 14.6626 2.87675Z",fill:"#FD2CA8"}),e.createElement("path",{d:"M2.36714 10.5861L5.36694 13.5859L12.3655 6.58734L9.36574 3.58754L2.36714 10.5861Z",fill:"#FFE203"}),e.createElement("path",{d:"M1.0256 14.6098C0.9386 14.8718 1.0806 15.0068 1.3416 14.9218L3.3426 14.2548L1.6926 12.6088L1.0256 14.6098Z",fill:"#000000"}))};function l(i){var l=i.id,c=i.type,d=i.cmsUrl,u=i.token,s=i.children,m=i.color,h=i.absolute,f=void 0===h||h,v=t(!1),g=v[0],p=v[1],w=window.matchMedia("(max-width: 1024px)"),E=t(w.matches),L=E[0],y=E[1];n((function(){var e=function(e){y(e.matches)};return w.addEventListener("change",e),function(){return w.removeEventListener("change",e)}}));var x=function(e){return{position:f?"absolute":"relative",display:"flex",justifyContent:e?"center":"flex-end",height:"32p",width:"100%"}},C=function(e){return{display:"flex",transform:"scale(1.25)",borderRadius:"50%",cursor:"pointer",zIndex:10,backgroundColor:null!=m?m:"#808080",width:"3.5rem",height:"3.5rem",right:e?"":"0",marginRight:e?"":"5rem",marginTop:e?"":"2rem"}};return e.createElement(r.Root,null,e.createElement("div",{onClick:function(){return p(!0)},style:x(L)},e.createElement(r.Trigger,{asChild:!0},e.createElement("div",{style:C(L)},e.createElement(a,null)))),s,g&&e.createElement(r.Overlay,{style:{overflowY:"hidden"}},e.createElement(r.Content,{asChild:!0},e.createElement(o,{id:l,type:c,cmsUrl:d,token:u,hide:function(){return p(!1)},onSave:function(){return e=function(){return p(!1)},setTimeout((function(){return e()}),100),void setTimeout((function(){var e=new URL(window.location.toString());window.location.replace(e.toString())}),500);var e}}))))}export{l as default}; | ||
//# sourceMappingURL=frontend-editing.production.esm.js.map |
{ | ||
"name": "@burst/frontend-editing", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Package to allow front-end editing", | ||
@@ -38,3 +38,3 @@ "author": "Mattijn Stolk mattijn.stolk@iodigital.com", | ||
}, | ||
"gitHead": "47397af2572eac9f932523a2f4a4d0e638bcdac5" | ||
"gitHead": "318095328d24af574cc9242ee79a9d25ec9b5a95" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
30641