3 lines
8.3 KiB
JavaScript
3 lines
8.3 KiB
JavaScript
|
/*! grapesjs-blocks-basic - 1.0.2 */
|
||
|
!function(n,a){'object'==typeof exports&&'object'==typeof module?module.exports=a():'function'==typeof define&&define.amd?define([],a):'object'==typeof exports?exports["gjs-blocks-basic"]=a():n["gjs-blocks-basic"]=a()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(()=>(()=>{"use strict";var n={d:(a,e)=>{for(var t in e)n.o(e,t)&&!n.o(a,t)&&Object.defineProperty(a,t,{enumerable:!0,get:e[t]})},o:(n,a)=>Object.prototype.hasOwnProperty.call(n,a),r:n=>{'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(n,'__esModule',{value:!0})}},a={};n.r(a),n.d(a,{default:()=>l});var e=void 0&&(void 0).__assign||function(){return e=Object.assign||function(n){for(var a,e=1,t=arguments.length;e<t;e++)for(var l in a=arguments[e])Object.prototype.hasOwnProperty.call(a,l)&&(n[l]=a[l]);return n},e.apply(this,arguments)};var t=void 0&&(void 0).__assign||function(){return t=Object.assign||function(n){for(var a,e=1,t=arguments.length;e<t;e++)for(var l in a=arguments[e])Object.prototype.hasOwnProperty.call(a,l)&&(n[l]=a[l]);return n},t.apply(this,arguments)};const l=function(n,a){void 0===a&&(a={}),function(n,a){var t=n.BlockManager,l=a.category,o=a.blocks,c=a.stylePrefix,i=a.flexGrid,d=a.rowHeight,r=a.addBasicStyle,s="".concat(c,"row"),v="".concat(c,"cell"),m=i?"\n .".concat(s," {\n display: flex;\n justify-content: flex-start;\n align-items: stretch;\n flex-wrap: nowrap;\n padding: 10px;\n }\n @media (max-width: 768px) {\n .").concat(s," {\n flex-wrap: wrap;\n }\n }"):"\n .".concat(s," {\n display: table;\n padding: 10px;\n width: 100%;\n }\n @media (max-width: 768px) {\n .").concat(c,"cell, .").concat(c,"cell30, .").concat(c,"cell70 {\n width: 100%;\n display: block;\n }\n }"),p=i?"\n .".concat(v," {\n min-height: ").concat(d,"px;\n flex-grow: 1;\n flex-basis: 100%;\n }"):"\n .".concat(v," {\n width: 8%;\n display: table-cell;\n height: ").concat(d,"px;\n }"),u="\n .".concat(c,"cell30 {\n width: 30%;\n }"),b="\n .".concat(c,"cell70 {\n width: 70%;\n }"),g=1,h={tl:0,tc:0,tr:0,cl:0,cr:0,bl:0,br:0,minDim:g},f=e(e({},h),{cr:1,bc:0,currentUnit:1,minDim:g,step:.2});i&&(f.keyWidth='flex-basis');var y={class:s,'data-gjs-droppable':".".concat(v),'data-gjs-resizable':h,'data-gjs-name':'Row'},C={class:v,'data-gjs-draggable':".".concat(s),'data-gjs-resizable':f,'data-gjs-name':'Cell'};i&&(C['data-gjs-unstylable']=['width'],C['data-gjs-stylable-require']=['flex-basis']);var x=[".".concat(s),".".concat(v)];n.on('selector:add',(function(n){return x.indexOf(n.getFullName())>=0&&n.set('private',1)}));var V=function(n){var a=[];for(var e in n){var t=n[e];t=t instanceof Array||t instanceof Object?JSON.stringify(t):t,a.push("".concat(e,"=").concat("'".concat(t,"'")))}return a.length?" ".concat(a.join(' ')):''},w=function(n){return o.indexOf(n)>=0},L=V(y),H=V(C),M={category:l,select:!0};w('column1')&&t.add('column1',e(e({},M),{label:a.labelColumn1,media:"<svg viewBox=\"0 0 24 24\">\n <path fill=\"currentColor\" d=\"M2 20h20V4H2v16Zm-1 0V4a1 1 0 0 1 1-1h20a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1Z\"/>\n </svg>",content:"<div ".concat(L,">\n <div ").concat(H,"></div>\n </div>\n ").concat(r?"<style>\n ".concat(m,"\n ").concat(p,"\n </style>"):'')})),w('column2')&&t.add('column2',e(e({},M),{label:a.labelColumn2,media:"<svg viewBox=\"0 0 23 24\">\n <path fill=\"currentColor\" d=\"M2 20h8V4H2v16Zm-1 0V4a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1ZM13 20h8V4h-8v16Zm-1 0V4a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1Z\"/>\n </svg>",content:"<div ".concat(L,">\n <div ").concat(H,"></div>\n <div ").concat(H,"></div>\n </div>\n ").concat(r?"<style>\n ".concat(m,"\n ").concat(p,"\n </style>"):'')})),w('column3')&&t.add('column3',e(e({},M),{label:a.labelCol
|
||
|
//# sourceMappingURL=index.js.map
|