1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00
invoiceninja/resources/assets/js/grapesjs-blocks-basic.min.js
2018-01-30 20:58:55 +02:00

2 lines
5.2 KiB
JavaScript

/*! grapesjs-blocks-basic - 0.1.3 */
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a(require("grapesjs")):"function"==typeof define&&define.amd?define(["grapesjs"],a):"object"==typeof exports?exports["grapesjs-blocks-basic"]=a(require("grapesjs")):e["grapesjs-blocks-basic"]=a(e.grapesjs)}(this,function(e){return function(e){function a(t){if(l[t])return l[t].exports;var n=l[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,a),n.l=!0,n.exports}var l={};return a.m=e,a.c=l,a.d=function(e,l,t){a.o(e,l)||Object.defineProperty(e,l,{configurable:!1,enumerable:!0,get:t})},a.n=function(e){var l=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(l,"a",l),l},a.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},a.p="",a(a.s=0)}([function(e,a,l){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var t=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var l=arguments[a];for(var t in l)Object.prototype.hasOwnProperty.call(l,t)&&(e[t]=l[t])}return e},n=l(1),s=function(e){return e&&e.__esModule?e:{default:e}}(n);a.default=s.default.plugins.add("gjs-blocks-basic",function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t({blocks:["column1","column2","column3","column3-7","text","link","image","video","map"],stylePrefix:"",addBasicStyle:!0,labelColumn1:"1 Column",labelColumn2:"2 Columns",labelColumn3:"3 Columns",labelColumn37:"2 Columns 3/7",labelText:"Text",labelLink:"Link",labelImage:"Image",labelVideo:"Video",labelMap:"Map"},a);l(2).default(e,n)})},function(a,l){a.exports=e},function(e,a,l){"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.default=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=a,t=e.BlockManager,n=l.blocks,s=l.stylePrefix,o=l.addBasicStyle,c="\n ."+s+"row {\n display: table;\n padding: 10px;\n width: 100%;\n }\n @media (max-width: 768px) {\n ."+s+"cell, ."+s+"cell30, ."+s+"cell70 {\n width: 100%;\n display: block;\n }\n }",d="\n ."+s+"cell {\n width: 8%;\n display: table-cell;\n height: 75px;\n }",i="\n ."+s+"cell30 {\n width: 30%;\n }",r="\n ."+s+"cell70 {\n width: 70%;\n }";n.indexOf("column1")>=0&&t.add("column1",{label:l.labelColumn1,category:"Basic",attributes:{class:"gjs-fonts gjs-f-b1"},content:'<div class="'+s+'row" data-gjs-droppable=".'+s+'cell" data-gjs-custom-name="Row">\n <div class="'+s+'cell" data-gjs-draggable=".'+s+'row" data-gjs-custom-name="Cell"></div>\n </div>\n '+(o?"<style>\n "+c+"\n "+d+"\n </style>":"")}),n.indexOf("column2")>=0&&t.add("column2",{label:l.labelColumn2,attributes:{class:"gjs-fonts gjs-f-b2"},category:"Basic",content:'<div class="'+s+'row" data-gjs-droppable=".'+s+'cell" data-gjs-custom-name="Row">\n <div class="'+s+'cell" data-gjs-draggable=".'+s+'row" data-gjs-custom-name="Cell"></div>\n <div class="'+s+'cell" data-gjs-draggable=".'+s+'row" data-gjs-custom-name="Cell"></div>\n </div>\n '+(o?"<style>\n "+c+"\n "+d+"\n </style>":"")}),n.indexOf("column3")>=0&&t.add("column3",{label:l.labelColumn3,category:"Basic",attributes:{class:"gjs-fonts gjs-f-b3"},content:'<div class="'+s+'row" data-gjs-droppable=".'+s+'cell" data-gjs-custom-name="Row">\n <div class="'+s+'cell" data-gjs-draggable=".'+s+'row" data-gjs-custom-name="Cell"></div>\n <div class="'+s+'cell" data-gjs-draggable=".'+s+'row" data-gjs-custom-name="Cell"></div>\n <div class="'+s+'cell" data-gjs-draggable=".'+s+'row" data-gjs-custom-name="Cell"></div>\n </div>\n '+(o?"<style>\n "+c+"\n "+d+"\n </style>":"")}),n.indexOf("column3-7")>=0&&t.add("column3-7",{label:l.labelColumn37,category:"Basic",attributes:{class:"gjs-fonts gjs-f-b37"},content:'<div class="'+s+'row" data-gjs-droppable=".'+s+'cell" data-gjs-custom-name="Row">\n <div class="'+s+"cell "+s+'cell30" data-gjs-draggable=".'+s+'row" data-gjs-custom-name="Cell"></div>\n <div class="'+s+"cell "+s+'cell70" data-gjs-draggable=".'+s+'row" data-gjs-custom-name="Cell"></div>\n </div>\n '+(o?"<style>\n "+c+"\n "+d+"\n "+i+"\n "+r+"\n </style>":"")}),n.indexOf("text")>=0&&t.add("text",{label:l.labelText,category:"Basic",attributes:{class:"gjs-fonts gjs-f-text"},content:{type:"text",content:"Insert your text here",style:{padding:"10px"},activeOnRender:1}}),n.indexOf("link")>=0&&t.add("link",{label:l.labelLink,category:"Basic",attributes:{class:"fa fa-link"},content:{type:"link",content:"Link",style:{color:"#d983a6"}}}),n.indexOf("image")>=0&&t.add("image",{label:l.labelImage,category:"Basic",attributes:{class:"gjs-fonts gjs-f-image"},content:{style:{color:"black"},type:"image",activeOnRender:1}}),n.indexOf("video")>=0&&t.add("video",{label:l.labelVideo,category:"Basic",attributes:{class:"fa fa-youtube-play"},content:{type:"video",src:"img/video2.webm",style:{height:"350px",width:"615px"}}}),n.indexOf("map")>=0&&t.add("map",{label:l.labelMap,category:"Basic",attributes:{class:"fa fa-map-o"},content:{type:"map",style:{height:"350px"}}})}}])});