Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
VvvebJs update
Givana99095e6c454
diff --git a/public/js/vvvebjs/blocks-bootstrap4.js b/public/js/vvvebjs/blocks-bootstrap4.jsindex b99c67a..98fdb2d 100755--- a/public/js/vvvebjs/blocks-bootstrap4.js+++ b/public/js/vvvebjs/blocks-bootstrap4.js@@ -1001,8 +1001,6 @@ Vvveb.Blocks.add("bootstrap4/pricing-1", {</div></div><style>-@import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css");-.panel-pricing {-moz-transition: all .3s ease;-o-transition: all .3s ease;diff --git a/public/js/vvvebjs/builder.js b/public/js/vvvebjs/builder.jsindex 92bf04d..221a7bb 100755--- a/public/js/vvvebjs/builder.js+++ b/public/js/vvvebjs/builder.js@@ -19,159 +19,163 @@* https://github.com/givanz/Vvveb*/+var $ = document.querySelector.bind(document);+var $$ = document.querySelectorAll.bind(document);// Simple JavaScript Templating and buildParams// John Resig - https://johnresig.com/ - MIT Licensed-(function(){- let cache = {};- let startTag = "{%";- let endTag = "%}";- let re1 = new RegExp(`((^|${endTag})[^\t]*)'`,"g");- let re2 = new RegExp(`\t=(.*?)${endTag}`,"g");-- this.tmpl = function tmpl(str, data){- // Figure out if we're getting a template, or if we need to- // load the template - and be sure to cache the result.- let fn = /^[-a-zA-Z0-9]+$/.test(str) ?- cache[str] = cache[str] ||- tmpl(document.getElementById(str).innerHTML) :-- // Generate a reusable function that will serve as a template- // generator (and which will be cached).- new Function("obj",- "let p=[],print=function(){p.push.apply(p,arguments);};" +-- // Introduce the data as local variables using with(){}- "with(obj){p.push('" +-- // Convert the template into pure JavaScript- str- .replace(/[\r\t\n]/g, " ")- .split(startTag).join("\t")- .replace(re1, "$1\r")- .replace(re2, "',$1,'")- .split("\t").join("');")- .split(endTag).join("p.push('")- .split("\r").join("\\'")- + "');}return p.join('');");- // Provide some basic currying to the user- return data ? fn( data ) : fn;- };+(function () {+ let cache = {};+ let startTag = "{%";+ let endTag = "%}";+ let re1 = new RegExp(`((^|${endTag})[^\t]*)'`, "g");+ let re2 = new RegExp(`\t=(.*?)${endTag}`, "g");++ this.tmpl = function tmpl(str, data) {+ // Figure out if we're getting a template, or if we need to+ // load the template - and be sure to cache the result.+ let fn = /^[-a-zA-Z0-9]+$/.test(str) ?+ cache[str] = cache[str] ||+ tmpl(document.getElementById(str).innerHTML) :++ // Generate a reusable function that will serve as a template+ // generator (and which will be cached).+ new Function("obj",+ "let p=[],print=function(){p.push.apply(p,arguments);};" +++ // Introduce the data as local variables using with(){}+ "with(obj){p.push('" +++ // Convert the template into pure JavaScript+ str+ .replace(/[\r\t\n]/g, " ")+ .split(startTag).join("\t")+ .replace(re1, "$1\r")+ .replace(re2, "',$1,'")+ .split("\t").join("');")+ .split(endTag).join("p.push('")+ .split("\r").join("\\'")+ + "');}return p.join('');");+ // Provide some basic currying to the user+ return data ? fn(data) : fn;+ };})();-function buildParams( prefix, obj, add ) {+function buildParams(prefix, obj, add) {let rbracket = /\[\]$/;- if ( Array.isArray( obj ) ) {+ if (Array.isArray(obj)) {// Serialize array item.- for(const key in obj) {+ for (const key in obj) {let v = obj[key];- if ( rbracket.test( prefix ) ) {+ if (rbracket.test(prefix)) {// Treat each array item as a scalar.- add( prefix, v );+ add(prefix, v);} else {// Item is non-scalar (array or object), encode its numeric index.buildParams(- prefix + "[" + ( typeof v === "object" && v != null ? key : "" ) + "]",+ prefix + "[" + (typeof v === "object" && v != null ? key : "") + "]",v,add);}}- } else if ( typeof obj === "object" ) {+ } else if (typeof obj === "object") {// Serialize object item.- for (const name in obj ) {- buildParams( prefix + "[" + name + "]", obj[ name ], add );+ for (const name in obj) {+ buildParams(prefix + "[" + name + "]", obj[name], add);}} else {// Serialize scalar item.- add( prefix, obj );+ add(prefix, obj);}}// Serialize an array of form elements or a set of// key/values into a query string-function nestedFormData( a ) {+function nestedFormData(a) {let prefix,s = [],- add = function( key, valueOrFunction ) {+ add = function (key, valueOrFunction) {// If value is a function, invoke it and use its return valuelet value = typeof valueOrFunction === "function" ?valueOrFunction() :valueOrFunction;- s[ s.length ] = encodeURIComponent( key ) + "=" +- encodeURIComponent( value == null ? "" : value );+ s[s.length] = encodeURIComponent(key) + "=" ++ encodeURIComponent(value == null ? "" : value);};- if ( a == null ) {+ if (a == null) {return "";}// If an array was passed in, assume that it is an array of form elements.- if ( Array.isArray( a ) || ( Object.is( a ) ) ) {+ if (Array.isArray(a)) {// Serialize the form elements- for(const key in object) {- let v = object[key];- //jQuery.each( a, function() {- add( key, v );- };+ a.forEach((v, key) => {+ if (v && typeof v === "object" && "name" in v) {+ add(v.name, v.value);+ } else {+ add(key, v);+ }+ });} else {// If traditional, encode the "old" way (the way 1.3.2 or older// did it), otherwise encode params recursively.- for (const prefix in a ) {- buildParams( prefix, a[ prefix ], add );+ for (const prefix in a) {+ buildParams(prefix, a[prefix], add);}}// Return the resulting serialization- return s.join( "&" );+ return s.join("&");};-let delay = (function(){- let timer = 0;- return function(callback, ms){- clearTimeout (timer);- timer = setTimeout(callback, ms);- };+let delay = (function () {+ let timer = 0;+ return function (callback, ms) {+ clearTimeout(timer);+ timer = setTimeout(callback, ms);+ };})();-function isElement(obj){- return (typeof obj==="object") &&- (obj.nodeType===1) && (typeof obj.style === "object") &&- (typeof obj.ownerDocument ==="object")/* && obj.tagName != "BODY"*/;+function isElement(obj) {+ return (typeof obj === "object") &&+ (obj.nodeType === 1) && (typeof obj.style === "object") &&+ (typeof obj.ownerDocument === "object")/* && obj.tagName != "BODY"*/;}function generateElements(html) {- const template = document.createElement('template');- template.innerHTML = html.trim();- return template.content.children;+ const template = document.createElement('template');+ template.innerHTML = html.trim();+ return template.content.children;}function offset(el) {- box = el.getBoundingClientRect();- docElem = document.documentElement;- return {- top: box.top + window.pageYOffset - docElem.clientTop,- left: box.left + window.pageXOffset - docElem.clientLeft- };+ const box = el.getBoundingClientRect();+ const docElem = document.documentElement;+ return {+ top: box.top + window.pageYOffset - docElem.clientTop,+ left: box.left + window.pageXOffset - docElem.clientLeft+ };}-if (Vvveb === undefined) var Vvveb = {};+if (typeof Vvveb === 'undefined') var Vvveb = {};Vvveb.defaultComponent = "_base";Vvveb.preservePropertySections = true;@@ -181,105 +185,170 @@ Vvveb.dragIcon = 'icon';Vvveb.dragElementStyle = "background:limegreen;width:100%;height:3px;border:1px solid limegreen;box-shadow:0px 0px 2px 1px rgba(0,0,0,0.14);overflow:hidden;";Vvveb.dragHtml = '<div style="' + Vvveb.dragElementStyle + '"></div>';-Vvveb.baseUrl = document.currentScript?document.currentScript.src.replace(/[^\/]*?\.js$/,''):'';-Vvveb.imgBaseUrl = Vvveb.baseUrl;+Vvveb.baseUrl = document.currentScript ? document.currentScript.src.replace(/[^\/]*?\.js$/, '') : '';+Vvveb.imgBaseUrl = Vvveb.baseUrl;Vvveb.ComponentsGroup = {};Vvveb.SectionsGroup = {};Vvveb.BlocksGroup = {};Vvveb.StylesGroup = {};+const NO_CHILDREN_TAGS = {+ input: true,+ textarea: true,+ img: true,+ svg: true,+ iframe: true,+ embed: true,+ col: true,+ area: true,+ hr: true,+ br: true,+ wbr: true,+};+Vvveb.Components = {-+_components: {},-+_nodesLookup: {},-+_attributesLookup: {},_classesLookup: {},-+_classesRegexLookup: {},-++ _classesRegexCompiled: [],+componentPropertiesElement: "#right-panel .component-properties",componentPropertiesDefaultSection: "content",- get: function(type) {+ get: function (type) {return this._components[type];},- updateProperty: function(type, key, value) {- let properties = this._components[type]["properties"];- for (property in properties) {- if (key == properties[property]["key"]) {- return this._components[type]["properties"][property] =- Object.assign(properties[property], value);- }+ updateProperty: function (type, key, value) {+ let property = this._components[type] ? this._findProperty(this._components[type]["properties"], key) : null;+ if (property) {+ return Object.assign(property, value);}},- getProperty: function(type, key) {+ getProperty: function (type, key) {let properties = this._components[type] ? this._components[type]["properties"] : [];- for (property in properties) {- if (key == properties[property]["key"]) {- return properties[property];+ return this._findProperty(properties, key);+ },++ _findProperty: function (properties, key) {+ for (let property of properties) {+ if (key == property["key"]) {+ return property;+ }+ if (property.properties) {+ let found = this._findProperty(property.properties, key);+ if (found) return found;+ }+ }+ },++ _applyConditionVisibility: function (component, key, value) {+ let conditions = component.conditions && component.conditions[key];+ if (!conditions) return;+ //the changed property definition, passed through to predicate rules+ let property = this._findProperty(component.properties || [], key);+ for (const condition in conditions) {+ let rule = conditions[condition];+ let show;++ if (typeof rule == "function") {+ //predicate rule decides visibility itself+ show = !!rule.call(component, value, property);+ } else {+ show = (rule == value);+ }++ let el = null;+ try {+ el = document.querySelector('[data-key="' + condition + '"]');+ } catch (err) {}+ if (el) {+ if (show) {+ el.style.display = "";+ } else {+ el.style.display = "none";+ }}}},- add: function(type, data) {+ _applyAllConditions: function (component) {+ if (!component || !component.conditions || !component.values) return;+ for (const key in component.conditions) {+ this._applyConditionVisibility(component, key, component.values[key]);+ }+ },++ add: function (type, data) {data.type = type;-+this._components[type] = data;-+if (data.nodes) {- for (let i in data.nodes) {- this._nodesLookup[ data.nodes[i] ] = data;+ for (const node of data.nodes) {+ this._nodesLookup[node] = data;}}-+if (data.attributes) {- if (data.attributes.constructor === Array) {- for (let i in data.attributes) {- this._attributesLookup[ data.attributes[i] ] = data;+ if (Array.isArray(data.attributes)) {+ for (const attr of data.attributes) {+ this._attributesLookup[attr] = data;}} else {- for (let i in data.attributes) {+ for (const i in data.attributes) {if (typeof this._attributesLookup[i] === 'undefined') {this._attributesLookup[i] = {};}- if (typeof this._attributesLookup[i][ data.attributes[i] ] === 'undefined') {- this._attributesLookup[i][ data.attributes[i] ] = {};+ if (typeof this._attributesLookup[i][data.attributes[i]] === 'undefined') {+ this._attributesLookup[i][data.attributes[i]] = {};}- this._attributesLookup[i][ data.attributes[i] ] = data;+ this._attributesLookup[i][data.attributes[i]] = data;}}}-+if (data.classes) {- for (let i in data.classes) {- this._classesLookup[ data.classes[i] ] = data;+ for (const cls of data.classes) {+ this._classesLookup[cls] = data;}}-+if (data.classesRegex) {- for (let i in data.classesRegex) {- this._classesRegexLookup[ data.classesRegex[i] ] = data;+ for (const cls of data.classesRegex) {+ this._classesRegexLookup[cls] = data;+ //precompile the regex once so matchNode() doesn't rebuild it for every node+ try {+ this._classesRegexCompiled.push({ regex: new RegExp(cls), component: data });+ } catch (e) {+ console.warn("Vvveb.Components.add: invalid classesRegex skipped:", cls);+ }}}},-- extend: function(inheritType, type, data) {-- let newData = data;-- if (inheritData = this._components[inheritType]) {- newData = {...inheritData, ...data};++ extend: function (inheritType, type, data) {++ let newData = data;+ let inheritData = this._components[inheritType];++ if (inheritData) {+ newData = { ...inheritData, ...data };newData.properties = (data.properties ? data.properties : []).concat(inheritData.properties ? inheritData.properties : []);- }+ }//remove duplicates/*@@ -289,187 +358,217 @@ Vvveb.Components = {)));*/- //sort by order- newData.properties.sort(function (a,b) {- if (typeof a.sort === "undefined") a.sort = 0;- if (typeof b.sort === "undefined") b.sort = 0;+ //sort by order+ newData.properties.sort(function (a, b) {+ if (typeof a.sort === "undefined") a.sort = 0;+ if (typeof b.sort === "undefined") b.sort = 0;++ if (a.sort < b.sort)+ return -1;+ if (a.sort > b.sort)+ return 1;+ return 0;+ });- if (a.sort < b.sort)- return -1;- if (a.sort > b.sort)- return 1;- return 0;- });-this.add(type, newData);},--- matchNode: function(node) {- let component = {};-+++ matchNode: function (node) {if (!node || !node.tagName) return false;-+if (node.attributes && node.attributes.length) {//search for attributes- for (let i in node.attributes) {- if (node.attributes[i]) {- attr = node.attributes[i].name;- value = node.attributes[i].value;-- if (attr in this._attributesLookup) {- component = this._attributesLookup[ attr ];-- //currently we check that is not a component by looking at name attribute- //if we have a collection of objects it means that attribute value must be checked- if (typeof component["name"] === "undefined") {- if (value in component) {- return component[value];- }- } else {- return component;+ for (let i = 0; i < node.attributes.length; i++) {+ const attr = node.attributes[i].name;+ const value = node.attributes[i].value;++ if (attr in this._attributesLookup) {+ let component = this._attributesLookup[attr];++ //currently we check that is not a component by looking at name attribute+ //if we have a collection of objects it means that attribute value must be checked+ if (typeof component["name"] === "undefined") {+ if (value in component) {+ return component[value];}+ } else {+ return component;}}}-- for (let i in node.attributes) {- attr = node.attributes[i].name;- value = node.attributes[i].value;-++ for (let i = 0; i < node.attributes.length; i++) {+ const attr = node.attributes[i].name;+ const value = node.attributes[i].value;+//check for node classesif (attr == "class") {- classes = value.split(" ");-- for (j in classes) {- if (classes[j] in this._classesLookup)- return this._classesLookup[ classes[j] ];+ const classes = value.split(" ");++ for (const cls of classes) {+ if (cls in this._classesLookup)+ return this._classesLookup[cls];}-- for (regex in this._classesRegexLookup) {- regexObj = new RegExp(regex);- if (regexObj.exec(value)) {- return this._classesRegexLookup[ regex ];++ //regexes are precompiled at registration time (see add())+ if (this._classesRegexCompiled) {+ for (const compiled of this._classesRegexCompiled) {+ if (compiled.regex.exec(value)) {+ return compiled.component;+ }}}}}}- tagName = node.tagName.toLowerCase();- if (tagName in this._nodesLookup) return this._nodesLookup[ tagName ];-+ const tagName = node.tagName.toLowerCase();+ if (tagName in this._nodesLookup) return this._nodesLookup[tagName];+return false;- //return false;},-- renderProperties: function(component, properties, componentsPanelSections, container) {- let fn = function(component, property) {++ renderProperties: function (component, properties, componentsPanelSections, container) {+ //component definitions are shared singletons: reset per-render state+ //so conditions/values from a previous selection cannot leak into this one+ if (component) {+ component.conditions = {};+ component.values = {};+ }+ let rendered = this._renderProperties(component, properties, componentsPanelSections, container, null, []);+ //reflect initial values so dependents of already-set controllers start hidden/shown correctly+ this._applyAllConditions(rendered);+ return rendered;+ },++ _renderProperties: function (component, properties, componentsPanelSections, container, baseNode, ancestors) {+ if (!component) component = { conditions: {}, values: {} };+ if (!component.conditions) component.conditions = {};+ if (!component.values) component.values = {};+ let fn = function (component, property, ancestors) {if (property.input) {property.input.addEventListener('propertyChange', (event) => {- element = selectedElement = Vvveb.Builder.selectedEl;- let value = event.detail.value, input = event.detail.input, origEvent = event.detail.origEvent;-- if (property.element) element = property.element;- if (property.child) element = element.querySelector(property.child);- if (property.parent) element = element.parent(property.parent);-- if (property.onChange) {- let ret = property.onChange(element, value, input, component, origEvent);- //if on change returns an object then is returning the dom node otherwise is returning the new value- if (typeof ret == "object") {- element = ret;- } else {- value = ret;- }- }/* else */- if (property.htmlAttr) {- let oldValue;-- if (property.htmlAttr == "class" && property.validValues) {- oldValue = element.getAttribute(property.htmlAttr);-- if (property.validValues) {- element.classList.remove(...property.validValues.filter(v => v));- }- if (value) {- element.classList.add(...value.split(" "));- }+ let selectedElement = Vvveb.Builder.selectedEl;+ let element = selectedElement;+ let value = event.detail.value, input = event.detail.input, origEvent = event.detail.origEvent;++ if (ancestors) {+ for (const ancestor of ancestors) {+ if (ancestor.element) element = ancestor.element;+ if (ancestor.child) element = element.querySelector(ancestor.child) ?? element;+ if (ancestor.parent) element = element.closest(ancestor.parent) ?? element;+ }+ }+ if (property.element) element = property.element;+ if (property.child) element = element.querySelector(property.child) ?? element;+ if (property.parent) element = element.closest(property.parent) ?? element;++ if (property.onChange) {+ let ret = property.onChange(element, value, input, component, origEvent);+ //if on change returns an object then is returning the dom node otherwise is returning the new value+ if (typeof ret == "object") {+ element = ret;+ } else {+ value = ret;+ }+ }/* else */+ if (property.htmlAttr) {+ let oldValue, oldStyle;++ if (property.htmlAttr == "class" && property.validValues) {+ oldValue = element.getAttribute(property.htmlAttr);++ if (property.validValues) {+ element.classList.remove(...property.validValues.filter(v => v));}- else if (property.htmlAttr == "style") {- //keep old style for undo- oldStyle = window.FrameDocument.getElementById("vvvebjs-styles").textContent;- element = Vvveb.StyleManager.setStyle(element, property.key, value);- } else if (property.htmlAttr == "innerHTML") {- oldValue = element.innerHTML;- element = Vvveb.ContentManager.setHtml(element, value);- } else if (property.htmlAttr == "outerHTML") {- oldValue = element.outerHTML;- element = Vvveb.ContentManager.setHtml(element, value, true);- } else if (property.htmlAttr == "innerText") {- oldValue = element.innerText;- element = Vvveb.ContentManager.setText(element, value);- } else {- oldValue = element.getAttribute(property.htmlAttr);- //if value is empty then remove attribute useful for attributes without values like disabled- if (value) {- element.setAttribute(property.htmlAttr, value);- } else {- element.removeAttribute(property.htmlAttr);- }+ if (value) {+ element.classList.add(...value.split(" "));}-- if (property.htmlAttr == "style") {- mutation = {- type: 'style',- target: element,- attributeName: property.htmlAttr,- oldValue: oldStyle,- newValue: window.FrameDocument.getElementById("vvvebjs-styles").textContent};-- Vvveb.Undo.addMutation(mutation);+ }+ else if (property.htmlAttr == "style") {+ //keep old style for undo+ oldStyle = window.FrameDocument.getElementById("vvvebjs-styles").textContent;+ element = Vvveb.StyleManager.setStyle(element, property.key, value);+ } else if (property.htmlAttr == "innerHTML") {+ oldValue = element.innerHTML;+ element = Vvveb.ContentManager.setHtml(element, value);+ } else if (property.htmlAttr == "outerHTML") {+ oldValue = element.outerHTML;+ element = Vvveb.ContentManager.setHtml(element, value, true);+ } else if (property.htmlAttr == "innerText") {+ oldValue = element.innerText;+ element = Vvveb.ContentManager.setText(element, value);+ } else {+ oldValue = element.getAttribute(property.htmlAttr);+ //if value is empty then remove attribute useful for attributes without values like disabled+ if (value) {+ element.setAttribute(property.htmlAttr, value);} else {- Vvveb.Undo.addMutation({- type: 'attributes',- target: element,- attributeName: property.htmlAttr,- oldValue: oldValue,- newValue: value- });+ element.removeAttribute(property.htmlAttr);}}- if (component && component.onChange) {- element = component.onChange(element, property, value, input);- }-- if (property.child || property.parent) {- Vvveb.Builder.selectNode(selectedElement);+ if (property.htmlAttr == "style") {+ const mutation = {+ type: 'style',+ target: element,+ attributeName: property.htmlAttr,+ oldValue: oldStyle,+ newValue: window.FrameDocument.getElementById("vvvebjs-styles").textContent+ };++ Vvveb.Undo.addMutation(mutation);} else {- Vvveb.Builder.selectNode(element);+ Vvveb.Undo.addMutation({+ type: 'attributes',+ target: element,+ attributeName: property.htmlAttr,+ oldValue: oldValue,+ newValue: value+ });}-- return element;- });+ }++ if (component && component.onChange) {+ element = component.onChange(element, property, value, input);+ }++ if (property.child || property.parent) {+ Vvveb.Builder.selectNode(selectedElement);+ } else {+ Vvveb.Builder.selectNode(element);+ }++ component.values[property.key] = value;+ Vvveb.Components._applyConditionVisibility(component, property.key, value);++ return element;+ });}-+return property.input;};-+let element;let defaultSection = this.componentPropertiesDefaultSection;let section;if (componentsPanelSections) {section = componentsPanelSections[defaultSection].querySelector('.section[data-section="default"]');}- let nodeElement = Vvveb.Builder.selectedEl;-- for (let i in properties) {- let property = properties[i];+ let nodeElement = baseNode || Vvveb.Builder.selectedEl;+ for (let property of properties) {+ if (property.conditions) {+ for (const cname in property.conditions) {+ if (!component.conditions[cname]) component.conditions[cname] = {};+ component.conditions[cname][property.key] = property.conditions[cname];+ }+ }+let element = nodeElement;if (property.beforeInit) property.beforeInit(element);-+if (property.element) element = property.element;if (property.child) element = element.querySelector(property.child) ?? element;if (property.parent) element = element.closest(property.parent) ?? element;@@ -477,13 +576,13 @@ Vvveb.Components = {if (property.data) {property.data["key"] = property.key;} else {- property.data = {"key" : property.key};+ property.data = { "key": property.key };}- if (typeof property.group === 'undefined') property.group = null;+ if (typeof property.group === 'undefined') property.group = null;property.input = property.inputtype.init(property.data, element);-+let value;if (property.init) {property.inputtype.setValue(property.init(element));@@ -492,29 +591,29 @@ Vvveb.Components = {//value = element.css(property.key);//jquery css returns computed stylevalue = Vvveb.StyleManager.getStyle(element, property.key);//getStyle returns declared style} else- if (property.htmlAttr == "innerHTML") {- value = Vvveb.ContentManager.getHtml(element);- } else if (property.htmlAttr == "outerHTML") {- value = Vvveb.ContentManager.getHtml(element, true);- } else if (property.htmlAttr == "innerText") {- value = Vvveb.ContentManager.getText(element);- } else {- value = element.getAttribute(property.htmlAttr);- }+ if (property.htmlAttr == "innerHTML") {+ value = Vvveb.ContentManager.getHtml(element);+ } else if (property.htmlAttr == "outerHTML") {+ value = Vvveb.ContentManager.getHtml(element, true);+ } else if (property.htmlAttr == "innerText") {+ value = Vvveb.ContentManager.getText(element);+ } else {+ value = element.getAttribute(property.htmlAttr);+ }//if attribute is class check if one of valid values is included as class to set the selectif (value && property.htmlAttr == "class" && property.validValues) {- let valid = value.split(" ").filter(function(el) {+ let valid = value.split(" ").filter(function (el) {return property.validValues.indexOf(el) != -1});-+if (valid && valid.length) {value = valid[0];- } else {+ } else {value = "";}- }-+ }+if (!value && property.defaultValue) {value = property.defaultValue;}@@ -528,25 +627,30 @@ Vvveb.Components = {property.inputtype.setValue(value);}- fn(component, property);-+ if (value !== null && value !== undefined && value !== "") {+ component.values[property.key] = value;+ }+ fn(component, property, ancestors);+let propertySection = defaultSection;if (property.section) {propertySection = property.section;- }+ }++ let row = null;if (property.inputtype == SectionInput) {section = componentsPanelSections[propertySection].querySelector('.section[data-section="' + property.key + '"]');-+if (Vvveb.preservePropertySections && section) {section.replaceChildren();- } else {+ } else {componentsPanelSections[propertySection].append(property.input);section = componentsPanelSections[propertySection].querySelector('.section[data-section="' + property.key + '"]');}}else {- let row = generateElements(tmpl('vvveb-property', property))[0];+ row = generateElements(tmpl('vvveb-property', property))[0];row.querySelector('.input').append(property.input);if (container) {container.append(row);@@ -554,7 +658,7 @@ Vvveb.Components = {section.append(row);}}-+if (property.inputtype.afterInit) {property.inputtype.afterInit(property.input);}@@ -562,10 +666,29 @@ Vvveb.Components = {if (property.afterInit) {property.afterInit(element, property.input);}++ //nested properties render inside the parent and resolve from its element+ if (property.properties && property.properties.length) {+ let subContainer = null;+ if (property.inputtype == SectionInput) {+ subContainer = section;+ } else if (row) {+ subContainer = generateElements('<div class="sub-properties"></div>')[0];+ if (subContainer) {+ row.append(subContainer);+ } else {+ subContainer = row;+ }+ }+ if (subContainer) {+ this._renderProperties(component, property.properties, componentsPanelSections, subContainer, element, (ancestors || []).concat([property]));+ }+ }}+ return component;},-- render: function(type, panel = false) {++ render: function (type, panel = false) {let component = this._components[type];if (!component) return;@@ -586,70 +709,70 @@ Vvveb.Components = {'label:not([data-header="default"]),' +'.section:not([data-section="default"])')) {- item.remove();+ item.remove();}});-+let section = componentsPanelSections[defaultSection].querySelector('.section[data-section="default"]');-+if (!(Vvveb.preservePropertySections && section)) {- let template = tmpl("vvveb-input-sectioninput", {key:"default", header:component.name});+ let template = tmpl("vvveb-input-sectioninput", { key: "default", header: component.name });componentsPanelSections[defaultSection].replaceChildren();componentsPanelSections[defaultSection].append(generateElements(template)[0]);-+section = componentsPanelSections[defaultSection].querySelector(".section");}componentsPanelSections[defaultSection].querySelector('[data-header="default"] span').innerHTML = component.name;- section.replaceChildren();-+ section.replaceChildren();+if (component.beforeInit) component.beforeInit(Vvveb.Builder.selectedEl);this.renderProperties(component, component.properties, componentsPanelSections);-+if (component.init) component.init(Vvveb.Builder.selectedEl);}-};+};Vvveb.Blocks = {-+_blocks: {},- get: function(type) {+ get: function (type) {return this._blocks[type];},- add: function(type, data) {+ add: function (type, data) {data.type = type;this._blocks[type] = data;},-};+};Vvveb.Sections = {-+_sections: {},- get: function(type) {+ get: function (type) {return this._sections[type];},- add: function(type, data) {+ add: function (type, data) {data.type = type;this._sections[type] = data;},-};+};Vvveb.Styles = {-+_styles: {},- get: function(type) {+ get: function (type) {return this._styles[type];},-- getByStyle: function(style) {++ getByStyle: function (style) {for (const name in this._styles) {if (this._styles[name].style == style) {return name;@@ -657,22 +780,27 @@ Vvveb.Styles = {}},- add: function(type, data) {+ add: function (type, data) {data.type = type;this._styles[type] = data;},-};+};Vvveb.WysiwygEditor = {-+isActive: false,oldValue: '',- doc:false,-+ doc: false,+ element: null,+ _initToolbar: false,+editorSetStyle: function (tag, style = {}, toggle = false) {- let iframeWindow = Vvveb.Builder.iframe.contentWindow;+ let iframe = Vvveb.Builder.iframe;+ let iframeWindow = iframe && iframe.contentWindow;+ if (!iframeWindow || typeof iframeWindow.getSelection !== "function") return this.element;+ let iframeDoc = iframeWindow.document;let selection = iframeWindow.getSelection();let element = this.element;let range;@@ -681,21 +809,30 @@ Vvveb.WysiwygEditor = {tag = "span";}- if (selection.rangeCount > 0) {- //check if the whole text is inside an existing node to use the node directly- if ((selection.baseNode && selection.baseNode.nextSibling == null && selection.baseNode.previousSibling == null- && selection.anchorOffset == 0 && selection.focusOffset == selection.baseNode.length)- || (selection.anchorOffset == selection.focusOffset)) {-- element = selection.baseNode.parentNode;-+ if (selection && selection.rangeCount > 0) {+ //standard Selection props (baseNode/extentNode only exist in old WebKit, missing in Firefox)+ let anchorNode = selection.anchorNode || selection.baseNode;+ let focusNode = selection.focusNode || selection.extentNode;+ let collapsed = selection.isCollapsed || (anchorNode && anchorNode === focusNode && selection.anchorOffset == selection.focusOffset);++ if (anchorNode && (collapsed ||+ (anchorNode === focusNode && anchorNode.nextSibling == null && anchorNode.previousSibling == null+ && selection.anchorOffset == 0 && selection.focusOffset == anchorNode.length))) {++ element = anchorNode.parentNode;+} else {- element = document.createElement(tag);range = selection.getRangeAt(0);-+ //create in the iframe document, a builder-document node throws WrongDocumentError on insert+ element = iframeDoc.createElement(tag);+try {range.surroundContents(element);- range.selectNodeContents(element.childNodes[0], 0);+ if (element.childNodes[0]) {+ range.selectNodeContents(element.childNodes[0]);+ } else {+ range.selectNodeContents(element);+ }} catch (e) {let content = range.extractContents();@@ -704,848 +841,877 @@ Vvveb.WysiwygEditor = {range.insertNode(element);range.selectNodeContents(element);- }+ }}}-- if (element && style) {- for (name in style) {- if ( !style[name] ||+ if (element && element.style && style) {+ for (let name in style) {++ if (!style[name] ||(toggle && element.style.getPropertyValue(name))) {element.style.removeProperty(name);-+} else {element.style.setProperty(name, style[name]);}}}-+//if edited text is an empty span remove the span- if (element.tagName == "SPAN" && element.style.length == 0 && element.attributes.length <= 1) {- let textNode = iframeWindow.document.createTextNode(element.innerText);- element.replaceWith(textNode);+ if (element && element.tagName == "SPAN" && element.style && element.style.length == 0 && element.attributes && element.attributes.length <= 1) {+ let textNode = iframeDoc.createTextNode(element.textContent);+ if (typeof element.replaceWith === "function") {+ element.replaceWith(textNode);+ } else if (element.parentNode) {+ element.parentNode.replaceChild(textNode, element);+ }element = textNode;- range = iframeWindow.document.createRange();- range.selectNodeContents(element);- selection.removeAllRanges();- selection.addRange(range);- }-+ try {+ range = iframeDoc.createRange();+ range.selectNodeContents(element);+ selection.removeAllRanges();+ selection.addRange(range);+ } catch (e) {}+ }+//select link element to edit link etc- if (tag == "a") {+ if (tag == "a" && element && element.tagName) {Vvveb.Builder.selectNode(element);Vvveb.Builder.loadNodeComponent(element);}return element;},-- init: function(doc) {++ init: function (doc) {this.doc = doc;let self = this;-- document.getElementById("bold-btn").addEventListener("click", function (e) {- //doc.execCommand('bold',false,null);- //self.editorSetStyle("b", {"font-weight" : "bold"}, true);- self.editorSetStyle(false, {"font-weight" : "bold"}, true);- e.preventDefault();- return false;++ //init runs on every iframe load, but the toolbar lives in the builder+ //document: bind it once or every click fires twice (bold on+off = no-op)+ if (!this._initToolbar) {+ this._initToolbar = true;++ let on = function (id, evt, fn) {+ let btn = document.getElementById(id);+ if (btn) btn.addEventListener(evt, fn);+ };++ on("bold-btn", "click", function (e) {+ //doc.execCommand('bold',false,null);+ //self.editorSetStyle("b", {"font-weight" : "bold"}, true);+ self.editorSetStyle(false, { "font-weight": "bold" }, true);+ e.preventDefault();+ return false;});- document.getElementById("italic-btn").addEventListener("click", function (e) {- //doc.execCommand('italic',false,null);- //self.editorSetStyle("i", {"font-style" : "italic"}, true);- self.editorSetStyle(false, {"font-style" : "italic"}, true);- e.preventDefault();- return false;+ on("italic-btn", "click", function (e) {+ //doc.execCommand('italic',false,null);+ //self.editorSetStyle("i", {"font-style" : "italic"}, true);+ self.editorSetStyle(false, { "font-style": "italic" }, true);+ e.preventDefault();+ return false;});- document.getElementById("underline-btn").addEventListener("click", function (e) {- //doc.execCommand('underline',false,null);- //self.editorSetStyle("u", {"text-decoration" : "underline"}, true);- self.editorSetStyle(false, {"text-decoration" : "underline"}, true);- e.preventDefault();- return false;+ on("underline-btn", "click", function (e) {+ //doc.execCommand('underline',false,null);+ //self.editorSetStyle("u", {"text-decoration" : "underline"}, true);+ self.editorSetStyle(false, { "text-decoration": "underline" }, true);+ e.preventDefault();+ return false;});-- document.getElementById("strike-btn").addEventListener("click", function (e) {- //doc.execCommand('strikeThrough',false,null);- //self.editorSetStyle("strike", {"text-decoration" : "line-through"}, true);- self.editorSetStyle(false, {"text-decoration" : "line-through"}, true);- e.preventDefault();- return false;++ on("strike-btn", "click", function (e) {+ //doc.execCommand('strikeThrough',false,null);+ //self.editorSetStyle("strike", {"text-decoration" : "line-through"}, true);+ self.editorSetStyle(false, { "text-decoration": "line-through" }, true);+ e.preventDefault();+ return false;});- document.getElementById("link-btn").addEventListener("click", function (e) {- //doc.execCommand('createLink',false,"#");- self.editorSetStyle("a");- e.preventDefault();- return false;+ on("link-btn", "click", function (e) {+ //doc.execCommand('createLink',false,"#");+ self.editorSetStyle("a");+ e.preventDefault();+ return false;});- document.getElementById("fore-color").addEventListener("change", function (e) {- //doc.execCommand('foreColor',false,this.value);- self.editorSetStyle(false, {"color" : this.value});- e.preventDefault();- return false;+ on("fore-color", "change", function (e) {+ //doc.execCommand('foreColor',false,this.value);+ self.editorSetStyle(false, { "color": this.value });+ e.preventDefault();+ return false;});-- document.getElementById("back-color").addEventListener("change", function (e) {- //doc.execCommand('hiliteColor',false,this.value);- self.editorSetStyle(false, {"background-color" : this.value});- e.preventDefault();- return false;++ on("back-color", "change", function (e) {+ //doc.execCommand('hiliteColor',false,this.value);+ self.editorSetStyle(false, { "background-color": this.value });+ e.preventDefault();+ return false;});-- document.getElementById("font-size").addEventListener("change", function (e) {- //doc.execCommand('fontSize',false,this.value);- self.editorSetStyle(false, {"font-size" : this.value});- e.preventDefault();- return false;++ on("font-size", "change", function (e) {+ //doc.execCommand('fontSize',false,this.value);+ self.editorSetStyle(false, { "font-size": this.value });+ e.preventDefault();+ return false;});- let sizes = "<option value=''> - Font size - </option>";- for (i = 1;i <= 128; i++) {- sizes += "<option value='"+ i +"px'>"+ i +"</option>";+ let fontSize = document.getElementById("font-size");+ if (fontSize) {+ let sizes = "<option value=''> - Font size - </option>";+ for (let i = 1; i <= 128; i++) {+ sizes += "<option value='" + i + "px'>" + i + "</option>";+ }+ fontSize.innerHTML = sizes;}- document.getElementById("font-size").innerHTML = sizes;- document.getElementById("font-family").addEventListener("change", function (e) {- let option = this.options[this.selectedIndex];- let element = self.editorSetStyle(false, {"font-family" : this.value});- Vvveb.FontsManager.addFont(option.dataset.provider, this.value, element);- //doc.execCommand('fontName',false,this.value);+ on("font-family", "change", function (e) {+ let select = e.currentTarget || this;+ if (!select.value) {e.preventDefault();return false;+ }+ let option = select.options && select.options[select.selectedIndex];+ let element = self.editorSetStyle(false, { "font-family": select.value });+ if (option && option.dataset) Vvveb.FontsManager.addFont(option.dataset.provider, select.value, element);+ //doc.execCommand('fontName',false,this.value);+ e.preventDefault();+ return false;});- document.getElementById("justify-btn").addEventListener("click", function (e) {- //let command = "justify" + this.dataset.value;- //doc.execCommand(command,false,"#");-- self.editorSetStyle(false, {"text-align" : e.srcElement.dataset.value});+ on("justify-btn", "click", function (e) {+ //let command = "justify" + this.dataset.value;+ //doc.execCommand(command,false,"#");++ //e.target may be a child icon inside the button, read the button itself+ let btn = (e.currentTarget && e.currentTarget.dataset && e.currentTarget.dataset.value !== undefined) ? e.currentTarget : (e.target.closest ? e.target.closest("#justify-btn") : null);+ let value = btn && btn.dataset ? btn.dataset.value : null;+ if (!value) {e.preventDefault();return false;+ }+ self.editorSetStyle(false, { "text-align": value });+ e.preventDefault();+ return false;});-- doc.addEventListener('keydown', event => {- if (event.key === 'Enter') {- let target = event.target.closest("[contenteditable]");- if (target) {- doc.execCommand('insertLineBreak');- event.preventDefault();- }- }- })- },-- undo: function(element) {- this.doc.execCommand('undo',false,null);+ }//end toolbar once-block++ if (doc && typeof doc.addEventListener === "function" && !doc._vvvebWysiwygKeys) {+ doc._vvvebWysiwygKeys = true;+ doc.addEventListener('keydown', event => {+ if (event.key === 'Enter') {+ let target = event.target && event.target.closest ? event.target.closest("[contenteditable]") : null;+ if (target) {+ doc.execCommand('insertLineBreak');+ event.preventDefault();+ }+ }+ })+ }},- redo: function(element) {- this.doc.execCommand('redo',false,null);+ undo: function (element) {+ if (this.doc && typeof this.doc.execCommand === "function") this.doc.execCommand('undo', false, null);},-- edit: function(element) {++ redo: function (element) {+ if (this.doc && typeof this.doc.execCommand === "function") this.doc.execCommand('redo', false, null);+ },++ edit: function (element) {+ if (!element || typeof element.setAttribute !== "function") return;+ //finish any previous session so only one element stays editable+ if (this.isActive && this.element && this.element !== element) {+ this.destroy();+ }element.setAttribute("contenteditable", true);- element.setAttribute("spellcheckker", false);- document.getElementById("wysiwyg-editor").style.display = "block";+ element.setAttribute("spellcheck", false);+ let toolbar = document.getElementById("wysiwyg-editor");+ if (toolbar && toolbar.style) toolbar.style.display = "block";this.element = element;this.isActive = true;this.oldValue = element.innerHTML;- document.getElementById("font-family").value = Vvveb.StyleManager.getStyle(element,'font-family');- document.getElementById("fore-color").value = Vvveb.StyleManager.getStyle(element,'color');- document.getElementById("back-color").value = Vvveb.StyleManager.getStyle(element,'background-color');- element.focus();+ let setVal = function (id, value) {+ let node = document.getElementById(id);+ if (node) node.value = value ?? "";+ };+ setVal("font-family", Vvveb.StyleManager.getStyle(element, 'font-family'));+ setVal("fore-color", Vvveb.StyleManager.getStyle(element, 'color'));+ setVal("back-color", Vvveb.StyleManager.getStyle(element, 'background-color'));+ if (typeof element.focus === "function") {+ try { element.focus(); } catch (e) {}+ }},- destroy: function(element) {- element.removeAttribute("contenteditable");- element.removeAttribute("spellcheckker");-- document.getElementById("wysiwyg-editor").style.display = "none";+ destroy: function (element) {+ element = element || this.element;+ let toolbar = document.getElementById("wysiwyg-editor");+ if (toolbar && toolbar.style) toolbar.style.display = "none";this.isActive = false;--- node = this.element;- Vvveb.Undo.addMutation({type:'characterData',- target: node,- oldValue: this.oldValue,- newValue: node.innerHTML});+ if (this.element === element) this.element = null;+ if (!element || typeof element.removeAttribute !== "function") return;+ element.removeAttribute("contenteditable");+ element.removeAttribute("spellcheck");++ let newValue = "";+ try { newValue = element.innerHTML; } catch (e) {}+ //don't pollute the undo stack (and "unsaved changes" prompt) when nothing changed+ if (newValue === this.oldValue) return;+ Vvveb.Undo.addMutation({+ type: 'characterData',+ target: element,+ oldValue: this.oldValue,+ newValue: newValue+ });}}-+Vvveb.Builder = {- component : {},- dragMoveMutation : false,- isPreview : false,- runJsOnSetHtml : false,- designerMode : false,- highlightEnabled : false,+ component: {},+ iframe: null,+ dragMoveMutation: false,+ isPreview: false,+ runJsOnSetHtml: false,+ designerMode: false,+ highlightEnabled: false,selectPadding: 0,leftPanelWidth: 275,ignoreClasses: ["clearfix", "masonry", "has-shadow"],-- init: function(url, callback) {++ _chrome: {},++ _$: function (id) {+ return this._chrome[id] ?? (this._chrome[id] = document.getElementById(id));+ },++ _setDisplay: function (id, value) {+ let el = this._$(id);+ if (el) el.style.display = value;+ },++ _showChrome: function () {+ this._setDisplay("section-actions", "");+ this._setDisplay("highlight-name", "");+ this._setDisplay("select-box", "");+ },++ _hideChrome: function () {+ this._setDisplay("section-actions", "none");+ this._setDisplay("highlight-name", "none");+ this._setDisplay("select-box", "none");+ },++ _componentHtml: function (component) {+ if (!component || !component.html) return "";+ //replace every placeholder so dropping the same component twice can't duplicate ids+ return component.html.replaceAll('RANDOM_ID', Math.floor(Math.random() * 100000));+ },++ init: function (url, callback) {let self = this;-+self.loadControlGroups();self.loadBlockGroups();self.loadSectionGroups();self.loadStylesGroups();-+self.selectedEl = null;self.highlightEl = null;self.initCallback = callback;-+self.documentFrame = document.querySelector("#iframe-wrapper > iframe");self.canvas = document.getElementById("canvas");-+if (!url) {url = 'about:blank';}- self._loadIframe(url + (url.indexOf('?') > -1 ? '&r=':'?r=') + Math.random());-+ self._loadIframe(url + (url.indexOf('?') > -1 ? '&r=' : '?r=') + Math.random());+self._initDragdrop();-+self._initBox();self.dragElement = null;-+self.highlightEnabled = true;-+self.leftPanelWidth = document.getElementById("left-panel").clientWidth;},--/* controls */- loadControlGroups : function() {- let componentsList = document.querySelectorAll(".components-list");- let item = {}, component = {};+ /* controls */++ _loadGroupList: function (listSelector, groups, registry, headSuffix, dragType = "", isComponent = false) {+ let lists = document.querySelectorAll(listSelector);let count = 0;-- componentsList.forEach(function (list, i) {++ lists.forEach(function (list) {let type = list.dataset.type;list.replaceChildren();- count ++;+ count++;- for (group in Vvveb.ComponentsGroup) {-- list.append(generateElements(- `<li class="header" data-section="${group}" data-search="">- <label class="header" for="${type}_comphead_${group}${count}">+ for (let group in groups) {+ let headerItem = generateElements(`+ <li class="header" data-section="${group}" data-search="">+ <label class="header" for="${type}_${headSuffix}_${group}${headSuffix == 'comphead' ? count : ''}">${group}<div class="header-arrow"></div></label>- <input class="header_check" type="checkbox" checked="true" id="${type}_comphead_${group}${count}">+ <input class="header_check" type="checkbox" checked="true" id="${type}_${headSuffix}_${group}${headSuffix == 'comphead' ? count : ''}"><ol></ol>- </li>`)[0]);-- //list.append('<li class="header clearfix" data-section="' + group + '" data-search=""><label class="header" for="' + type + '_comphead_' + group + count + '">' + group + ' <div class="header-arrow"></div>\- // </label><input class="header_check" type="checkbox" checked="true" id="' + type + '_comphead_' + group + count + '"> <ol></ol></li>');+ </li>`)[0];- let componentsSubList = list.querySelector('li[data-section="' + group + '"] ol');-- components = Vvveb.ComponentsGroup[ group ];-- for (i in components) {- const componentType = components[i];- component = Vvveb.Components.get(componentType);-- if (component) {- item = generateElements(`<li data-section="${group}" data-drag-type="component" data-type="${componentType}" data-search="${component.name.toLowerCase()}">- <span>${component.name}</span>- </li>`)[0];+ list.append(headerItem);- if (component.image) {+ //use the created element directly instead of re-querying by a selector+ //string that breaks when the group name contains quotes or special chars+ let subList = headerItem.querySelector('ol');+ const items = groups[group];- item.style.backgroundImage = "url(" + Vvveb.imgBaseUrl + component.image + ")";- item.style.backgroundRepeat = "no-repeat";- }-- componentsSubList.append(item);- }- }- }- });- },-- loadSectionGroups : function() {-- let sectionsList = document.querySelectorAll(".sections-list");- let item = {};+ for (const itemType of items) {+ const item = registry.get(itemType);- sectionsList.forEach(function (list, i) {- let type = list.dataset.type;- list.replaceChildren();+ if (!item) continue;- for (group in Vvveb.SectionsGroup) {- list.append(generateElements(- `<li class="header" data-section="${group}" data-search="">- <label class="header" for="${type}_sectionhead_${group}">- ${group}<div class="header-arrow"></div>- </label>- <input class="header_check" type="checkbox" checked="true" id="${type}_sectionhead_${group}">- <ol></ol>- </li>`)[0]);+ let dragAttr = dragType ? ` data-drag-type="${dragType}"` : '';+ let li;- let sectionsSubList = list.querySelector('li[data-section="' + group + '"] ol');- let sections = Vvveb.SectionsGroup[ group ];+ if (isComponent) {+ li = generateElements(`<li data-section="${group}"${dragAttr} data-type="${itemType}" data-search="${item.name.toLowerCase()}">+ <span>${item.name}</span>+ </li>`)[0];- for (i in sections) {- const sectionType = sections[i];- const section = Vvveb.Sections.get(sectionType);-- if (section) {- item = generateElements(`<li data-section="${group}" data-drag-type="section" data-type="${sectionType}" data-search="${section.name.toLowerCase()}">- <span class="name">${section.name}</span>- <div class="add-section-btn" title="Add section"><i class="la la-plus"></i></div>+ if (item.image) {+ li.style.backgroundImage = "url(" + Vvveb.imgBaseUrl + item.image + ")";+ li.style.backgroundRepeat = "no-repeat";+ }+ } else {+ let addBtn = (dragType === 'section')+ ? `<div class="add-section-btn" title="Add section"><svg class="svg-icon" aria-hidden="true"><use href="/admin/default/img/icons.svg#plus"></use></svg></div>`+ : '';+ li = generateElements(`<li data-section="${group}"${dragAttr} data-type="${itemType}" data-search="${item.name.toLowerCase()}">+ <span class="name">${item.name}</span>${addBtn}<img class="preview" src="" loading="lazy"></li>`)[0];- if (section.image) {-- let image = ((section.image.indexOf('/') == -1) ? Vvveb.imgBaseUrl:'') + section.image;- item.querySelector("img").setAttribute("src", image);+ if (item.image) {+ let image = ((item.image.indexOf('/') == -1) ? Vvveb.imgBaseUrl : '') + item.image;+ li.querySelector("img").setAttribute("src", image);}-- sectionsSubList.append(item)}++ subList.append(li);}}});- },-- loadBlockGroups : function() {+ },- let blocksList = document.querySelectorAll(".blocks-list");- let item = {};+ loadControlGroups: function () {+ this._loadGroupList(".components-list", Vvveb.ComponentsGroup, Vvveb.Components, "comphead", "component", true);+ },- blocksList.forEach(function (list, i) {- let type = list.dataset.type;- list.replaceChildren();+ loadSectionGroups: function () {+ this._loadGroupList(".sections-list", Vvveb.SectionsGroup, Vvveb.Sections, "sectionhead", "section");+ },- for (group in Vvveb.BlocksGroup) {- list.append(generateElements(- `<li class="header" data-section="${group}" data-search="">- <label class="header" for="${type}_blockhead_${group}">- ${group}<div class="header-arrow"></div>- </label>- <input class="header_check" type="checkbox" checked="true" id="${type}_blockhead_${group}">- <ol></ol>- </li>`)[0]);+ loadBlockGroups: function () {+ this._loadGroupList(".blocks-list", Vvveb.BlocksGroup, Vvveb.Blocks, "blockhead", "block");+ },- let blocksSubList = list.querySelector('li[data-section="' + group + '"] ol');- blocks = Vvveb.BlocksGroup[ group ];+ loadStylesGroups: function () {+ this._loadGroupList(".styles-list", Vvveb.StylesGroup, Vvveb.Styles, "stylehead");+ },- for (i in blocks) {- const blockType = blocks[i];- const block = Vvveb.Blocks.get(blockType);-- if (block) {- item = generateElements(`<li data-section="${group}" data-drag-type="block" data-type="${blockType}" data-search="${block.name.toLowerCase()}">- <span class="name">${block.name}</span>- <img class="preview" src="" loading="lazy">- </li>`)[0];+ loadUrl: function (url, callback) {+ let self = this;+ self._setDisplay("select-box", "none");- if (block.image) {+ self.initCallback = callback;+ if (!Vvveb.Builder.iframe || Vvveb.Builder.iframe.src == url) {+ //no load event will fire, run the callback directly instead of dropping it+ if (callback) callback();+ return;+ }+ Vvveb.Builder.iframe.src = url;+ },- let image = ((block.image.indexOf('/') == -1) ? Vvveb.imgBaseUrl:'') + block.image;- item.querySelector("img").setAttribute("src", image);- }-- blocksSubList.append(item);- }- }- }- });- },-- loadStylesGroups : function() {+ /* iframe */+ _loadIframe: function (url) {- let stylesList = document.querySelectorAll(".styles-list");- let item = {};+ let self = this;+ if (!this.documentFrame) return;+ self.iframe = this.documentFrame;+ self.iframe.src = url;- stylesList.forEach(function (list, i) {- let type = list.dataset.type;- list.replaceChildren();+ //attach the load handler only once so repeated _loadIframe calls don't stack listeners+ if (self._iframeLoadListenerAttached) return;+ self._iframeLoadListenerAttached = true;- for (group in Vvveb.StylesGroup) {- list.append(generateElements(- `<li class="header" data-section="${group}" data-search="">- <label class="header" for="${type}_stylehead_${group}">- ${group}<div class="header-arrow"></div>- </label>- <input class="header_check" type="checkbox" checked="true" id="${type}_stylehead_${group}">- <ol></ol>- </li>`)[0]);+ return this.documentFrame.addEventListener("load", function () {+ window.FrameWindow = self.iframe.contentWindow;+ window.FrameDocument = self.iframe.contentWindow.document;+ let addSectionBox = self._$("add-section-box");+ let highlightBox = self._$("highlight-box");+ let SelectBox = self._$("select-box");- let stylesSubList = list.querySelector('li[data-section="' + group + '"] ol');- styles = Vvveb.StylesGroup[ group ];+ highlightBox.style.display = "none";- for (i in styles) {- const styleType = styles[i];- const style = Vvveb.Styles.get(styleType);-- if (style) {- item = generateElements(`<li data-section="${group}" data-type="${styleType}" data-search="${style.name.toLowerCase()}">- <span class="name">${style.name}</span>- <img class="preview" src="" loading="lazy">- </li>`)[0];- if (style.image) {+ window.FrameWindow.addEventListener("beforeunload", function (event) {+ if (Vvveb.Undo.undoIndex >= 0) {+ let dialogText = "You have unsaved changes";+ event.returnValue = dialogText;+ return dialogText;+ }+ });- let image = ((style.image.indexOf('/') == -1) ? Vvveb.imgBaseUrl:'') + style.image;- item.querySelector("img").setAttribute("src", image);- }-- stylesSubList.append(item);- }+ window.FrameWindow.addEventListener("unload", function (event) {+ document.querySelector(".loading-message").classList.add("active");+ Vvveb.Undo.reset();+ });++ //prevent accidental clicks on links when editing text+ window.FrameDocument.addEventListener("click", function (event) {+ if (Vvveb.WysiwygEditor.isActive && event.target.closest("a")) {+ event.preventDefault();+ return false;+ }+ });++ const selectBoxPosition = function (event) {+ let target = self.selectedEl;++ highlightBox.style.display = "none";++ if (target) {+ self._positionSelectBox(target, false);}}++ window.FrameWindow.addEventListener("scroll", selectBoxPosition);+ window.FrameWindow.addEventListener("resize", selectBoxPosition);++ Vvveb.WysiwygEditor.init(window.FrameDocument);+ Vvveb.StyleManager.init(window.FrameDocument);+ Vvveb.ColorPaletteManager.init(window.FrameDocument);++ if (self.initCallback) self.initCallback();++ return self._frameLoaded();});- },-- loadUrl : function(url, callback) {- let self = this;- document.getElementById("select-box").style.display = "none";-- self.initCallback = callback;- if (Vvveb.Builder.iframe.src != url) Vvveb.Builder.iframe.src = url;- },--/* iframe */- _loadIframe : function(url) {- let self = this;- self.iframe = this.documentFrame;- self.iframe.src = url;+ },- return this.documentFrame.addEventListener("load", function() {- window.FrameWindow = self.iframe.contentWindow;- window.FrameDocument = self.iframe.contentWindow.document;- let addSectionBox = document.getElementById("add-section-box");- let highlightBox = document.getElementById("highlight-box");- let SelectBox = document.getElementById("select-box");-- highlightBox.style.display = "none";-+ _frameLoaded: function () {- window.FrameWindow.addEventListener("beforeunload", function(event) {- if (Vvveb.Undo.undoIndex >= 0) {- let dialogText = "You have unsaved changes";- event.returnValue = dialogText;- return dialogText;- }- });-- window.FrameWindow.addEventListener("unload", function(event) {- document.querySelector(".loading-message").classList.add("active");- Vvveb.Undo.reset();- });-- //prevent accidental clicks on links when editing text- window.FrameDocument.addEventListener("click", function(event) {- if (Vvveb.WysiwygEditor.isActive && event.target.closest("a")) {- event.preventDefault();- return false;- }- });-- selectBoxPosition = function(event) {- let pos;- let target = self.selectedEl;// ?? self.highlightEl;-- highlightBox.style.display = "none";-- if (target) {- pos = offset(target);-- SelectBox.style.top = (pos.top - (self.frameDoc.scrollTop ?? 0) - self.selectPadding) + "px";- SelectBox.style.left = (pos.left - (self.frameDoc.scrollLeft ?? 0) - self.selectPadding) + "px";-- SelectBox.style.width = ((target.offsetWidth ?? target.clientWidth) + self.selectPadding * 2) + "px";- SelectBox.style.height = ((target.offsetHeight ?? target.clientHeight) + self.selectPadding * 2) + "px";- }- }-- window.FrameWindow.addEventListener("scroll", selectBoxPosition);- window.FrameWindow.addEventListener("resize", selectBoxPosition);-- Vvveb.WysiwygEditor.init(window.FrameDocument);- Vvveb.StyleManager.init(window.FrameDocument);- Vvveb.ColorPaletteManager.init(window.FrameDocument);-- if (self.initCallback) self.initCallback();-- return self._frameLoaded();- });-- },-- _frameLoaded : function() {-let self = Vvveb.Builder;-- self.frameDoc = window.FrameDocument;++ self.frameDoc = window.FrameDocument;self.frameHtml = window.FrameDocument.querySelector("html");self.frameBody = window.FrameDocument.querySelector("body");self.frameHead = window.FrameDocument.querySelector("head");-+//insert editor helpers like non editable areasself.frameHead.append(generateElements('<link data-vvveb-helpers href="' + Vvveb.baseUrl + '../../css/vvvebjs-editor-helpers.css" rel="stylesheet">')[0]);- self.frameHtml.setAttribute("data-vvvebjs-editor","");+ self.frameHtml.setAttribute("data-vvvebjs-editor", "");self._initHighlight();-- window.dispatchEvent(new CustomEvent("vvveb.iframe.loaded", {detail: self.frameDoc}));++ window.dispatchEvent(new CustomEvent("Vvveb.iframe.loaded", { detail: self.frameDoc }));document.querySelector(".loading-message").classList.remove("active");- Vvveb.NewSection.init();+ //Vvveb.NewSection.init();Vvveb.StyleList.load(self.frameDoc);-+//enable save button only if changes are made- let setSaveButtonState = function (e) {- if (Vvveb.Undo.hasChanges()){+ let setSaveButtonState = function (e) {+ if (Vvveb.Undo.hasChanges()) {document.querySelectorAll("#top-panel .save-btn").forEach(e => e.removeAttribute("disabled"));} else {document.querySelectorAll("#top-panel .save-btn").forEach(e => e.setAttribute("disabled", "true"));}- };-- Vvveb.Builder.frameBody.addEventListener("vvveb.undo.add", setSaveButtonState);- Vvveb.Builder.frameBody.addEventListener("vvveb.undo.restore", setSaveButtonState);- },-- _getElementType: function(el) {-+ };++ Vvveb.Builder.frameBody.addEventListener("Vvveb.undo.add", setSaveButtonState);+ Vvveb.Builder.frameBody.addEventListener("Vvveb.undo.restore", setSaveButtonState);+ },++ _getElementType: function (el) {+ if (!el) return ["", ""];+//search for component attribute- let componentName = '';- let componentAttribute = '';-+ let componentName = '';+ let componentAttribute = '';+if (el.attributes) {- for (let j = 0; j < el.attributes.length; j++){- let nodeName = el.attributes[j].nodeName;-- if (nodeName.indexOf('data-component') > -1) {- componentName = nodeName.replace('data-component-', '');- return [componentName, "component"];- }-- if (nodeName.indexOf('data-v-component-') > -1) {- componentName = nodeName.replace('data-v-component-', '');- return [componentName,"component"];- }-- if (nodeName.indexOf('data-v-') > -1) {- componentAttribute = (componentAttribute ? componentAttribute + " - " : "") +- nodeName.replace('data-v-', '') + " ";- }+ for (let j = 0; j < el.attributes.length; j++) {+ let nodeName = el.attributes[j].nodeName;++ if (nodeName.indexOf('data-component') > -1) {+ componentName = nodeName.replace('data-component-', '');+ return [componentName, "component"];+ }++ if (nodeName.indexOf('data-v-component-') > -1) {+ componentName = nodeName.replace('data-v-component-', '');+ return [componentName, "component"];+ }++ if (nodeName.indexOf('data-v-') > -1) {+ componentAttribute = (componentAttribute ? componentAttribute + " - " : "") ++ nodeName.replace('data-v-', '') + " ";+ }}}if (componentAttribute != '') return [componentAttribute, "attribute"];-+if (el.id) {componentName = "#" + el.id;} else {componentName = (el.className && (typeof el.className == "string")) ? "." + el.className.split(" ")[0] : "";}-+return [componentName, el.tagName];},-- loadNodeComponent: function(node) {++ loadNodeComponent: function (node) {const data = Vvveb.Components.matchNode(node);let component;-- if (data)++ if (data)component = data.type;- else+ elsecomponent = Vvveb.defaultComponent;-- Vvveb.component = Vvveb.Components.get(component);++ Vvveb.component = Vvveb.Components.get(component);Vvveb.Components.render(component);this.selectedComponent = component;//if component properties is loaded in left panel tab instead of right panel show tablet propertiesTab = document.querySelector(".component-properties-tab a");- if (propertiesTab.offsetParent) {//if properites tab is enabled/visible- propertiesTab.style.display = "";+ if (propertiesTab && propertiesTab.offsetParent) {//if properites tab is enabled/visible+ propertiesTab.style.display = "";+ if (typeof bootstrap !== "undefined" && bootstrap.Tab) {const bsTab = bootstrap.Tab.getOrCreateInstance(propertiesTab);- bsTab.show();- }+ bsTab.show();+ }+ }},-- reloadComponent: function() {++ reloadComponent: function () {Vvveb.Components.render(this.selectedComponent);},-- moveNodeUp: function(node) {- if (!node) {- node = Vvveb.Builder.selectedEl;- }+ _moveNode: function (node, sibling, placeFn, fallbackFn) {+ if (!node || !node.parentNode) return;const oldParent = node.parentNode;const oldNextSibling = node.nextSibling;- const next = node.previousElementSibling;-- if (next) {- next.before(node);++ if (sibling) {+ placeFn(sibling, node);} else {- node.parentNode.before(node);+ fallbackFn(node);}-+Vvveb.Builder.selectNode(node);- const newParent = node.parentNode;- const newNextSibling = node.nextSibling;-- Vvveb.Undo.addMutation({type: 'move',- target: node,- oldParent: oldParent,- newParent: newParent,- oldNextSibling: oldNextSibling,- newNextSibling: newNextSibling});+ Vvveb.Undo.addMutation({+ type: 'move',+ target: node,+ oldParent: oldParent,+ newParent: node.parentNode,+ oldNextSibling: oldNextSibling,+ newNextSibling: node.nextSibling+ });+ },++ moveNodeUp: function (node) {+ node = node || Vvveb.Builder.selectedEl;+ if (!node) return;+ this._moveNode(+ node,+ node.previousElementSibling,+ (sibling, n) => sibling.before(n),+ (n) => n.parentNode.before(n)+ );},- moveNodeDown: function(node) {- if (!node) {- node = Vvveb.Builder.selectedEl;- }+ moveNodeDown: function (node) {+ node = node || Vvveb.Builder.selectedEl;+ if (!node) return;- const oldParent = node.parentNode;- const oldNextSibling = node.nextSibling;- const next = node.nextElementSibling;-- if (next) {- next.after(node);- } else {- node.parentNode.after(node);- }-- Vvveb.Builder.selectNode(node);-- const newParent = node.parentNode;- const newNextSibling = node.nextSibling;-- Vvveb.Undo.addMutation({type: 'move',- target: node,- oldParent: oldParent,- newParent: newParent,- oldNextSibling: oldNextSibling,- newNextSibling: newNextSibling});+ this._moveNode(+ node,+ node.nextElementSibling,+ (sibling, n) => sibling.after(n),+ (n) => n.parentNode.after(n)+ );},- cloneNode: function(node) {- if (!node) {- node = Vvveb.Builder.selectedEl;- }+ cloneNode: function (node) {+ node = node || Vvveb.Builder.selectedEl;+ if (!node || typeof node.cloneNode !== "function") return;const clone = node.cloneNode(true);- node.after(clone);- node.click();-- Vvveb.Undo.addMutation({type: 'childList',- target: node.parentNode,- addedNodes: [clone],- nextSibling: node.nextSibling});-+ if (typeof node.after === "function") node.after(clone);+ if (typeof node.click === "function") node.click();++ Vvveb.Undo.addMutation({+ type: 'childList',+ target: node.parentNode,+ addedNodes: [clone],+ nextSibling: node.nextSibling+ });+},--- selectNode: function(node) {- let SelectBox = document.getElementById("select-box");-- if (!node) {- SelectBox.style.display = "none";++ _positionSelectBox: function (target, show = true) {+ let self = this;+ let SelectBox = self._$("select-box");++ if (!target || !SelectBox || !self.frameDoc) {+ if (SelectBox) SelectBox.style.display = "none";return;}+ let pos = offset(target);+ let scrollLeft = self.frameDoc.scrollLeft ?? 0;+ let scrollTop = self.frameDoc.scrollTop ?? 0;+ let padding = self.selectPadding;++ SelectBox.style.top = (pos.top - scrollTop - padding) + "px";+ SelectBox.style.left = (pos.left - scrollLeft - padding) + "px";+ SelectBox.style.width = ((target.offsetWidth ?? target.clientWidth) + padding * 2) + "px";+ SelectBox.style.height = ((target.offsetHeight ?? target.clientHeight) + padding * 2) + "px";++ if (show) {+ SelectBox.style.display = "block";+ }+ },++ selectNode: function (node) {let self = this;- let SelectActions = document.getElementById("select-actions");- let AddSectionBtn = document.getElementById("add-section-btn");+ let SelectBox = self._$("select-box");++ if (!node || !SelectBox) {+ if (SelectBox) SelectBox.style.display = "none";+ return;+ }++ let SelectActions = self._$("select-actions");+ let AddSectionBtn = self._$("add-section-btn");let elementType = this._getElementType(node);-+if (self.texteditEl && (self.selectedEl != node)) {Vvveb.WysiwygEditor.destroy(self.texteditEl);self.selectPadding = 0;SelectBox.classList.remove("text-edit");- SelectActions.style.display = "";+ if (SelectActions) SelectActions.style.display = "";self.texteditEl = null;}if (elementType[1] == "BODY") {- SelectActions.style.display = "none";- AddSectionBtn.style.display = "none";+ if (SelectActions) SelectActions.style.display = "none";+ if (AddSectionBtn) AddSectionBtn.style.display = "none";} else {- SelectActions.style.display = "";- AddSectionBtn.style.display = "";+ if (SelectActions) SelectActions.style.display = "";+ if (AddSectionBtn) AddSectionBtn.style.display = "";}let target = node;self.selectedEl = target;try {- let pos = offset(target);- let top = (pos.top - (self.frameDoc.scrollTop ?? 0) - self.selectPadding);-- SelectBox.style.top = top + "px";- SelectBox.style.left = (pos.left - (self.frameDoc.scrollLeft ?? 0) - self.selectPadding) + "px";- SelectBox.style.width = ((target.offsetWidth ?? target.clientWidth) + self.selectPadding * 2) + "px";- SelectBox.style.height = ((target.offsetHeight ?? target.clientHeight) + self.selectPadding * 2) + "px";- SelectBox.style.display = "block";-+ this._positionSelectBox(target);+ let top = parseFloat(SelectBox.style.top);+//move actions toolbar to bottom if there is no space on top- if (top < 30) {- SelectActions.style.top = "unset";- SelectActions.style.bottom = "-25px";- } else {- SelectActions.style.top = "";- SelectActions.style.bottom = "";+ if (SelectActions) {+ if (top < 30) {+ SelectActions.style.top = "unset";+ SelectActions.style.bottom = "-25px";+ } else {+ SelectActions.style.top = "";+ SelectActions.style.bottom = "";+ }}-+Vvveb.Breadcrumb.loadBreadcrumb(target);-- } catch(err) {- console.log(err);++ } catch (err) {+ console.error(err);return false;}-- document.querySelector("#highlight-name .type").innerHTML = elementType[0];- document.querySelector("#highlight-name .name").innerHTML = elementType[1];-- window.dispatchEvent(new CustomEvent("vvveb.Builder.selectNode", {detail: {target}}));++ let typeEl = document.querySelector("#highlight-name .type");+ if (typeEl) typeEl.textContent = elementType[0];+ let nameEl = document.querySelector("#highlight-name .name");+ if (nameEl) nameEl.textContent = elementType[1];++ window.dispatchEvent(new CustomEvent("Vvveb.Builder.selectNode", { detail: { target } }));},-/* iframe highlight */- _initHighlight: function() {-+ /* iframe highlight */+ _initHighlight: function () {+let self = Vvveb.Builder;-- let highlightMove = function(event) {++ if (!self.frameBody || typeof self.frameBody.addEventListener !== "function") return;++ let highlightMoveQueued = false;+ let highlightMoveLastEvent = null;++ let highlightMove = function (event) {+ highlightMoveLastEvent = event;++ if (highlightMoveQueued) return;+ highlightMoveQueued = true;++ requestAnimationFrame(function () {+ highlightMoveQueued = false;+ if (highlightMoveLastEvent) {+ self._highlightMoveProcess(highlightMoveLastEvent);+ highlightMoveLastEvent = null;+ }+ });+ };++ self.frameBody.addEventListener("mousemove", highlightMove);+ self.frameBody.addEventListener("mouseup", function (event) {+ self._highlightUp(event);+ });+ self.frameBody.addEventListener("dblclick", function (event) {+ self._highlightDbClick(event);+ });+ self.frameBody.addEventListener("click", function (event) {+ self._highlightClick(event);+ });++ },++ _highlightMoveProcess: function (event) {+ let self = this;if (self.highlightEnabled == true && event.target/* && isElement(event.target)*/) {- self.highlightEl = target = event.target;+ let target = event.target;+ if (!target || typeof target.getBoundingClientRect !== "function") return;+ self.highlightEl = target;let pos = offset(target);let height = target.offsetHeight;let halfHeight = Math.max(height / 2, 5);let width = target.offsetWidth;let halfWidth = Math.max(width / 2, 5);let prepend = true;-+let x = event.x;let y = event.y;if (self.isResize) {+ if (!self.selectedEl || !self.initialSize) {+ self.isResize = false;+ return;+ }if (!self.initialPosition) {- self.initialPosition = {x,y};+ self.initialPosition = { x, y };}-- let deltaX = x - self.initialPosition.x;- let deltaY = y - self.initialPosition.y;-++ let deltaX = x - self.initialPosition.x;+ let deltaY = y - self.initialPosition.y;+pos = offset(self.selectedEl);-+width = self.initialSize.width;height = self.initialSize.height;-+switch (self.resizeHandler) {// topcase "top-left":- height -= deltaY;- width -= deltaX;- break;-+ height -= deltaY;+ width -= deltaX;+ break;+case "top-center":- height -= deltaY;- break;-+ height -= deltaY;+ break;+case "top-right":- height -= deltaY;- width += deltaX;- break;-+ height -= deltaY;+ width += deltaX;+ break;+// centercase "center-left":- width -= deltaX;- break;-+ width -= deltaX;+ break;+case "center-right":- width += deltaX;- break;-+ width += deltaX;+ break;+// bottomcase "bottom-left":- width -= deltaX;- height += deltaY;- break;-+ width -= deltaX;+ height += deltaY;+ break;+case "bottom-center":- height += deltaY;- break;-+ height += deltaY;+ break;+case "bottom-right":- width += deltaX;- height += deltaY;- break;+ width += deltaX;+ height += deltaY;+ break;}-- if (self.resizeMode == "css") {- self.selectedEl.style.width = width + "px";- self.selectedEl.style.height = height + "px";- } else {- self.selectedEl.setAttribute("width", width);- self.selectedEl.setAttribute("height", height);- }-- let SelectBox = document.getElementById("select-box");- SelectBox.style.top = pos.top - (self.frameDoc.scrollTop ?? 0) + "px";- SelectBox.style.left = pos.left - (self.frameDoc.scrollLeft ?? 0) + "px";- SelectBox.style.width = width + "px";++ if (self.resizeMode == "css") {+ self.selectedEl.style.width = width + "px";+ self.selectedEl.style.height = height + "px";+ } else {+ self.selectedEl.setAttribute("width", width);+ self.selectedEl.setAttribute("height", height);+ }++ let SelectBox = self._$("select-box");+ if (!SelectBox) return;+ SelectBox.style.top = pos.top - (self.frameDoc.scrollTop ?? 0) + "px";+ SelectBox.style.left = pos.left - (self.frameDoc.scrollLeft ?? 0) + "px";+ SelectBox.style.width = width + "px";SelectBox.style.height = self.selectedEl.offsetHeight + "px";SelectBox.style.display = "block";-- } else if (self.isDragging) {- let noChildren = {- input: true,- textarea: true,- img: true,- svg: true,- iframe: true,- embed: true,- col: true,- area: true,- hr: true,- br: true,- wbr: true- };+ } else if (self.isDragging) {let parent = self.highlightEl;+ if (!parent || typeof parent.getBoundingClientRect !== "function") return;- let isBlock = (window.getComputedStyle(parent).display == "block");+ let isBlock = false;+ try {+ isBlock = (window.getComputedStyle(parent).display == "block");+ } catch (e) {}+ //sections only behave as childless for section drags, don't mutate the shared table+ let noChildrenTags = NO_CHILDREN_TAGS;if (self.dragType == "section") {- let closest = parent.closest("section, header, footer, body");+ let closest = (typeof parent.closest === "function") ? parent.closest("section, header, footer, body") : null;if (closest) {parent = closest;}- noChildren.section = true;+ noChildrenTags = { ...NO_CHILDREN_TAGS, section: true };}- let parentTagName = parent.tagName.toLowerCase();+ let parentTagName = (parent.tagName || "").toLowerCase();let isVattribute = false;//check if node is a data-v-attribute dynamic node that will override the content if added inside- if (parent.childElementCount == 0) {+ if (parent.childElementCount == 0 && parent.attributes) {for (let attr of parent.attributes) {if (attr.name.startsWith("data-v-") && !attr.name.startsWith("data-v-component-")) {isVattribute = true;@@ -1553,234 +1719,259 @@ Vvveb.Builder = {}}}-- try {- if ((pos.top < (y - halfHeight)) || (pos.left < (x - halfWidth))) {- if (noChildren[parentTagName] || isBlock || isVattribute) {- parent.after(self.dragElement);- } else {- if (parent == self.dragElement.parenNode) {- parent.appendChild(self.dragElement);- } else {- parent.append(self.dragElement);- }- }- prepend = true;+ try {+ if ((pos.top < (y - halfHeight)) || (pos.left < (x - halfWidth))) {+ if (noChildrenTags[parentTagName] || isBlock || isVattribute) {+ parent.after(self.dragElement);} else {- if (noChildren[parentTagName] || isBlock || isVattribute) {- parent.parentNode.insertBefore(self.dragElement, parent);+ if (parent == self.dragElement.parentNode) {+ parent.appendChild(self.dragElement);} else {- parent.prepend(self.dragElement);+ parent.append(self.dragElement);}+ }- prepend = false;- };-- if (self.designerMode) {- let parentOffset = offset(self.dragElement.offsetParent);- self.dragElement.style.position = "absolute";- self.dragElement.style.x = x - (parentOffset.left - self.frameDoc.scrollLeft);- self.dragElement.style.y = y - (parentOffset.top - self.frameDoc.scrollTop);+ prepend = true;+ } else {+ if (noChildrenTags[parentTagName] || isBlock || isVattribute) {+ parent.parentNode.insertBefore(self.dragElement, parent);+ } else {+ parent.prepend(self.dragElement);}-- } catch(err) {- console.log(err);++ prepend = false;+ };++ if (self.designerMode && self.dragElement) {+ let parentOffset = self.dragElement.offsetParent ? offset(self.dragElement.offsetParent) : { left: 0, top: 0 };+ self.dragElement.style.position = "absolute";+ self.dragElement.style.x = x - (parentOffset.left - self.frameDoc.scrollLeft);+ self.dragElement.style.y = y - (parentOffset.top - self.frameDoc.scrollTop);+ }++ } catch (err) {+ console.error(err);return false;}-+if (!self.designerMode && self.iconDrag) {- self.iconDrag.style.top = (y + 60) + "px";- self.iconDrag.style.left = (x + self.leftPanelWidth + 10) + "px";+ self.iconDrag.style.top = (y + 60) + "px";+ self.iconDrag.style.left = (x + self.leftPanelWidth + 10) + "px";}}// else //uncomment else to disable parent highlighting when dragging{//if text editor is open check if the highlighted element is not inside the editor- if (Vvveb.WysiwygEditor.isActive ) {- if (self.texteditEl.contains(event.target)) {+ if (Vvveb.WysiwygEditor.isActive) {+ if (self.texteditEl && typeof self.texteditEl.contains === "function" && self.texteditEl.contains(event.target)) {return true;}}-- document.getElementById("highlight-box").setAttribute("style",++ let highlightBox = self._$("highlight-box");+ if (!highlightBox) return;+ highlightBox.setAttribute("style",`top:${pos.top - (self.frameDoc.scrollTop ?? 0)}px;left:${pos.left - (self.frameDoc.scrollLeft ?? 0)}px;width:${width}px;height:${height}px;- display:${event.target.hasAttribute('contenteditable') ? "none":"block"};- border:${self.isDragging ? "1px dashed #0d6efd":""};+ display:${event.target.hasAttribute('contenteditable') ? "none" : "block"};+ border:${self.isDragging ? "1px dashed #0d6efd" : ""};`);- if (height < 50) {- document.getElementById("section-actions").classList.add("outside");- } else {- document.getElementById("section-actions").classList.remove("outside");+ let sectionActions = self._$("section-actions");+ if (sectionActions) {+ if (height < 50) {+ sectionActions.classList.add("outside");+ } else {+ sectionActions.classList.remove("outside");+ }}let elementType = self._getElementType(event.target);- document.querySelector("#highlight-name .type").innerHTML = elementType[0];- document.querySelector("#highlight-name .name").innerHTML = elementType[1];+ let hlType = document.querySelector("#highlight-name .type");+ if (hlType) hlType.textContent = elementType[0];+ let hlName = document.querySelector("#highlight-name .name");+ if (hlName) hlName.textContent = elementType[1];}- }-- };-- self.frameBody.addEventListener("mousemove", highlightMove);-- let highlightUp = function(event) {+ }++ },++ /**+ * Handles mouseup on the frame: finishes resize/drag operations, swaps in+ * real component html, records undo mutations, and selects the dropped node.+ */+ _highlightUp: function (event) {+ let self = this;self.isResize = false;- document.querySelectorAll("#section-actions, #highlight-name").forEach(el => el.style.display = "");+ self._setDisplay("section-actions", "");+ self._setDisplay("highlight-name", "");if (self.isDragging) {self.isDragging = false;Vvveb.Builder.highlightEnabled = true;if (self.iconDrag) self.iconDrag.remove();document.getElementById("component-clone")?.remove();- if (self.dragMoveMutation === false) {- if (self.component.dragHtml || Vvveb.dragHtml) { //if dragHtml is set for dragging then set real component html- if (self.component) {- let html = self.component.html.replace('RANDOM_ID', Math.floor(Math.random() * 1000));- newElement = generateElements(html)[0];- self.dragElement.replaceWith(newElement);- self.dragElement = newElement;+ if (self.dragMoveMutation === false) {+ if ((self.component && self.component.dragHtml) || Vvveb.dragHtml) { //if dragHtml is set for dragging then set real component html+ if (self.component && self.dragElement) {+ //component may lack html (eg. icon-only drag) - fall back to the drag placeholder+ let html = self._componentHtml(self.component) || Vvveb.dragHtml;+ const newElement = generateElements(html)[0];+ if (newElement) {+ self.dragElement.replaceWith(newElement);+ self.dragElement = newElement;+ }}- }-- if (self.component.afterDrop) self.dragElement = self.component.afterDrop(self.dragElement);+ }++ if (self.component && self.component.afterDrop && self.dragElement) self.dragElement = self.component.afterDrop(self.dragElement);} else {- self.selectedEl.classList.remove("is-dragged");- self.dragElement.replaceWith(self.selectedEl);+ if (self.selectedEl && self.selectedEl.classList) self.selectedEl.classList.remove("is-dragged");+ if (self.dragElement && self.selectedEl) self.dragElement.replaceWith(self.selectedEl);self.dragElement = self.selectedEl;}const node = self.dragElement;+ if (!node) {+ self.isDragging = false;+ return;+ }self.selectNode(node);Vvveb.TreeList.loadComponents();Vvveb.TreeList.selectComponent(node);Vvveb.Server.renderComponents(node);self.loadNodeComponent(node);-+if (self.dragType == "section") {- node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ node.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });}if (self.dragMoveMutation === false) {- Vvveb.Undo.addMutation({type: 'childList',- target: node.parentNode,- addedNodes: [node],- nextSibling: node.nextSibling});+ Vvveb.Undo.addMutation({+ type: 'childList',+ target: node.parentNode,+ addedNodes: [node],+ nextSibling: node.nextSibling+ });} else {self.dragMoveMutation.newParent = node.parentNode;self.dragMoveMutation.newNextSibling = node.nextSibling;-+Vvveb.Undo.addMutation(self.dragMoveMutation);self.dragMoveMutation = false;}}- };-- self.frameBody.addEventListener("mouseup", highlightUp);+ },++ /**+ * Handles double-click on the frame: enters inline text editing via the+ * WYSIWYG editor and wires up select-box tracking listeners.+ */+ _highlightDbClick: function (event) {+ let self = this;- let highlightDbClick = function(event) {-if (Vvveb.Builder.isPreview == false && Vvveb.Builder.highlightEnabled) {-- if (!Vvveb.WysiwygEditor.isActive) {++ if (!Vvveb.WysiwygEditor.isActive && event.target && typeof event.target.addEventListener === "function") {self.selectPadding = 10;- self.texteditEl = target = event.target;+ let target = event.target;+ self.texteditEl = target;Vvveb.WysiwygEditor.edit(self.texteditEl);-- _updateSelectBox = function(event) {- if (!self.texteditEl) return;- let pos = offset(self.selectedEl);- let SelectBox = document.getElementById("select-box");-- SelectBox.style.top = (pos.top - (self.frameDoc.scrollTop ?? 0) - self.selectPadding) + "px";- SelectBox.style.left = (pos.left - (self.frameDoc.scrollLeft ?? 0) - self.selectPadding) + "px";- SelectBox.style.width = (self.texteditEl.offsetWidth + (self.selectPadding * 2)) + "px";- SelectBox.style.height = (self.texteditEl.offsetHeight + (self.selectPadding * 2)) + "px";- SelectBox.style.display = "block";+ const _updateSelectBox = function (event) {+ if (!self.texteditEl) return;+ self._positionSelectBox(self.texteditEl);};-+//update select box when the text size is changed- self.texteditEl.addEventListener("blur", _updateSelectBox);- self.texteditEl.addEventListener("keyup", _updateSelectBox);- self.texteditEl.addEventListener("paste", _updateSelectBox);- self.texteditEl.addEventListener("input", _updateSelectBox);- _updateSelectBox();-- document.getElementById("select-box").classList.add("text-edit")- document.getElementById("select-actions").style.display = "none";- document.getElementById("highlight-box").style.display = "none";+ self.texteditEl.addEventListener("blur", _updateSelectBox);+ self.texteditEl.addEventListener("keyup", _updateSelectBox);+ self.texteditEl.addEventListener("paste", _updateSelectBox);+ self.texteditEl.addEventListener("input", _updateSelectBox);+ _updateSelectBox();++ self._$("select-box").classList.add("text-edit")+ self._$("select-actions").style.display = "none";+ self._$("highlight-box").style.display = "none";}- }- };-- self.frameBody.addEventListener("dblclick", highlightDbClick);-- let highlightClick = function(event) {-- if (Vvveb.Builder.isPreview == false && Vvveb.Builder.highlightEnabled){+ }+ },++ /**+ * Handles click on the frame: selects the clicked node, loads its component+ * properties, and toggles resize handles when supported.+ */+ _highlightClick: function (event) {+ let self = this;++ if (Vvveb.Builder.isPreview == false && Vvveb.Builder.highlightEnabled) {if (event.target) {- if (Vvveb.WysiwygEditor.isActive ) {- if (self.texteditEl.contains(event.target)) {+ if (Vvveb.WysiwygEditor.isActive) {+ if (self.texteditEl && typeof self.texteditEl.contains === "function" && self.texteditEl.contains(event.target)) {return true;}}-+self.selectNode(event.target);Vvveb.TreeList.selectComponent(event.target);self.loadNodeComponent(event.target);- if (Vvveb.component.resizable) {- document.getElementById("select-box").classList.add("resizable");- self.resizeMode = Vvveb.component.resizeMode;+ let selectBox = self._$("select-box");+ if (Vvveb.component && Vvveb.component.resizable) {+ if (selectBox) selectBox.classList.add("resizable");+ self.resizeMode = Vvveb.component.resizeMode;} else {- document.getElementById("select-box").classList.remove("resizable");+ if (selectBox) selectBox.classList.remove("resizable");}-- document.getElementById("add-section-box").style.display = "none";++ self._setDisplay("add-section-box", "none");event.preventDefault();return false;- }- }-- };-- self.frameBody.addEventListener("click", highlightClick);-+ }+ }+},-- _initBox: function() {++ _initBox: function () {let self = this;-- document.getElementById("drag-btn").addEventListener("mousedown", function(event) {++ //builder skins may omit buttons, guard so one missing button can't break the rest+ let on = function (id, evt, fn) {+ let btn = document.getElementById(id);+ if (btn) btn.addEventListener(evt, fn);+ };++ on("drag-btn", "mousedown", function (event) {//self.dragElement = self.selectedEl.setAttribute("style",Vvveb.dragElementStyle);if (event.which == 1) {//left click+ if (!self.selectedEl) return false;self.isDragging = true;- document.querySelectorAll("#section-actions, #highlight-name, #select-box").forEach(el => el.style.display = "");--+ self._showChrome();++if (self.designerMode) {self.dragElement = self.selectedEl;} else {- self.selectedEl.style.position = "";- self.selectedEl.style.top = "";- self.selectedEl.style.left = "";+ self.selectedEl.style.position = "";+ self.selectedEl.style.top = "";+ self.selectedEl.style.left = "";self.selectedEl.classList.add("is-dragged");self.dragElement = generateElements(Vvveb.dragHtml)[0];}- const node = self.selectedEl;+ const node = self.selectedEl;++ self.dragMoveMutation = {+ type: 'move',+ target: node,+ oldParent: node.parentNode,+ oldNextSibling: node.nextSibling+ };- self.dragMoveMutation = {type: 'move',- target: node,- oldParent: node.parentNode,- oldNextSibling: node.nextSibling};-//self.selectNode(false);event.preventDefault();return false;@@ -1788,12 +1979,14 @@ Vvveb.Builder = {});- let resizeDown = function(event) {+ let resizeDown = function (event) {if (event.which == 1) {//left click- document.querySelector("#section-actions, #highlight-name, #highlight-box").style.display = "none";-+ if (!self.selectedEl) return false;+ let hideEl = document.querySelectorAll("#section-actions, #highlight-name, #highlight-box");+ if (hideEl) hideEl.forEach(e => e.style.display = "none");+self.isResize = true;- self.initialSize = {"width" : self.selectedEl.offsetWidth, "height" : self.selectedEl.offsetHeight};+ self.initialSize = { "width": self.selectedEl.offsetWidth, "height": self.selectedEl.offsetHeight };self.initialPosition = false;self.resizeHandler = this.className;@@ -1801,236 +1994,261 @@ Vvveb.Builder = {return false;}};-+document.querySelectorAll(".resize > div").forEach(e => e.addEventListener("mousedown", resizeDown));- document.getElementById("down-btn").addEventListener("click", function(event) {+ on("down-btn", "click", function (event) {- document.getElementById("select-box").style.display = "none";+ self._setDisplay("select-box", "none");Vvveb.Builder.moveNodeDown();event.preventDefault();return false;});-- document.getElementById("up-btn").addEventListener("click", function(event) {- document.getElementById("select-box").style.display = "none";++ on("up-btn", "click", function (event) {+ self._setDisplay("select-box", "none");Vvveb.Builder.moveNodeUp();event.preventDefault();return false;});-- document.getElementById("clone-btn").addEventListener("click", function(event) {-++ on("clone-btn", "click", function (event) {+Vvveb.Builder.cloneNode();-+event.preventDefault();return false;});-- document.getElementById("parent-btn").addEventListener("click", function(event) {-- const node = self.selectedEl.parentNode;-++ on("parent-btn", "click", function (event) {++ const node = self.selectedEl && self.selectedEl.parentNode;+ if (!node) {+ event.preventDefault();+ return false;+ }+self.selectNode(node);self.loadNodeComponent(node);Vvveb.TreeList.selectComponent(node);-+event.preventDefault();return false;- });-- document.getElementById("save-reusable-btn").addEventListener("click", function(event) {-+ });++ on("save-reusable-btn", "click", function (event) {+const node = self.selectedEl;+ if (!node || !node.tagName) {+ event.preventDefault();+ return false;+ }let type = 'block';if (node.tagName.toLowerCase() == 'section') {type = 'section';}-+const name = prompt("Enter name for new reusable " + type, '');if (name) {Vvveb.Builder.saveElement(node, type, name);}-+event.preventDefault();return false;});-+let codeEditorOldValue;- document.getElementById("edit-code-btn").addEventListener("click", function(event) {+ on("edit-code-btn", "click", function (event) {+ if (!Vvveb.Builder.selectedEl) {+ event.preventDefault();+ return false;+ }let value = Vvveb.Builder.selectedEl.innerHTML;Vvveb.ModalCodeEditor.show();Vvveb.ModalCodeEditor.setValue(value);-+codeEditorOldValue = value;event.preventDefault();return false;});- let onSave = function(event) {+ let onSave = function (event) {+ if (!Vvveb.Builder.selectedEl) return;Vvveb.Builder.selectedEl.innerHTML = event.detail;-+const node = Vvveb.Builder.selectedEl;- Vvveb.Undo.addMutation({type:'characterData',- target: node,- oldValue: codeEditorOldValue,- newValue: node.innerHTML});-- Vvveb.Builder.selectNode(node);+ Vvveb.Undo.addMutation({+ type: 'characterData',+ target: node,+ oldValue: codeEditorOldValue,+ newValue: node.innerHTML+ });++ Vvveb.Builder.selectNode(node);};-- window.addEventListener("vvveb.ModalCodeEditor.save", onSave);-- document.getElementById("translate-code-btn")?.addEventListener("click", function(event) {- let text = Vvveb.Builder.selectedEl.innerHTML.trim();++ window.addEventListener("Vvveb.ModalCodeEditor.save", onSave);++ on("translate-code-btn", "click", function (event) {+ let text = (Vvveb.Builder.selectedEl && Vvveb.Builder.selectedEl.innerHTML ? Vvveb.Builder.selectedEl.innerHTML : "").trim();// uncomment to use outerHTML, not recommended//let text = selectedEl.outerHTML;-- fetch(namespaceUrl + "/translate&action=get", {method: "POST", body: new URLSearchParams({text, csrf: document.getElementById('csrf')?.value}), credentials: 'include'})- .then((response) => {- if (!response.ok) { throw new Error(response) }- return response.json()- })- .then((data) => {- for (code in data) {- let translation = data[code];- document.querySelector("#lang-" + code + "-editor textarea").value = translation;- }- })- .catch(error => {- console.log(error.statusText);- displayToast("danger", "Error", "Error loading translations!");- });-+ fetch(namespaceUrl + "/translate&action=get", { method: "POST", body: new URLSearchParams({ text, csrf: document.getElementById('csrf')?.value }), credentials: 'include' })+ .then((response) => {+ if (!response.ok) { throw new Error(response) }+ return response.json()+ })+ .then((data) => {+ for (let code in data) {+ let translation = data[code];+ let editor = document.querySelector("#lang-" + code + "-editor textarea");+ if (editor) editor.value = translation;+ }+ })+ .catch(error => {+ console.error(error);+ displayToast("danger", "Error", "Error loading translations!");+ });++Vvveb.ModalTranslateEditor.show();Vvveb.ModalTranslateEditor.setValue(text);-+event.preventDefault();return false;});- let onTranslateSave = function(event) {- let data = Object.fromEntries(new FormData(document.getElementById("translateForm")));+ let onTranslateSave = function (event) {+ let form = document.getElementById("translateForm");+ let data = form ? Object.fromEntries(new FormData(form)) : {};data["csrf"] = document.getElementById('csrf')?.value;- fetch(namespaceUrl + "/translate&action=save", {method: "POST", body: new URLSearchParams(data)})- .then((response) => {- if (!response.ok) {- return Promise.resolve(response.text()).then((responseInText) => {- return Promise.reject([response, responseInText]);- });- }- return response.json();- })- .then((data) => {- //use toast to show save status- let success = true;- let bg = "success";-- if (data.success || data == "success") {- } else {- bg = "danger";- }-- if (typeof data.message === "string") {- displayToast(bg, "Save", data.message ?? data);- } else if (Array.isArray(data.message)) {- for (let message of data.message) {+ fetch(namespaceUrl + "/translate&action=save", { method: "POST", body: new URLSearchParams(data) })+ .then((response) => {+ if (!response.ok) {+ return Promise.resolve(response.text()).then((responseInText) => {+ return Promise.reject([response, responseInText]);+ });+ }+ return response.json();+ })+ .then((data) => {+ //use toast to show save status+ let success = true;+ let bg = "success";- if (message.success || data == "success") {- bg = "success"- } else {- bg = "danger";- success = false;+ if (data.success || data == "success") {+ } else {+ bg = "danger";+ }++ if (typeof data.message === "string") {+ displayToast(bg, "Save", data.message ?? data);+ } else if (Array.isArray(data.message)) {+ for (let message of data.message) {++ if (message.success || data == "success") {+ bg = "success"+ } else {+ bg = "danger";+ success = false;+ }++ displayToast(bg, "Save", message.message);}-- displayToast(bg, "Save", message.message);+ } else if (typeof data === "string") {+ displayToast(bg, "Save", data);}- } else if (typeof data === "string") {- displayToast(bg, "Save", data);- }-- })- .catch(err => {- displayToast("danger", "Error", "Error saving translations!");- let message = err;- try {- let [response, responseInText] = err;- message = responseInText ?? response.statusText ?? "Error uploading!";- } catch (e) {- }+ })+ .catch(err => {+ displayToast("danger", "Error", "Error saving translations!");- if (err.hasOwnProperty('text')) err.text().then( errorMessage => {- let message = errorMessage.substr(0, 200);- displayToast("danger", "Error", message);- });+ let message = err;+ try {+ let [response, responseInText] = err;+ message = responseInText ?? response.statusText ?? "Error uploading!";+ } catch (e) {+ }- if (typeof message == "string") {- displayToast("danger", "Error", message.substr(0, 200));- }-- });- /*- Vvveb.Builder.frameBody.querySelectorAll("form").forEach(f => {- console.log( JSON.stringify(Object.fromEntries(new FormData(f))) );- });- */- Vvveb.Builder.selectedEl.innerHTML = event.detail;+ if (typeof err?.text === 'function') err.text().then(errorMessage => {+ let message = errorMessage.substring(0, 200);+ displayToast("danger", "Error", message);+ });++ if (typeof message == "string") {+ displayToast("danger", "Error", message.substring(0, 200));+ }++ });+ if (Vvveb.Builder.selectedEl) Vvveb.Builder.selectedEl.innerHTML = event.detail;//selectedEl.outerHTML = text;};- //window.removeEventListener("vvveb.ModalTranslateEditor.save", onTranslateSave);- window.addEventListener("vvveb.ModalTranslateEditor.save", onTranslateSave);--- document.getElementById("delete-btn").addEventListener("click", function(event) {- document.getElementById("select-box").style.display = "none";-+ //window.removeEventListener("Vvveb.ModalTranslateEditor.save", onTranslateSave);+ window.addEventListener("Vvveb.ModalTranslateEditor.save", onTranslateSave);+++ on("delete-btn", "click", function (event) {+ self._setDisplay("select-box", "none");+const node = self.selectedEl;-- Vvveb.Undo.addMutation({type: 'childList',- target: node.parentNode,+ if (!node || !node.parentNode || typeof node.remove !== "function") {+ event.preventDefault();+ return false;+ }++ Vvveb.Undo.addMutation({+ type: 'childList',+ target: node.parentNode,removedNodes: [node],- nextSibling: node.nextSibling});+ nextSibling: node.nextSibling+ });self.selectedEl.remove();+ self.selectedEl = null;Vvveb.TreeList.loadComponents();Vvveb.SectionList.loadSections();-+event.preventDefault();return false;});- let addSectionBox = document.getElementById("add-section-box");+ let addSectionBox = self._$("add-section-box");let addSectionElement;-- document.getElementById("add-section-btn").addEventListener("click", function(event) {-- addSectionElement = self.highlightEl;- addSectionBox.style.display = "block";- addSectionBox.classList.remove("only-base");++ on("add-section-btn", "click", function (event) {++ addSectionElement = self.highlightEl;+ if (!addSectionBox || !addSectionElement || !addSectionElement.tagName || !window.FrameWindow) {+ event.preventDefault();+ return false;+ }+ addSectionBox.style.display = "block";+ addSectionBox.classList.remove("only-base");let tagName = self.highlightEl.tagName.toLowerCase();- let bsTab;+ let tabId = "box-components-tab";if (["section", "footer", "header"].includes(tagName)) {- addSectionBox.classList.add("only-sections");- bsTab = bootstrap.Tab.getOrCreateInstance(document.getElementById("box-sections-tab"));+ addSectionBox.classList.add("only-sections");+ tabId = "box-sections-tab";} else {- addSectionBox.classList.remove("only-sections");- bsTab = bootstrap.Tab.getOrCreateInstance(document.getElementById("box-components-tab"));+ addSectionBox.classList.remove("only-sections");+ }+ if (typeof bootstrap !== "undefined" && bootstrap.Tab) {+ let bsTab = bootstrap.Tab.getOrCreateInstance(document.getElementById(tabId));+ if (bsTab) bsTab.show();}- bsTab.show();- let pos = offset(addSectionElement);+ let pos = offset(addSectionElement);let top = ((pos.top + window.FrameWindow.pageYOffset + addSectionElement.clientTop) - self.frameHtml.scrollTop) + addSectionElement.offsetHeight;let left = ((pos.left + window.FrameWindow.pageXOffset + addSectionElement.clientLeft) - self.frameHtml.scrollLeft) + (addSectionElement.offsetWidth / 2) - (addSectionBox.offsetWidth / 2);let outerHeight = window.FrameWindow.innerHeight + self.frameHtml.scrollTop;@@ -2040,50 +2258,53 @@ Vvveb.Builder = {//check if box is out of viewport and move insideif (left < 0) left = 0;if (top < 0) top = 0;-- addSectionBox.style.top = top + "px";- addSectionBox.style.left = left + "px";++ addSectionBox.style.top = top + "px";+ addSectionBox.style.left = left + "px";event.preventDefault();return false;});-- document.getElementById("close-section-btn").addEventListener("click", function(event) {- addSectionBox.style.display = "none";++ on("close-section-btn", "click", function (event) {+ if (addSectionBox) addSectionBox.style.display = "none";});-+function addSectionComponent(component, after = true) {- let html = component.html.replace('RANDOM_ID', Math.floor(Math.random() * 1000))- let node = generateElements(html)[0];+ if (!component) return;+ let html = self._componentHtml(component);+ let node = generateElements(html)[0];+ if (!node || !node.tagName) return;let tagName = node.tagName.toLowerCase();let element = addSectionElement;-+//if section add after current sectionif (["section", "footer", "header", "nav"].includes(tagName)) {- if (!element) {- element = Vvveb.Builder.frameBody.querySelector(':scope > ' + tagName + ':last-of-type') || Vvveb.Builder.frameBody.querySelector(':scope > section:last-of-type') || Vvveb.Builder.frameBody.querySelector(':scope > header:last-of-type') || Vvveb.Builder.frameBody.querySelector(':scope > main') || Vvveb.Builder.frameBody.querySelector(':scope > footer:last-of-type');- } else {+ if (!element && Vvveb.Builder.frameBody) {+ let frameBody = Vvveb.Builder.frameBody;+ element = frameBody.querySelector(':scope > ' + tagName + ':last-of-type') || frameBody.querySelector(':scope > section:last-of-type') || frameBody.querySelector(':scope > header:last-of-type') || frameBody.querySelector(':scope > main') || frameBody.querySelector(':scope > footer:last-of-type');+ } else if (element) {while (element = element.parentElement) {tagName = element.tagName.toLowerCase();if (["section", "footer", "header", "nav"].includes(tagName)) {after = true;break;- }- }- }-+ }+ }+ }+if (!element) {element = addSectionElement;}}-+if (element) {if (after) {element.after(node);} else {element.append(node);}- } else {+ } else if (Vvveb.Builder.frameBody) {let newsection = Vvveb.Builder.frameBody.querySelector('newsection')if (newsection) {newsection.before(node);@@ -2091,7 +2312,7 @@ Vvveb.Builder = {Vvveb.Builder.frameBody.append(node);}}-+if (component.afterDrop) {node = component.afterDrop(node);}@@ -2101,56 +2322,61 @@ Vvveb.Builder = {self.loadNodeComponent(node);Vvveb.TreeList.loadComponents();Vvveb.TreeList.selectComponent(node);-- node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});- Vvveb.Undo.addMutation({type: 'childList',- target: node.parentNode,- addedNodes: [node],- nextSibling: node.nextSibling});+ node.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });++ Vvveb.Undo.addMutation({+ type: 'childList',+ target: node.parentNode,+ addedNodes: [node],+ nextSibling: node.nextSibling+ });}-- addSectionBox.addEventListener("click", function(event) {- let element = event.target.closest("ol li");++ if (addSectionBox) {+ addSectionBox.addEventListener("click", function (event) {+ let element = event.target && event.target.closest ? event.target.closest("ol li") : null;if (element) {let itemType = element.dataset.dragType;let html;switch (itemType) {case 'component':html = Vvveb.Components.get(element.dataset.type);- break;+ break;case 'block':html = Vvveb.Blocks.get(element.dataset.type);- break;+ break;case 'section':html = Vvveb.Sections.get(element.dataset.type);- break;+ break;}-- addSectionComponent(html, (document.querySelector("[name='add-section-insert-mode']:checked").value == "after"));++ let insertAfterEl = document.querySelector("[name='add-section-insert-mode']:checked");+ addSectionComponent(html, (insertAfterEl && insertAfterEl.value == "after"));addSectionBox.style.display = "none";}});-- },+ }++ },-/* drag and drop */- _initDragdrop : function() {+ /* drag and drop */+ _initDragdrop: function () {let self = this;- self.isDragging = false;-- document.addEventListener("mousedown", function(event) {- let element = event.target.closest(".drag-elements-sidepane ul > li > ol > li[data-drag-type]");+ self.isDragging = false;++ document.addEventListener("mousedown", function (event) {+ let element = event.target && event.target.closest ? event.target.closest(".drag-elements-sidepane ul > li > ol > li[data-drag-type]") : null;let html;-+if (element && event.which == 1) {//left clickdocument.getElementById("component-clone")?.remove();- document.querySelectorAll("#section-actions, #highlight-name, #select-box").forEach(e => e.style.display = "none");-- self.dragType = element.dataset.dragType;+ self._hideChrome();++ self.dragType = element.dataset.dragType;if (self.dragType == "component") {self.component = Vvveb.Components.get(element.dataset.type);}@@ -2160,18 +2386,24 @@ Vvveb.Builder = {else if (self.dragType == "block") {self.component = Vvveb.Blocks.get(element.dataset.type);}-++ //guard against unknown/unregistered drag types to avoid TypeError below+ if (! self.component) {+ console.warn("Vvveb.Builder: no component registered for dragged item:", element.dataset.type);+ return false;+ }+if (self.component.dragHtml) {html = self.component.dragHtml;- } else if (Vvveb.dragHtml) {+ } else if (Vvveb.dragHtml) {html = Vvveb.dragHtml;} else {- html = self.component.html.replace('RANDOM_ID', Math.floor(Math.random() * 1000));+ html = self._componentHtml(self.component);}-+self.dragElement = generateElements(html)[0];//self.dragElement.css("border", "1px dashed #4285f4");-+if (self.component.dragStart) self.dragElement = self.component.dragStart(self.dragElement);self.isDragging = true;@@ -2184,7 +2416,7 @@ Vvveb.Builder = {self.iconDrag = document.createElement("img");self.iconDrag.setAttribute("id", "dragElement-clone");self.iconDrag.setAttribute("src", element.style.backgroundImage.replace(/^url\(['"](.+)['"]\)/, '$1'));-+self.iconDrag.style.zIndex = "100";self.iconDrag.style.position = "absolute";self.iconDrag.style.width = "64px";@@ -2192,120 +2424,139 @@ Vvveb.Builder = {self.iconDrag.style.top = event.y + "px";self.iconDrag.style.left = event.x + "px";}-- document.body.append(self.iconDrag);-++ if (self.iconDrag) document.body.append(self.iconDrag);+event.preventDefault();return false;}});-- document.addEventListener('mouseup', function(event) {++ document.addEventListener('mouseup', function (event) {if (self.iconDrag && self.isDragging == true) {self.isDragging = false;document.getElementById("component-clone")?.remove();- document.querySelectorAll("#section-actions, #highlight-name, #select-box").forEach(el => el.style.display = "");+ self._showChrome();self.iconDrag.remove();- if(self.dragElement){+ if (self.dragElement) {self.dragElement.remove();}}});-- document.addEventListener('mousemove', function(event) {++ document.addEventListener('mousemove', function (event) {if (self.iconDrag && self.isDragging == true) {- let x = (event.clientX || event.clientX);- let y = (event.clientY || event.clientY);+ //absolute-positioned drag ghost needs document coords (scroll included),+ //elementFromPoint needs viewport coords (scroll excluded)+ const pageX = event.pageX ?? (event.clientX + window.scrollX);+ const pageY = event.pageY ?? (event.clientY + window.scrollY);+ const clientX = event.clientX ?? (event.pageX - window.scrollX);+ const clientY = event.clientY ?? (event.pageY - window.scrollY);- self.iconDrag.style.left = (x - 60) + "px";- self.iconDrag.style.top = (y - 30) + "px";+ self.iconDrag.style.left = (pageX - 60) + "px";+ self.iconDrag.style.top = (pageY - 30) + "px";- const elementMouseIsOver = document.elementFromPoint(x - 60, y - 40);-- //if drag elements hovers over iframe switch to iframe mouseover handler- return;+ const elementMouseIsOver = document.elementFromPoint(clientX - 60, clientY - 40);++ //if drag elements hovers over iframe switch to iframe mouseover handler+ //TODO: dispatch mousemove to iframe when hovering over it during drag+ /*if (elementMouseIsOver && elementMouseIsOver.tagName == 'IFRAME') {self.frameBody.dispatchEvent(new MouseEvent("mousemove", {- bubbles: true,- cancelable: true,- }));-- //self.frameBody.trigger("mousemove", event);+ bubbles: true,+ cancelable: true,+ }));+event.stopPropagation();self.selectNode(false);}+ */}});-- document.addEventListener("mouseup", function(event) {- let element = event.target.closest(".drag-elements-sidepane ul > ol > li > li");++ document.addEventListener("mouseup", function (event) {+ let element = event.target && event.target.closest ? event.target.closest(".drag-elements-sidepane ul > ol > li > li") : null;if (element) {self.isDragging = false;document.getElementById("component-clone")?.remove()- document.querySelectorAll("#section-actions, #highlight-name, #select-box").forEach(el => el.style.display = "");+ self._showChrome();}});-+},-+removeHelpers: function (html, keepHelperAttributes = false) {//tags like stylesheets or scripts+ html = String(html ?? "");html = html.replace(/<[^>]+?data-vvveb-helpers.+?>/gi, "");html = html.replace(/<[^>]+?vvvebjs-new-section.+?>.+?<\/newsection>/gims, "");//attributesif (!keepHelperAttributes) {html = html.replace(/\s*data-vvveb-\w+(=["'].*?["'])?\s*/gi, "");}-+html = html.replaceAll("vvveb-hidden", "").replaceAll("data-vvvebjs-editor", "");return html;},- getHtml: function(keepHelperAttributes = true, filter = true) {+ getHtml: function (keepHelperAttributes = true, filter = true) {let doc = window.FrameDocument;- let hasDoctpe = (doc.doctype !== null);+ if (!doc || !doc.documentElement) return "";+ let hasDoctpe = (doc.doctype != null);let html = "";-+doc.querySelectorAll("[contenteditable]").forEach(e => e.removeAttribute("contenteditable"));- doc.querySelectorAll("[spellcheckker]").forEach(e => e.removeAttribute("spellcheckker"));+ doc.querySelectorAll("[spellcheck]").forEach(e => e.removeAttribute("spellcheck"));doc.querySelectorAll('script[src^="chrome-extension://"]').forEach(e => e.remove());doc.querySelectorAll('script[src^="moz-extension://"]').forEach(e => e.remove());-+// scroll page to top to avoid saving the page in a different state// like saving with sticky classes set for navbar etc// this.iframe.contentWindow.scrollTo(0,0);if (filter) {- window.dispatchEvent(new CustomEvent("vvveb.getHtml.before", {detail: doc}));+ window.dispatchEvent(new CustomEvent("Vvveb.getHtml.before", { detail: doc }));}if (hasDoctpe) html =- "<!DOCTYPE "- + doc.doctype.name- + (doc.doctype.publicId ? ' PUBLIC "' + doc.doctype.publicId + '"' : '')- + (!doc.doctype.publicId && doc.doctype.systemId ? ' SYSTEM' : '')- + (doc.doctype.systemId ? ' "' + doc.doctype.systemId + '"' : '')- + ">\n";-+ "<!DOCTYPE "+ + doc.doctype.name+ + (doc.doctype.publicId ? ' PUBLIC "' + doc.doctype.publicId + '"' : '')+ + (!doc.doctype.publicId && doc.doctype.systemId ? ' SYSTEM' : '')+ + (doc.doctype.systemId ? ' "' + doc.doctype.systemId + '"' : '')+ + ">\n";+Vvveb.FontsManager.cleanUnusedFonts();html += doc.documentElement.outerHTML;html = this.removeHelpers(html, keepHelperAttributes);if (filter) {- window.dispatchEvent(new CustomEvent("vvveb.getHtml.after", {detail: doc}));- window.dispatchEvent(new CustomEvent("vvveb.getHtml.filter", {detail: html}));+ window.dispatchEvent(new CustomEvent("Vvveb.getHtml.after", { detail: doc }));+ window.dispatchEvent(new CustomEvent("Vvveb.getHtml.filter", { detail: html }));}-- return html;++ return html;},-- setHtml: function(html) {++ loadHtml: function (html) {+ if (!this.iframe) return;+ this.iframe.srcdoc = html;+ /*+ this.iframe.src = "about:blank";+ window.FrameDocument.open();+ window.FrameDocument.write(html);+ window.FrameDocument.close();+ */+ },++ setHtml: function (html) {//documentElement.innerHTML resets <head> each time and the page flickers//return window.FrameDocument.documentElement.innerHTML = html;-+ if (typeof html !== "string" || !window.FrameDocument) return;+function getTag(html, tag, outerHtml = false) {const start = html.indexOf("<" + tag);- const end = html.indexOf("</" + tag);+ const end = html.indexOf("</" + tag);if (start >= 0 && end >= 0) {if (outerHtml)@@ -2317,137 +2568,151 @@ Vvveb.Builder = {}}- if (this.runJsOnSetHtml) {+ if (this.runJsOnSetHtml && this.frameBody) {this.frameBody.innerHTML = getTag(html, "body");}- else {+ else if (window.FrameDocument.body) {window.FrameDocument.body.innerHTML = getTag(html, "body");}-+//use outerHTML if you want to set body tag attributes//window.FrameDocument.body.outerHTML = getTag(html, "body", true);//set head html only if changed to avoid page flicker- let headHtml = getTag(html, "head");- if (window.FrameDocument.head.innerHTML != headHtml) {- window.FrameDocument.head.innerHTML = headHtml;+ if (window.FrameDocument.head) {+ let headHtml = getTag(html, "head");+ if (window.FrameDocument.head.innerHTML != headHtml) {+ window.FrameDocument.head.innerHTML = headHtml;+ }}},- saveElement: function(element, type, name, callback) {+ saveElement: function (element, type, name, callback) {+ if (!element || !element.outerHTML || !name) return;if (type == 'section') {- Vvveb.Sections.add('reusable/'+ name, {+ Vvveb.Sections.add('reusable/' + name, {name,image: "img/logo-small.png",- html: element.outerHTML});-+ html: element.outerHTML+ });+if (Vvveb.SectionsGroup["Reusable"] === undefined) {Vvveb.SectionsGroup["Reusable"] = [];}-- Vvveb.SectionsGroup["Reusable"].push('reusable/'+ name);++ Vvveb.SectionsGroup["Reusable"].push('reusable/' + name);Vvveb.Builder.loadSectionGroups();} else {- Vvveb.Blocks.add('reusable/'+ name, {+ Vvveb.Blocks.add('reusable/' + name, {name,image: "img/logo-small.png",- html: element.outerHTML});-+ html: element.outerHTML+ });+if (Vvveb.BlocksGroup["Reusable"] === undefined) {Vvveb.BlocksGroup["Reusable"] = [];}-- Vvveb.BlocksGroup["Reusable"].push('reusable/'+ name);++ Vvveb.BlocksGroup["Reusable"].push('reusable/' + name);Vvveb.Builder.loadBlockGroups();}-- let data = {type, name, html:element.outerHTML, csrf: document.getElementById('csrf')?.value};-- fetch(saveReusableUrl, {method: "POST", body: new URLSearchParams(data), credentials: 'include'})- .then((response) => {- if (!response.ok) { throw new Error(response) }- return response.json()- })- .then((data) => {- if (callback) callback(data);- let bg = "success";- if (data.success || text == "success") {- } else {- bg = "danger";- }-- displayToast(bg, "Save", data.message ?? data);- })++ let data = { type, name, html: element.outerHTML, csrf: document.getElementById('csrf')?.value };++ fetch(saveReusableUrl, { method: "POST", body: new URLSearchParams(data), credentials: 'include' })+ .then((response) => {+ if (!response.ok) { throw new Error(response) }+ return response.json()+ })+ .then((data) => {+ if (callback) callback(data);+ let bg = "success";++ if (data.success || data == "success") {+ } else {+ bg = "danger";+ }++ displayToast(bg, "Save", data.message ?? data);+ }).catch(error => {- console.log(error.statusText);+ console.error(error);displayToast("danger", "Error", "Error saving!");});},-- saveAjax: function(data, saveUrl, callback, error ) {- if (!data) data = Vvveb.FileManager.getPageData();-- if (!data.hasOwnProperty("file")) {- data["file"] = Vvveb.FileManager.getCurrentFileName();++ save: function (data, saveUrl, success, error) {+ if (!data) data = Vvveb.FileManager.getPageData() || {};+ if (!data || typeof data !== "object") data = {};++ if (!Object.hasOwn(data, "file")) {+ data["file"] = Vvveb.FileManager.getCurrentFileName();}- if (!data.hasOwnProperty("url")) {- data["url"] = Vvveb.FileManager.getPageData('url');+ if (!Object.hasOwn(data, "url")) {+ data["url"] = Vvveb.FileManager.getPageData('url');}data["elements"] = Vvveb.ChangeManager.getChangedElements();- data["csrf"] = document.getElementById('csrf')?.value;-- if (!data.hasOwnProperty("startTemplateUrl")) {+ data["csrf"] = document.getElementById('csrf')?.value ?? "";++ if (!Object.hasOwn(data, "startTemplateUrl")) {data["html"] = this.getHtml();}-++ let detail = { ...Vvveb.FileManager.getPageData(), ...data };+ //allow event to change name or cancel by setting name to false+ window.dispatchEvent(new CustomEvent("Vvveb.Builder.save", {+ detail+ }));//data['elements'] = new URLSearchParams(data['elements']);return fetch(saveUrl, {- method: "POST",- headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},- body: nestedFormData(data),+ method: "POST",+ headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },+ body: nestedFormData(data),credentials: 'include'})- .then((response) => {- if (!response.ok) {- return Promise.resolve(response.text()).then((responseInText) => {- return Promise.reject([response, responseInText]);- });- }- return response.json();- })- .then((data) => {- if (callback) callback(data);- Vvveb.Undo.reset();- document.querySelectorAll("#top-panel .save-btn").forEach(e => e.setAttribute("disabled", "true"));- window.dispatchEvent(new CustomEvent("vvveb.Builder.saveAjax", {- detail: data,- }));- })- .catch((err) => {- if (error) error(err);-- let message = err;- try {- let [response, responseInText] = err;- message = responseInText ?? response.statusText ?? "Error uploading!";- } catch (e) {- }+ .then((response) => {+ if (!response.ok) {+ return Promise.resolve(response.text()).then((responseInText) => {+ return Promise.reject([response, responseInText]);+ });+ }+ return response.json();+ })+ .then((data) => {+ if (success) success(data);+ Vvveb.Undo.reset();+ document.querySelectorAll("#top-panel .save-btn").forEach(e => e.setAttribute("disabled", "true"));+ window.dispatchEvent(new CustomEvent("Vvveb.Builder.save", {+ detail: data,+ }));+ })+ .catch((err) => {+ if (error) error(err);- if (err.hasOwnProperty('text')) err.text().then( errorMessage => {- let message = errorMessage.substr(0, 200);- displayToast("danger", "Error", message);- });+ let message;- if (typeof message == "string") {- displayToast("danger", "Error", message.substr(0, 200));- }- });+ if (Object.hasOwn(err, 'message')) {+ message = err.message;+ } else if (err?.[Symbol.iterator]) {+ let [response, responseInText] = err;+ message = responseInText || response.statusText || "Error saving!";++ if (typeof response?.text === 'function') response.text().then(errorMessage => {+ let message = errorMessage.substring(0, 200);+ displayToast("danger", "Error", message);+ });+ }++ if (message) {+ displayToast("danger", "Error", message.substring(0, 200));+ }+ });},-- setDesignerMode: function(designerMode = false) {++ setDesignerMode: function (designerMode = false) {this.designerMode = designerMode;}@@ -2458,8 +2723,8 @@ Vvveb.ModalCodeEditor = {modalId: 'codeEditorModal',name: 'ModalCodeEditor',editor: false,-- init: function(modal = false, editor = false) {++ init: function (modal = false, editor = false) {if (modal) {this.modal = modal;} else {@@ -2470,35 +2735,35 @@ Vvveb.ModalCodeEditor = {} else {this.editor = this.modal.querySelector('textarea');}-+let self = this;- this.modal.querySelector('.save-btn').addEventListener("click", function(event) {- window.dispatchEvent(new CustomEvent("vvveb." + self.name + ".save", {detail: self.getValue()}));+ this.modal.querySelector('.save-btn').addEventListener("click", function (event) {+ window.dispatchEvent(new CustomEvent("Vvveb." + self.name + ".save", { detail: self.getValue() }));self.hide();return false;});},-- show: function(value) {++ show: function (value) {if (!this.modal) {this.init();}-+const bsModal = bootstrap.Modal.getOrCreateInstance(this.modal);- return bsModal.show();+ return bsModal.show();},- hide: function(value) {+ hide: function (value) {const bsModal = bootstrap.Modal.getOrCreateInstance(this.modal);- return bsModal.hide();+ return bsModal.hide();},-- getValue: function() {- return this.editor.value;;++ getValue: function () {+ return this.editor.value;},-- setValue: function(value) {++ setValue: function (value) {if (!this.modal) {this.init();}@@ -2506,21 +2771,20 @@ Vvveb.ModalCodeEditor = {document.querySelectorAll("#top-panel .save-btn").forEach(e => e.removeAttribute("disabled"));this.editor.value = value;},-}+};-//Vvveb.ModalTranslateEditor = structuredClone(Vvveb.ModalCodeEditor);-Vvveb.ModalTranslateEditor = Object.assign({}, Vvveb.ModalCodeEditor);-Vvveb.ModalTranslateEditor.modalId = 'translateEditorModal';-Vvveb.ModalTranslateEditor.name = 'ModalTranslateEditor';+ Vvveb.ModalTranslateEditor = Object.create(Vvveb.ModalCodeEditor);+ Vvveb.ModalTranslateEditor.modalId = 'translateEditorModal';+ Vvveb.ModalTranslateEditor.name = 'ModalTranslateEditor';Vvveb.CodeEditor = {-+isActive: false,oldValue: '',- doc:false,- textarea:false,-- init: function(doc) {+ doc: false,+ textarea: false,++ init: function (doc) {this.textarea = document.querySelector("#vvveb-code-editor textarea");this.textarea.value = Vvveb.Builder.getHtml();@@ -2529,26 +2793,26 @@ Vvveb.CodeEditor = {});//load code on document changes- Vvveb.Builder.frameBody.addEventListener("vvveb.undo.add", () => Vvveb.CodeEditor.setValue());- Vvveb.Builder.frameBody.addEventListener("vvveb.undo.restore", () => Vvveb.CodeEditor.setValue());-+ Vvveb.Builder.frameBody.addEventListener("Vvveb.undo.add", () => Vvveb.CodeEditor.setValue());+ Vvveb.Builder.frameBody.addEventListener("Vvveb.undo.restore", () => Vvveb.CodeEditor.setValue());+//load code when a new url is loadedVvveb.Builder.documentFrame.addEventListener("load", () => Vvveb.CodeEditor.setValue());this.isActive = true;},- setValue: function(value) {+ setValue: function (value) {if (this.isActive) {this.textarea.value = Vvveb.Builder.getHtml();}},- destroy: function(element) {+ destroy: function (element) {//this.isActive = false;},- toggle: function() {+ toggle: function () {if (this.isActive != true) {this.isActive = true;return this.init();@@ -2556,18 +2820,21 @@ Vvveb.CodeEditor = {this.isActive = false;this.destroy();}-}+};Vvveb.CssEditor = {-+isActive: false,oldValue: '',- doc:false,- textarea:false,-- init: function(doc) {+ doc: false,+ textarea: false,+ _boundTextarea: false,+ _pushCss: false,++ init: function (doc) {this.textarea = document.getElementById("css-editor")+ if (!this.textarea) return false;this.textarea.value = Vvveb.StyleManager.getCss();let self = this;/*@@ -2575,85 +2842,107 @@ Vvveb.CssEditor = {self.textarea.value = Vvveb.StyleManager.getCss();}));*/- this.textarea.addEventListener("keyup", e => {- delay(() => Vvveb.StyleManager.setCss(self.textarea.value), 1000);- });+ //bind once so repeated toggles don't stack handlers; rebind if the node was replaced+ if (this._boundTextarea !== this.textarea) {+ this._boundTextarea = this.textarea;+ this._pushCss = debounce(() => {+ if (self.textarea) Vvveb.StyleManager.setCss(self.textarea.value);+ }, 1000);+ this.textarea.addEventListener("keyup", e => {+ self._pushCss();+ });+ }+ this.isActive = true;+ return true;},- getValue: function() {+ getValue: function () {+ if (!this.textarea) return "";return this.textarea.value;},-- setValue: function(value, updateStyles = true) {- this.textarea.value = value;++ setValue: function (value, updateStyles = true) {+ if (this.textarea) this.textarea.value = value ?? "";if (updateStyles) {- Vvveb.StyleManager.setCss(value);+ Vvveb.StyleManager.setCss(value ?? "");}},- destroy: function() {+ destroy: function () {},- toggle: function() {+ toggle: function () {if (this.isActive != true) {- this.isActive = true;return this.init();}this.isActive = false;this.destroy();- }-}+ }+};function displayToast(type, title, message, position = 'bottom', id = null) {if (!id) {id = position + "-toast";}-+let toast = document.getElementById(id);let header = toast.querySelector(".toast-header");toast.classList.remove("bottom-0", "top-0");toast.classList.add(position + "-0");- toast.querySelector(".toast-body .message").innerHTML = message;+ toast.querySelector(".toast-body .message").textContent = message;header.classList.remove("danger", "success");- header.classList.add("bg-" + type);+ header.classList.add("bg-" + type);header.querySelector("strong").textContent = title;let toastDisplay = toast.cloneNode(true);toast.parentNode.appendChild(toastDisplay);-+let delay = 3000;if (type == "danger") {delay = 10000;}- let bsToast = new bootstrap.Toast(toastDisplay, {animation:true, delay});+ let bsToast = new bootstrap.Toast(toastDisplay, { animation: true, delay });toastDisplay.addEventListener('hidden.bs.toast', () => {toastDisplay.remove();});- bsToast.show();-}+ bsToast.show();+}Vvveb.Gui = {-- init: function() {- document.querySelectorAll("[data-vvveb-action]").forEach(function (el,i) {++ init: function () {+ if (this._init) return;+ this._init = true;+ document.querySelectorAll("[data-vvveb-action]").forEach(function (el, i) {const on = el.dataset.vvvebOn ?? "click";- el.addEventListener(on, Vvveb.Gui[el.dataset.vvvebAction]);+ const action = Vvveb.Gui[el.dataset.vvvebAction];+ //a typo in data-vvveb-action must not abort binding for the rest of the buttons+ if (typeof action !== "function") {+ console.warn("Vvveb.Gui: unknown action:", el.dataset.vvvebAction);+ return;+ }+ el.addEventListener(on, action);});-- this.shortcuts();++ this.shortcuts();},-- shortcuts: function() {++ shortcuts: function () {let self = this;- handleShortcuts = function(e) {+ const handleShortcuts = function (e) {if (e.ctrlKey) {+ let target = e.target;+ let typing = target && (target.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(target.tagName || ""));+ //don't hijack native editing keys (e.g. undo in text fields), except save+ if (typing && e.key !== 's' && e.key !== 'S') return;switch (e.key) {case 's':e.preventDefault();let btn = document.querySelector('.save-btn');+ if (! btn) return;let url = btn.dataset.vvvebUrl;- self.saveAjax(null, url, document.querySelector('.save-btn'));+ self.save(null, url, document.querySelector('.save-btn'));return;case 'z':e.preventDefault();@@ -2675,7 +2964,7 @@ Vvveb.Gui = {case 'P':e.preventDefault();self.newPage();- return;+ return;case 'S':e.preventDefault();self.newSection();@@ -2683,16 +2972,16 @@ Vvveb.Gui = {}}}-+//handle shortcuts from main window and iframe also- document.addEventListener('keydown', handleShortcuts);- window.addEventListener('vvveb.iframe.loaded', () => {- Vvveb.Builder.frameBody.addEventListener('keydown', handleShortcuts);+ document.addEventListener('keydown', handleShortcuts);+ window.addEventListener('Vvveb.iframe.loaded', () => {+ if (Vvveb.Builder.frameBody) Vvveb.Builder.frameBody.addEventListener('keydown', handleShortcuts);});},-- undo : function () {++ undo: function () {if (Vvveb.WysiwygEditor.isActive) {Vvveb.WysiwygEditor.undo();} else {@@ -2700,8 +2989,8 @@ Vvveb.Gui = {}Vvveb.Builder.selectNode();},-- redo : function () {++ redo: function () {if (Vvveb.WysiwygEditor.isActive) {Vvveb.WysiwygEditor.redo();} else {@@ -2709,29 +2998,42 @@ Vvveb.Gui = {}Vvveb.Builder.selectNode();},-+//show modal with html content- save : function () {- document.getElementById('textarea-modal textarea').value = Vvveb.Builder.getHtml();- document.getElementById('textarea-modal').modal();+ /**+ * Shows a modal with the current HTML in a textarea.+ */+ saveModal: function () {+ let editor = document.querySelector('#textarea-modal textarea');+ if (editor) editor.value = Vvveb.Builder.getHtml();+ let modal = document.getElementById('textarea-modal');+ if (!modal) return;+ if (typeof bootstrap !== "undefined" && bootstrap.Modal) {+ let instance = bootstrap.Modal.getOrCreateInstance(modal);+ if (instance) instance.show();+ } else if (typeof modal.modal === "function") {+ modal.modal();+ }},-+//show offcanvas with page changes- showChanges : function () {+ showChanges: function () {let base, folder, filename, page;filename = Vvveb.FileManager.getPageData('file');- base = (base = /[^\/]+$/.exec(filename)) ? base[0] : '';- folder = (folder = /(.+)\//.exec(filename)) ? folder[1] : '/';+ if (!filename) return;+ base = (base = /[^\/]+$/.exec(filename)) ? base[0] : '';+ folder = (folder = /(.+)\//.exec(filename)) ? folder[1] : '/';- page = Vvveb.FileManager.getCurrentUrl();- page = (page = /[^\/]+\/?$/.exec(page)) ? page[0] : '';- page = page.replace(".html", "");- page = page ? page : "new-template";- page += ".html";+ page = Vvveb.FileManager.getCurrentUrl();+ page = (page = /[^\/]+\/?$/.exec(page)) ? page[0] : '';+ page = page.replace(".html", "");+ page = page ? page : "new-template";+ page += ".html";let safeOffcanvas = document.querySelector("#save-offcanvas");+ if (!safeOffcanvas) return;let element;-+if (element = safeOffcanvas.querySelector("[data-v-filename]")) {element.textContent = filename;}@@ -2744,47 +3046,71 @@ Vvveb.Gui = {if (element = safeOffcanvas.querySelector("[data-v-theme-folders]")) {element.value = folder;}-+Vvveb.ChangeManager.render();},-+//post html content through ajax to save to filesystem/db- saveAjax : function (event, saveUrl = null, saveBtn = null) {- let btn = saveBtn ?? this;- saveUrl = saveUrl ?? this.dataset.vvvebUrl;- let pageData = Vvveb.FileManager.getPageData();+ /**+ * Initiates a save operation with loading state and toast notifications.+ *+ * @param {Event} event - Click event.+ * @param {string} [saveUrl] - Save URL override.+ * @param {Element} [saveBtn] - The save button element.+ * @returns {Promise} The save Promise.+ */+ save: function (event, saveUrl = null, saveBtn = null) {+ let btn = (saveBtn ?? this);+ if (!btn || typeof btn.querySelector !== "function") {+ btn = document.querySelector('.save-btn');+ }+ saveUrl = saveUrl ?? this?.dataset?.vvvebUrl ?? btn?.dataset?.vvvebUrl;+ if (!saveUrl) {+ displayToast("danger", "Error", "Error saving! Missing save url.");+ return Promise.reject(new Error("Missing save url"));+ }+ let pageData = Vvveb.FileManager.getPageData() || {};//if offcanvas check if user provided new template name- if (btn.classList.contains("save-offcanvas")) {- if (document.querySelector("#save-offcanvas [name=template]:checked").value == "new") {- pageData['file'] = document.querySelector("#save-offcanvas [name=folder]").value + "/" + document.querySelector("#save-offcanvas [name=file]").value;+ if (btn && btn.classList && btn.classList.contains("save-offcanvas")) {+ let templateChoice = document.querySelector("#save-offcanvas [name=template]:checked");+ let folderInput = document.querySelector("#save-offcanvas [name=folder]");+ let fileInput = document.querySelector("#save-offcanvas [name=file]");+ if (templateChoice && templateChoice.value == "new" && folderInput && fileInput) {+ pageData['file'] = folderInput.value + "/" + fileInput.value;}}- btn.querySelector(".loading").classList.remove("d-none");- btn.querySelector(".button-text").classList.add("d-none");-- return Vvveb.Builder.saveAjax(pageData, saveUrl, (data) => {+ let loading = btn ? btn.querySelector(".loading") : null;+ if (loading) loading.classList.remove("d-none");+ let buttonText = btn ? btn.querySelector(".button-text") : null;+ if (buttonText) buttonText.classList.add("d-none");++ let detail = { ...pageData, saveUrl, saveBtn };+ const saveEvent = new CustomEvent("Vvveb.Gui.save", { detail });+ window.dispatchEvent(saveEvent);++ return Vvveb.Builder.save(pageData, saveUrl, (data) => {//use toast to show save statuslet success = true;let bg = "success";-- if (data.success || data == "success") {++ if (data.success || data == "success") {} else {bg = "danger";}-+if (typeof data.message === "string") {displayToast(bg, "Save", data.message ?? data);} else if (Array.isArray(data.message)) {for (let message of data.message) {- if (message.success || data == "success") {+ if (message.success || data == "success") {bg = "success"} else {bg = "danger";success = false;}-+displayToast(bg, "Save", message.message);}} else if (typeof data === "string") {@@ -2792,164 +3118,215 @@ Vvveb.Gui = {}const offcanvas = document.getElementById('save-offcanvas');- if (offcanvas) {+ if (offcanvas && typeof bootstrap !== "undefined" && bootstrap.Offcanvas) {let instance = bootstrap.Offcanvas.getInstance(offcanvas);- if (instance) instance.hide();+ if (instance) instance.hide();}-- btn.querySelector(".loading").classList.add("d-none");- btn.querySelector(".button-text").classList.remove("d-none");-++ let loading = btn ? btn.querySelector(".loading") : null;+ if (loading) loading.classList.add("d-none");+ let buttonText = btn ? btn.querySelector(".button-text") : null;+ if (buttonText) buttonText.classList.remove("d-none");+if (success) {document.querySelectorAll("#top-panel .save-btn").forEach(e => e.setAttribute("disabled", "true"));}-+}, (error) => {- btn.querySelector(".loading").classList.add("d-none");- btn.querySelector(".button-text").classList.remove("d-none");+ let loading = btn ? btn.querySelector(".loading") : null;+ if (loading) loading.classList.add("d-none");+ let buttonText = btn ? btn.querySelector(".button-text") : null;+ if (buttonText) buttonText.classList.remove("d-none");let message = error?.statusText ?? "Error saving!";displayToast("danger", "Error", message);- });+ });},-- download : function () {- const filename = /[^\/]+$/.exec(Vvveb.Builder.iframe.src)[0];- const uriContent = "data:application/octet-stream," + encodeURIComponent(Vvveb.Builder.getHtml());++ download: function () {+ let src = Vvveb.Builder.iframe && Vvveb.Builder.iframe.src;+ if (!src) return;+ const match = /[^\/]+$/.exec(src);+ const filename = match ? match[0] : 'page.html';+ const uriContent = "data:application/octet-stream," + encodeURIComponent(Vvveb.Builder.getHtml());let link = document.createElement('a');if ('download' in link) {link.dataset.download = filename;link.href = uriContent;link.target = "_blank";-+document.body.appendChild(link);const result = link.click();document.body.removeChild(link);link.remove();-+} else {location.href = uriContent;}},-- viewport : function () {- let breakpoint = this.dataset.view;- document.getElementById("canvas").classList.remove("responsive");- document.getElementById("iframe-wrapper").removeAttribute("style");++ viewport: function () {+ let breakpoint = this && this.dataset ? this.dataset.view : null;+ let canvas = document.getElementById("canvas");+ if (canvas) canvas.classList.remove("responsive");+ let wrapper = document.getElementById("iframe-wrapper");+ if (wrapper) wrapper.removeAttribute("style");document.querySelectorAll(".responsive-btns .active").forEach(e => e.classList.remove("active"));- if (Vvveb.StyleManager.currentBreakpoint == breakpoint) {+ if (breakpoint && Vvveb.StyleManager.currentBreakpoint == breakpoint) {Vvveb.StyleManager.currentBreakpoint = "none";breakpoint = null;}-- Vvveb.Builder.documentFrame.style.width = "";- Vvveb.Builder.documentFrame.style.height = "";-++ if (Vvveb.Builder.documentFrame) {+ Vvveb.Builder.documentFrame.style.width = "";+ Vvveb.Builder.documentFrame.style.height = "";+ }+if (breakpoint) {- document.getElementById("canvas").classList.add("responsive");- document.getElementById("iframe-wrapper").style.width = Vvveb.StyleManager.breakpoints[breakpoint].replace(".98", "");+ let width = Vvveb.StyleManager.breakpoints[breakpoint];+ //unknown size names reset instead of throwing+ if (!width) {+ Vvveb.StyleManager.currentBreakpoint = "none";+ Vvveb.StyleManager.setMedia();+ return;+ }+ if (canvas) canvas.classList.add("responsive");+ if (wrapper) wrapper.style.width = width.replace(".98", "");Vvveb.StyleManager.currentBreakpoint = breakpoint;- this.classList.add("active");+ if (this && this.classList) this.classList.add("active");}++ Vvveb.StyleManager.setMedia();},-- toggleEditor : function () {- document.getElementById("vvveb-builder").classList.toggle("bottom-panel-expand");- document.getElementById("toggleEditorJsExecute").classList.toggle("d-none");++ toggleEditor: function () {+ let toggle = function (selector, cls) {+ let el = document.querySelector(selector);+ if (el) el.classList.toggle(cls);+ };+ toggle("#vvveb-builder", "bottom-panel-expand");+ toggle("#toggleEditorJsExecute", "d-none");//hide breadcrumb when showing the editor- document.querySelector(".breadcrumb-navigator .breadcrumb").classList.toggle("d-none");- document.querySelector(".breadcrumb-navigator .nav-tabs").classList.toggle("d-none");- Vvveb.CodeEditor.toggle();- Vvveb.CssEditor.toggle();+ toggle(".breadcrumb-navigator .breadcrumb", "d-none");+ toggle(".breadcrumb-navigator .nav-tabs", "d-none");+ try { Vvveb.CodeEditor.toggle(); } catch (e) { console.error(e); }+ try { Vvveb.CssEditor.toggle(); } catch (e) { console.error(e); }},-- toggleHidden : function () {- Vvveb.Builder.frameBody.classList.toggle("vvveb-hidden");++ toggleHidden: function () {+ if (Vvveb.Builder.frameBody) Vvveb.Builder.frameBody.classList.toggle("vvveb-hidden");},- toggleEditorJsExecute : function () {+ toggleEditorJsExecute: function () {Vvveb.Builder.runJsOnSetHtml = this.checked;},-- preview : function () {- (Vvveb.Builder.isPreview == true)?Vvveb.Builder.isPreview = false:Vvveb.Builder.isPreview = true;- document.getElementById("iframe-layer").classList.toggle("d-none");- document.getElementById("vvveb-builder").classList.toggle("preview");++ preview: function () {+ Vvveb.Builder.isPreview = !(Vvveb.Builder.isPreview == true);+ let layer = document.getElementById("iframe-layer");+ if (layer) layer.classList.toggle("d-none");+ let builder = document.getElementById("vvveb-builder");+ if (builder) builder.classList.toggle("preview");},-- fullscreen : function () {- launchFullScreen(document); // the whole page++ fullscreen: function () {+ if (typeof launchFullScreen === "function") launchFullScreen(document); // the whole page},-- search : function () {- let searchText = this.value;- let panel = this.parentNode.parentNode.querySelector("div > ul");++ search: function () {+ let searchText = ((this && this.value) || "").toLowerCase();+ let panel = this && this.parentNode && this.parentNode.parentNode ? this.parentNode.parentNode.querySelector("div > ul") : null;+ if (!panel) return;panel.querySelectorAll("li ol li").forEach(function (el, i) {el.style.display = "none";- if (el.dataset.search.indexOf(searchText) > -1) el.style.display = "";+ if ((el.dataset.search || "").toLowerCase().indexOf(searchText) > -1) el.style.display = "";});},-- clearSearch : function (e) {- let input = this.parentNode.querySelector("input");++ clearSearch: function (e) {+ let input = this && this.parentNode ? this.parentNode.querySelector("input") : null;+ if (!input) return;input.value = "";input.dispatchEvent(new KeyboardEvent("keyup", {bubbles: true,cancelable: true,}));},-- toggleSections : function (e) {- let icon = this.querySelector("i");++ toggleSections: function (e) {+ if (!this || typeof this.querySelector !== "function") return;+ //toggle buttons render an inline svg sprite icon (very old markup used <i class="la ...">)+ let icon = this.querySelector("svg, i");+ if (!icon) return;+ let tag = (icon.tagName || "").toLowerCase();+ let use = (tag == "svg" && typeof icon.querySelector === "function") ? icon.querySelector("use") : null;let closed = (this.dataset.closed == "true");- if (closed) {- icon.setAttribute("class", "la la-minus");- this.dataset.closed = "false";- } else {- icon.setAttribute("class", "la la-plus");- this.dataset.closed = "true";+ if (use && typeof use.getAttribute === "function") {+ let href = use.getAttribute("href") || "";+ let base = href.split("#")[0];+ use.setAttribute("href", base + (closed ? "#minus" : "#plus"));+ } else if (typeof icon.setAttribute === "function") {+ icon.setAttribute("class", closed ? "la la-minus" : "la la-plus");}-- this.parentNode.parentNode.parentNode.querySelectorAll('input.header_check[type="checkbox"]').forEach(e => e.checked = closed);+ this.dataset.closed = closed ? "false" : "true";++ let root = this.parentNode && this.parentNode.parentNode ? this.parentNode.parentNode.parentNode : null;+ if (root && typeof root.querySelectorAll === "function") root.querySelectorAll('input.header_check[type="checkbox"]').forEach(e => e.checked = closed);},//Pages, file/components tree- newPage : function () {-+ newPage: function () {+let newPageModal = document.getElementById('new-page-modal');+ if (!newPageModal) return;let form = newPageModal.querySelector("form");-+ if (!form || typeof bootstrap === "undefined" || !bootstrap.Modal) return;+const bsModal = bootstrap.Modal.getOrCreateInstance(newPageModal);- bsModal.show();+ if (!bsModal) return;+ bsModal.show();- let submitForm = function(e) {+ let submitForm = function (e) {let data = {};- this.querySelectorAll("input[type=text],input[type=number],input[type=checkbox]:checked,input[type=radio]:checked,input[name=image],textarea,select:not(:disabled)").forEach( (el, i) => {+ this.querySelectorAll("input[type=text],input[type=number],input[type=checkbox]:checked,input[type=radio]:checked,input[name=image],textarea,select:not(:disabled)").forEach((el, i) => {if (el.offsetParent || el.name == 'image') data[el.name] = el.value;- });+ });++ if (!data['file']) {+ if (!data['title']) {+ displayToast("danger", "Error", "Page title is required!");+ e.preventDefault();+ return false;+ }+ data['file'] = data['title'] + '.html';+ }++ if (!data['name']) {+ data['name'] = data['title'];+ }if (data['file']) {- data['title'] = data['file'].replace('/', '').replace('.html', '');+ data['title'] = data['file'].replace('/', '').replace('.html', '');//let name = data['name'] = data['folder'].replace('/', '_') + "-" + data['title'];if (!data['name']) {data['name'] = data['title'];}- data['url'] = data['folder'] + "/" + data['file'];- data['url'] = Vvveb.themeBaseUrl + data['url'];+ data['url'] = data['folder'] + "/" + data['file'];+ data['url'] = (Vvveb.themeBaseUrl || "") + data['url'];} else {data['className'] = 'page';}- data['file'] = data['file'] ? data['file'] : '';- data['content'] = data['content'] ? '<div>' + data['content'] + '</div>' : '';- data['filename'] = data['filename'] ? data['filename'] : data['file'];+ data['file'] = data['file'] ? data['file'] : '';+ data['content'] = data['content'] ? '<div>' + data['content'] + '</div>' : '';+ data['filename'] = data['filename'] ? data['filename'] : data['file'];data['startTemplateUrl'] = data['startTemplateUrl'] ? data['startTemplateUrl'] : '';e.preventDefault();- return Vvveb.Builder.saveAjax(data, this.action, function (savedData) {+ return Vvveb.Builder.save(data, this.action, function (savedData) {if (savedData?.success) {data.title = data.name;@@ -2959,123 +3336,149 @@ Vvveb.Gui = {data.file = savedData.file ?? (data.folder + "/" + data.file);data.title = savedData.title ?? data.title;}-+delete data['startTemplateUrl'];let page = Vvveb.FileManager.addPage(data.name, data, false, false);Vvveb.FileManager.loadPage(data.name);Vvveb.FileManager.scrollToPage(page);bsModal.hide();-- let pageUrl = window.location.pathname + "?module=editor/editor&template=" + data["file"] + "&url=" + data["url"] + "&name=" + data["title"];++ let pageUrl = window.location.pathname + "?module=editor/page-builder&template=" + encodeURIComponent(data["file"] ?? "") + "&url=" + encodeURIComponent(data["url"] ?? "") + "&name=" + encodeURIComponent(data["title"] ?? "");if (data["post_id"]) {- pageUrl += "&post_id=" + data["post_id"];+ pageUrl += "&post_id=" + encodeURIComponent(data["post_id"]);}if (data["product_id"]) {- pageUrl += "&product_id=" + data["product_id"];+ pageUrl += "&product_id=" + encodeURIComponent(data["product_id"]);}-- window.history.pushState({name:data.name}, null, pageUrl);++ window.history.pushState({ name: data.name }, "", pageUrl);} else {let message = savedData?.message ?? "Error saving!";displayToast("danger", "Error", message);}});};-+if (!form.dataset.init) {form.addEventListener("submit", submitForm);form.dataset.init = true;}},- newSection : function (e, onlyBase = false) {-+ newSection: function (e, onlyBase = false) {+let addSectionBox = document.getElementById("add-section-box");- let addSectionElement = {};-- //addSectionElement = self.highlightEl;- addSectionBox.style.display = "block";+ if (!addSectionBox) return false;++ //addSectionElement = self.highlightEl;+ addSectionBox.style.display = "block";- let bsTab;- addSectionBox.classList.add("only-sections");+ addSectionBox.classList.add("only-sections");if (onlyBase) {- addSectionBox.classList.add("only-base");+ addSectionBox.classList.add("only-base");} else {addSectionBox.classList.remove("only-base");}-- bsTab = bootstrap.Tab.getOrCreateInstance(document.getElementById("box-sections-tab"));- bsTab.show();- event.preventDefault();+ if (typeof bootstrap !== "undefined" && bootstrap.Tab) {+ let bsTab = bootstrap.Tab.getOrCreateInstance(document.getElementById("box-sections-tab"));+ if (bsTab) bsTab.show();+ }++ if (e && typeof e.preventDefault === "function") e.preventDefault();return false;-+},-- setDesignerMode : function () {++ setDesignerMode: function () {//aria-pressed attribute is updated after action is called and we check for false instead of true- let designerMode = this.attributes["aria-pressed"].value == "true";- Vvveb.Builder.setDesignerMode(designerMode);+ let pressed = this && typeof this.getAttribute === "function" ? this.getAttribute("aria-pressed") : null;+ Vvveb.Builder.setDesignerMode(pressed == "true");},-+//layouttogglePanel: function (panel, cssVar) {panel = document.querySelector(panel);let body = document.querySelector("body");+ if (!panel || !body) return false;let prevValue = getComputedStyle(body).getPropertyValue(cssVar);let visible = false;-+if (prevValue !== "0px") {panel.dataset.layoutToggle = prevValue;body.style.setProperty(cssVar, "0px");panel.style.display = "none";visible = false;} else {- prevValue= panel.dataset.layoutToggle;+ prevValue = panel.dataset.layoutToggle;body.style.setProperty(cssVar, "");panel.style.display = "";visible = true;}-+return visible;},toggleFileManager: function () {Vvveb.Gui.togglePanel("#filemanager", "--builder-filemanager-height");},-+toggleLeftColumn: function () {Vvveb.Gui.togglePanel("#left-panel", "--builder-left-panel-width");- },-- toggleRightColumn: function (rightColumnEnabled = null) {- rightColumnEnabled = Vvveb.Gui.togglePanel("#right-panel", "--builder-right-panel-width");+ },- document.getElementById("vvveb-builder").classList.toggle("no-right-panel");- document.querySelector(".component-properties-tab").classList.toggle("d-none");-- Vvveb.Components.componentPropertiesElement = (rightColumnEnabled ? "#right-panel" :"#left-panel #properties") + " .component-properties";+ toggleRightColumn: function (e, rightColumnEnabled = null) {+ if (rightColumnEnabled === null) {+ rightColumnEnabled = Vvveb.Gui.togglePanel("#right-panel", "--builder-right-panel-width");+ } else {+ let panel = document.getElementById("right-panel");+ let body = document.querySelector("body");+ if (!panel || !body) return rightColumnEnabled;+ if (rightColumnEnabled) {+ panel.style.display = "none";+ body.style.setProperty("--builder-right-panel-width", "0px");+ } else {+ panel.style.display = "";+ body.style.setProperty("--builder-right-panel-width", "");+ }+ }++ let builderEl = document.getElementById("vvveb-builder");+ let propsTab = document.querySelector(".component-properties-tab");+ if (rightColumnEnabled) {+ if (builderEl) builderEl.classList.remove("no-right-panel");+ if (propsTab) propsTab.classList.add("d-none");+ } else {+ if (builderEl) builderEl.classList.add("no-right-panel");+ if (propsTab) propsTab.classList.remove("d-none");+ }++ Vvveb.Components.componentPropertiesElement = (rightColumnEnabled ? "#right-panel" : "#left-panel #properties") + " .component-properties";let componentTab = document.querySelector("#components-tab");- if (document.getElementById("properties").offsetParent) {+ let propertiesPanel = document.getElementById("properties");+ if (propertiesPanel && propertiesPanel.offsetParent && componentTab && typeof bootstrap !== "undefined" && bootstrap.Tab) {const bsTab = bootstrap.Tab.getOrCreateInstance(componentTab);componentTab.style.display = "";- bsTab.show();+ if (bsTab) bsTab.show();}},toggleTreeList: function () {let treeList = document.getElementById("tree-list");+ if (!treeList) return;treeList.classList.toggle("d-none");if (!treeList.offsetParent) {- document.getElementById("toggle-tree-list").classList.remove("active");+ let toggle = document.getElementById("toggle-tree-list");+ if (toggle) toggle.classList.remove("active");}},treeListRight: function () {let treeList = document.getElementById("tree-list");+ if (!treeList) return;let btnIcon = document.querySelector("[data-vvveb-action='treeListRight'] i");if (treeList.style.height) {treeList.style.height = "";@@ -3083,39 +3486,43 @@ Vvveb.Gui = {treeList.style.top = "";treeList.style.left = "";treeList.style.width = "";- btnIcon.className = "icon-stop-outline";+ if (btnIcon) btnIcon.className = "icon-stop-outline";} else {treeList.style.height = "auto";treeList.style.right = "0";treeList.style.top = "0";treeList.style.left = "auto";treeList.style.width = "300px";- btnIcon.className = "icon-remove-outline";+ if (btnIcon) btnIcon.className = "icon-remove-outline";}},-+treeListPanel: function () {let treeList = document.getElementById("tree-list");let canvas = document.getElementById("canvas");let filemanager = document.getElementById("filemanager");+ if (!treeList || !canvas || !filemanager) return;let btnIcon = document.querySelector("[data-vvveb-action='treeListPanel'] i");-+if (treeList.parentNode == canvas) {filemanager.after(treeList);- btnIcon.className = "icon-chevron-forward-outline";+ if (btnIcon) btnIcon.className = "icon-chevron-forward-outline";} else {canvas.append(treeList);- btnIcon.className = "icon-chevron-back-outline";+ if (btnIcon) btnIcon.className = "icon-chevron-back-outline";}},-+zoomChange: function () {let wrapper = document.getElementById("iframe-wrapper");+ if (!wrapper) return;+ let zoom = parseFloat(this && this.value);+ if (isNaN(zoom) || !zoom) zoom = 100;let scale = "";let height = "";- if (this.value != "100") {- scale = "scale(" + this.value + "%)";- height = ((100 / this.value) * 100) + "%";+ if (zoom != 100) {+ scale = "scale(" + zoom + "%)";+ height = ((100 / zoom) * 100) + "%";}wrapper.style.transform = scale;wrapper.style.height = height;@@ -3124,121 +3531,205 @@ Vvveb.Gui = {setState: function () {Vvveb.StyleManager.setState(this.value);Vvveb.Builder.reloadComponent();+ },++ setTheme: function () {+ Vvveb.StyleManager.setTheme(this.value);+ if (Vvveb.StyleManager.themeMode == "attribute") {+ let frameDoc = Vvveb.Builder.documentFrame && Vvveb.Builder.documentFrame.contentDocument;+ let html = frameDoc ? frameDoc.querySelector("html") : null;+ if (html) html.setAttribute("data-bs-theme", this.value);+ }+ Vvveb.Builder.reloadComponent();}}-Vvveb.StyleManager = {-- styles:{},- cssContainer:false,++ styles: {},+ cssContainer: false,+ _preservedAtRules: [],breakpoints: {- 'sm':'575.98px',- 'md':'767.98px',- 'lg':'991.98px',- 'xl':'1199.98px',- 'xxl':'1399.98px'- },- doc:false,- inlineCSS:false,- currentElement:null,- currentSelector:null,- currentBreakpoint:"none",- state:"",//hover, active etc-- init: function(doc) {+ 'sm': '575.98px',+ 'md': '767.98px',+ 'lg': '991.98px',+ 'xl': '1199.98px',+ 'xxl': '1399.98px'+ },+ doc: false,+ inlineCSS: false,+ currentElement: null,+ currentSelector: null,+ currentSelectorIdClass: null,+ currentBreakpoint: "none",+ currentMedia: "none",+ state: "",//hover, active etc+ themeMode: "attribute",//attribute, media+ theme: null,++ init: function (doc) {if (doc) {this.doc = doc;-+let style = false;let _style = false;-+//check if editor style is presentfor (let i = 0; i < doc.styleSheets.length; i++) {- _style = doc.styleSheets[i];- if (_style.ownerNode.id && _style.ownerNode.id == "vvvebjs-styles") {- style = _style.ownerNode;- break;- }+ _style = doc.styleSheets[i];+ if (_style.ownerNode && _style.ownerNode.id == "vvvebjs-styles") {+ style = _style.ownerNode;+ break;+ }}-+document.getElementById("vvvebjs-styles-css")?.remove();-- //if style element does not exist create it++ //a new document may have different nodes so drop cached selector+ this.currentElement = null;+ this.currentSelector = null;+ this.currentSelectorIdClass = null;++ //if style element does not exist create itif (!style) {style = generateElements('<style id="vvvebjs-styles"></style>')[0];+ if (!style && typeof doc.createElement === "function") {+ style = doc.createElement("style");+ style.id = "vvvebjs-styles";+ }+ if (!style) return this.cssContainer;doc.head.append(style);- return this.cssContainer = style;+ this.cssContainer = style;+ //fresh sheet, drop styles parsed from the previous document+ this.styles = {};+ this._preservedAtRules = [];+ return this.cssContainer;}-+//if it existsthis.cssContainer = style;this.loadCss();- return this.cssContainer;+ return this.cssContainer;}- },-- loadCss: function() {- let style = this.cssContainer.sheet;- //if style exist then load all css styles for editor- for (let j = 0; j < style.cssRules.length; j++) {- let media = "none";-- if (style.cssRules[j].media) {- for (breakpoint in this.breakpoints) {- if (style.cssRules[j].media[0] === "@media (max-width: " + this.breakpoints[breakpoint] + ")") {- media = breakpoint;- break;- }- }- }+ },- style.cssRules[j].media-- const selector = (media === "none") ? style.cssRules[j].selectorText : style.cssRules[j].cssRules[0].selectorText;- const styles = (media === "none") ? style.cssRules[j].style : style.cssRules[j].cssRules[0].style;+ loadCss: function () {+ //reset previous state so deleted selectors don't linger after reload+ this.styles = {};+ this._preservedAtRules = [];- if (media) {- this.styles[media] = this.styles[media] ?? {};- if (selector) {- this.styles[media][selector] = {};-- for (let k = 0; k < styles.length; k++) {-- const property = styles[k];- const value = styles[property];-- this.styles[media][selector][property] = value;+ let rules = null;+ try {+ let sheet = this.cssContainer && this.cssContainer.sheet;+ if (!sheet) return this.styles;+ //may throw SecurityError for cross-origin sheets or be null while parsing+ rules = sheet.cssRules;+ if (!rules) return this.styles;+ } catch (e) {+ console.warn("Vvveb.StyleManager.loadCss: cannot read stylesheet:", e);+ return this.styles;+ }++ for (let j = 0; j < rules.length; j++) {+ let rule = rules[j];+ if (!rule) continue;++ //grouping rule with nested rules (e.g. @media) holds its+ //condition in `media`/`conditionText` instead of selectorText/style+ if (rule.media && rule.cssRules) {+ let media = "";+ try {+ media = rule.media.mediaText || rule.conditionText || "";+ } catch (e) {+ media = "";+ }+ if (!media) media = "none";++ let innerRules = null;+ try {+ innerRules = rule.cssRules;+ } catch (e) {+ console.warn("Vvveb.StyleManager.loadCss: cannot read @media rules:", e);+ }+ if (!innerRules || !innerRules.length) continue;++ for (let k = 0; k < innerRules.length; k++) {+ let inner = innerRules[k];+ if (!inner) continue;+ if (inner.selectorText && inner.style) {+ this._addStyleRule(media, inner.selectorText, inner.style);+ } else if (inner.cssText) {+ //non-style rule nested in @media (e.g. @supports/@keyframes):+ //keep the media context so it still applies after regenerate+ this._preservedAtRules.push(`@media ${media} {\n${inner.cssText}\n}`);}}+ } else if (rule.selectorText && rule.style) {+ this._addStyleRule("none", rule.selectorText, rule.style);+ } else if (rule.cssText) {+ //at-rules without selector/style (@font-face, @keyframes,+ //@supports, @layer, @import, ...) are kept verbatim so a+ //later generateCss() doesn't silently delete them+ this._preservedAtRules.push(rule.cssText);}- }+ }++ return this.styles;},-- getSelectorForElement: function(element) {++ _addStyleRule: function (media, selectorText, styleDecl) {+ let selector = (selectorText || "").trim();+ if (!selector || !styleDecl || !styleDecl.length) return;++ this.styles[media] = this.styles[media] ?? {};+ let props = this.styles[media][selector] ?? (this.styles[media][selector] = {});++ for (let k = 0; k < styleDecl.length; k++) {+ let property = typeof styleDecl.item === "function" ? styleDecl.item(k) : styleDecl[k];+ if (!property) continue;+ let value = typeof styleDecl.getPropertyValue === "function" ? styleDecl.getPropertyValue(property) : styleDecl[property];+ if (value == null || value === "") {+ //shorthand or engine quirk fallback, skip truly empty values+ value = styleDecl[property];+ if (value == null || value === "") continue;+ }+ let priority = typeof styleDecl.getPropertyPriority === "function" ? styleDecl.getPropertyPriority(property) : "";+ props[property] = priority ? `${value} !${priority}` : value;+ }++ //don't keep empty blocks (e.g. rules made only of comments)+ if (Object.keys(props).length === 0) {+ delete this.styles[media][selector];+ }+ },++ getSelectorForElement: function (element) {if (!element) return '';-+let currentElement = element;let selector = [];-+while (currentElement.parentElement) {let elementSelector = "";- let classSelector = Array.from(currentElement.classList).map(function (className) {- if (Vvveb.Builder.ignoreClasses.indexOf(className) == -1) {- return "." + className;- }- }).join("");+ let classSelector = Array.from(currentElement.classList).filter(function (className) {+ return className && Vvveb.Builder.ignoreClasses.indexOf(className) == -1;+ }).map(function (className) {+ //escape classes like Tailwind's `w-1/2` or `md:flex` into valid selectors+ return "." + (typeof CSS !== "undefined" && CSS.escape ? CSS.escape(className) : className.replace(/([^a-zA-Z0-9_-])/g, "\\$&"));+ }).join("");//element (tag) selector- let tag = currentElement.tagName.toLowerCase();+ let tag = (currentElement.tagName || "").toLowerCase();+ if (!tag) break;//exclude top most element body unless the parent element is bodyif (tag == "body" && selector.length > 1) {break;}-+//stop at a unique element (with id)if (currentElement.id) {- elementSelector = "#" + currentElement.id;+ let id = (typeof CSS !== "undefined" && CSS.escape) ? CSS.escape(currentElement.id) : String(currentElement.id).replace(/([^a-zA-Z0-9_-])/g, "\\$&");+ elementSelector = "#" + id;selector.push(elementSelector);break;} else if (classSelector) {@@ -3248,52 +3739,110 @@ Vvveb.StyleManager = {//element selectorelementSelector = tag}-+if (elementSelector) {selector.push(elementSelector);}-+currentElement = currentElement.parentElement;}-- return selector.reverse().join(" > ");- },-- setState: function(state) {++ let selectorText = selector.reverse().join(" > ");++ if (this.themeMode == "attribute" && (this.theme == "light" || this.theme == "dark")) {+ selectorText = `[data-bs-theme="${this.theme}"] ` + selectorText;+ }++ return selectorText;+ },++ setState: function (state) {this.state = state;},- addSelectorState: function(selector) {- return selector + (this.state ? ":" + this.state : "");+ setTheme: function (theme = null) {//light, dark, null+ this.theme = theme;+ //theme is baked into cached selectors (attribute mode), drop stale cache+ this.currentElement = null;+ this.currentSelector = null;+ this.currentSelectorIdClass = null;+ this.setMedia();+ },++ setMedia: function (media = null) {+ if (!media) {+ media = "";++ if (this.themeMode == "media" && (this.theme == "light" || this.theme == "dark")) {+ media = `(prefers-color-scheme: ${this.theme})`;+ }++ if (this.currentBreakpoint != "none") {+ let width = this.breakpoints[this.currentBreakpoint];+ if (width) {+ if (media) {+ media += " and ";+ }++ media += `(max-width: ${width})`;+ }+ }+ }++ if (!media) {+ media = "none";+ }++ this.currentMedia = media;},- setStyle: function(element, styleProp, value) {+ addSelectorState: function (selector) {+ if (!selector) return selector;+ return selector + (this.state ? ":" + this.state : "");+ },++ setStyle: function (element, styleProp, value) {let selector;-- if (typeof(element) == "string") {++ if (typeof (element) == "string") {selector = element;} else {let node = element;- //if propert is set with inline style attribute then override it and don't save to css+ //if property is set with inline style attribute then override it and don't save to css//inline text editor sets properties like font-size inline that can't be later overriten from css- if (node.style && node.style[styleProp]) {- node.style[styleProp] = value;+ //use getPropertyValue/setProperty so hyphenated names ("font-size") work+ let inlineValue = node && node.style && typeof node.style.getPropertyValue === "function" ?+ node.style.getPropertyValue(styleProp) : (node && node.style ? node.style[styleProp] : "");+ if (inlineValue) {+ if (typeof node.style.setProperty === "function") {+ node.style.setProperty(styleProp, value);+ } else {+ node.style[styleProp] = value;+ }return element;}- selector = this.getSelectorForElement(node);+ selector = this.getSelectorForElement(node);}-++ if (!selector) return element;+if (this.inlineCSS) {- element.style[styleProp] = value;- return element;+ //inline mode needs a real element, not a selector string+ if (typeof (element) == "string" || !element.style) return element;+ if (typeof element.style.setProperty === "function") {+ element.style.setProperty(styleProp, value);+ } else {+ element.style[styleProp] = value;+ }+ return element;}-+selector = this.addSelectorState(selector);-- const media = this.currentBreakpoint;-++ const media = this.currentMedia;+//styles[media][selector][styleProp] = valueif (!this.styles[media]) {this.styles[media] = {};@@ -3301,173 +3850,216 @@ Vvveb.StyleManager = {if (!this.styles[media][selector]) {this.styles[media][selector] = {};}- if (!this.styles[media][selector][styleProp]) {- this.styles[media][selector][styleProp] = {};+ if (value == null || value === "") {+ //empty value unsets the property instead of writing invalid `prop: ;`+ delete this.styles[media][selector][styleProp];+ if (Object.keys(this.styles[media][selector]).length === 0) {+ delete this.styles[media][selector];+ }+ if (Object.keys(this.styles[media]).length === 0) {+ delete this.styles[media];+ }+ } else {+ this.styles[media][selector][styleProp] = value;}- this.styles[media][selector][styleProp] = value;-- this.generateCss(media);- window.dispatchEvent(new CustomEvent("vvveb.StyleManager.setStyle", {detail: {element, styleProp, value}}));-- return element;- //uncomment bellow code to set css in element's style attribute- //return element.css(styleProp, value);+ this.generateCss();++ window.dispatchEvent(new CustomEvent("Vvveb.StyleManager.setStyle", { detail: { element, styleProp, value } }));++ return element;},-+setCss: function (css) {+ if (!this.cssContainer) return this.styles;this.cssContainer.innerHTML = css;this.loadCss();+ return this.styles;},- getCss: function (css) {+ /**+ * Returns the current CSS content from the style element.+ *+ * @returns {string} Raw CSS text.+ */+ getCss: function () {+ if (!this.cssContainer) return "";return this.cssContainer.innerHTML;},-- generateCss: function (media) {- //let css = "";- //for (selector in this.styles[media]) {- // css += `${selector} {`;- // for (property in this.styles[media][selector]) {- // value = this.styles[media][selector][property];- // css += `${property}: ${value};`;- // }- // css += '}';- //}-- //this.cssContainer.innerHTML = css;-- //return element;+ /**+ * Generates a full CSS string from the styles map and writes to the stylesheet.+ *+ * @returns {string} The generated CSS text.+ */+ generateCss: function () {//refresh container element to avoid issues with changes from code editor- this.cssContainer = this.doc.getElementById("vvvebjs-styles");+ if (this.doc) {+ this.cssContainer = this.doc.getElementById("vvvebjs-styles") || this.cssContainer;+ }+ if (!this.cssContainer) return "";let css = "";- for (media in this.styles) {+ //re-emit at-rules loadCss() preserved verbatim (@font-face, @keyframes, ...)+ if (this._preservedAtRules && this._preservedAtRules.length) {+ css += this._preservedAtRules.join("\n\n") + "\n\n";+ }+ for (let media in this.styles) {+ let selectors = this.styles[media];+ if (!selectors || Object.keys(selectors).length === 0) continue;+ let indent = "";if (media !== "none") {- let width = this.breakpoints[media];- css += `@media (max-width: ${width}){\n\n`- }- for (selector in this.styles[media]) {- css += `${selector} {\n`;- for (property in this.styles[media][selector]) {- const value = this.styles[media][selector][property];- css += `\t${property}: ${value};\n`;+ css += `@media ${media} {\n\n`;+ indent = `\t`;+ }+ for (let selector in selectors) {+ let props = selectors[selector];+ if (!props || Object.keys(props).length === 0) continue;+ css += indent + `${selector} {\n`;+ for (let property in props) {+ const value = props[property];+ css += indent + `\t${property}: ${value};\n`;}- css += '}\n\n';+ css += indent + '}\n\n';}if (media !== "none") {- css += `}\n\n`+ css += `}\n\n`;}}return this.cssContainer.innerHTML = css;},--- _getCssStyle: function(element, styleProp){+++ _getCssStyle: function (element, styleProp) {+ if (!element || !styleProp) return "";+let value = "", el, selector, media;el = element;- if (el != this.currentElement) {+ //cached selector goes stale when the element's id/classes change+ //(e.g. class edited from the properties panel), so key on them too+ let idClass = (el.id || "") + "\0" + (el.className != null ? String(el.className) : "");+ if (el != this.currentElement || idClass != this.currentSelectorIdClass) {selector = this.getSelectorForElement(el);this.currentElement = el;- this.currentSelector = selector+ this.currentSelector = selector;+ this.currentSelectorIdClass = idClass;} else {selector = this.currentSelector;}selector = this.addSelectorState(selector);- media = this.currentBreakpoint;+ media = this.currentMedia;- if (el.style && el.style.length > 0 && el.style[styleProp]) {//check inline- value = el.style[styleProp];+ let inlineValue = el.style && typeof el.style.getPropertyValue === "function" ?+ el.style.getPropertyValue(styleProp) : (el.style ? el.style[styleProp] : "");+ if (inlineValue) {//check inline+ value = inlineValue;} else if (this.styles[media] !== undefined && this.styles[media][selector] !== undefined && this.styles[media][selector][styleProp] !== undefined) {//check defined cssvalue = this.styles[media][selector][styleProp];-- if (styleProp == 'font-family') {+ } else {+ //use the element's own document, it lives in the iframe not the builder page+ let view = el.ownerDocument && el.ownerDocument.defaultView;+ if (view && typeof view.getComputedStyle === "function") {+ try {+ value = view.getComputedStyle(el, null).getPropertyValue(styleProp);+ } catch (e) {+ value = "";+ }}- } else if (window.getComputedStyle) {- value = document.defaultView.getDefaultComputedStyle ?- document.defaultView.getDefaultComputedStyle(el,null).getPropertyValue(styleProp) :- window.getComputedStyle(el,null).getPropertyValue(styleProp);-}-+return value;},-- getStyle: function(element,styleProp){++ getStyle: function (element, styleProp) {return this._getCssStyle(element, styleProp);}}Vvveb.ContentManager = {- getAttr: function(element, attrName) {+ getAttr: function (element, attrName) {+ if (!element || typeof element.getAttribute !== "function" || !attrName) return null;return element.getAttribute(attrName);},-- setAttr: function(element, attrName, value) {- return element.setAttribute(attrName, value);++ setAttr: function (element, attrName, value) {+ if (!element || !attrName) return element;+ if (value == null) {+ if (typeof element.removeAttribute === "function") element.removeAttribute(attrName);+ } else if (typeof element.setAttribute === "function") {+ element.setAttribute(attrName, value);+ }+ return element;},-- setHtml: function(element, html, outer = false) {++ setHtml: function (element, html, outer = false) {+ if (!element) return element;if (outer) {- const template = document.createElement('template');- template.innerHTML = html.trim();- let newelement = template.content.children[0];- element.parentNode.replaceChild(newelement,element);- element.remove();+ //parse in the element's own document so the node needs no cross-document adoption+ let doc = element.ownerDocument || document;+ if (!element.parentNode || typeof doc.createElement !== "function") return element;+ const template = doc.createElement('template');+ template.innerHTML = String(html ?? "");+ let newelement = template.content && template.content.children && template.content.children[0];+ if (!newelement) return element;+ element.parentNode.replaceChild(newelement, element);return newelement;} else {- element.innerHTML = html;+ element.innerHTML = html ?? "";}-+return element;},-- getHtml: function(element, outer = false) {++ getHtml: function (element, outer = false) {+ if (!element) return "";if (outer) {- return element.outerHTML;+ return element.outerHTML ?? "";} else {- return element.innerHTML;+ return element.innerHTML ?? "";}},- setText: function(element, text) {- return element.textContent = text;+ setText: function (element, text) {+ if (!element) return element;+ element.textContent = text ?? "";+ return element;},-- getText: function(element) {- return element.textContent;++ getText: function (element) {+ if (!element) return "";+ return element.textContent ?? "";},};-function getNodeTree (node, parent, allowedComponents, idToNode = {}) {-- function getNodeTreeTraverse (node, parent, id = '') {-+function getNodeTree(node, parent, allowedComponents, idToNode = {}) {++ function getNodeTreeTraverse(node, parent, id = '') {+if (node.hasChildNodes()) {for (let j = 0; j < node.childNodes.length; j++) {-+const child = node.childNodes[j];//skip text and comments nodesif (child.nodeType == 3 || child.nodeType == 8) {continue;}-+let element;- if (child && child["attributes"] != undefined &&+ let matchChild;+ if (child && child["attributes"] != undefined &&(matchChild = Vvveb.Components.matchNode(child))) {if (Array.isArray(allowedComponents)&& allowedComponents.indexOf(matchChild.type) == -1) {-- element = getNodeTreeTraverse(child, parent);++ element = getNodeTreeTraverse(child, parent);continue;}-+let title;for (const attr of ["id", "title", "aria-label"]) {title = child.getAttribute(attr);@@ -3489,55 +4081,58 @@ function getNodeTree (node, parent, allowedComponents, idToNode = {}) {element.children = [];parent.push(element);idToNode[id + '-' + j] = child;-+element = getNodeTreeTraverse(child, element.children, id + '-' + j);} else {- element = getNodeTreeTraverse(child, parent, id + '-' + j);+ element = getNodeTreeTraverse(child, parent, id + '-' + j);}}}return false;}-+getNodeTreeTraverse(node, parent, '1');}function drawComponentsTree(tree) {let j = 1;let prefix = Math.floor(Math.random() * 100);-+function drawComponentsTreeTraverse(tree) {let list = document.createElement("ol");j++;-- for (i in tree) {++ for (let i in tree) {let node = tree[i];let id = node.id;let li;-+if (!id) {- id = prefix + '-' + j + '-' + i;+ id = prefix + '-' + j + '-' + i;}-- let title = (node.title ? friendlyName(node.title.substr(0, 21)) : "");++ let title = (node.title ? friendlyName(node.title.substring(0, 21)) : "");if (title) {title = ` - <span class="text-secondary">${title}</span>`;}-++ const componentName = node.name;+ const componentImage = Vvveb.imgBaseUrl + node.image;+if (tree[i].children.length > 0) {- li = generateElements('<li data-component="' + node.name + '">\- <label for="id' + id + '" style="background-image:url(' + Vvveb.imgBaseUrl + node.image + ')">\- <span>' + node.name + '</span>' + title + '\+ li = generateElements('<li data-component="' + componentName + '">\+ <label for="id' + id + '" style="background-image:url(' + componentImage + ')">\+ <span>' + componentName + '</span>' + title + '\</label>\<input type="checkbox" id="id' + id + '">\- </li>')[0];+ </li>')[0];li.append(drawComponentsTreeTraverse(node.children));}else {- li = generateElements('<li data-component="' + node.name + '" class="file">\- <label for="id' + id + '" style="background-image:url(' + Vvveb.imgBaseUrl + node.image + ')">\- <span>' + node.name + '</span>' + title + '\+ li = generateElements('<li data-component="' + componentName + '" class="file">\+ <label for="id' + id + '" style="background-image:url(' + componentImage + ')">\+ <span>' + componentName + '</span>' + title + '\</label>\<input type="checkbox" id="id' + id + '">\</li>')[0];@@ -3546,10 +4141,10 @@ function drawComponentsTree(tree) {li._treeNode = node.node;list.append(li);}-+return list;}-+return drawComponentsTreeTraverse(tree);}@@ -3558,11 +4153,11 @@ let selected = null;let dragover = null;Vvveb.SectionList = {-+selector: '.sections-container',allowedComponents: {},-- init: function(allowedComponents = {}) {++ init: function (allowedComponents = {}) {this.allowedComponents = allowedComponents;@@ -3571,14 +4166,14 @@ Vvveb.SectionList = {if (element) {let node = element.parentNode._node;if (node) {- node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ node.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });//node.click();Vvveb.Builder.selectNode(node);Vvveb.Builder.loadNodeComponent(node);}}});-+document.querySelector(this.selector).addEventListener("dblclick", function (e) {let element = e.target.closest(":scope > div");if (element) {@@ -3586,40 +4181,40 @@ Vvveb.SectionList = {node.click();}});--++document.querySelector(this.selector).addEventListener("click", function (e) {let element = e.target.closest("li[data-component] label");if (element) {let node = element.parentNode._node;if (node) {- node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ node.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });node.click();}}});-+document.querySelector(this.selector).addEventListener("mouseenter", function (e) {let element = e.target.closest("li[data-component] label");if (element) {- const node = document.querySelector(element.parentNode._node);- node.css("outline","1px dashed blue");+ const node = element.parentNode._node;+ node.style.outline = "1px dashed blue";}});-- document.querySelector(this.selector).addEventListener("mouseleave", function (e){++ document.querySelector(this.selector).addEventListener("mouseleave", function (e) {let element = e.target.closest("li[data-component] label");if (element) {- const node = document.querySelector(element.parentNode._node);- node.css("outline","");+ const node = element.parentNode._node;+ node.style.outline = "";if (node.getAttribute("style") == "") node.removeAttribute("style");}- });-+ });+document.querySelector(this.selector).addEventListener("dragstart", this.dragStart);document.querySelector(this.selector).addEventListener("dragover", this.dragOver);document.querySelector(this.selector).addEventListener("dragend", this.dragEnd);-+document.querySelector(this.selector).addEventListener("click", function (e) {let element = e.target.closest(".delete-btn");if (element) {@@ -3628,7 +4223,7 @@ Vvveb.SectionList = {node.remove();section.remove();Vvveb.TreeList.loadComponents();-+e.stopPropagation();e.preventDefault();}@@ -3651,7 +4246,7 @@ Vvveb.SectionList = {img.style.display = "none";}})-+/*document.querySelector(this.selector).addEventListener("click", ".up-btn", function (e) {let section = e.target.closest(".section-item");@@ -3673,7 +4268,7 @@ Vvveb.SectionList = {});*/-+let self = this;document.querySelector(".sections-list").addEventListener("click", function (e) {let element = e.target.closest(".add-section-btn");@@ -3683,21 +4278,21 @@ Vvveb.SectionList = {let node = generateElements(section.html)[0];let sectionType = node.tagName.toLowerCase();let afterSection = Vvveb.Builder.frameBody.querySelector(":scope > " + sectionType + ":last-of-type");-+if (afterSection) {afterSection.after(node);} else {if (sectionType == "nav") {- afterSection = Vvveb.Builder.frameBody.querySelector(":scope > nav:first,> header:last-of-type");-+ afterSection = Vvveb.Builder.frameBody.querySelector(":scope > nav:first,> header:last-of-type");+if (afterSection) {afterSection.before(node);} else {Vvveb.Builder.frameBody.append(node);}} else if (sectionType != "footer") {- afterSection = Vvveb.Builder.frameBody.querySelector("body > footer:last-of-type");-+ afterSection = Vvveb.Builder.frameBody.querySelector("body > footer:last-of-type");+if (afterSection) {afterSection.before(node);} else {@@ -3712,7 +4307,7 @@ Vvveb.SectionList = {}}}-+//node.click();Vvveb.Server.renderComponents(node);@@ -3726,67 +4321,69 @@ Vvveb.SectionList = {delay(() => node.click(), 1000);*/- Vvveb.Undo.addMutation({type: 'childList',- target: node.parentNode,- addedNodes: [node],- nextSibling: node.nextSibling});+ Vvveb.Undo.addMutation({+ type: 'childList',+ target: node.parentNode,+ addedNodes: [node],+ nextSibling: node.nextSibling+ });+-self.loadSections();Vvveb.TreeList.loadComponents();Vvveb.TreeList.selectComponent(node);- node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ node.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });e.preventDefault();}});-+document.querySelector(this.selector).addEventListener("click", function (e) {let element = e.target.closest(".properties-btn");if (element) {let section = element.closest(".section-item");let node = section._node;node.click();-+e.preventDefault();}});-+},-- getSections: function() {++ getSections: function () {let sections = [];- let sectionList =+ let sectionList =window.FrameDocument.body.querySelectorAll(':scope > section, :scope > header, :scope > footer, :scope > main, :scope > nav');-+sectionList.forEach(function (node, i) {let id = node.id ? node.id : (node.title ? node.title : node.ariaLabel ?? node.className);if (!id) {- id = 'section-' + Math.floor(Math.random() * 1000);+ id = 'section-' + Math.floor(Math.random() * 1000);}let section = {- name: id.replace(/[^\w+]+/g,' '),+ name: id.replace(/[^\w+]+/g, ' '),id: node.id,type: node.tagName.toLowerCase(),node: node};sections.push(section);});-+return sections;},- loadComponents: function(sectionListItem, section, allowedComponents = {}) {+ loadComponents: function (sectionListItem, section, allowedComponents = {}) {let tree = [];getNodeTree(section, tree, allowedComponents);-+let html = drawComponentsTree(tree);document.querySelector("ol", sectionListItem).replaceWith(html);},--- addSection: function(data) {+++ addSection: function (data) {let section = generateElements(tmpl("vvveb-section", data))[0];section._node = data.node;document.querySelector(this.selector).append(section);@@ -3794,29 +4391,29 @@ Vvveb.SectionList = {//this.loadComponents(section, data.node, this.allowedComponents);},- loadSections: function() {+ loadSections: function () {let sections = this.getSections();let container = document.querySelector(this.selector);container.replaceChildren();- for (i in sections) {+ for (let i in sections) {this.addSection(sections[i]);}},-+//drag and drop- dragOver: function(e) {+ dragOver: function (e) {let element = e.target.closest("div");if (element) {- if (e.target != dragover &&+ if (e.target != dragover &&e.target.className == "section-item") {if (dragover) {dragover.classList.remove("drag-over");}-- dragover = e.target;++ dragover = e.target;dragover.classList.add("drag-over");}}@@ -3842,15 +4439,17 @@ Vvveb.SectionList = {//replace sectionreplaceNode.parentNode.insertBefore(selectedNode, replaceNode);}-+dragover.classList.remove("drag-over");-+let node = selectedNode;-- Vvveb.Undo.addMutation({type: 'move',- target: node,- oldParent: node.parentNode,- oldNextSibling: node.nextSibling});++ Vvveb.Undo.addMutation({+ type: 'move',+ target: node,+ oldParent: node.parentNode,+ oldNextSibling: node.nextSibling+ });}selected = null;@@ -3867,32 +4466,32 @@ Vvveb.SectionList = {}Vvveb.StyleList = {-+selector: '.sections-container',allowedComponents: {},-- applyStyle: function(style) {- let doc = window.FrameDocument;++ applyStyle: function (style) {+ let doc = window.FrameDocument;let themeStyle = doc.getElementById("vvvebjs-theme-style");-+if (!style) {if (themeStyle) themeStyle.remove();return;}-+//if style element does not exist create itif (!themeStyle) {- themeStyle = doc.createElement("link");+ themeStyle = doc.createElement("link");themeStyle.id = "vvvebjs-theme-style";themeStyle.rel = "stylesheet";themeStyle.media = "screen";doc.head.append(themeStyle);}-+themeStyle.href = style;},-- load: function(doc) {++ load: function (doc) {let themeStyle = window.FrameDocument.getElementById("vvvebjs-theme-style");if (themeStyle) {let style = Vvveb.Styles.getByStyle(themeStyle.getAttribute("href"));@@ -3901,15 +4500,15 @@ Vvveb.StyleList = {}}},-- init: function() {++ init: function () {let self = this;document.querySelector(".styles-list").addEventListener("click", function (e) {let element = e.target.closest("li");if (element) {let style = Vvveb.Styles.get(element.dataset.type);-+if (element.classList.contains("active")) {element.classList.remove("active");style = "";//if already active remove current style@@ -3917,15 +4516,15 @@ Vvveb.StyleList = {document.querySelector(".styles-list .active")?.classList.remove("active");element.classList.add("active");}-+self.applyStyle(style.style);-- console.log(style);++ //console.log(style);e.preventDefault();}});-+}}@@ -3933,20 +4532,20 @@ Vvveb.TreeList = {selector: '#tree-list',container: null,-+tree: [],-- idToNode : {},-- init: function() {++ idToNode: {},++ init: function () {// header movethis.container = document.querySelector(this.selector);let header = this.container.querySelector(".header");let isDown = false;- let offset = [0,0];+ let offset = [0, 0];let self = this;- header.addEventListener('mousedown', function(e) {+ header.addEventListener('mousedown', function (e) {if (e.which == 1) {//left clickisDown = true;offset = [@@ -3956,18 +4555,18 @@ Vvveb.TreeList = {}}, true);- document.addEventListener('mouseup', function() {+ document.addEventListener('mouseup', function () {isDown = false;}, true);- document.addEventListener('mousemove', function(event) {+ document.addEventListener('mousemove', function (event) {if (isDown) {event.preventDefault();let left = Math.max(event.clientX + offset[0], 0);let top = Math.max(event.clientY + offset[1], 0);if (left >= 0 && (left < (window.innerWidth - self.container.clientWidth))) self.container.style.left = left + "px";- if (top >= 0 && (top < (window.innerHeight - self.container.clientHeight))) self.container.style.top = top + "px";+ if (top >= 0 && (top < (window.innerHeight - self.container.clientHeight))) self.container.style.top = top + "px";}});@@ -3975,21 +4574,21 @@ Vvveb.TreeList = {let element = e.target.closest("li[data-component] label");if (element) {const node = element.parentNode._treeNode;- node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ node.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });//node.click();Vvveb.Builder.selectNode(node);Vvveb.Builder.loadNodeComponent(node);-- document.querySelector(self.selector + " .active")?.classList.remove("active");++ document.querySelector(self.selector + " .active")?.classList.remove("active");element.querySelector("label").classList.add("active");}})-+document.querySelector(this.selector).addEventListener("mousemove", function (e) {let element = e.target.closest("li[data-component]");if (element) {const node = element._treeNode;-+node.dispatchEvent(new MouseEvent("mousemove", {bubbles: true,cancelable: true,@@ -3997,8 +4596,8 @@ Vvveb.TreeList = {}})},-- selectComponent: function(node) {++ selectComponent: function (node) {let id;for (const i in this.idToNode) {if (node == this.idToNode[i]) {@@ -4010,7 +4609,7 @@ Vvveb.TreeList = {if (id) {let element = document.getElementById("id" + id);- this.container.querySelector(".active")?.classList.remove("active");+ this.container.querySelector(".active")?.classList.remove("active");//collapse alllet checkboxes = this.container.querySelectorAll("input[type=checkbox]:checked");for (let i = 0, len = checkboxes.length; i < len; i++) {@@ -4026,61 +4625,66 @@ Vvveb.TreeList = {let parent = element;let current = element;while (parent = current.closest("li")) {- current = parent.parentNode;+ current = parent.parentNode;let input = parent.querySelector("input");if (input && input.hasAttribute("type") && input.type == "checkbox") {input.checked = true;}}-+element.checked = true;element.labels[0].classList.add("active");- element.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ element.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });}}-+return false;},-- loadComponents: function() {++ loadComponents: function () {let list = this.container.querySelector(".tree > ol");//if navigator not visible don't loadif (list.offsetParent === null) return;-- this.tree = [];++ this.tree = [];this.idToNode = {};getNodeTree(window.FrameDocument.body, this.tree, {}, this.idToNode);-+let ol = drawComponentsTree(this.tree);list.replaceWith(ol);//list.replaceWith(html);- },+ },}Vvveb.FileManager = {- tree:false,- pages:{},+ tree: false,+ _init: false,+ pages: {},currentPage: false,allowedComponents: {},-- init: function(allowedComponents = {}) {-++ init: function (allowedComponents = {}) {+this.allowedComponents = allowedComponents;this.tree = document.querySelector("#filemanager .tree > ol");+ if (!this.tree) return;this.tree.replaceChildren();-+ //attach handlers once, re-calling init only clears the tree and updates the filter+ if (this._init) return;+ this._init = true;+this.tree.addEventListener("click", function (e) {- let element = event.target.closest("a");+ let element = e.target.closest("a");if (element) {e.stopImmediatePropagation();if (element.classList.contains('view')) return;e.preventDefault();return false;}- });-+ });+this.tree.addEventListener("click", function (e) {- let element = event.target.closest(".delete");+ let element = e.target.closest(".delete");if (element) {Vvveb.FileManager.deletePage(element.closest("li"), e);e.stopImmediatePropagation();@@ -4090,7 +4694,7 @@ Vvveb.FileManager = {});this.tree.addEventListener("click", function (e) {- let element = event.target.closest(".rename");+ let element = e.target.closest(".rename");if (element) {Vvveb.FileManager.renamePage(element.closest("li"), e, false);e.stopImmediatePropagation();@@ -4100,7 +4704,7 @@ Vvveb.FileManager = {});this.tree.addEventListener("click", function (e) {- let element = event.target.closest(".duplicate");+ let element = e.target.closest(".duplicate");if (element) {Vvveb.FileManager.renamePage(element.closest("li"), e, true);e.stopImmediatePropagation();@@ -4108,122 +4712,140 @@ Vvveb.FileManager = {return false;}});-+this.tree.addEventListener("click", function (e) {- let element = event.target.closest("li[data-page] label");+ let element = e.target.closest ? e.target.closest("li[data-page] label") : null;if (element) {let page = element.parentNode.dataset.page;if (page) {- Vvveb.FileManager.loadPage(page, allowedComponents);-- let data = Vvveb.FileManager.pages[page];-- let pageUrl = window.location.pathname + "?module=editor/editor&template=" + data["file"] + "&url=" + data["url"] + "&name=" + data["title"];+ Vvveb.FileManager.loadPage(page, Vvveb.FileManager.allowedComponents);++ let data = Vvveb.FileManager.pages[page] || {};++ let pageUrl = window.location.pathname + "?module=editor/page-builder&template=" + encodeURIComponent(data["file"] ?? "") + "&url=" + encodeURIComponent(data["url"] ?? "") + "&name=" + encodeURIComponent(data["title"] ?? "");if (data["post_id"]) {- pageUrl += "&post_id=" + data["post_id"];+ pageUrl += "&post_id=" + encodeURIComponent(data["post_id"]);}if (data["product_id"]) {- pageUrl += "&product_id=" + data["product_id"];+ pageUrl += "&product_id=" + encodeURIComponent(data["product_id"]);}-- window.history.pushState({name:page}, null, pageUrl);++ window.history.pushState({ name: page }, "", pageUrl);}-+e.preventDefault();- return false;+ return false;}});-+this.tree.addEventListener("click", function (e) {- let element = event.target.closest("li[data-component] label");+ let element = e.target.closest ? e.target.closest("li[data-component] label") : null;if (element) {- const node = e.currentTarget.parentNode._node;- node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ let li = element.closest("li[data-component]");+ const node = li && (li._treeNode || li._node);+ if (!node) return;+ node.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });node.click();}});-- this.tree.addEventListener("mouseenter", function (e) {- let element = event.target.closest("li[data-component] label");++ //mouseover bubbles (mouseenter doesn't), so delegate hover from the tree root+ this.tree.addEventListener("mouseover", function (e) {+ let element = e.target.closest ? e.target.closest("li[data-component] label") : null;if (element) {- const node = e.currentTarget.parentNode._node;- node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ let li = element.closest("li[data-component]");+ const node = li && (li._treeNode || li._node);+ if (!node) return;node.dispatchEvent(new MouseEvent("mousemove", {bubbles: true,cancelable: true,}));- //node.trigger("mousemove");- }+ }});},-- clear: function() {++ clear: function () {this.pages = {};this.currentPage = false;- this.tree.replaceChildren();+ if (this.tree) this.tree.replaceChildren();},- deletePage: function(element, e) {- let page = element.dataset;- let post_id = element.dataset.post_id ?? 0;+ /**+ * Returns page list+ */+ getPages: function () {+ return this.pages;+ },++ deletePage: function (element, e) {+ if (!element) return;+ let page = element.dataset;+ let post_id = Number(element.dataset.post_id ?? 0) || 0;let name;let _self = this;+ if (!page || !page.page || !this.pages[page.page]) return;+if (post_id) {- name = element.querySelector('label span')?.textContent;+ name = element.querySelector('label span')?.textContent ?? page.file;} else {name = page.file;}if (confirm(`Are you sure you want to delete "${name}"?`)) {- //allow event to change page or cancel by setting page to false- window.dispatchEvent(new CustomEvent("vvveb.FileManager.deletePage", {- detail: page- }));-- if (page) {-- fetch(deleteFileUrl, {method: "POST", body: new URLSearchParams({file:page.file, post_id, csrf: document.getElementById('csrf')?.value})})+ let event = new CustomEvent("Vvveb.FileManager.deletePage", {+ detail: { ...this.pages[page.page], element },+ cancelable: true+ });+ //allow listeners to veto deletion by preventing default+ window.dispatchEvent(event);+ if (event.defaultPrevented) return;++ fetch(deleteFileUrl, { method: "POST", body: new URLSearchParams({ file: page.file, post_id, csrf: document.getElementById('csrf')?.value ?? "" }) }).then((response) => {- if (!response.ok) { return Promise.reject(response); }+ if (!response.ok) { return Promise.reject(response); }return response.json()}).then((data) => {- let bg = "success";- if (data.success) {- document.querySelectorAll("#top-panel .save-btn").forEach(e => e.setAttribute("disabled", "true"));- } else {- bg = "danger";- }+ let bg = "success";+ if (data.success) {+ document.querySelectorAll("#top-panel .save-btn").forEach(e => e.setAttribute("disabled", "true"));+ //drop map entry and selection only after the server confirms,+ //otherwise currentPage keeps pointing at a deleted page+ delete _self.pages[page.page];+ if (_self.currentPage === page.page) _self.currentPage = false;+ element.remove();+ } else {+ bg = "danger";+ }- displayToast(bg, "Delete", data.message ?? data);+ displayToast(bg, "Delete", data.message ?? data);})- .catch(error => {- let message = error.statusText ?? "Error deleting page!";- displayToast("danger", "Error", message);-- error.text().then( errorMessage => {- let message = errorMessage.substr(0, 200);+ .catch(error => {+ let message = error?.statusText ?? "Error deleting page!";displayToast("danger", "Error", message);- })- });- element.remove();- }+ if (typeof error?.text === 'function') error.text().then(errorMessage => {+ let message = errorMessage.substring(0, 200);+ displayToast("danger", "Error", message);+ })+ });}- },-- renamePage: function(element, e, duplicate = false) {- let page = element.dataset;- let post_id = element.dataset.post_id ?? 0;- let product_id = element.dataset.product_id ?? 0;+ },++ renamePage: function (element, e, duplicate = false) {+ if (!element) return;+ let page = element.dataset;+ let post_id = Number(element.dataset.post_id ?? 0) || 0;+ let product_id = Number(element.dataset.product_id ?? 0) || 0;let newfile;let name;let _self = this;- name = element.querySelector('label span')?.textContent.replace('.html', '');+ let label = element.querySelector('label span')?.textContent ?? "";+ name = label.replace(/\.html$/, '');if (post_id || product_id) {name = prompt(`Enter new name for "${name}"`, name);if (name) {@@ -4234,79 +4856,98 @@ Vvveb.FileManager = {}if (newfile && name) {- //allow event to change page or newfile or cancel by setting page to false- window.dispatchEvent(new CustomEvent("vvveb.FileManager.renamePage", {- detail: {page, newfile}- }));-+ let event = new CustomEvent("Vvveb.FileManager.renamePage", {+ detail: { page, newfile, element },+ cancelable: true+ });+ //allow event to change newfile or cancel by preventing default+ window.dispatchEvent(event);+ if (event.defaultPrevented) return;+ newfile = event.detail.newfile ?? newfile;+if (page) {- fetch(renameFileUrl, {method: "POST", body: new URLSearchParams({file:page.file, newfile:newfile, name, duplicate, post_id, product_id, csrf: document.getElementById('csrf')?.value})})- .then((response) => {- if (!response.ok) { return Promise.reject(response); }- return response.json()- })- .then((data) => {+ fetch(renameFileUrl, { method: "POST", body: new URLSearchParams({ file: page.file, newfile: newfile, name, duplicate, post_id, product_id, csrf: document.getElementById('csrf')?.value ?? "" }) })+ .then((response) => {+ if (!response.ok) { return Promise.reject(response); }+ return response.json()+ })+ .then((data) => {let bg = "success";- if (data.success) {+ if (data.success) {//document.querySelectorAll("#top-panel .save-btn").forEach(e => e.setAttribute("disabled", "true"));} else {bg = "danger";}-- newfile = data.newfile ?? newfile;++ newfile = data.newfile ?? newfile;displayToast(bg, "Rename", data.message ?? data);- let baseName = newfile.replace('.html', '');- let newName = data.name ?? name ?? friendlyName(newfile.replace(/.*[\/\\]+/, '')).replace('.html', '');-+ if (!data.success) return;+ let entry = _self.pages[page.page];+ if (!entry) return;+ let baseName = newfile.replace(/\.html$/, '');+ let newName = data.name ?? name ?? friendlyName(String(newfile).replace(/.*[\/\\]+/, '')).replace(/\.html$/, '');+if (duplicate) {- let addPage = _self.pages[page.page];- addPage["name"] = data.name ?? baseName;- addPage["file"] = newfile;- addPage["title"] = newName;- addPage["url"] = data.url;- addPage["post_id"] = data.post_id;- addPage["product_id"] = data.product_id;-+ //clone so source and copy don't share one data object+ let addPage = { ...entry };+ addPage["name"] = data.name ?? baseName;+ addPage["file"] = newfile;+ addPage["title"] = newName;+ addPage["url"] = data.url ?? addPage["url"];+ addPage["post_id"] = data.post_id ?? addPage["post_id"];+ addPage["product_id"] = data.product_id ?? addPage["product_id"];+if (data.newfile) {//addPage["url"] = Vvveb.themeBaseUrl + addPage["url"]//addPage["url"] = page.url.substring(0, page.url.lastIndexOf("/") + 1) + addPage["url"];}let newPage = Vvveb.FileManager.addPage(baseName, addPage, page.page);- Vvveb.FileManager.scrollToPage(newPage);+ if (newPage) Vvveb.FileManager.scrollToPage(newPage);} else {- _self.pages[page.page]["file"] = newfile;- _self.pages[page.page]["title"] = newName;- page.url = data.url ?? page.url.replace(page.file, newfile);+ entry["file"] = newfile;+ entry["title"] = newName;+ page.url = data.url ?? (page.url ?? "").replace(page.file, newfile);page.file = newfile;- element.querySelector(":scope > label span").innerHTML = newName;- element.querySelector(":scope > label a.view").setAttribute("href", page.url);- _self.pages[page.page]["url"] = page.url;- _self.pages[page.page]["file"] = page.file;+ let labelEl = element.querySelector(":scope > label span");+ if (labelEl) labelEl.textContent = newName;+ let view = element.querySelector(":scope > label a.view");+ if (view) view.setAttribute("href", page.url);+ entry["url"] = page.url;+ entry["file"] = page.file;}- })- .catch(error => {- let message = error.statusText ?? "Error renaming page!";- displayToast("danger", "Error", message);-- error.text().then( errorMessage => {- let message = errorMessage.substr(0, 200);- displayToast("danger", "Error", message);})- });+ .catch(error => {+ let message = error?.statusText ?? "Error renaming page!";+ displayToast("danger", "Error", message);++ if (typeof error?.text === 'function') error.text().then(errorMessage => {+ let message = errorMessage.substring(0, 200);+ displayToast("danger", "Error", message);+ })+ });}}},-- addPage: function(name, data, afterPage = false, append = true) {- //allow event to change name or cancel by setting name to false- window.dispatchEvent(new CustomEvent("vvveb.FileManager.addPage", {- detail: [name, data],- }));+ escSelector: function (value) {+ value = String(value ?? "");+ return (typeof CSS !== "undefined" && CSS.escape) ? CSS.escape(value) : value.replace(/([^a-zA-Z0-9_-])/g, "\\$&");+ },++ addPage: function (name, data, afterPage = false, append = true) {+ let event = new CustomEvent("Vvveb.FileManager.addPage", {+ detail: { name, data },+ cancelable: true+ });+ //allow event to change name or cancel by preventing default (or setting name to false)+ window.dispatchEvent(event);+ if (event.defaultPrevented) return false;+ name = event.detail.name;+ data = event.detail.data;- if (!name) {+ if (!name || !data || typeof data !== "object" || !this.tree) {return false;}@@ -4314,19 +4955,33 @@ Vvveb.FileManager = {data['name'] = name;let folder = this.tree;- if (data.folder) {- if ((data.folder && data.folder != "/") && !(folder = folder.querySelector('li[data-folder="' + data.folder + '"]'))) {+ if (data.folder && data.folder != "/") {+ let folderLi = folder.querySelector('li[data-folder="' + this.escSelector(data.folder) + '"]');+ if (!folderLi) {data.folderTitle = friendlyName(data.folder);//data.folder[0].toUpperCase() + data.folder.slice(1);- folder = generateElements(tmpl("vvveb-filemanager-folder", data))[0];- this.tree.append(folder);+ try {+ folderLi = generateElements(tmpl("vvveb-filemanager-folder", data))[0];+ } catch (e) {+ folderLi = null;+ }+ if (!folderLi) return false;+ this.tree.append(folderLi);}- folder = folder.querySelector("ol");- }-- let page = generateElements(tmpl("vvveb-filemanager-page", data))[0];- if (afterPage && (afterPage = folder.querySelector('[data-page="' + afterPage + '"]'))) {- afterPage.after(page);+ folder = (folderLi.querySelector ? folderLi.querySelector("ol") : null);+ if (!folder) return false;+ }++ let page = null;+ try {+ page = generateElements(tmpl("vvveb-filemanager-page", data))[0];+ } catch (e) {+ page = null;+ }+ if (!page) return false;+ let afterEl = afterPage && folder.querySelector('[data-page="' + this.escSelector(afterPage) + '"]');+ if (afterEl) {+ afterEl.after(page);} else {if (append) {folder.append(page);@@ -4334,134 +4989,158 @@ Vvveb.FileManager = {folder.prepend(page);}}-+return page;},-- addPages: function(pages) {- for (page in pages) {- this.addPage(pages[page]['name'], pages[page]);++ addPages: function (pages) {+ if (!pages || typeof pages !== "object") return;+ for (const page in pages) {+ if (pages[page] && pages[page]['name']) this.addPage(pages[page]['name'], pages[page]);}},-- addComponent: function(name, url, title, page) {- document.querySelector("[data-page='" + page + "'] > ol", this.tree).append(- tmpl("vvveb-filemanager-component", {name:name, url:url, title:title}));++ addComponent: function (name, url, title, page) {+ if (!this.tree || !page) return false;+ let list = this.tree.querySelector("[data-page=\"" + this.escSelector(page) + "\"] > ol");+ if (!list) return false;+ //tmpl() returns an html string, parse it before appending+ let node = null;+ try {+ node = generateElements(tmpl("vvveb-filemanager-component", { name: name, url: url, title: title }))[0];+ } catch (e) {+ node = null;+ }+ if (!node) return false;+ list.append(node);+ return node;},-- loadComponents: function(allowedComponents = {}) {++ loadComponents: function (allowedComponents = {}) {+ if (!this.tree || !this.currentPage || !window.FrameDocument || !window.FrameDocument.body) return;let tree = [];getNodeTree(window.FrameDocument.body, tree, allowedComponents);-+let html = drawComponentsTree(tree);- document.querySelector("[data-page='" + this.currentPage + "'] > ol", this.tree).replaceWith(html);+ this.tree.querySelector("[data-page=\"" + this.escSelector(this.currentPage) + "\"] > ol")?.replaceWith(html);},-- getCurrentUrl: function() {- if (this.currentPage) {++ getCurrentUrl: function () {+ if (this.currentPage && this.pages[this.currentPage]) {return this.pages[this.currentPage]['url'];}- },-- getCurrentPage: function() {+ },++ getCurrentPage: function () {return this.currentPage;- },-- getPageData: function(key) {- if (this.currentPage) {+ },++ getPageData: function (key) {+ if (this.currentPage && this.pages[this.currentPage]) {if (key) {return this.pages[this.currentPage][key];} else {return this.pages[this.currentPage];}}- },--- getCurrentFileName: function() {- if (this.currentPage) {- let folder = this.pages[this.currentPage]['folder'];- folder = folder ? folder + '/': '';- return folder + this.pages[this.currentPage]['file'];- }},-- reloadCurrentPage: function() {+++ getCurrentFileName: function () {+ let entry = this.currentPage && this.pages[this.currentPage];+ if (!entry) return;+ let folder = entry['folder'] ?? '';+ if (folder && !folder.endsWith('/')) folder += '/';+ return folder + entry['file'];+ },++ reloadCurrentPage: function () {if (this.currentPage)- return this.loadPage(this.currentPage);+ return this.loadPage(this.currentPage);},-- loadPage: function(name, allowedComponents = false, disableCache = true, loadComponents = false) {- let url = this.pages[name]['url'] ?? "";-++ loadPage: function (name, allowedComponents = false, disableCache = true, loadComponents = false) {+ let entry = this.pages[name];+ if (!entry || !this.tree) {+ return;+ }+ let url = entry['url'] ?? "";++ //allow event to change url or cancel by preventing default+ let self = this;+ let event = new CustomEvent("Vvveb.FileManager.loadPage", {+ detail: entry,+ cancelable: true,+ });+ window.dispatchEvent(event);+ if (event.defaultPrevented) {+ return;+ }+ url = entry['url'] ?? url;+if (!url) {return;}-- let page = this.tree.querySelector("[data-page='" + name + "']");++ let page = this.tree.querySelector("[data-page=\"" + this.escSelector(name) + "\"]");+ if (!page) return;//remove active from current active pagethis.tree.querySelector("[data-page].active")?.classList.remove("active");//set loaded page as activepage.classList.add("active");//open parent folder if closed- page.closest("[data-folder]")?.querySelector("input[type=checkbox]").setAttribute("checked", true);-- this.currentPage = name;- document.querySelector(".btn-preview-url").setAttribute("href", url);-- //allow event to change page or url or cancel by setting url to false- let self = this;+ page.closest("[data-folder]")?.querySelector("input[type=checkbox]")?.setAttribute("checked", true);- window.dispatchEvent(new CustomEvent("vvveb.FileManager.loadPage", {- detail: self.pages[name],- }));+ this.currentPage = name;+ document.querySelector(".btn-preview-url")?.setAttribute("href", url);if (url) {- Vvveb.Builder.loadUrl(url + (disableCache ? (url.indexOf('?') > -1 ? '&r=':'?r=') + Math.random():''),- function () {+ Vvveb.Builder.loadUrl(url + (disableCache ? (url.indexOf('?') > -1 ? '&r=' : '?r=') + Math.random() : ''),+ function () {if (loadComponents) { Vvveb.FileManager.loadComponents(allowedComponents); }- Vvveb.SectionList.loadSections(allowedComponents);- Vvveb.TreeList.loadComponents();- Vvveb.StyleManager.init();+ Vvveb.SectionList.loadSections(allowedComponents);+ Vvveb.TreeList.loadComponents();+ if (window.FrameDocument) Vvveb.StyleManager.init(window.FrameDocument);Vvveb.ChangeManager.setOriginalContent();});}},- scrollToPage: function(page) {- page.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ scrollToPage: function (page) {+ if (!page || typeof page.scrollIntoView !== "function") return;+ page.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });},}Vvveb.Breadcrumb = {- tree:false,-- init: function() {+ tree: false,++ init: function () {this.tree = document.querySelector(".breadcrumb-navigator > .breadcrumb");this.tree.replaceChildren();this.tree.addEventListener("click", function (e) {- let element = event.target.closest(".breadcrumb-item");+ let element = e.target.closest(".breadcrumb-item");if (element) {let node = element._node;if (node) {//node.click();Vvveb.Builder.selectNode(node);Vvveb.Builder.loadNodeComponent(node);- node.scrollIntoView({behavior: "smooth", block: "center", inline: "center"});+ node.scrollIntoView({ behavior: "smooth", block: "center", inline: "center" });}-+e.preventDefault();}});-+let currentHoverNode;this.tree.addEventListener("mousemove", function (e) {- if (event.target == currentHoverNode) return;- currentHoverNode = event.target;-- let element = event.target.closest(".breadcrumb-item");+ if (e.target == currentHoverNode) return;+ currentHoverNode = e.target;++ let element = e.target.closest(".breadcrumb-item");if (element) {let node = element._node;@@ -4472,26 +5151,26 @@ Vvveb.Breadcrumb = {}})},-- addElement: function(data, element) {++ addElement: function (data, element) {let li = generateElements(tmpl("vvveb-breadcrumb-navigaton-item", data))[0];- li._node = element;+ li._node = element;this.tree.prepend(li);},-- loadBreadcrumb: function(element) {++ loadBreadcrumb: function (element) {this.tree.replaceChildren();let currentElement = element;-+while (currentElement.parentElement) {let elementType = Vvveb.Builder._getElementType(currentElement);let el = elementType[1].toLowerCase();-+this.addElement({- "name": el + " " + elementType[0],+ "name": el + " " + elementType[0],"className": "el-" + el}, currentElement);-+currentElement = currentElement.parentElement;}}@@ -4501,86 +5180,103 @@ Vvveb.Breadcrumb = {Vvveb.Revisions = {updateRevisionsDropdown: function (revisions) {+ revisions = revisions || {};let dropdown = document.querySelector(".revisions-dropdown");+ let countEl = document.querySelector(".revisions-count");+ if (!dropdown) return;let count = Object.keys(revisions).length;- document.querySelector(".revisions-count").innerHTML = count;+ if (countEl) countEl.textContent = count;dropdown.replaceChildren();for (let i in revisions) {let revision = revisions[i];//revision['url'] = '' + revision['file'] + ".html";- dropdown.append(generateElements(tmpl('vvveb-revision-item', revision))[0]);+ try {+ let node = generateElements(tmpl('vvveb-revision-item', revision))[0];+ if (node) dropdown.append(node);+ } catch (e) {+ console.error(e);+ }}},-+loadRevisions: function (template) {let self = this;- if (template) {- fetch(revisionsUrl + "&" + new URLSearchParams({template}))- .then((response) => {- if (!response.ok) { throw new Error(response) }- return response.json()- })- .then((data) => {- self.updateRevisionsDropdown(data);- })- .catch(error => {- console.log(error.statusText);- displayToast("danger", "Error", "Error loading revision!");- });- }+ if (!template || typeof revisionsUrl === "undefined") return Promise.resolve();++ //ignore out-of-order responses when pages are switched quickly+ let requestId = (this._requestId = (this._requestId || 0) + 1);+ return fetch(revisionsUrl + "&" + new URLSearchParams({ template }))+ .then((response) => {+ if (!response.ok) { throw new Error(response) }+ return response.json()+ })+ .then((data) => {+ if (requestId === self._requestId) self.updateRevisionsDropdown(data);+ })+ .catch(error => {+ console.error(error);+ displayToast("danger", "Error", "Error loading revision!");+ });},-+init: function () {let self = this;-- window.addEventListener("vvveb.Builder.saveAjax", function(event) {- let data = event.detail;+ if (this._init) return;+ this._init = true;++ //note: Builder.save dispatches "Vvveb.Builder.save" (capital V) with page data;+ //the lowercase post-save event carries the server response, which has no file+ window.addEventListener("Vvveb.Builder.save", function (event) {+ let data = event.detail || {};self.loadRevisions(data['file'] ?? false);});-- window.addEventListener("vvveb.FileManager.loadPage", function(event) {- let data = event.detail;++ window.addEventListener("Vvveb.FileManager.loadPage", function (event) {+ let data = event.detail || {};self.loadRevisions(data['file'] ?? false);});-- document.querySelector(".revisions-dropdown").addEventListener("click", function (event) {- let element = event.target.closest(".btn-revision-load");++ let dropdown = document.querySelector(".revisions-dropdown");+ if (!dropdown) return;+ dropdown.addEventListener("click", function (event) {+ let element = event.target && event.target.closest ? event.target.closest(".btn-revision-load") : null;if (element) {let file = element.dataset.file;if (file) {fetch(revisionLoadUrl, {- method: "POST",+ method: "POST",headers: {- 'Content-Type': 'application/x-www-form-urlencoded',+ 'Content-Type': 'application/x-www-form-urlencoded',},- body: new URLSearchParams({file, csrf: document.getElementById('csrf')?.value})- })- .then((response) => {- if (!response.ok) { throw new Error(response) }- return response.text()- })- .then((data) => {- Vvveb.Builder.setHtml(data);- displayToast("success", "Load", "Revision loaded");-- Vvveb.Builder.frameBody.querySelectorAll("[data-aos]").forEach(e => e.classList.add("aos-init","aos-animate"));- document.querySelectorAll("#top-panel .save-btn").forEach(e => e.removeAttribute("disabled"));-- Vvveb.SectionList.loadSections();- Vvveb.TreeList.loadComponents();- Vvveb.StyleManager.init();- Vvveb.ChangeManager.setOriginalContent();- })- .catch(error => {- console.log(error.statusText);- displayToast("danger", "Error", "Error loading revisions!");- });- }- } else {- let element = event.target.closest(".btn-revision-delete");+ body: new URLSearchParams({ file, csrf: document.getElementById('csrf')?.value ?? "" })+ }).then((response) => {+ if (!response.ok) { throw new Error(response) }+ return response.text()+ })+ .then((data) => {+ Vvveb.Builder.setHtml(data);+ displayToast("success", "Load", "Revision loaded");++ if (Vvveb.Builder.frameBody) {+ Vvveb.Builder.frameBody.querySelectorAll("[data-aos]").forEach(e => e.classList.add("aos-init", "aos-animate"));+ }+ document.querySelectorAll("#top-panel .save-btn").forEach(e => e.removeAttribute("disabled"));++ Vvveb.SectionList.loadSections();+ Vvveb.TreeList.loadComponents();+ if (window.FrameDocument) Vvveb.StyleManager.init(window.FrameDocument);+ Vvveb.ChangeManager.setOriginalContent();+ })+ .catch(error => {+ console.error(error);+ displayToast("danger", "Error", "Error loading revisions!");+ });+ }+ } else {+ let element = event.target && event.target.closest ? event.target.closest(".btn-revision-delete") : null;if (element && confirm("Are you sure?")) {let item = element.closest(".dropdown-item");@@ -4588,33 +5284,31 @@ Vvveb.Revisions = {if (file) {fetch(revisionDeleteUrl, {- method: "POST",+ method: "POST",headers: {- 'Content-Type': 'application/x-www-form-urlencoded',+ 'Content-Type': 'application/x-www-form-urlencoded',},- body: new URLSearchParams({file, csrf: document.getElementById('csrf')?.value})- })- .then((response) => {- if (!response.ok) { throw new Error(response) }- return response.json()- })- .then((data) => {+ body: new URLSearchParams({ file, csrf: document.getElementById('csrf')?.value ?? "" })+ }).then((response) => {+ if (!response.ok) { throw new Error(response) }+ return response.json()+ }).then((data) => {let bg = "success";- if (data.success) {- item.remove();+ if (data.success) {+ if (item) item.remove();} else {bg = "danger";}displayToast(bg, "Delete", data.message ?? data);-+let count = document.querySelector(".revisions-count");- count.innerHTML = Math.max(0, parseInt(count.innerHTML) - 1);- })- .catch(error => {- console.log(error.statusText);- displayToast("danger", "Error", "Error deleting revision!");- });+ if (count) count.textContent = Math.max(0, (parseInt(count.textContent) || 1) - 1);+ })+ .catch(error => {+ console.error(error);+ displayToast("danger", "Error", "Error deleting revision!");+ });}}}@@ -4628,70 +5322,94 @@ Vvveb.Server = {index: 0,fullUpdate: false,userServerTemplate: false,-+ajax: function (callback) {let self = this;- this.url = Vvveb.Builder.iframe.contentWindow.location.href;+ let element = self.element;+ if (!element || !element.style) return Promise.resolve();+ try {+ this.url = Vvveb.Builder.iframe.contentWindow.location.href;+ } catch (e) {+ this.url = this.url || "";+ }+ if (!this.url) return Promise.resolve();- self.element.style.opacity = "0.85";- self.element.style.transition = "min-height 0.25s ease-out";- self.element.style.interpolateSize = "allow-keywords";+ //remember inline styles so the loading shimmer below doesn't wipe them+ let oldStyle = typeof element.getAttribute === "function" ? element.getAttribute("style") : null;+ element.style.opacity = "0.85";+ element.style.transition = "min-height 0.25s ease-out";+ element.style.interpolateSize = "allow-keywords";++ let cleanup = function () {+ if (oldStyle == null) {+ element.removeAttribute("style");+ } else {+ element.setAttribute("style", oldStyle);+ }+ };let data = new FormData();data.append("_component_content", this.content);data.append("html", Vvveb.Builder.getHtml());- data.append("csrf", document.getElementById('csrf')?.value);- data.append("user_key", userKey);- data.append("admin_id", adminId);-- fetch(this.url + '&_component_ajax=' + this.component + '&_component_id=' + this.index + '&_server_template=' + this.userServerTemplate + '&r=true',{- method: 'POST',+ data.append("csrf", document.getElementById('csrf')?.value ?? "");+ data.append("user_key", typeof userKey !== "undefined" ? userKey : "");+ data.append("admin_id", typeof adminId !== "undefined" ? adminId : "");++ return fetch(this.url + '&_component_ajax=' + encodeURIComponent(this.component) + '&_component_id=' + encodeURIComponent(this.index) + '&_server_template=' + encodeURIComponent(this.userServerTemplate) + '&r=true', {+ method: 'POST',body: data,credentials: 'include'})- .then((response) => {- if (!response.ok) { throw new Error(response) }- return response.text()- })- .then((data) => {- if (data) {-- let newElement = generateElements(data)[0];- //set fixed height for parent to avoid page flicker- let parent = self.element.parentNode;-- parent.style.minHeight = parent.clientHeight + "px";- //full update- if (this.fullUpdate) {- self.element.replaceWith(newElement);- } else {- self.element.innerHTML = newElement.innerHTML;- self.element.style.minHeight = self.element.clientHeight + "px";+ .then((response) => {+ if (!response.ok) { throw new Error(response.statusText || ("HTTP " + response.status)) }+ return response.text()+ })+ .then((data) => {+ if (data) {++ let newElement = generateElements(data)[0];+ if (!newElement) {+ cleanup();+ if (callback) callback(data);+ return;+ }+ //set fixed height for parent to avoid page flicker+ let parent = element.parentNode;++ if (parent) parent.style.minHeight = parent.clientHeight + "px";+ //full update+ if (self.fullUpdate) {+ element.replaceWith(newElement);+ element = self.element = newElement;+ } else {+ element.innerHTML = newElement.innerHTML;+ element.style.minHeight = element.clientHeight + "px";+ }++ Vvveb.Builder.selectNode(element);++ setTimeout(function () {+ //if (self.fullUpdate)+ if (parent) parent.style.minHeight = "";+ element.style.minHeight = "";+ //element.click();+ Vvveb.Builder.selectNode(element);+ Vvveb.TreeList.loadComponents();+ }, 500);}-- Vvveb.Builder.selectNode(self.element);-- setTimeout(function () {- //if (this.fullUpdate)- if (parent) parent.style.minHeight = "";- self.element.style.minHeight = "";- //self.element.click();- Vvveb.Builder.selectNode(self.element);- Vvveb.TreeList.loadComponents();- }, 500);- }- self.element.removeAttribute("style");-- if (callback) callback(data);- })- .catch(error => {- console.log(error.statusText);- });+ cleanup();++ if (callback) callback(data);+ })+ .catch(error => {+ console.error(error);+ cleanup();+ });},-+//render a single component- renderComponent:function (element, component, index) {+ renderComponent: function (element, component, index) {/*if (component) {this.component = component;@@ -4702,126 +5420,140 @@ Vvveb.Server = {this.index = Array.prototype.indexOf.call(Vvveb.Builder.frameBody.querySelectorAll(selector), element);}*/- this.component = null;- for (attribute of element.attributes) {- if (attribute.name.startsWith("data-v-component-")) {- this.component = attribute.name.replace("data-v-component-","");- break;- }+ if (!element || !element.attributes) return element;++ let name = null;+ for (let attribute of element.attributes) {+ if (attribute.name.startsWith("data-v-component-")) {+ name = attribute.name.replace("data-v-component-", "");+ break;+ }+ }++ if (!name) return element;++ this.component = name;+ if (typeof index == "undefined" || index == null) {+ let selector = "[data-v-component-" + name + "]";+ let list = Vvveb.Builder.frameBody ? Vvveb.Builder.frameBody.querySelectorAll(selector) : [];+ index = Array.prototype.indexOf.call(list, element);}-- if (!this.component) return element;-this.index = index;- if (typeof index == "undefined" || index == null) {- let selector = "[" + this.component + "]";- this.index = Array.prototype.indexOf.call(Vvveb.Builder.frameBody.querySelectorAll(selector), element);- }-- if (this.content != element.outerHTML) {++ if (element._serverContent != element.outerHTML) {let itemClone = element.cloneNode(true);itemClone.querySelectorAll(".vvveb-hidden").forEach(e => e.classList.remove("vvveb-hidden"));-- this.content = itemClone.outerHTML;++ //per-element content + throttle: one shared timer dropped every+ //component but the last when a page rendered several at once+ element._serverContent = itemClone.outerHTML;+ this.content = element._serverContent;this.element = element;-+let self = this;- this.throttle = setTimeout(function () {- clearTimeout(this.throttle);+ clearTimeout(element._serverThrottle);+ element._serverThrottle = setTimeout(function () {+ self.content = element._serverContent;+ self.element = element;+ self.component = name;+ self.index = index;self.ajax();}, 500);}-+return element;},-+//search for components inside element and render them allrenderComponents(element) {+ if (!window.FrameDocument || typeof window.FrameDocument.evaluate !== "function") return [];const path = ".//*[ @*[starts-with(name(), 'data-v-component-')] ] | ../*[ @*[starts-with(name(), 'data-v-component-')] ]";- const elements = window.FrameDocument.evaluate(path, element ?? window.FrameDocument, null, XPathResult.ANY_TYPE, null);-- components = [];+ const context = element ?? window.FrameDocument;+ if (!context) return [];+ const elements = window.FrameDocument.evaluate(path, context, null, XPathResult.ANY_TYPE, null);++ const components = [];let currentComponent = elements.iterateNext();while (currentComponent) {- components.push(currentComponent);- currentComponent = elements.iterateNext();- }+ components.push(currentComponent);+ currentComponent = elements.iterateNext();+ }for (const component of components) {- this.renderComponent(component);+ this.renderComponent(component);}-+return components;}}Vvveb.FontsManager = {-- activeFonts:[],++ activeFonts: [],providers: {},//{"google":GoogleFontsManager};- addFontList: function(provider, groupName, fontList) {+ addFontList: function (provider, groupName, fontList) {let fonts = {};let fontNames = [];-+let fontSelect = generateElements("<optgroup label='" + groupName + "'></optgroup>")[0];for (const font in fontList) {- fontNames.push({"text":font, "value":font, "data-provider": provider});+ fontNames.push({ "text": font, "value": font, "data-provider": provider });let option = new Option(font, font);option.dataset.provider = provider;//option.style.setProperty("font-family", font);//font preview if the fonts are loaded in editorfontSelect.append(option);}- document.getElementById("font-family").append(fontSelect);+ document.getElementById("font-family").append(fontSelect);let list = Vvveb.Components.getProperty("_base", "font-family");if (list) {- list.onChange = function (node,value, input, component) {+ list.onChange = function (node, value, input, component) {let option = input.options[input.selectedIndex];Vvveb.FontsManager.addFont(option.dataset.provider, value, node);return node;};-- list.data.options.push({optgroup:groupName});++ list.data.options.push({ optgroup: groupName });list.data.options = list.data.options.concat(fontNames);- Vvveb.Components.updateProperty("_base", "font-family", {data:list.data});-+ Vvveb.Components.updateProperty("_base", "font-family", { data: list.data });+//update default font listfontList = list.data.options;}},-- addProvider: function(provider, Obj) {++ addProvider: function (provider, Obj) {this.providers[provider] = Obj;},-+//add also element so we can keep track of the used fonts to remove unused ones- addFont: function(provider, fontFamily, element = false) {+ addFont: function (provider, fontFamily, element = false) {if (!provider) return;-+let providerObj = this.providers[provider];if (providerObj) {providerObj.addFont(fontFamily);- this.activeFonts.push({provider, fontFamily, element});+ this.activeFonts.push({ provider, fontFamily, element });}},-- removeFont: function(provider, fontFamily) {++ removeFont: function (provider, fontFamily) {if (!provider) return;let providerObj = this.providers[provider];- if (provider!= "default" && providerObj) {+ if (provider != "default" && providerObj) {providerObj.removeFont(fontFamily);}},-+//check if the added fonts are still used for the elements they were set and remove unused ones- cleanUnusedFonts: function (){- for (i in this.activeFonts) {+ cleanUnusedFonts: function () {+ for (let i in this.activeFonts) {let elementFont = this.activeFonts[i];if (elementFont.element) {- if (Vvveb.StyleManager.getStyle(elementFont.element,'font-family').replaceAll('"','') != elementFont.fontFamily) {+ if (Vvveb.StyleManager.getStyle(elementFont.element, 'font-family').replaceAll('"', '') != elementFont.fontFamily) {this.removeFont(elementFont.provider, elementFont.fontFamily);}}@@ -4832,119 +5564,119 @@ Vvveb.FontsManager = {Vvveb.ColorPalette = {colors: {},-- getAll: function() {++ getAll: function () {return this.colors;},-- add: function(name, color) {++ add: function (name, color) {this.colors[name] = color;},-- remove: function(color) {- delete this.colors[name];++ remove: function (color) {+ delete this.colors[color];},}function friendlyName(name) {- name = name.replaceAll("--bs-","").replace(/[-_]/g, " ").trim();+ name = name.replaceAll("--bs-", "").replace(/[-_]/g, " ").trim();return name = name[0].toUpperCase() + name.slice(1);}Vvveb.ColorPaletteManager = {-- cssVars: {"font": {}, "color" : {}, "dimensions": {}},-- getType: function (type) {++ cssVars: { "font": {}, "color": {}, "dimensions": {} },++ getType: function (type) {return this.cssVars[type];},-- getAllCSSVariableNames: function (styleSheets = document.styleSheets, selector){-- for(let i = 0; i < styleSheets.length; i++){- try{- let cssRules = styleSheets[i].cssRules;- for( let j = 0; j < cssRules.length; j++){- try{- let style = cssRules[j].style;- if (selector && cssRules[j].selectorText && cssRules[j].selectorText != selector) continue;- for(let k = 0; k < style.length; k++){- let name = style[k];- let value = style.getPropertyValue(name).trim();- let type = "";-- if(name.startsWith("--")){- //ignore bootstrap rgb variables- if (name.endsWith("-rgb")) continue;- //ignore variables depending on other variables- if (value.startsWith("var(")) continue;-- let friendlyName = name.replace("--bs-","").replaceAll("-", " ");-- if (value.startsWith("#")) {- type = "color";- } else if (value.indexOf('"') >= 0 || value.indexOf("'") >= 0) {- type = "font";- } else if (value.endsWith('em') > 0 || value.endsWith('px') > 0) {- type = "dimensions";- } else if (!isNaN(parseFloat(value))) {- type = "dimensions";++ getAllCSSVariableNames: function (styleSheets = document.styleSheets, selector) {++ for (let i = 0; i < styleSheets.length; i++) {+ try {+ let cssRules = styleSheets[i].cssRules;+ for (let j = 0; j < cssRules.length; j++) {+ try {+ let style = cssRules[j].style;+ if (selector && cssRules[j].selectorText && cssRules[j].selectorText != selector) continue;+ for (let k = 0; k < style.length; k++) {+ let name = style[k];+ let value = style.getPropertyValue(name).trim();+ let type = "";++ if (name.startsWith("--")) {+ //ignore bootstrap rgb variables+ if (name.endsWith("-rgb")) continue;+ //ignore variables depending on other variables+ if (value.startsWith("var(")) continue;++ let friendlyName = name.replace("--bs-", "").replaceAll("-", " ");++ if (value.startsWith("#")) {+ type = "color";+ } else if (value.indexOf('"') >= 0 || value.indexOf("'") >= 0) {+ type = "font";+ } else if (value.endsWith('em') || value.endsWith('px')) {+ type = "dimensions";+ } else if (!isNaN(parseFloat(value))) {+ type = "dimensions";+ }++ if (type) {+ if (!this.cssVars[type]) this.cssVars[type] = {};+ this.cssVars[type][name] = { value, type, friendlyName };+ }+ }}+ } catch (error) { }+ }+ } catch (error) { }+ }- if (type) {- if (!this.cssVars[type]) this.cssVars[type] = {};- this.cssVars[type][name] = {value, type, friendlyName};- }- }- }- } catch (error) {}- }- } catch (error) {}- }-- return this.cssVars;+ return this.cssVars;},-- getCssWithVars: function (styleSheets = document.styleSheets, vars){- let cssVars = {};- let css = "";- let cssStyles = "";- for(let i = 0; i < styleSheets.length; i++){- try{- let cssRules = styleSheets[i].cssRules;- for( let j = 0; j < cssRules.length; j++){- try{- let style = cssRules[j].style;- //if (selector && cssRules[j].selectorText && cssRules[j].selectorText != selector) continue;- cssStyles = "";- for(let k = 0; k < style.length; k++){- let name = style[k];- let value = style.getPropertyValue(name);- if(name.startsWith('--bs-btn-')) {- for (v in vars) {- if (value == vars[v]) {- cssVars[name] = v;- cssStyles += name + ":var(" + v + ");\n";++ getCssWithVars: function (styleSheets = document.styleSheets, vars) {+ let cssVars = {};+ let css = "";+ let cssStyles = "";+ for (let i = 0; i < styleSheets.length; i++) {+ try {+ let cssRules = styleSheets[i].cssRules;+ for (let j = 0; j < cssRules.length; j++) {+ try {+ let style = cssRules[j].style;+ //if (selector && cssRules[j].selectorText && cssRules[j].selectorText != selector) continue;+ cssStyles = "";+ for (let k = 0; k < style.length; k++) {+ let name = style[k];+ let value = style.getPropertyValue(name);+ if (name.startsWith('--bs-btn-')) {+ for (let v in vars) {+ if (value == vars[v]) {+ cssVars[name] = v;+ cssStyles += name + ":var(" + v + ");\n";+ }+ }}- }- }-- }- if (cssStyles) {- css += cssRules[j].selectorText + "{\n"- css += cssStyles;- css += "}\n";- }- } catch (error) {}- }- } catch (error) {}- }- return cssVars;++ }+ if (cssStyles) {+ css += cssRules[j].selectorText + "{\n"+ css += cssStyles;+ css += "}\n";+ }+ } catch (error) { }+ }+ } catch (error) { }+ }+ return cssVars;},- init: function(document) {+ init: function (document) {Vvveb.Components.render("config/bootstrap", "#configuration .component-properties");-+//apply current theme color palette//let colors = Vvveb.ColorPaletteManager.getType("color");let colors = this.cssVars.color;@@ -4957,12 +5689,12 @@ Vvveb.ColorPaletteManager = {}}},-+};Vvveb.NewSection = {- container:null,- template:`<newsection id="vvvebjs-new-section">+ container: null,+ template: `<newsection id="vvvebjs-new-section"><div class="container"><div class="row"><div class="col">@@ -4972,38 +5704,40 @@ Vvveb.NewSection = {</div></div></newsection>`,-- init: function() {- this.insert();-- this.container.onmouseout = function(event) {- Vvveb.Builder.highlightEnabled = true;++ init: function () {+ this.insert();++ this.container.onmouseout = function (event) {+ Vvveb.Builder.highlightEnabled = true;};-- this.container.onmouseover = function(event) {- Vvveb.Builder.highlightEnabled = false;++ this.container.onmouseover = function (event) {+ Vvveb.Builder.highlightEnabled = false;};-- this.container.onclick = function(event) {++ this.container.onclick = function (event) {if (event.target.id == 'new-blank-section') {- Vvveb.Gui.newSection(null,true);+ Vvveb.Gui.newSection(null, true);} else {if (event.target.id == 'new-section') {- Vvveb.Gui.newSection(null,false);+ Vvveb.Gui.newSection(null, false);}}};- },-- insert: function() {+ },++ insert: function () {+ if (Vvveb.Builder.frameDoc.getElementById("vvvebjs-new-section")) return;let position = 'before';+let lastSection = Vvveb.Builder.frameBody.querySelector(':scope > footer:last-of-type');if (!lastSection) {position = 'after';- lastSection = Vvveb.Builder.frameBody.querySelector(':scope > main:last-of-type') ||- Vvveb.Builder.frameBody.querySelector(':scope > section:last-of-type');+ lastSection = Vvveb.Builder.frameBody.querySelector(':scope > main:last-of-type') ||+ Vvveb.Builder.frameBody.querySelector(':scope > section:last-of-type');}-+this.container = generateElements(this.template)[0];if (lastSection) {if (position == 'after') {@@ -5014,53 +5748,35 @@ Vvveb.NewSection = {} else {Vvveb.Builder.frameBody.append(this.container)}-+return this.container;}}Vvveb.Config = {- components :[],- blocks :[],- plugins :[],-- load: function(url = 'default.json') {- $.getJSON( url, function( data ) {-- });+ components: [],+ blocks: [],+ plugins: [],++ load: function (url = 'default.json') {+ fetch(url)+ .then(response => response.json())+ .then(data => {+ });}}// Toggle fullscreenfunction launchFullScreen(document) {- if(document.documentElement.requestFullScreen) {-- if (document.FullScreenElement)- document.exitFullScreen();- else- document.documentElement.requestFullScreen();-//mozilla- } else if(document.documentElement.mozRequestFullScreen) {-- if (document.mozFullScreenElement)- document.mozCancelFullScreen();- else- document.documentElement.mozRequestFullScreen();-//webkit- } else if(document.documentElement.webkitRequestFullScreen) {-- if (document.webkitFullscreenElement)- document.webkitExitFullscreen();- else- document.documentElement.webkitRequestFullScreen();-//ie- } else if(document.documentElement.msRequestFullscreen) {-- if (document.msFullScreenElement)- document.msExitFullscreen();- else- document.documentElement.msRequestFullscreen();- }+ const el = document.documentElement;++ if (document.fullscreenElement) {+ document.exitFullscreen();+ } else if (el.requestFullscreen) {+ el.requestFullscreen();+ } else if (el.webkitRequestFullscreen) {+ el.webkitRequestFullscreen();+ }}let fontList = [{@@ -5069,49 +5785,13 @@ let fontList = [{}, {value: "Arial, Helvetica, sans-serif",text: "Arial"-}, {- value: "'Lucida Sans Unicode', 'Lucida Grande', sans-serif",- text: 'Lucida Grande'-}, {- value: "'Palatino Linotype', 'Book Antiqua', Palatino, serif",- text: 'Palatino Linotype'-}, {- value: "'Times New Roman', Times, serif",- text: 'Times New Roman'-}, {- value: "Georgia, serif",- text: "Georgia, serif"-}, {- value: "Tahoma, Geneva, sans-serif",- text: "Tahoma"-}, {- value: "'Comic Sans MS', cursive, sans-serif",- text: 'Comic Sans'-}, {- value: "Verdana, Geneva, sans-serif",- text: 'Verdana'-}, {- value: "Impact, Charcoal, sans-serif",- text: 'Impact'-}, {- value: "'Arial Black', Gadget, sans-serif",- text: 'Arial Black'-}, {- value: "'Trebuchet MS', Helvetica, sans-serif",- text: 'Trebuchet'-}, {- value: "'Courier New', Courier, monospace",- text: 'Courier New'-}, {- value: "'Brush Script MT', sans-serif",- text: 'Brush Script'}];window.addEventListener("popstate", checkState);function checkState(e) {- if (e.state && e.state.name) {- Vvveb.FileManager.loadPage(e.state.name);- }+ if (e.state && e.state.name) {+ Vvveb.FileManager.loadPage(e.state.name);+ }}diff --git a/public/js/vvvebjs/components-bootstrap5.js b/public/js/vvvebjs/components-bootstrap5.jsold mode 100755new mode 100644index 079e7c7..7fbd0d4--- a/public/js/vvvebjs/components-bootstrap5.js+++ b/public/js/vvvebjs/components-bootstrap5.js@@ -20,7 +20,7 @@*/Vvveb.ComponentsGroup['Bootstrap 5'] =-["html/container", "html/gridrow", "html/btn", "html/btn-link", "html/buttongroup", "html/buttontoolbar", "html/alert", "html/card", "html/listgroup", "html/badge", "html/progress", "html/navbar", "html/breadcrumbs", "html/pagination"];+["html/container", "html/gridrow", "html/btn", "html/buttongroup", "html/buttontoolbar", "html/alert", "html/card", "html/listgroup", "html/badge", "html/progress", "html/navbar", "html/breadcrumbs", "html/pagination"];Vvveb.Components.extend("_base", "html/container", {@@ -85,9 +85,6 @@ Vvveb.Components.extend("html/link", "html/btn", {},{value: "btn-primary",text: "Primary"- },{- value: "btn btn-info",- text: "Info"},{value: "btn-success",text: "Success"@@ -452,7 +449,7 @@ Vvveb.Components.extend("_base", "html/breadcrumbs", {html: `<ol class="breadcrumb"><li class="breadcrumb-item"><a href="#">Home</a></li><li class="breadcrumb-item"><a href="#">Library</a></li>- s<li class="breadcrumb-item active" aria-current="page"><a href="#">Book</a></li>+ <li class="breadcrumb-item active" aria-current="page"><a href="#">Book</a></li></ol>`,properties: [{name: "Divider",@@ -738,11 +735,17 @@ Vvveb.Components.extend("_base", "html/gridcolumn", {data: {hide_remove:true},beforeInit: function(node) {- _class = node.getAttribute("class");+ if (!node) return node;+ let _class = (typeof node.getAttribute === "function" ? node.getAttribute("class") : null) || "";let reg = /col(-[^-\$ ]*)?-?(\d+)?/g;let match;+ //clear previous values, beforeInit runs on every selection+ for (const key in this.data) {+ if (key.indexOf("col") === 0) delete this.data[key];+ }+while ((match = reg.exec(_class)) != null) {let key = "col" + ((match[1] != undefined) ? "_" + match[1].replace('-','') : "");this.data[key] = match[2] ?? '';@@ -750,12 +753,13 @@ Vvveb.Components.extend("_base", "html/gridcolumn", {},onChange: function(node, value, input) {- let _class = node.getAttribute("class");+ if (!node || !input || !input.name) return node;+ let _class = (typeof node.getAttribute === "function" ? node.getAttribute("class") : null) || "";//remove previous breakpoint column size_class = _class.replace(new RegExp(input.name + '-\\d+?'), '');//add new column size- if (value) _class += ' ' + input.name + '-' + value;+ if (value) _class = (_class + ' ' + input.name + '-' + value).trim();node.setAttribute("class", _class);return node;@@ -773,12 +777,12 @@ Vvveb.Components.extend("_base", "html/gridrow", {classesRegex: ["col-"],}],beforeInit: function (node) {- properties = [];+ if (!node || typeof node.querySelectorAll !== "function") return node;+ let properties = [];let i = 0;- let j = 0;node.querySelectorAll('[class*="col-"],.col').forEach(el => {- _class = el.getAttribute("class");+ let _class = el.getAttribute("class");let reg = /col(-[^-\$ ]*)?-?(\d+)?/g;let match;@@ -802,6 +806,7 @@ Vvveb.Components.extend("_base", "html/gridrow", {onChange: function(node, value, input) {let column = this.columnNode;+ if (!column || !node || !input) return node;//if remove button is clicked remove column and render row propertiesif (input.nodeName == 'BUTTON') {@@ -811,12 +816,12 @@ Vvveb.Components.extend("_base", "html/gridrow", {}//if select input then change column class- _class = column.getAttribute("class");+ let _class = (typeof column.getAttribute === "function" ? column.getAttribute("class") : null) || "";//remove previous breakpoint column size_class = _class.replace(new RegExp(input.name + '-\\d+?'), '');//add new column size- if (value) _class += ' ' + input.name + '-' + value;+ if (value) _class = (_class + ' ' + input.name + '-' + value).trim();column.setAttribute("class", _class);return node;@@ -846,7 +851,7 @@ Vvveb.Components.extend("_base", "html/gridrow", {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "",- icon:"la la-times",+ icon:"x",//text: "None",title: "Default",checked:true,@@ -854,25 +859,25 @@ Vvveb.Components.extend("_base", "html/gridrow", {value: "flex-row",//text: "Left",title: "Row - horizontal",- icon:"la la-arrow-right",+ icon:"arrow-right",checked:false,},{value: "flex-column",//text: "Center",title: "Column - vertical",- icon:"la la-arrow-down",+ icon:"arrow-down",checked:false,},{value: "flex-row-reverse",//text: "Right",title: "Row - reversed",- icon:"la la-arrow-left",+ icon:"arrow-left",checked:false,},{value: "flex-column-reverse",//text: "Center",title: "Column - reversed",- icon:"la la-arrow-up",+ icon:"arrow-up",checked:false,}],},@@ -887,7 +892,7 @@ Vvveb.Components.extend("_base", "html/gridrow", {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "",- icon:"la la-times",+ icon:"x",//text: "None",title: "None",checked:true,@@ -895,29 +900,29 @@ Vvveb.Components.extend("_base", "html/gridrow", {value: "align-items-start",//text: "Left",title: "Start",- icon:"la la-align-left",+ icon:"align-left",checked:false,},{value: "align-items-center",//text: "Center",title: "Center",- icon:"la la-align-center",+ icon:"align-center",checked:false,},{value: "align-items-end",//text: "Right",title: "End",- icon:"la la-align-right",+ icon:"align-right",checked:false,},{value: "align-items-baseline",title: "Baseline",- icon:"la la-indent",+ icon:"indent-increase",checked:false,},{value: "align-items-stretch",title: "Stretch",- icon:"la la-align-justify",+ icon:"align-justified",checked:false,}],},@@ -932,7 +937,7 @@ Vvveb.Components.extend("_base", "html/gridrow", {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "",- icon:"la la-times",+ icon:"x",//text: "None",title: "None",checked:true,@@ -940,37 +945,37 @@ Vvveb.Components.extend("_base", "html/gridrow", {value: "justify-content-start",//text: "Left",title: "Start",- icon:"la la-align-left",+ icon:"align-left",checked:false,},{value: "justify-content-center",//text: "Center",title: "Center",- icon:"la la-align-center",+ icon:"align-center",checked:false,},{value: "justify-content-end",//text: "Right",title: "End",- icon:"la la-align-right",+ icon:"align-right",checked:false},{value: "justify-content-around",//text: "Left",title: "Around",- icon:"la la-indent",+ icon:"indent-increase",checked:false,},{value: "justify-content-between",//text: "Center",title: "Between",- icon:"la la-outdent",+ icon:"indent-decrease",checked:false,},{value: "justify-content-evenly",//text: "Right",title: "Evenly",- icon:"la la-align-justify",+ icon:"align-justified",checked:false,}],},@@ -985,7 +990,7 @@ Vvveb.Components.extend("_base", "html/gridrow", {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "",- icon:"la la-times",+ icon:"x",//text: "None",title: "None",checked:true,@@ -993,13 +998,13 @@ Vvveb.Components.extend("_base", "html/gridrow", {value: "flex-wrap",//text: "Left",title: "Wrap",- icon:"la la-undo",+ icon:"arrow-back-up",checked:false,},{value: "flex-nowrap",//text: "Center",title: "No wrap",- icon:"la la-arrow-right",+ icon:"arrow-right",checked:false,}],},@@ -1018,9 +1023,10 @@ Vvveb.Components.extend("_base", "html/gridrow", {key: "addChild",inline:true,inputtype: ButtonInput,- data: {text:"Add column", icon:"la la-plus", className:"btn-secondary"},+ data: {text:"Add column", icon:"plus", className:"btn-secondary"},onChange: function(node){+ if (!node || typeof node.append !== "function") return node;node.append(generateElements('<div class="col-3"><h3>Col-3</h3></div>')[0]);//render component properties again to include the new column inputsdiff --git a/public/js/vvvebjs/components-bootstrap6.js b/public/js/vvvebjs/components-bootstrap6.jsnew file mode 100644index 0000000..33eaf17--- /dev/null+++ b/public/js/vvvebjs/components-bootstrap6.js@@ -0,0 +1,1060 @@+/**+ * Vvveb+ *+ * Copyright (C) 2021 Ziadin Givan+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ *+ * https://github.com/givanz/Vvveb+ */++Vvveb.ComponentsGroup['Bootstrap 6'] =+["html/container", "html/gridrow", "html/btn", "html/buttongroup", "html/buttontoolbar", "html/alert", "html/card", "html/listgroup", "html/badge", "html/progress", "html/navbar", "html/breadcrumbs", "html/pagination"];+++Vvveb.Components.extend("_base", "html/container", {+ classes: ["container", "container-fluid"],+ image: "icons/container.svg",+ html: '<div class="container" style="min-height:150px;"><div class="m-5">Container</div></div>',+ name: "Container",+ properties: [+ {+ name: "Type",+ key: "type",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["container", "container-fluid"],+ data: {+ options: [{+ value: "container",+ text: "Default"+ },{+ value: "container-fluid",+ text: "Fluid"+ }]+ }+ },{+ name: "Background",+ key: "background",+ htmlAttr: "class",+ validValues: bgcolorClasses,+ inputtype: SelectInput,+ data: {+ options: bgcolorSelectOptions+ }+ },{+ name: "Background Color",+ key: "background-color",+ htmlAttr: "style",+ inputtype: ColorInput,+ },{+ name: "Text Color",+ key: "color",+ htmlAttr: "style",+ inputtype: ColorInput,+ }],+});++Vvveb.Components.extend("html/link", "html/btn", {+ classes: ["btn"],+ nodes: null,+ name: "Button",+ image: "icons/button.svg",+ html: '<a class="btn btn-solid theme-primary">Primary</a>',+ properties: [{+ name: "Style",+ key: "style",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["btn-solid", "btn-outline", "btn-subtle", "btn-text", "btn-link"],+ data: {+ options: [{+ value: "btn-solid",+ text: "Solid"+ },{+ value: "btn-outline",+ text: "Outline"+ },{+ value: "btn-subtle",+ text: "Subtle"+ },{+ value: "btn-text",+ text: "Text"+ },{+ value: "btn-link",+ text: "Link"+ }]+ }+ },{+ name: "Color",+ key: "color",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["theme-primary", "theme-accent", "theme-success", "theme-danger", "theme-warning", "theme-info", "theme-secondary", "theme-inverse"],+ data: {+ options: [{+ value: "theme-primary",+ text: "Primary"+ },{+ value: "theme-accent",+ text: "Accent"+ },{+ value: "theme-success",+ text: "Success"+ },{+ value: "theme-danger",+ text: "Danger"+ },{+ value: "theme-warning",+ text: "Warning"+ },{+ value: "theme-info",+ text: "Info"+ },{+ value: "theme-secondary",+ text: "Secondary"+ },{+ value: "theme-inverse",+ text: "Inverse"+ }]+ }+ },{+ name: "Size",+ key: "size",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["btn-lg", "btn-sm"],+ data: {+ options: [{+ value: "",+ text: "Default"+ },{+ value: "btn-lg",+ text: "Large"+ },{+ value: "btn-sm",+ text: "Small"+ }]+ }+ },{+ name: "Autofocus",+ key: "autofocus",+ htmlAttr: "autofocus",+ inputtype: CheckboxInput,+ inline:true,+ col:6,+ },{+ name: "Disabled",+ key: "disabled",+ htmlAttr: "class",+ inline:true,+ col:6,+ inputtype: ToggleInput,+ validValues: ["disabled"],+ data: {+ on: "disabled",+ off: null+ }+ },{+ key: "link_options",+ inputtype: SectionInput,+ name:false,+ data: {header:"Link"},+ }]+});++Vvveb.Components.extend("_base", "html/buttongroup", {+ classes: ["btn-group"],+ name: "Button Group",+ image: "icons/button_group.svg",+ html: '<div class="btn-group" role="group" aria-label="Basic example"><button type="button" class="btn btn-solid theme-secondary">Left</button><button type="button" class="btn btn-solid theme-secondary">Middle</button> <button type="button" class="btn btn-solid theme-secondary">Right</button></div>',+ properties: [{+ name: "Size",+ key: "size",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["btn-group-lg", "btn-group-sm"],+ data: {+ options: [{+ value: "",+ text: "Default"+ },{+ value: "btn-group-lg",+ text: "Large"+ },{+ value: "btn-group-sm",+ text: "Small"+ }]+ }+ },{+ name: "Alignment",+ key: "alignment",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["btn-group", "btn-group-vertical"],+ data: {+ options: [{+ value: "",+ text: "Default"+ },{+ value: "btn-group",+ text: "Horizontal"+ },{+ value: "btn-group-vertical",+ text: "Vertical"+ }]+ }+ }]+});+Vvveb.Components.extend("_base", "html/buttontoolbar", {+ classes: ["btn-toolbar"],+ name: "Button Toolbar",+ image: "icons/button_toolbar.svg",+ html: '<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">\+ <div class="btn-group me-3" role="group" aria-label="First group">\+ <button type="button" class="btn btn-solid theme-secondary">1</button>\+ <button type="button" class="btn btn-solid theme-secondary">2</button>\+ <button type="button" class="btn btn-solid theme-secondary">3</button>\+ <button type="button" class="btn btn-solid theme-secondary">4</button>\+ </div>\+ <div class="btn-group me-3" role="group" aria-label="Second group">\+ <button type="button" class="btn btn-solid theme-secondary">5</button>\+ <button type="button" class="btn btn-solid theme-secondary">6</button>\+ <button type="button" class="btn btn-solid theme-secondary">7</button>\+ </div>\+ <div class="btn-group" role="group" aria-label="Third group">\+ <button type="button" class="btn btn-solid theme-secondary">8</button>\+ </div>\+ </div>'+});+Vvveb.Components.extend("_base","html/alert", {+ classes: ["alert"],+ name: "Alert",+ image: "icons/alert.svg",+ html: '<div class="alert theme-warning alert-dismissible fade show" role="alert">\+ <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close">\+ <!--span aria-hidden="true">×</span-->\+ </button>\+ <strong>Holy guacamole!</strong> You should check in on some of those fields below.\+ </div>',+ properties: [{+ name: "Type",+ key: "type",+ htmlAttr: "class",+ validValues: ["theme-primary", "theme-accent", "theme-success", "theme-danger", "theme-warning", "theme-info", "theme-secondary", "theme-inverse"],+ inputtype: SelectInput,+ data: {+ options: [{+ value: "theme-primary",+ text: "Primary"+ },{+ value: "theme-secondary",+ text: "Secondary"+ },{+ value: "theme-accent",+ text: "Accent"+ },{+ value: "theme-success",+ text: "Success"+ },{+ value: "theme-danger",+ text: "Danger"+ },{+ value: "theme-warning",+ text: "Warning"+ },{+ value: "theme-info",+ text: "Info"+ },{+ value: "theme-inverse",+ text: "Inverse"+ }]+ }+ }]+});+Vvveb.Components.extend("_base", "html/badge", {+ classes: ["badge"],+ image: "icons/badge.svg",+ name: "Badge",+ html: '<span class="badge theme-primary">Primary badge</span>',+ properties: [{+ name: "Color",+ key: "color",+ htmlAttr: "class",+ validValues:["theme-primary", "theme-accent", "theme-secondary", "theme-success", "theme-danger", "theme-warning", "theme-info", "theme-inverse"],+ inputtype: SelectInput,+ data: {+ options: [{+ value: "",+ text: "Default"+ },{+ value: "theme-primary",+ text: "Primary"+ },{+ value: "theme-accent",+ text: "Accent"+ },{+ value: "theme-secondary",+ text: "Secondary"+ },{+ value: "theme-success",+ text: "Success"+ },{+ value: "theme-warning",+ text: "Warning"+ },{+ value: "theme-danger",+ text: "Danger"+ },{+ value: "theme-info",+ text: "Info"+ },{+ value: "theme-inverse",+ text: "Inverse"+ }]+ }+ }]+});+Vvveb.Components.extend("_base", "html/card", {+ classes: ["card"],+ image: "icons/panel.svg",+ name: "Card",+ html: '<div class="card">\+ <img class="card-img-top bg-secondary" src="' + Vvveb.baseUrl + 'icons/image.svg" alt="Card image cap">\+ <div class="card-body">\+ <h4 class="card-title">Card title</h4>\+ <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card\'s content.</p>\+ <a href="#" class="btn btn-solid theme-primary">Go somewhere</a>\+ </div>\+ </div>'+});++Vvveb.Components.extend("_base", "html/listgroup", {+ name: "List Group",+ image: "icons/list_group.svg",+ classes: ["list-group"],+ html: '<ul class="list-group">\n <li class="list-group-item">\n <span class="badge theme-success">14</span>\n Cras justo odio\n </li>\n <li class="list-group-item">\n <span class="badge theme-primary">2</span>\n Dapibus ac facilisis in\n </li>\n <li class="list-group-item">\n <span class="badge theme-danger">1</span>\n Morbi leo risus\n </li>\n</ul>',+ properties: [{+ name: "Flush",+ key: "flush",+ htmlAttr: "class",+ validValues: ["", "list-group-flush"],+ inputtype: ToggleInput,+ data: {+ on: "list-group-flush",+ off: ""+ }+ },{+ name: "Numbered",+ key: "numbered",+ htmlAttr: "class",+ validValues: ["", "list-group-numbered"],+ inputtype: ToggleInput,+ data: {+ on: "list-group-numbered",+ off: ""+ }+ },{+ name: "Horizontal",+ key: "horizontal",+ htmlAttr: "class",+ validValues: ["", "list-group-horizontal"],+ inputtype: ToggleInput,+ data: {+ on: "list-group-horizontal",+ off: ""+ }+ }]+});++Vvveb.Components.extend("_base", "html/listitem", {+ name: "List Item",+ classes: ["list-group-item"],+ html: '<li class="list-group-item"><span class="badge theme-primary">14</span> Cras justo odio</li>',+ properties: [{+ name: "Background",+ key: "background",+ htmlAttr: "class",+ validValues:["theme-primary", "theme-accent", "theme-secondary", "theme-success", "theme-danger", "theme-warning", "theme-info", "theme-inverse"],+ inputtype: SelectInput,+ data: {+ options: [{+ value: "",+ text: "Default"+ },{+ value: "theme-primary",+ text: "Primary"+ },{+ value: "theme-accent",+ text: "Accent"+ },{+ value: "theme-secondary",+ text: "Secondary"+ },{+ value: "theme-success",+ text: "Success"+ },{+ value: "theme-warning",+ text: "Warning"+ },{+ value: "theme-danger",+ text: "Danger"+ },{+ value: "theme-info",+ text: "Info"+ },{+ value: "theme-inverse",+ text: "Inverse"+ }]+ }+ }, {+ name: "Active",+ key: "active",+ htmlAttr: "class",+ validValues: ["", "active"],+ inputtype: ToggleInput,+ inline:true,+ col:6,+ data: {+ on: "active",+ off: ""+ }+ },{+ name: "Disabled",+ key: "disabled",+ htmlAttr: "class",+ validValues: ["", "disabled"],+ inputtype: ToggleInput,+ inline:true,+ col:6,+ data: {+ on: "disabled",+ off: ""+ }+ }]+});++Vvveb.Components.extend("_base", "html/breadcrumbs", {+ classes: ["breadcrumb"],+ name: "Breadcrumbs",+ image: "icons/breadcrumbs.svg",+ html: `<ol class="breadcrumb">+ <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Home</a></li>+ <li class="breadcrumb-divider" aria-hidden="true"></li>+ <li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Library</a></li>+ <li class="breadcrumb-divider" aria-hidden="true"></li>+ <li class="breadcrumb-item" aria-current="page"><a class="breadcrumb-link active" href="#">Book</a></li>+ </ol>`+});++Vvveb.Components.extend("_base", "html/breadcrumbitem", {+ classes: ["breadcrumb-item"],+ name: "Breadcrumb Item",+ html: '<li class="breadcrumb-item"><a class="breadcrumb-link" href="#">Library</a></li>',+ properties: [{+ name: "Active",+ key: "active",+ htmlAttr: "class",+ validValues: ["", "active"],+ inputtype: ToggleInput,+ data: {+ on: "active",+ off: ""+ }+ }]+});+Vvveb.Components.extend("_base", "html/pagination", {+ classes: ["pagination"],+ name: "Pagination",+ image: "icons/pagination.svg",+ html: '<nav aria-label="Page navigation example">\+ <ul class="pagination">\+ <li class="page-item"><a class="page-link" href="#">Previous</a></li>\+ <li class="page-item"><a class="page-link" href="#">1</a></li>\+ <li class="page-item"><a class="page-link" href="#">2</a></li>\+ <li class="page-item"><a class="page-link" href="#">3</a></li>\+ <li class="page-item"><a class="page-link" href="#">Next</a></li>\+ </ul>\+ </nav>',++ properties: [{+ name: "Size",+ key: "size",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["pagination-lg", "pagination-sm"],+ data: {+ options: [{+ value: "",+ text: "Default"+ },{+ value: "pagination-lg",+ text: "Large"+ },{+ value: "pagination-sm",+ text: "Small"+ }]+ }+ },{+ name: "Alignment",+ key: "alignment",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["justify-content-center", "justify-content-end"],+ data: {+ options: [{+ value: "",+ text: "Default"+ },{+ value: "justify-content-center",+ text: "Center"+ },{+ value: "justify-content-end",+ text: "Right"+ }]+ }+ }]+});+Vvveb.Components.extend("_base", "html/pageitem", {+ classes: ["page-item"],+ html: '<li class="page-item"><a class="page-link" href="#">1</a></li>',+ name: "Pagination Item",+ properties: [{+ name: "Link To",+ key: "href",+ htmlAttr: "href",+ child:".page-link",+ inputtype: LinkInput+ },{+ name: "Active",+ key: "active",+ htmlAttr: "class",+ validValues: ["active"],+ inputtype: ToggleInput,+ data: {+ on: "active",+ off: ""+ }+ },{+ name: "Disabled",+ key: "disabled",+ htmlAttr: "class",+ validValues: ["disabled"],+ inputtype: ToggleInput,+ data: {+ on: "disabled",+ off: ""+ }+ }]+});+Vvveb.Components.extend("_base", "html/progress", {+ classes: ["progress"],+ name: "Progress Bar",+ image: "icons/progressbar.svg",+ html: '<div class="progress"><div class="progress-bar w-25"></div></div>',+ properties: [{+ name: "Background",+ key: "background",+ htmlAttr: "class",+ validValues: bgcolorClasses,+ inputtype: SelectInput,+ data: {+ options: bgcolorSelectOptions+ }+ },+ {+ name: "Progress",+ key: "background",+ child:".progress-bar",+ htmlAttr: "class",+ validValues: ["", "w-25", "w-50", "w-75", "w-100"],+ inputtype: SelectInput,+ data: {+ options: [{+ value: "",+ text: "None"+ },{+ value: "w-25",+ text: "25%"+ },{+ value: "w-50",+ text: "50%"+ },{+ value: "w-75",+ text: "75%"+ },{+ value: "w-100",+ text: "100%"+ }]+ }+ },+ {+ name: "Progress background",+ key: "background",+ child:".progress-bar",+ htmlAttr: "class",+ validValues: bgcolorClasses,+ inputtype: SelectInput,+ data: {+ options: bgcolorSelectOptions+ }+ },{+ name: "Striped",+ key: "striped",+ child:".progress-bar",+ htmlAttr: "class",+ validValues: ["", "progress-bar-striped"],+ inputtype: ToggleInput,+ data: {+ on: "progress-bar-striped",+ off: "",+ }+ },{+ name: "Animated",+ key: "animated",+ child:".progress-bar",+ htmlAttr: "class",+ validValues: ["", "progress-bar-animated"],+ inputtype: ToggleInput,+ data: {+ on: "progress-bar-animated",+ off: "",+ }+ }]+});+Vvveb.Components.extend("_base", "html/navbar", {+ classes: ["navbar"],+ image: "icons/navbar.svg",+ name: "Nav Bar",+ html: `<nav class="navbar lg:navbar-expand bg-body">+ <div class="container-fluid">+ <a class="navbar-brand" href="#">Navbar</a>+ <button class="navbar-toggler" type="button" data-bs-toggle="drawer" data-bs-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">+ <span class="navbar-toggler-icon"></span>+ </button>+ <dialog class="drawer" id="navbarTogglerDemo02">+ <div class="drawer-header">+ <span class="drawer-title">Menu</span>+ <button type="button" class="btn-close" data-bs-dismiss="drawer" aria-label="Close"></button>+ </div>+ <div class="drawer-body">+ <ul class="navbar-nav me-auto mb-2 lg:mb-0">+ <li class="nav-item">+ <a class="nav-link active" aria-current="page" href="#">Home</a>+ </li>+ <li class="nav-item">+ <a class="nav-link" href="#">Link</a>+ </li>+ <li class="nav-item">+ <a class="nav-link disabled">Disabled</a>+ </li>+ </ul>+ <form class="d-flex" role="search">+ <input class="form-control me-3" type="search" placeholder="Search" aria-label="Search">+ <button class="btn btn-outline theme-success" type="submit">Search</button>+ </form>+ </div>+ </dialog>+ </div>+ </nav>`,++ properties: [{+ name: "Color theme",+ key: "color",+ htmlAttr: "data-bs-theme",+ inputtype: SelectInput,+ data: {+ options: [{+ value: "",+ text: "Default"+ },{+ value: "light",+ text: "Light"+ },{+ value: "dark",+ text: "Dark"+ }]+ }+ },{+ name: "Background color",+ key: "background",+ htmlAttr: "class",+ validValues: bgcolorClasses,+ inputtype: SelectInput,+ data: {+ options: bgcolorSelectOptions+ }+ },{+ name: "Placement",+ key: "placement",+ htmlAttr: "class",+ validValues: ["fixed-top", "fixed-bottom", "sticky-top"],+ inputtype: SelectInput,+ data: {+ options: [{+ value: "",+ text: "Default"+ },{+ value: "fixed-top",+ text: "Fixed Top"+ },{+ value: "fixed-bottom",+ text: "Fixed Bottom"+ },{+ value: "sticky-top",+ text: "Sticky top"+ }]+ }+ }]+});++Vvveb.Components.extend("_base", "html/tablebody", {+ nodes: ["tbody"],+ name: "Table Body",+ html: "<tbody><tr><td>Cell 1</td><td>Cell 2</td><td>Cell 3</td></tr></tbody>"+});++Vvveb.Components.extend("_base", "html/gridcolumn", {+ name: "Grid Column",+ image: "icons/grid_column.svg",+ classesRegex: ["col-"],+ classes: ["col"],+ html: '<div class="sm:col-4"><h3>sm:col-4</h3></div>',+ properties: [{+ name: "Column",+ key: "column",+ inline:false,+ inputtype: GridInput,+ data: {hide_remove:true},++ beforeInit: function(node) {+ if (!node) return node;+ let _class = (typeof node.getAttribute === "function" ? node.getAttribute("class") : null) || "";++ //Bootstrap 6 uses breakpoint prefixes (sm:col-4) instead of infixes (col-sm-4)+ let reg = /(?:([a-z0-9]+):)?col-(\d+)?/g;+ let match;++ //clear previous values, beforeInit runs on every selection+ for (const key in this.data) {+ if (key.indexOf("col") === 0) delete this.data[key];+ }++ while ((match = reg.exec(_class)) != null) {+ //keep GridInput data keys (col, col_sm, ..., col_xxl) so the editor template keeps working,+ //map the 2xl prefix back to xxl for the key name+ let prefix = match[1] ?? '';+ if (prefix == "2xl") prefix = "xxl";+ let key = "col" + (prefix ? "_" + prefix : "");+ this.data[key] = match[2] ?? '';+ }+ },++ onChange: function(node, value, input) {+ if (!node || !input || !input.name) return node;+ let _class = (typeof node.getAttribute === "function" ? node.getAttribute("class") : null) || "";++ //map GridInput select names (col, col-sm, ..., col-xxl) to Bootstrap 6 prefixes (col, sm:col, ..., 2xl:col)+ let prefixMap = {"col":"col", "col-sm":"sm:col", "col-md":"md:col", "col-lg":"lg:col", "col-xl":"xl:col", "col-xxl":"2xl:col", "col-2xl":"2xl:col"};+ let prefix = prefixMap[input.name] ?? input.name;+ //remove previous breakpoint column size+ _class = _class.replace(new RegExp(prefix.replace(":", "\\:") + '-\\d+?'), '');+ //also remove legacy v5 infix class if present+ _class = _class.replace(new RegExp(input.name + '-\\d+?'), '');+ //add new column size+ if (value) _class = (_class + ' ' + prefix + '-' + value).trim();+ node.setAttribute("class", _class.replace(/\s+/, ' ').trim());++ return node;+ },+ }]+});++Vvveb.Components.extend("_base", "html/gridrow", {+ name: "Grid Row",+ image: "icons/grid_row.svg",+ classes: ["row"],+ html: '<div class="row"><div class="sm:col-4"><h3>sm:col-4</h3></div><div class="sm:col-4 col-5"><h3>sm:col-4</h3></div><div class="sm:col-4"><h3>sm:col-4</h3></div></div>',+ children :[{+ name: "html/gridcolumn",+ classesRegex: ["col-"],+ }],+ beforeInit: function (node) {+ if (!node || typeof node.querySelectorAll !== "function") return node;+ let properties = [];+ let i = 0;++ node.querySelectorAll('[class*="col-"],.col').forEach(el => {+ let _class = el.getAttribute("class");++ //Bootstrap 6 uses breakpoint prefixes (sm:col-4), keep GridInput data keys (col, col_sm, ..., col_xxl)+ let reg = /(?:([a-z0-9]+):)?col-(\d+)?/g;+ let match;+ let data = {};++ while ((match = reg.exec(_class)) != null) {+ let prefix = match[1] ?? '';+ if (prefix == "2xl") prefix = "xxl";+ let key = "col" + (prefix ? "_" + prefix : "");+ data[key] = match[2] ?? '';+ }++ i++;+ properties.push({+ name: "Column " + i,+ key: "column" + i,+ //index: i - 1,+ columnNode: el,+ col:12,+ inline:false,+ inputtype: GridInput,+ data: data,+ onChange: function(node, value, input) {++ let column = this.columnNode;+ if (!column || !node || !input) return node;++ //if remove button is clicked remove column and render row properties+ if (input.nodeName == 'BUTTON') {+ column.remove();+ Vvveb.Components.render("html/gridrow");+ return node;+ }++ //if select input then change column class+ let _class = (typeof column.getAttribute === "function" ? column.getAttribute("class") : null) || "";++ //map GridInput select names to Bootstrap 6 prefixes+ let prefixMap = {"col":"col", "col-sm":"sm:col", "col-md":"md:col", "col-lg":"lg:col", "col-xl":"xl:col", "col-xxl":"2xl:col", "col-2xl":"2xl:col"};+ let prefix = prefixMap[input.name] ?? input.name;+ //remove previous breakpoint column size (v6 prefix and legacy v5 infix)+ _class = _class.replace(new RegExp(prefix.replace(":", "\\:") + '-\\d+?'), '');+ _class = _class.replace(new RegExp(input.name + '-\\d+?'), '');+ //add new column size+ if (value) _class = (_class + ' ' + prefix + '-' + value).trim();+ column.setAttribute("class", _class.replace(/\s+/, ' ').trim());++ return node;+ },+ });+ });++ //remove all column properties+ this.properties = this.properties.filter(function(item) {+ return item.key.indexOf("column") === -1;+ });++ //add remaining properties to generated column properties, put first 2 align properties first+ this.properties = this.properties.slice(0,4).concat(properties, this.properties.slice(4));++ return node;+ },++ properties: [{+ name: "Direction",+ key: "direction",+ htmlAttr: "class",+ inline:false,+ validValues: ["", "flex-row", "flex-row-reverse", "flex-column", "flex-column-reverse"],+ inputtype: RadioButtonInput,+ data: {+ extraclass:"btn-group-sm btn-group-fullwidth",+ options: [{+ value: "",+ icon:"x",+ //text: "None",+ title: "Default",+ checked:true,+ },{+ value: "flex-row",+ //text: "Left",+ title: "Row - horizontal",+ icon:"arrow-right",+ checked:false,+ },{+ value: "flex-column",+ //text: "Center",+ title: "Column - vertical",+ icon:"arrow-down",+ checked:false,+ },{+ value: "flex-row-reverse",+ //text: "Right",+ title: "Row - reversed",+ icon:"arrow-left",+ checked:false,+ },{+ value: "flex-column-reverse",+ //text: "Center",+ title: "Column - reversed",+ icon:"arrow-up",+ checked:false,+ }],+ },+ },{+ name: "Vertical align",+ key: "vertical-align",+ htmlAttr: "class",+ inline:false,+ validValues: ["", "align-items-start", "align-items-center", "align-items-end", "align-items-baseline", "align-items-stretch"],+ inputtype: RadioButtonInput,+ data: {+ extraclass:"btn-group-sm btn-group-fullwidth",+ options: [{+ value: "",+ icon:"x",+ //text: "None",+ title: "None",+ checked:true,+ },{+ value: "align-items-start",+ //text: "Left",+ title: "Start",+ icon:"align-left",+ checked:false,+ },{+ value: "align-items-center",+ //text: "Center",+ title: "Center",+ icon:"align-center",+ checked:false,+ },{+ value: "align-items-end",+ //text: "Right",+ title: "End",+ icon:"align-right",+ checked:false,+ },{+ value: "align-items-baseline",+ title: "Baseline",+ icon:"indent-increase",+ checked:false,+ },{+ value: "align-items-stretch",+ title: "Stretch",+ icon:"align-justified",+ checked:false,+ }],+ },+ },{+ name: "Horizontal align",+ key: "horizontal-align",+ htmlAttr: "class",+ inline:false,+ validValues: ["", "justify-content-start", "justify-content-center", "justify-content-end", "justify-content-around", "justify-content-between", "justify-content-evenly"],+ inputtype: RadioButtonInput,+ data: {+ extraclass:"btn-group-sm btn-group-fullwidth",+ options: [{+ value: "",+ icon:"x",+ //text: "None",+ title: "None",+ checked:true,+ },{+ value: "justify-content-start",+ //text: "Left",+ title: "Start",+ icon:"align-left",+ checked:false,+ },{+ value: "justify-content-center",+ //text: "Center",+ title: "Center",+ icon:"align-center",+ checked:false,+ },{+ value: "justify-content-end",+ //text: "Right",+ title: "End",+ icon:"align-right",+ checked:false+ },{+ value: "justify-content-around",+ //text: "Left",+ title: "Around",+ icon:"indent-increase",+ checked:false,+ },{+ value: "justify-content-between",+ //text: "Center",+ title: "Between",+ icon:"indent-decrease",+ checked:false,+ },{+ value: "justify-content-evenly",+ //text: "Right",+ title: "Evenly",+ icon:"align-justified",+ checked:false,+ }],+ },+ },{+ name: "Wrap",+ key: "wrap",+ htmlAttr: "class",+ inline:false,+ validValues: ["", "flex-wrap", "flex-nowrap"],+ inputtype: RadioButtonInput,+ data: {+ extraclass:"btn-group-sm btn-group-fullwidth",+ options: [{+ value: "",+ icon:"x",+ //text: "None",+ title: "None",+ checked:true,+ },{+ value: "flex-wrap",+ //text: "Left",+ title: "Wrap",+ icon:"arrow-back-up",+ checked:false,+ },{+ value: "flex-nowrap",+ //text: "Center",+ title: "No wrap",+ icon:"arrow-right",+ checked:false,+ }],+ },+ },{+ name: "Column",+ key: "column1",+ inputtype: GridInput+ },{+ name: "Column",+ key: "column1",+ inline:true,+ col:12,+ inputtype: GridInput+ },{+ name: "",+ key: "addChild",+ inline:true,+ inputtype: ButtonInput,+ data: {text:"Add column", icon:"plus", className:"btn-secondary"},+ onChange: function(node)+ {+ if (!node || typeof node.append !== "function") return node;+ node.append(generateElements('<div class="col-3"><h3>Col-3</h3></div>')[0]);++ //render component properties again to include the new column inputs+ Vvveb.Components.render("html/gridrow");++ return node;+ }+ }]+});+diff --git a/public/js/vvvebjs/components-common.js b/public/js/vvvebjs/components-common.jsindex 5d45c03..437af32 100755--- a/public/js/vvvebjs/components-common.js+++ b/public/js/vvvebjs/components-common.js@@ -19,10 +19,10 @@* https://github.com/givanz/Vvveb*/-bgcolorClasses = ["bg-primary", "bg-secondary", "bg-success", "bg-danger", "bg-warning", "bg-info", "bg-body-secondary", "bg-dark", "bg-white"]+const bgcolorClasses = ["bg-primary", "bg-secondary", "bg-success", "bg-danger", "bg-warning", "bg-info", "bg-body-secondary", "bg-dark", "bg-white"]-bgcolorSelectOptions = [{- value: "Default",+const bgcolorSelectOptions = [{+ value: "",text: ""},{value: "bg-primary",@@ -54,11 +54,18 @@ bgcolorSelectOptions = [{}];function changeNodeName(node, newNodeName) {+ if (!node || !node.attributes || !node.parentNode) return node;+ //create in the node's own document, edited nodes live in the iframe not the builder page+ const doc = node.ownerDocument || document;let newNode;- newNode = document.createElement(newNodeName);- attributes = node.attributes;+ try {+ newNode = doc.createElement(newNodeName);+ } catch (e) {+ return node;+ }+ const attributes = node.attributes;- for (i = 0, len = attributes.length; i < len; i++) {+ for (let i = 0, len = attributes.length; i < len; i++) {newNode.setAttribute(attributes[i].nodeName, attributes[i].nodeValue);}@@ -141,41 +148,52 @@ Vvveb.Components.extend("_base", "_base", {text:'This element shares styles with other <a class="linked-elements-hover" href="javascript:void()"><b class="elements-count">4</b> elements</a>, to apply styles <b>only for this element</b> enter a <b>unique id</b> eg: <i>marketing-heading</i> in in <br/><a class="id-input" href="#content-tab" role="tab" aria-controls="components" aria-selected="false" href="#content-tab">Content > General > Id</a>.<br/><span class="text-muted small"></span>',},afterInit:function(node, inputElement) {- let selector = Vvveb.StyleManager.getSelectorForElement(node);- let elements = window.FrameDocument.querySelectorAll(selector);+ if (!inputElement) return;+ let selector = "";+ let elements = [];+ try {+ selector = Vvveb.StyleManager.getSelectorForElement(node);+ if (window.FrameDocument && selector) {+ elements = window.FrameDocument.querySelectorAll(selector.replace(":", "\\:"));+ }+ } catch (e) {+ elements = [];+ }if (elements.length <= 1) {if (inputElement.style) {inputElement.style.display = "none";}} else {- inputElement.style.display = "";- inputElement.querySelector(".elements-count").innerHTML = elements.length;- inputElement.querySelector(".text-muted").innerHTML = selector;+ if (inputElement.style) inputElement.style.display = "";+ let countEl = inputElement.querySelector(".elements-count");+ if (countEl) countEl.textContent = elements.length;+ let mutedEl = inputElement.querySelector(".text-muted");+ if (mutedEl) mutedEl.textContent = selector;- inputElement.querySelector(".id-input", inputElement).addEventListener("click", (event) => {+ let idInput = inputElement.querySelector(".id-input");+ if (idInput) idInput.addEventListener("click", (event) => {document.querySelectorAll(".content-tab a").forEach(e => e.click());setTimeout(function () {let idInput = document.querySelectorAll("[name=id]");- idInput.forEach(el => {if (el.offsetParent) el.focus()});/*- idInput.forEach(el => el .dispatchEvent(new FocusEvent("focusin", {- bubbles: true,- cancelable: false- })));*/+ idInput.forEach(el => {if (el.offsetParent) el.focus()});}, 700);event.preventDefault();return false;});- inputElement.querySelector(".linked-elements-hover").addEventListener("mouseenter", function (){- elements.forEach( e => e.style.outline = "2px dotted blue");- });-- inputElement.querySelector(".linked-elements-hover").addEventListener("mouseleave", function (){- elements.forEach( e => e.style.outline = "");- });+ let hoverEl = inputElement.querySelector(".linked-elements-hover");+ if (hoverEl) {+ hoverEl.addEventListener("mouseenter", function (){+ elements.forEach( e => { if (e.style) e.style.outline = "2px dotted blue"; });+ });++ hoverEl.addEventListener("mouseleave", function (){+ elements.forEach( e => { if (e.style) e.style.outline = ""; });+ });+ }}},},{@@ -187,7 +205,7 @@ Vvveb.Components.extend("_base", "_base", {col:6,inline:false,inputtype: SelectInput,- validValues: ["block", "inline", "inline-block", "none"],+ validValues: ["block", "inline", "inline-block", "flex", "inline-flex", "grid", "inline-grid", "table", "table-row", "list-item", "inherit", "initial", "none"],data: {options: [{value: "block",@@ -198,9 +216,6 @@ Vvveb.Components.extend("_base", "_base", {},{value: "inline-block",text: "Inline Block"- },{- value: "inline-block",- text: "Inline Block"},{value: "flex",text: "Flex"@@ -230,10 +245,145 @@ Vvveb.Components.extend("_base", "_base", {text: "Initial"},{value: "none",- text: "none"+ text: "None"}]- }+ },},{+ name: "Flex direction",+ key: "flex-direction",+ htmlAttr: "style",+ sort: base_sort++,+ col:6,+ inline:false,+ conditions:{'display':value => (value || "").includes("flex")},+ inputtype: SelectInput,+ validValues: ["row", "row-reverse", "column", "column-reverse"],+ data: {options: [+ {value: "row", text: "Row"},+ {value: "row-reverse", text: "Row reverse"},+ {value: "column", text: "Column"},+ {value: "column-reverse", text: "Column reverse"}+ ]}+ },{+ name: "Flex wrap",+ key: "flex-wrap",+ htmlAttr: "style",+ sort: base_sort++,+ col:6,+ inline:false,+ conditions:{'display':value => (value || "").includes("flex")},+ inputtype: SelectInput,+ validValues: ["nowrap", "wrap", "wrap-reverse"],+ data: {options: [+ {value: "nowrap", text: "No wrap"},+ {value: "wrap", text: "Wrap"},+ {value: "wrap-reverse", text: "Wrap reverse"}+ ]}+ },{+ name: "Justify content",+ key: "justify-content",+ htmlAttr: "style",+ sort: base_sort++,+ inline:false,+ col:6,+ conditions:{'display':value => /flex|grid/.test(value || "")},+ inputtype: SelectInput,+ validValues: ["flex-start", "flex-end", "center", "space-between", "space-around", "space-evenly"],+ data: {options: [+ {value: "flex-start", text: "Start"},+ {value: "flex-end", text: "End"},+ {value: "center", text: "Center"},+ {value: "space-between", text: "Space between"},+ {value: "space-around", text: "Space around"},+ {value: "space-evenly", text: "Space evenly"}+ ]}+ },{+ name: "Align items",+ key: "align-items",+ htmlAttr: "style",+ sort: base_sort++,+ col:6,+ inline:false,+ conditions:{'display':value => /flex|grid/.test(value || "")},+ inputtype: SelectInput,+ validValues: ["stretch", "flex-start", "flex-end", "center", "baseline"],+ data: {options: [+ {value: "stretch", text: "Stretch"},+ {value: "flex-start", text: "Start"},+ {value: "flex-end", text: "End"},+ {value: "center", text: "Center"},+ {value: "baseline", text: "Baseline"}+ ]}+ },{+ name: "Gap",+ key: "gap",+ htmlAttr: "style",+ sort: base_sort++,+ col:6,+ inline:false,+ conditions:{'display':value => /flex|grid/.test(value || "")},+ inputtype: CssUnitInput+ },{+ name: "Grid template columns",+ key: "grid-template-columns",+ htmlAttr: "style",+ sort: base_sort++,+ col:6,+ inline:false,+ conditions:{'display':value => (value || "").includes("grid")},+ inputtype: TextInput+ },{+ name: "Grid template rows",+ key: "grid-template-rows",+ htmlAttr: "style",+ sort: base_sort++,+ col:6,+ inline:false,+ conditions:{'display':value => (value || "").includes("grid")},+ inputtype: TextInput+ },{+ name: "Grid auto flow",+ key: "grid-auto-flow",+ htmlAttr: "style",+ inline:false,+ sort: base_sort++,+ col:6,+ conditions:{'display':value => (value || "").includes("grid")},+ inputtype: SelectInput,+ validValues: ["row", "column", "dense", "row dense", "column dense"],+ data: {options: [+ {value: "row", text: "Row"},+ {value: "column", text: "Column"},+ {value: "dense", text: "Dense"},+ {value: "row dense", text: "Row dense"},+ {value: "column dense", text: "Column dense"}+ ]}+ },{+ name: "Justify items",+ key: "justify-items",+ htmlAttr: "style",+ inline:false,+ sort: base_sort++,+ col:6,+ conditions:{'display':value => (value || "").includes("grid")},+ inputtype: SelectInput,+ validValues: ["stretch", "start", "end", "center"],+ data: {options: [+ {value: "stretch", text: "Stretch"},+ {value: "start", text: "Start"},+ {value: "end", text: "End"},+ {value: "center", text: "Center"}+ ]}+ },{+ name: "Grid auto rows",+ key: "grid-auto-rows",+ htmlAttr: "style",+ sort: base_sort++,+ col:6,+ inline:false,+ conditions:{'display':value => (value || "").includes("grid")},+ inputtype: TextInput+ }, {name: "Position",key: "position",htmlAttr: "style",@@ -311,7 +461,7 @@ Vvveb.Components.extend("_base", "_base", {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "none",- icon:"la la-times",+ icon:"x",//text: "None",title: "None",checked:true,@@ -319,13 +469,13 @@ Vvveb.Components.extend("_base", "_base", {value: "left",//text: "Left",title: "Left",- icon:"la la-align-left",+ icon:"align-left",checked:false,},{value: "right",//text: "Right",title: "Right",- icon:"la la-align-right",+ icon:"align-right",checked:false,}],}@@ -451,7 +601,7 @@ let ComponentBaseTypography = {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "",- icon:"la la-times",+ icon:"x",//text: "None",title: "None",checked:true,@@ -459,25 +609,25 @@ let ComponentBaseTypography = {value: "left",//text: "Left",title: "Left",- icon:"la la-align-left",+ icon:"align-left",checked:false,},{value: "center",//text: "Center",title: "Center",- icon:"la la-align-center",+ icon:"align-center",checked:false,},{value: "right",//text: "Right",title: "Right",- icon:"la la-align-right",+ icon:"align-right",checked:false,},{value: "justify",//text: "justify",title: "Justify",- icon:"la la-align-justify",+ icon:"align-justified",checked:false,}],},@@ -512,7 +662,7 @@ let ComponentBaseTypography = {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "none",- icon:"la la-times",+ icon:"x",//text: "None",title: "None",checked:true,@@ -520,25 +670,25 @@ let ComponentBaseTypography = {value: "underline",//text: "Left",title: "underline",- icon:"la la-long-arrow-alt-down",+ icon:"arrow-down",checked:false,},{value: "overline",//text: "Right",title: "overline",- icon:"la la-long-arrow-alt-up",+ icon:"arrow-up",checked:false,},{value: "line-through",//text: "Right",title: "Line Through",- icon:"la la-strikethrough",+ icon:"strikethrough",checked:false,},{value: "underline overline",//text: "justify",title: "Underline Overline",- icon:"la la-arrows-alt-v",+ icon:"arrows-vertical",checked:false,}],},@@ -878,13 +1028,14 @@ Vvveb.Components.extend("_base", "_base", {inputtype: ImageInput,init: function(node) {- let image = node.style.backgroundImage.replace(/url\(['"]?([^"\)$]+?)['"]?\).*/, '$1');- return image;+ let bg = (node && node.style && node.style.backgroundImage) || "";+ let match = /url\(['"]?([^"')]+)['"]?\)/.exec(bg);+ return match ? match[1] : "";},onChange: function(node, value) {- Vvveb.StyleManager.setStyle(node, "background-image", 'url(' + value + ')');+ Vvveb.StyleManager.setStyle(node, "background-image", value ? 'url("' + value + '")' : '');return node;}@@ -1084,13 +1235,17 @@ Vvveb.Components.extend("_base", "_base", ComponentDeviceVisibility);Vvveb.Components.add("config/bootstrap", {name: "Bootstrap Variables",beforeInit: function (node) {- properties = [];+ let properties = [];let i = 0;- let j = 0;- let cssVars = Vvveb.ColorPaletteManager.getAllCSSVariableNames(window.FrameDocument.styleSheets/*, ":root"*/);+ let cssVars = {};+ try {+ if (window.FrameDocument) cssVars = Vvveb.ColorPaletteManager.getAllCSSVariableNames(window.FrameDocument.styleSheets/*, ":root"*/) || {};+ } catch (e) {+ cssVars = {};+ }- for (type in cssVars) {+ for (const type in cssVars) {properties.push({key: "cssVars" + type,inputtype: SectionInput,@@ -1099,15 +1254,15 @@ Vvveb.Components.add("config/bootstrap", {data: {header:type[0].toUpperCase() + type.slice(1)},});- for (selector in cssVars[type]) {+ for (const selector in cssVars[type]) {let friendlyName = selector.replaceAll(/--bs-/g,"").replaceAll("-", " ").trim();- friendlyName = friendlyName[0].toUpperCase() + friendlyName.slice(1);+ friendlyName = (friendlyName[0] ? friendlyName[0].toUpperCase() : "") + friendlyName.slice(1);let value = cssVars[type][selector];let input;- data = {selector, type:value.type, step:"any"};+ let data = {selector, type:value.type, step:"any"};if (value.type == "color") {input = ColorInput;@@ -1116,6 +1271,8 @@ Vvveb.Components.add("config/bootstrap", {data.options = fontList;} else if (value.type == "dimensions") {input = CssUnitInput;+ } else {+ input = TextInput;}i++;@@ -1126,15 +1283,15 @@ Vvveb.Components.add("config/bootstrap", {//index: i - 1,columnNode: this,col:(value.type == "font" || value.type == "dimensions") ? 12 : 6,- inline:(value.type == "font" || value.type == "dimensions") ? false : false,+ inline:false,section: advanced_section,inputtype: input,data: data,onChange: function(node, value, input) {if (this.data.type == "font") {- let option = input.options[input.selectedIndex];- Vvveb.FontsManager.addFont(option.dataset.provider, value, node[0]);+ let option = input && input.options ? input.options[input.selectedIndex] : null;+ if (option && option.dataset) Vvveb.FontsManager.addFont(option.dataset.provider, value, node[0]);}Vvveb.StyleManager.setStyle(":root", this.data.selector, value);diff --git a/public/js/vvvebjs/components-elements.js b/public/js/vvvebjs/components-elements.jsindex 13d0aae..d057526 100644--- a/public/js/vvvebjs/components-elements.js+++ b/public/js/vvvebjs/components-elements.js@@ -61,7 +61,7 @@ Vvveb.Components.extend("_base","elements/figure", {<figcaption>Fig.1 - Trulli, Puglia, Italy.</figcaption><div class="border"></div></figure>`,-+stylesheets:[{//the css is added in head when the element is added to page'src': Vvveb.baseUrl + 'css/figure.css',@@ -127,15 +127,17 @@ Vvveb.Components.extend("_base","elements/font-icon", {inline:true,inputtype: HtmlListSelectInput,onChange:function(element, value, input, component) {+ if (!element || !element.classList) return element;element.classList.remove("la", "lab", "lar");- let className = element.getAttribute('class');- element.classList.forEach((value, key, listObj) => {- if (value.startsWith("la-") && value != "la-lg") {- element.classList.remove(value);+ //snapshot first, removing while iterating the live list skips entries+ for (const cls of [...element.classList]) {+ if (cls.startsWith("la-") && cls != "la-lg" && cls != "la-2x") {+ element.classList.remove(cls);}- });+ }- element.classList.add(...input.className.split(" "));+ let classes = (input && input.className ? input.className.split(" ") : []).filter(c => c);+ if (classes.length) element.classList.add(...classes);return element;},data: {@@ -200,7 +202,9 @@ Vvveb.Components.extend("_base","elements/svg-image", {inline:true,inputtype: HtmlListSelectInput,onChange:function(element, value, input, component) {- let newElement = generateElements(value)[0];+ if (!element || !element.attributes || typeof element.replaceWith !== "function") return element;+ let newElement = generateElements(value || "")[0];+ if (!newElement) return element;let attributes = element.attributes;//keep old svg size and colors@@ -231,9 +235,6 @@ Vvveb.Components.extend("_base","elements/svg-image", {},{value: "remix-icon",text: "RemixIcon"- },{- value: "unicons",- text: "Unicons"},{value: "clarity-icons",text: "Clarity icons"@@ -246,9 +247,6 @@ Vvveb.Components.extend("_base","elements/svg-image", {},{value: "themify",text: "Themify"- },{- value: "css.gg",- text: "Css.gg"},{value: "olicons",text: "Olicons"@@ -261,9 +259,6 @@ Vvveb.Components.extend("_base","elements/svg-image", {},{value: "elegant-font",text: "Elegant font"- },{- value: "dripicons",- text: "Dripicons"},{value: "feather",text: "Feather"@@ -285,15 +280,30 @@ Vvveb.Components.extend("_base","elements/svg-image", {},{value: "tabler-icons",text: "Tabler icons"+ },{+ value: "phosphor-icons",+ text: "Phosphor icons"+ },{+ value: "lucide",+ text: "Lucide"+ },{+ value: "hugeicons-a-f",+ text: "Hugeicons A–F"+ },{+ value: "hugeicons-g-m",+ text: "Hugeicons G–M"+ },{+ value: "hugeicons-n-s",+ text: "Hugeicons N–S"+ },{+ value: "hugeicons-t-z",+ text: "Hugeicons T–Z"},{value: "octicons",text: "Octicons"},{value: "system-uicons",text: "System-uicons"- },{- value: "font-awesome",- text: "FontAwesome"},{value: "pe-icon-7-stroke",text: "Pixeden icon 7 stroke"@@ -371,7 +381,7 @@ Vvveb.Components.extend("_base","elements/svg-image", {inputtype: ColorInput,},{name: "Stroke",- key: "Stroke",+ key: "stroke",//sort: base_sort++,col:4,inline:true,@@ -407,7 +417,7 @@ Vvveb.Components.add("elements/svg-element", {inputtype: ColorInput,},{name: "Stroke",- key: "Stroke",+ key: "stroke",//sort: base_sort++,col:4,inline:true,@@ -506,7 +516,7 @@ Vvveb.Components.add("elements/gallery", {extraclass:"btn-group-fullwidth btn-group-sm",options: [{value: "masonry",- //icon:"la la-cog",+ //icon:"settings",text: "Masonry",title: "Masonry",checked:true,@@ -514,12 +524,12 @@ Vvveb.Components.add("elements/gallery", {value: "flex",text: "Flex",title: "Flex",- //icon:"la la-search",+ //icon:"search",},{value: "grid",text: "Grid",title: "Grid",- //icon:"la la-search",+ //icon:"search",}],},@@ -528,11 +538,11 @@ Vvveb.Components.add("elements/gallery", {document.querySelectorAll('.mb-2[data-group="'+ group + '"]').forEach(el => el.style.display = "");},onChange : function(node, value, input) {- this.setGroup(value);+ if (typeof this.setGroup === "function") this.setGroup(value);return node;},init: function (node) {- if (node.classList.contains("masonry")) {+ if (node && node.classList && node.classList.contains("masonry")) {return "masonry";} else {return "flex";@@ -623,12 +633,12 @@ Vvveb.Components.add("elements/gallery", {step:1},onChange: function(node, value, input, component, inputElement) {- if (value) {- value = 100 / value;- value += "%";- }+ let num = parseFloat(value);+ if (!isFinite(num) || !num) {+ return "";+ }- return value;+ return (100 / num) + "%";}},{name: "Images per row grid",@@ -643,7 +653,11 @@ Vvveb.Components.add("elements/gallery", {step:1},onChange: function(node, value, input, component, inputElement) {- return 'repeat(' + value + ', minmax(0, 1fr))';+ let num = parseInt(value);+ if (isNaN(num) || num <= 0) {+ return "";+ }+ return 'repeat(' + num + ', minmax(0, 1fr))';}},{name: "Images",@@ -707,30 +721,22 @@ Vvveb.Components.add("elements/gallery", {}]},onChange: function(node, value, input, component, event) {- if (event.action) {- if (event.action == "add") {- //temporary solution to better update list- Vvveb.Components.render("elements/gallery");- }- if (event.action == "remove") {- } else if (event.action == "select") {- }+ //temporary solution to better update list after adding an item+ if (event && event.action == "add") {+ Vvveb.Components.render("elements/gallery");}return node;},}],init(node) {+ if (!node || !node.classList) return node;document.querySelectorAll(".mb-2[data-group]").forEach(el => el.style.display = "none");- let source = "flex";- if (node.classList.contains("masonry")) {- source = "masonry";- } else {- source = "flex";- }+ const source = node.classList.contains("masonry") ? "masonry" : (node.classList.contains("grid") ? "grid" : "flex");- document.querySelector('.mb-2[data-group="'+ source + '"]').style.display = "";+ const group = document.querySelector('.mb-2[data-group="' + source + '"]');+ if (group) group.style.display = "";}});@@ -796,8 +802,8 @@ Vvveb.Components.add("elements/tabs", {</div></div>`,afterDrop: function(node) {- //set unique accordion parent id, this is a bootstrap accordion limitation- let parentId = Math.ceil(Math.random() * 1000);+ //set unique tabs parent id so tab targets don't clash between tabs components+ let parentId = Math.floor(Math.random() * 100000);node.id = 'tabs-' + parentId;node.innerHTML = node.innerHTML.replaceAll('parentId', parentId);@@ -823,11 +829,13 @@ Vvveb.Components.add("elements/tabs", {//"newElement": ``},onChange: function(node, value, input, component, event) {+ if (!node || !event || !event.action) return node;let element = node;- let tabsId = element.id.replace('tabs-','');+ let tabsId = (element.id || "").replace('tabs-','');let nav = node.querySelector("nav .nav-tabs");let content = node.querySelector(".tab-content");+ if (!nav || !content) return node;if (event.action) {if (event.action == "add") {@@ -844,11 +852,16 @@ Vvveb.Components.add("elements/tabs", {let index = event.index + 1;if (event.action == "remove") {- nav.querySelector("button:nth-child(" + index + ")").remove();- content.querySelector(".tab-pane:nth-child(" + index + ")").remove();+ let navBtn = nav.querySelector("button:nth-child(" + index + ")");+ if (navBtn) navBtn.remove();+ let pane = content.querySelector(".tab-pane:nth-child(" + index + ")");+ if (pane) pane.remove();} else if (event.action == "select") {let tab = nav.querySelector("button:nth-child(" + index + ")");- Vvveb.Builder.iframe.contentWindow.bootstrap.Tab.getOrCreateInstance(tab).show();+ let frameWindow = Vvveb.Builder.iframe && Vvveb.Builder.iframe.contentWindow;+ if (tab && frameWindow && frameWindow.bootstrap && frameWindow.bootstrap.Tab) {+ frameWindow.bootstrap.Tab.getOrCreateInstance(tab).show();+ }}}@@ -862,7 +875,7 @@ Vvveb.Components.add("elements/tabs", {//AccordionVvveb.Components.add("elements/accordion", {classes: ["accordion"],- name: "Accordeon",+ name: "Accordion",image: "icons/accordion.svg",html: `<div class="accordion" id="accordion-parentId"><div class="accordion-item">@@ -904,7 +917,7 @@ Vvveb.Components.add("elements/accordion", {</div>`,afterDrop: function(node) {//set unique accordion id- let parentId = Math.ceil(Math.random() * 1000);+ let parentId = Math.floor(Math.random() * 100000);//node.outerHTML = node.outerHTML.replaceAll('parentId', parentId);node.id = 'accordion-' + parentId;node.innerHTML = node.innerHTML.replaceAll('parentId', parentId);@@ -927,17 +940,17 @@ Vvveb.Components.add("elements/accordion", {//"newElement": ``},onChange: function(node, value, input, component, event) {- let element = node;- let accordionId = element.id.replace('accordion-','');+ if (!node) return node;+ const accordionId = (node.id || "").replace('accordion-','');- if (event.action) {+ if (event && event.action) {if (event.action == "add") {let random = Math.floor(Math.random() * 100) + 1;- let index = element.childElementCount + 1;+ let index = node.childElementCount + 1;node.append(generateElements(`<div class="accordion-item"><h2 class="accordion-header" id="heading-${index}-${random}">- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-${index}-${random}" aria-expanded="false" aria-controls="collapseTwo">Accordion Item #${index}</button>+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapse-${index}-${random}" aria-expanded="false" aria-controls="collapse-${index}-${random}">Accordion Item #${index}</button></h2><div id="collapse-${index}-${random}" class="accordion-collapse collapse" aria-labelledby="heading-${index}-${random}" data-bs-parent="#accordion-${accordionId}"><div class="accordion-body">@@ -952,18 +965,18 @@ Vvveb.Components.add("elements/accordion", {let index = (event.index + 1);if (event.action == "remove") {- node.querySelector(":scope > .accordion-item:nth-child(" + index + ")").remove();+ let item = node.querySelector(":scope > .accordion-item:nth-child(" + index + ")");+ if (item) item.remove();} else if (event.action == "select") {- let el = node.querySelector(":scope > .accordion-item:nth-child(" + index + ")");- let btn= el.querySelector(".accordion-button");- let collapse = el.querySelector(" .collapse");+ const el = node.querySelector(":scope > .accordion-item:nth-child(" + index + ")");+ if (!el) return node;+ const btn = el.querySelector(".accordion-button");+ const collapse = el.querySelector(".collapse");node.querySelectorAll(":scope > .accordion-item .collapse").forEach(e => e.classList.remove("show"));- node.querySelectorAll(":scope > .accordion-item .accordion-button").forEach(btn => btn.classList.add("collapsed"));- collapse.classList.add("show");- btn.classList.remove("collapsed");- //el[0].click();- //Vvveb.Builder.iframe.contentWindow.bootstrap.Collapse.getOrCreateInstance(el[0]).toggle();+ node.querySelectorAll(":scope > .accordion-item .accordion-button").forEach(b => b.classList.add("collapsed"));+ if (collapse) collapse.classList.add("show");+ if (btn) btn.classList.remove("collapsed");}}@@ -1131,9 +1144,8 @@ Vvveb.Components.add("elements/social-icons", {//"newElement": ``},onChange: function(node, value, input, component, event) {- let element = node;-- if (event.action) {+ if (!node) return node;+ if (event && event.action) {if (event.action == "add") {node.append(generateElements(`<li><a href="https://twitter.com">@@ -1145,11 +1157,8 @@ Vvveb.Components.add("elements/social-icons", {Vvveb.Components.render("elements/social-icons");}if (event.action == "remove") {- node.querySelector(":scope > li:nth-child(" + event.index + ")").remove();- } else if (event.action == "select") {- let el = node.querySelector(":scope > li:nth-child(" + event.index + ")");- //el[0].click();- //Vvveb.Builder.iframe.contentWindow.bootstrap.Collapse.getOrCreateInstance(el[0]).toggle();+ let item = node.querySelector(":scope > li:nth-child(" + event.index + ")");+ if (item) item.remove();}}@@ -1179,13 +1188,16 @@ Vvveb.Components.add("elements/social-icons", {});function carouselAfterDrop(node) {+ if (!node) return node;//check if swiper js is included and if not add it when drag starts to allow the script to load- body = Vvveb.Builder.frameBody;+ let body = Vvveb.Builder.frameBody;+ if (!body) return node;if (!body.querySelector("#swiper-js")) {- let link = document.createElement('link');- let lib = document.createElement('script');- let code = document.createElement('script');+ const doc = body.ownerDocument || document;+ let link = doc.createElement('link');+ let lib = doc.createElement('script');+ let code = doc.createElement('script');link.href = '../../js/libs/swiper/swiper-bundle.min.css';link.id = 'swiper-css';link.rel = 'stylesheet';@@ -1208,7 +1220,7 @@ function carouselAfterDrop(node) {el: ".swiper-pagination",},};- for (i in el.dataset) {+ for (let i in el.dataset) {let param = el.dataset[i];if (param == 'true') param = true;if (param == 'false') param = false;@@ -1234,10 +1246,12 @@ function carouselAfterDrop(node) {body.appendChild(code);lib.addEventListener('load', function() {- Vvveb.Builder.iframe.contentWindow.initSwiper();+ let frameWindow = Vvveb.Builder.iframe && Vvveb.Builder.iframe.contentWindow;+ if (frameWindow && typeof frameWindow.initSwiper === "function") frameWindow.initSwiper();});} else {- Vvveb.Builder.iframe.contentWindow.initSwiper(true);+ let frameWindow = Vvveb.Builder.iframe && Vvveb.Builder.iframe.contentWindow;+ if (frameWindow && typeof frameWindow.initSwiper === "function") frameWindow.initSwiper(true);}return node;@@ -1267,8 +1281,14 @@ Vvveb.Components.add("elements/carousel", {`,beforeInit(node) {- if (node.dataset.breakpoints) {- breakpoints = JSON.parse(node.dataset.breakpoints);+ if (!node) return node;+ if (node.dataset && node.dataset.breakpoints) {+ let breakpoints = {};+ try {+ breakpoints = JSON.parse(node.dataset.breakpoints) || {};+ } catch (e) {+ breakpoints = {};+ }for (let prop of this.properties) {if (prop.breakpoint && breakpoints[prop.breakpoint] && breakpoints[prop.breakpoint][prop.breakname]) {@@ -1283,9 +1303,11 @@ Vvveb.Components.add("elements/carousel", {afterDrop: carouselAfterDrop,onChange: function (node, property, value) {- let element = node;+ if (!node || !property) return node;+ const element = node;+if (property.key == "autoplay" && value == true) {- value = {"waitForTransition":true,"enabled":value,"delay":element.dataset.delay};+ value = {"waitForTransition":true,"enabled":value,"delay":element.dataset ? element.dataset.delay : undefined};}if (value == 'true') value= true;@@ -1305,28 +1327,28 @@ Vvveb.Components.add("elements/carousel", {*/if (property.group == "breakpoints") {- let breakpoints;- if (node.dataset.breakpoints) {- breakpoints = JSON.parse(node.dataset.breakpoints);- } else {- breakpoints = {};- }-- property.breakpoint = parseInt(property.breakpoint);-- if (!breakpoints[property.breakpoint]) {- breakpoints[property.breakpoint] = {};- }-- breakpoints[property.breakpoint][property.breakname] = parseInt(value);-+ let breakpoints = {};+ try {+ breakpoints = node.dataset && node.dataset.breakpoints ? JSON.parse(node.dataset.breakpoints) : {};+ } catch (e) {+ breakpoints = {};+ }+ property.breakpoint = parseInt(property.breakpoint);++ if (!breakpoints[property.breakpoint]) {+ breakpoints[property.breakpoint] = {};+ }++ let num = parseInt(value);+ if (!isNaN(num)) {+ breakpoints[property.breakpoint][property.breakname] = num;node.dataset.breakpoints = JSON.stringify(breakpoints);--+ }}- element.swiper.destroy();- Vvveb.Builder.iframe.contentWindow.initSwiper(true);+ if (element.swiper && typeof element.swiper.destroy === "function") element.swiper.destroy();+ let frameWindow = Vvveb.Builder.iframe && Vvveb.Builder.iframe.contentWindow;+ if (frameWindow && typeof frameWindow.initSwiper === "function") frameWindow.initSwiper(true);return node;},@@ -1346,12 +1368,16 @@ Vvveb.Components.add("elements/carousel", {},onChange: function(node, value, input, component, event) {let element = node;+ if (!element || !event || !event.action) return node;let dataset = {};- for (i in element.dataset) {- dataset[i] = element.dataset[i];- };+ if (element.dataset) {+ for (let i in element.dataset) {+ dataset[i] = element.dataset[i];+ };+ }if (event.action) {+ if (!element.swiper) return node;if (event.action == "add") {let random = Math.floor(Math.random() * 6) + 1;let index = element.swiper.slides.length + 1;@@ -1368,7 +1394,8 @@ Vvveb.Components.add("elements/carousel", {}setTimeout(function () {- for (i in dataset) {+ if (!element.swiper) return;+ for (let i in dataset) {element.swiper.params[i] = dataset[i];element.dataset[i] = dataset[i];};@@ -1508,13 +1535,13 @@ Vvveb.Components.add("elements/carousel", {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "horizontal",- icon:"la la-arrow-down",+ icon:"arrow-down",title: "Horizontal",checked:true,},{value: "vertical",title: "Vertical",- icon:"la la-arrow-right",+ icon:"arrow-right",checked:false,}],}@@ -1658,7 +1685,7 @@ Vvveb.Components.add("elements/Image box", {Vvveb.Components.add("elements/Icon box", {nodes: [".counter"],- name: "Image Box",+ name: "Icon Box",image: "icons/stopwatch.svg",html: `<i class="font-icon la la-star"></i>`,properties: [diff --git a/public/js/vvvebjs/components-embeds.js b/public/js/vvvebjs/components-embeds.jsindex 0fe5e90..62d4eef 100755--- a/public/js/vvvebjs/components-embeds.js+++ b/public/js/vvvebjs/components-embeds.js@@ -19,6 +19,42 @@* https://github.com/givanz/Vvveb*/+/**+ * Placeholder shown until an url is embedded.+ */+function embedPlaceholder(label = "Enter url to embed") {+ return `<div data-component-oembed data-url="">+ <div class="alert alert-light m-5" role="alert">+ <img width="64" src="${Vvveb.baseUrl}icons/code.svg">+ <h6>${label}</h6>+ </div></div>`;+}++//recreate scripts so they execute inside the frame document+//(scripts inserted via innerHTML never run)+function recreateScripts(node) {+ if (!node || typeof node.querySelectorAll !== "function") return;+ const frameDoc = Vvveb.Builder.frameDoc;+ if (!frameDoc || typeof frameDoc.createElement !== "function") return;++ node.querySelectorAll('script').forEach(script => {+ try {+ const newScript = frameDoc.createElement("script");+ //keep src/async/defer/type and provider data attributes+ for (const attr of script.attributes) {+ newScript.setAttribute(attr.name, attr.value);+ }+ if (!script.src) {+ //inline scripts (player init code etc.) would stay dead otherwise+ newScript.textContent = script.textContent;+ }+ script.replaceWith(newScript);+ } catch (e) {+ //best effort - don't fail the whole embed for one script+ console.warn("Vvveb: could not re-create script", script.src, e);+ }+ });+}Vvveb.ComponentsGroup['Embeds'] = ["embeds/embed"];@@ -26,13 +62,7 @@ Vvveb.Components.extend("_base", "embeds/embed", {name: "Embed",attributes: ["data-component-oembed"],image: "icons/code.svg",- //dragHtml: '<img src="' + Vvveb.baseUrl + 'icons/maps.png">',- html: `<div data-component-oembed data-url="">- <div class="alert alert-light m-5" role="alert">- <img width="64" src="${Vvveb.baseUrl}icons/code.svg">- <h6>Enter url to embed</h6>- </div></div>`,-+ html: embedPlaceholder("Enter url to embed"),properties: [{name: "Url",@@ -40,32 +70,60 @@ Vvveb.Components.extend("_base", "embeds/embed", {htmlAttr: "data-url",inputtype: TextInput,onChange: function(node, value) {+ if (!node) return node;+ value = String(value ?? "").trim();++ //clearing the url restores the placeholder instead of requesting an embed for ""+ if (!value) {+ node.innerHTML = embedPlaceholder();+ return node;+ }++ if (typeof getOembed !== "function") {+ console.error("Vvveb: embed failed, oembed.js is not loaded");+ return node;+ }+node.innerHTML = `<div class="alert alert-light d-flex justify-content-center"><div class="spinner-border m-5" role="status"><span class="visually-hidden">Loading...</span></div></div>`;-++ //ignore stale responses when the url is edited again before load finishes+ const requestId = (node._oembedRequest = (node._oembedRequest || 0) + 1);+getOembed(value).then(response => {- node.innerHTML = response.html;- let containerW = node.offsetWidth;- let iframe = node.querySelector("iframe");- if (iframe) {- let ratio = containerW / iframe.offsetWidth;- iframe.setAttribute("width", (width * ratio));- iframe.setAttribute("height", (height * ratio));- }-- let arr = node.querySelectorAll('script').forEach(script => {- let newScript = Vvveb.Builder.frameDoc.createElement("script");- newScript.src = script.src;- script.replaceWith(newScript);- });-- }).catch(error => console.log(error));+ if (requestId !== node._oembedRequest) return;+ if (!response || !response.html) {+ throw new Error("Empty embed response");+ }++ node.innerHTML = response.html;++ //scale the iframe up from its intrinsic size to the container width+ const containerW = node.offsetWidth;+ const iframe = node.querySelector("iframe");++ if (iframe && containerW > 0 && iframe.offsetWidth > 0) {+ const ratio = containerW / iframe.offsetWidth;+ iframe.setAttribute("width", Math.round(containerW));+ iframe.setAttribute("height", Math.round(iframe.offsetHeight * ratio));+ }++ recreateScripts(node);+ }).catch(error => {+ if (requestId !== node._oembedRequest) return;+ console.error("Vvveb: embed failed", error);+ //don't leave the spinner spinning forever+ node.innerHTML = `<div class="alert alert-danger m-5" role="alert">+ <h6>Error embedding url</h6>+ <p class="mb-0">The url could not be embedded, please check it and try again.</p>+ </div>`;+ });return node;- },+ },},{name: "Width",key: "width",@@ -83,13 +141,11 @@ Vvveb.Components.extend("_base", "embeds/embed", {for (const provider of ["youtube", "vimeo", "dailymotion", "flickr", "smugmug", "scribd", "twitter", "soundcloud", "slideshare", "spotify", "imgur", "issuu", "mixcloud", "ted", "animoto", "tumblr", "kickstarter", "reverbnation", "reddit", "speakerdeck", "screencast", "amazon", "someecards", "tiktok","pinterest", "wolfram", "anghami"]) {Vvveb.Components.add("embeds/" + provider, {- name: provider,+ name: provider[0].toUpperCase() + provider.slice(1),image: "icons/code.svg",- html: `<div data-component-oembed data-url="">- <div class="alert alert-light m-5" role="alert">- <img width="64" src="${Vvveb.baseUrl}icons/code.svg">- <h6>Enter ${provider} url to embed</h6>- </div></div>`,+ html: embedPlaceholder(`Enter ${provider} url to embed`),});- Vvveb.ComponentsGroup['Embeds'].push("embeds/" + provider);+ if (!Vvveb.ComponentsGroup['Embeds'].includes("embeds/" + provider)) {+ Vvveb.ComponentsGroup['Embeds'].push("embeds/" + provider);+ }}diff --git a/public/js/vvvebjs/components-html.js b/public/js/vvvebjs/components-html.jsindex a4dceec..b65bf4b 100644--- a/public/js/vvvebjs/components-html.js+++ b/public/js/vvvebjs/components-html.js@@ -39,6 +39,7 @@ Vvveb.Components.extend("_base", "html/heading", {},init: function(node) {+ if (!node || !node.nodeName) return 1;let regex;regex = /H(\d)/.exec(node.nodeName);if (regex && regex[1]) {@@ -94,7 +95,7 @@ let linkComponentProperties = [htmlAttr: "href",inputtype: AutocompleteInput,data: {- url: linkUrl,+ url: (typeof linkUrl !== "undefined" ? linkUrl : ""),validSelection: false,allowFreeText: true,useKeyAsValue: true,@@ -189,7 +190,7 @@ Vvveb.Components.extend("_base", "html/image", {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "",- icon:"la la-times",+ icon:"x",//text: "None",title: "None",checked:true,@@ -197,19 +198,19 @@ Vvveb.Components.extend("_base", "html/image", {value: "align-left",//text: "Left",title: "text-start",- icon:"la la-align-left",+ icon:"align-left",checked:false,}, {value: "align-center",//text: "Center",title: "Center",- icon:"la la-align-center",+ icon:"align-center",checked:false,}, {value: "align-right",//text: "Right",title: "Right",- icon:"la la-align-right",+ icon:"align-right",checked:false,}],},@@ -238,21 +239,25 @@ Vvveb.Components.extend("_base", "html/image", {}},onChange : function(node, value, input) {- this.setGroup(value);+ if (!node) return node;+ if (typeof this.setGroup === "function") this.setGroup(value);if (value) {- const wrappingElement = document.createElement('a');+ const wrappingElement = (node.ownerDocument || document).createElement('a');node.replaceWith(wrappingElement);wrappingElement.appendChild(node);} else {- if (node.parentNode.tagName.toLowerCase() == "a"){- node.parentNode.replaceWith(node);+ let parent = node.parentNode;+ if (parent && parent.tagName && parent.tagName.toLowerCase() == "a" && parent.parentNode) {+ //unwrap keeping siblings in place instead of dropping them+ parent.parentNode.insertBefore(node, parent);+ if (!parent.hasChildNodes()) parent.remove();}}return node;},init: function (node) {- let value = node.parentNode.tagName.toLowerCase() == "a";- this.setGroup(value);+ let value = !!(node && node.parentNode && node.parentNode.tagName && node.parentNode.tagName.toLowerCase() == "a");+ if (typeof this.setGroup === "function") this.setGroup(value);return value;}}].concat(@@ -262,7 +267,9 @@ Vvveb.Components.extend("_base", "html/image", {)),init(node) {+ if (!node) return node;let group = document.querySelectorAll('.mb-2[data-group="link"]');+ let value = !!(node.parentNode && node.parentNode.tagName && node.parentNode.tagName.toLowerCase() == "a");if (group.length) {group.forEach(el => {if (value) {@@ -290,7 +297,7 @@ Vvveb.Components.extend("_base", "html/hr", {inputtype: SelectInput,data: {options: [{- value: "Default",+ value: "",text: ""}, {value: "border-primary",@@ -329,7 +336,7 @@ Vvveb.Components.extend("_base", "html/hr", {inputtype: SelectInput,data: {options: [{- value: "Default",+ value: "",text: ""}, {value: "border-1",@@ -356,7 +363,7 @@ Vvveb.Components.extend("_base", "html/hr", {inputtype: SelectInput,data: {options: [{- value: "Default",+ value: "",text: ""}, {value: "opacity-25",@@ -510,11 +517,12 @@ Vvveb.Components.extend("_base", "html/selectinput", {html: '<select class="form-control"><option value="value1">Text 1</option><option value="value2">Text 2</option><option value="value3">Text 3</option></select>',beforeInit: function (node) {- properties = [];+ if (!node || typeof node.querySelectorAll !== "function") return node;+ let properties = [];let i = 0;node.querySelectorAll('option').forEach(el => {- data = {"value": el.value, "text": el.text};+ let data = {"value": el.value, "text": el.text};i++;properties.push({name: "Option " + i,@@ -525,8 +533,9 @@ Vvveb.Components.extend("_base", "html/selectinput", {inputtype: TextValueInput,data: data,onChange: function(node, value, input) {-- option = this.optionNode;+ if (!node || !input) return node;+ const option = this.optionNode;+ if (!option) return node;//if remove button is clicked remove option and render row propertiesif (input.nodeName == 'BUTTON') {@@ -584,9 +593,10 @@ Vvveb.Components.extend("_base", "html/selectinput", {name: "",key: "addChild",inputtype: ButtonInput,- data: {text:"Add option", icon:"la-plus"},+ data: {text:"Add option", icon:"plus"},onChange: function(node){+ if (!node || typeof node.append !== "function") return node;node.append(generateElements('<option value="value">Text</option>')[0]);//render component properties again to include the new column inputs@@ -679,7 +689,7 @@ Vvveb.Components.extend("_base", "html/radiobutton", {},{name: "Checked",key: "checked",- htmlAttr: "Checked",+ htmlAttr: "checked",inputtype: CheckboxInput,//inline:true,//col:6@@ -726,7 +736,7 @@ Vvveb.Components.extend("_base", "html/checkbox", {},{name: "Checked",key: "checked",- htmlAttr: "Checked",+ htmlAttr: "checked",inputtype: CheckboxInput,//inline:true,//col:6@@ -759,7 +769,7 @@ Vvveb.Components.extend("_base", "html/fileinput", {Vvveb.Components.extend("_base", "html/video", {nodes: ["video"],name: "Video",- html: '<video width="320" height="240" playsinline loop autoplay muted src="../../media/demo/sample.webm" poster="../../media/demo/sample.webp"><video>',+ html: '<video width="320" height="240" playsinline loop autoplay muted src="../../media/demo/sample.webm" poster="../../media/demo/sample.webp"></video>',dragHtml: '<img width="320" height="240" src="' + Vvveb.baseUrl + 'icons/video.svg">',image: "icons/video.svg",resizable:true,//show select box resize handlers@@ -778,12 +788,12 @@ Vvveb.Components.extend("_base", "html/video", {name: "Width",key: "width",htmlAttr: "width",- inputtype: TextInput+ inputtype: NumberInput}, {name: "Height",key: "height",htmlAttr: "height",- inputtype: TextInput+ inputtype: NumberInput},{name: "Muted",key: "muted",@@ -889,7 +899,7 @@ Vvveb.Components.extend("_base", "html/paragraph", {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "",- icon:"la la-times",+ icon:"x",//text: "None",title: "None",checked:true,@@ -897,19 +907,19 @@ Vvveb.Components.extend("_base", "html/paragraph", {value: "text-start",//text: "Left",title: "text-start",- icon:"la la-align-left",+ icon:"align-left",checked:false,}, {value: "text-center",//text: "Center",title: "Center",- icon:"la la-align-center",+ icon:"align-center",checked:false,}, {value: "text-end",//text: "Right",title: "Right",- icon:"la la-align-right",+ icon:"align-right",checked:false,}],},@@ -944,7 +954,7 @@ Vvveb.Components.extend("_base", "html/blockquote", {extraclass:"btn-group-sm btn-group-fullwidth",options: [{value: "",- icon:"la la-times",+ icon:"x",//text: "None",title: "None",checked:true,@@ -952,19 +962,19 @@ Vvveb.Components.extend("_base", "html/blockquote", {value: "align-left",//text: "Left",title: "text-start",- icon:"la la-align-left",+ icon:"align-left",checked:false,}, {value: "align-center",//text: "Center",title: "Center",- icon:"la la-align-center",+ icon:"align-center",checked:false,}, {value: "align-right",//text: "Right",title: "Right",- icon:"la la-align-right",+ icon:"align-right",checked:false,}],},@@ -1005,6 +1015,7 @@ Vvveb.Components.extend("_base", "html/list", {},init: function(node) {+ if (!node || !node.nodeName) return "ul";return node.nodeName.toLowerCase()},@@ -1021,7 +1032,6 @@ Vvveb.Components.extend("_base", "html/list", {name: "Items",key: "items",inputtype: ListInput,- htmlAttr:"data-slides-per-view",inline:true,data: {selector:"li",@@ -1032,8 +1042,9 @@ Vvveb.Components.extend("_base", "html/list", {},onChange: function(node, value, input, component, event) {let element = node;+ if (!element) return element;- if (event.action) {+ if (event && event.action) {if (event.action == "add") {//node.append(generateElements(`<li>List item</li>`)[0]);@@ -1172,7 +1183,7 @@ Vvveb.Components.extend("_base", "html/tablerow", {value: "success",text: "Success"}, {- value: "error",+ value: "danger",text: "Error"}, {value: "warning",@@ -1206,10 +1217,10 @@ Vvveb.Components.extend("_base", "html/tablebody", {});Vvveb.Components.extend("_base", "html/tablefooter", {- nodes: ["tfooter"],+ nodes: ["tfoot"],image: "icons/table.svg",name: "Table Footer",- html: "<tfooter>Table footer</tfooter>"+ html: "<tfoot>Table footer</tfoot>"});Vvveb.Components.extend("_base", "html/tablehead", {@@ -1231,7 +1242,7 @@ Vvveb.Components.extend("_base", "html/tablehead", {value: "success",text: "Success"}, {- value: "anger",+ value: "danger",text: "Error"}, {value: "warning",@@ -1286,7 +1297,7 @@ Vvveb.Components.extend("_base", "html/table", {inputtype: SelectInput,data: {options: [{- value: "Default",+ value: "",text: ""}, {value: "table-primary",@@ -1390,11 +1401,11 @@ Vvveb.Components.extend("_base", "html/table", {value: "",text: "None"}, {- value: "thead-default",- text: "Default"+ value: "thead-dark",+ text: "Dark"}, {- value: "thead-inverse",- text: "Inverse"+ value: "thead-light",+ text: "Light"}]}}]@@ -1462,11 +1473,11 @@ Vvveb.Components.extend("_base", "html/embed", {attributes: ["data-component-embed"],image: "icons/embed.svg",name: "Embed",- html: `<object data="" type="application/pdf" data-component-pdf></object>`,+ html: `<embed data-component-embed src="" type="">`,properties: [{- name: "Data",- key: "data",- htmlAttr: "data",+ name: "Source",+ key: "src",+ htmlAttr: "src",inputtype: TextInput}]});diff --git a/public/js/vvvebjs/components-server.js b/public/js/vvvebjs/components-server.jsindex da14400..4843a88 100755--- a/public/js/vvvebjs/components-server.js+++ b/public/js/vvvebjs/components-server.js@@ -422,7 +422,7 @@ Vvveb.Components.add("components/slider", {let j = 0;$(node).find('[data-slide]').each(function() {- _class = $(this).getAttribute("class");+ _class = this.getAttribute("class");let reg = /col-([^-\$ ]*)?-?(\d+)/g;let match;@@ -445,7 +445,7 @@ Vvveb.Components.add("components/slider", {onChange: function(node, value, input) {//column = $('[class*="col-"]:eq(' + this.index + ')', node);- let column = $(this.columnNode);+ let column = this.columnNode;//if remove button is clicked remove column and render row propertiesif (input.nodeName == 'BUTTON') {@@ -461,7 +461,7 @@ Vvveb.Components.add("components/slider", {_class = _class.replace(new RegExp(input.name + '-\\d+?'), '');//add new column sizeif (value) _class += ' ' + input.name + '-' + value;- column.setAttribute"class", _class);+ column.setAttribute("class", _class);return node;},diff --git a/public/js/vvvebjs/components-tailwind.js b/public/js/vvvebjs/components-tailwind.jsnew file mode 100644index 0000000..a7f5790--- /dev/null+++ b/public/js/vvvebjs/components-tailwind.js@@ -0,0 +1,1219 @@+/**+ * Vvveb+ *+ * Copyright (C) 2025 Ziadin Givan+ *+ * This program is free software: you can redistribute it and/or modify+ * it under the terms of the GNU Affero General Public License as+ * published by the Free Software Foundation, either version 3 of the+ * License, or (at your option) any later version.+ *+ * This program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+ * GNU Affero General Public License for more details.+ *+ * You should have received a copy of the GNU Affero General Public License+ * along with this program. If not, see <https://www.gnu.org/licenses/>.+ *+ * https://github.com/givanz/Vvveb+ */++/**+ * Tailwind CSS component definitions for the Vvveb page builder.+ *+ * Modeled on components-bootstrap4.js / components-bootstrap5.js: same+ * component ids (html/container, html/gridrow, html/button, ...) so core+ * builder references keep working, with Tailwind utility classes instead of+ * Bootstrap ones.+ *+ * Loading modes:+ * - Framework swap: load instead of components-bootstrap5.js.+ * - Theme overlay: place in {theme}/components/*.js; the editor loads it+ * after the core files, so the registrations below override the Bootstrap+ * defaults and the "Bootstrap 5" palette group is removed.+ *+ * Note on class properties: the builder swaps class values by removing every+ * entry listed in validValues and adding the selected value, so properties+ * that target `class` use ONE utility class per option. Options that need+ * several coordinated classes (alert schemes, active pagination items) are+ * implemented with onChange handlers that rewrite the node's class list.+ *+ * `primary` colors (bg-primary, text-primary, ...) require a matching+ * `theme.extend.colors.primary` entry in the site's tailwind.config.js, as+ * used by the landing-tailwind theme.+ */++Vvveb.ComponentsGroup['Tailwind'] = [+ "html/container", "html/flexrow", "html/gridrow", "html/button", "html/buttongroup",+ "html/alert", "html/card", "html/listgroup", "html/badge", "html/progress",+ "html/navbar", "html/breadcrumbs", "html/pagination", "html/hero", "html/spinner",+ "html/form", "html/textinput", "html/selectinput", "html/textareainput", "html/fileinput",+ "html/table"+];++//the framework layer this replaces is no longer needed in the palette+delete Vvveb.ComponentsGroup['Bootstrap 5'];++const tw_base_sort = 100;//start sorting from 100 so extended properties render first++//single-class background utilities (requires primary color in tailwind.config.js)+const twBgColorClasses = ["", "bg-primary", "bg-blue-600", "bg-green-600", "bg-red-600", "bg-yellow-500", "bg-sky-500", "bg-gray-100", "bg-gray-900", "bg-white"];++function twBgColorOptions() {+ return [+ {value: "", text: "Default"},+ {value: "bg-primary", text: "Primary"},+ {value: "bg-blue-600", text: "Blue"},+ {value: "bg-green-600", text: "Green"},+ {value: "bg-red-600", text: "Red"},+ {value: "bg-yellow-500", text: "Yellow"},+ {value: "bg-sky-500", text: "Sky"},+ {value: "bg-gray-100", text: "Gray"},+ {value: "bg-gray-900", text: "Dark"},+ {value: "bg-white", text: "White"}+ ];+}++//named color schemes used by alerts/badges; each scheme maps to a set of+//utility classes applied together through onChange+const twSchemeClasses = {+ "": ["rounded-lg border p-4", "border-gray-200", "bg-gray-50", "text-gray-700"],+ "info": ["rounded-lg border p-4", "border-sky-200", "bg-sky-50", "text-sky-800"],+ "success":["rounded-lg border p-4", "border-green-200", "bg-green-50", "text-green-800"],+ "warning":["rounded-lg border p-4", "border-yellow-200", "bg-yellow-50", "text-yellow-800"],+ "danger": ["rounded-lg border p-4", "border-red-200", "bg-red-50", "text-red-800"],+ "primary":["rounded-lg border p-4", "border-primary-light", "bg-primary-light", "text-primary"],+ "dark": ["rounded-lg border p-4", "border-gray-700", "bg-gray-800", "text-gray-100"]+};++/**+ * Replace all scheme classes on a node with the ones for the selected scheme.+ * Keeps unrelated classes (layout, spacing added by the user).+ */+function twApplyScheme(node, scheme, markerClass) {+ const classes = twSchemeClasses[scheme] || twSchemeClasses[""];+ const all = new Set();+ for (const key in twSchemeClasses) {+ for (const cls of twSchemeClasses[key]) {+ all.add(cls);+ }+ }+ //drop every known scheme class except the shared base, then add the new set+ const kept = (node.getAttribute("class") || "").split(/\s+/).filter(c => c && (!all.has(c) || c === markerClass));+ node.setAttribute("class", [...new Set(kept.concat(classes))].join(" "));+ return node;+}++function twSchemeOptions() {+ return [+ {value: "", text: "Default"},+ {value: "primary", text: "Primary"},+ {value: "info", text: "Info"},+ {value: "success", text: "Success"},+ {value: "warning", text: "Warning"},+ {value: "danger", text: "Danger"},+ {value: "dark", text: "Dark"}+ ];+}++//shared tailwind input styling for form controls+const twInputClass = "w-full rounded-lg border border-gray-300 px-3 py-2 text-sm text-gray-900 focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary";++Vvveb.Components.extend("_base", "html/container", {+ classes: ["container"],+ image: "icons/container.svg",+ name: "Container",+ html: '<div class="container mx-auto px-4" style="min-height:150px;"><div class="py-12">Container</div></div>',+ properties: [{+ name: "Width",+ key: "width",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["container", "max-w-7xl", "max-w-screen-lg", "max-w-3xl", "max-w-full"],+ data: {+ options: [{+ value: "container",+ text: "Container"+ },{+ value: "max-w-7xl",+ text: "Max width 7xl"+ },{+ value: "max-w-screen-lg",+ text: "Max width screen lg"+ },{+ value: "max-w-3xl",+ text: "Max width 3xl"+ },{+ value: "max-w-full",+ text: "Full width"+ }]+ }+ },{+ name: "Centered",+ key: "centered",+ htmlAttr: "class",+ inputtype: ToggleInput,+ validValues: ["mx-auto"],+ data: {+ on: "mx-auto",+ off: ""+ }+ },{+ name: "Horizontal padding",+ key: "padding",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["px-0", "px-4", "px-6", "px-8"],+ data: {+ options: [{+ value: "px-0",+ text: "None"+ },{+ value: "px-4",+ text: "Small"+ },{+ value: "px-6",+ text: "Medium"+ },{+ value: "px-8",+ text: "Large"+ }]+ }+ },{+ name: "Background",+ key: "background",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: twBgColorClasses,+ data: {+ options: twBgColorOptions()+ }+ }],+});++/** Flex row: direction / alignment / gap via single-class utilities */+Vvveb.Components.add("html/flexrow", {+ name: "Flex Row",+ image: "icons/grid_row.svg",+ classes: ["flex"],+ html: '<div class="flex flex-wrap items-center gap-4"><div class="rounded-lg bg-gray-100 p-6">Item 1</div><div class="rounded-lg bg-gray-100 p-6">Item 2</div><div class="rounded-lg bg-gray-100 p-6">Item 3</div></div>',+ properties: [{+ name: "Direction",+ key: "direction",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["flex-row", "flex-row-reverse", "flex-col", "flex-col-reverse"],+ data: {+ options: [{+ value: "flex-row",+ text: "Row"+ },{+ value: "flex-row-reverse",+ text: "Row reverse"+ },{+ value: "flex-col",+ text: "Column"+ },{+ value: "flex-col-reverse",+ text: "Column reverse"+ }]+ }+ },{+ name: "Justify content",+ key: "justify",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["justify-start", "justify-center", "justify-end", "justify-between", "justify-around"],+ data: {+ options: [{+ value: "justify-start",+ text: "Start"+ },{+ value: "justify-center",+ text: "Center"+ },{+ value: "justify-end",+ text: "End"+ },{+ value: "justify-between",+ text: "Space between"+ },{+ value: "justify-around",+ text: "Space around"+ }]+ }+ },{+ name: "Align items",+ key: "align",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["items-start", "items-center", "items-end", "items-stretch", "items-baseline"],+ data: {+ options: [{+ value: "items-start",+ text: "Start"+ },{+ value: "items-center",+ text: "Center"+ },{+ value: "items-end",+ text: "End"+ },{+ value: "items-stretch",+ text: "Stretch"+ },{+ value: "items-baseline",+ text: "Baseline"+ }]+ }+ },{+ name: "Wrap",+ key: "wrap",+ htmlAttr: "class",+ inputtype: ToggleInput,+ validValues: ["flex-wrap"],+ data: {+ on: "flex-wrap",+ off: ""+ }+ },{+ name: "Gap",+ key: "gap",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["gap-0", "gap-2", "gap-4", "gap-6", "gap-8"],+ data: {+ options: [{+ value: "gap-0",+ text: "None"+ },{+ value: "gap-2",+ text: "Small"+ },{+ value: "gap-4",+ text: "Medium"+ },{+ value: "gap-6",+ text: "Large"+ },{+ value: "gap-8",+ text: "Extra large"+ }]+ }+ }]+});++/** Grid row: responsive columns through md:col-span-* utilities */+Vvveb.Components.add("html/gridcolumn", {+ name: "Grid Column",+ image: "icons/grid_row.svg",+ classesRegex: ["col-span-"],+ html: '<div class="md:col-span-1"><h3>Column</h3></div>',+ properties: [{+ name: "Column",+ key: "column",+ inputtype: GridInput,+ data: {hide_remove:true},++ beforeInit: function(node) {+ let _class = node.getAttribute("class");++ let reg = /([a-zA-Z]+:)?col-span-(\d+)/g;+ let match;++ while ((match = reg.exec(_class)) != null) {+ this.data["col" + ((match[1] != undefined) ? "_" + match[1].replace(':', '') : "")] = match[2];+ }+ },++ onChange: function(node, value, input) {+ //GridInput select names are "col", "col-sm", "col-md"; tailwind prefixes are "", "sm:", "md:"+ let isBase = input.name == "col";+ let twPrefix = isBase ? "" : input.name.replace(/^col-/, '') + ":";+ let rePrefix = isBase ? "" : input.name.replace(/^col-/, '') + "\\:";++ let _class = node.getAttribute("class") || "";++ //remove previous column span for this breakpoint+ _class = _class.replace(new RegExp("(^|\\s)" + rePrefix + "col-span-\\d+"), "$1");+ //add new column size+ if (value) _class += " " + twPrefix + "col-span-" + value;+ node.setAttribute("class", _class.trim());++ return node;+ },+ }]+});++Vvveb.Components.add("html/gridrow", {+ name: "Grid Row",+ image: "icons/grid_row.svg",+ classes: ["grid"],+ html: '<div class="grid grid-cols-1 gap-6 md:grid-cols-3"><div class="md:col-span-1"><h3>Column 1</h3></div><div class="md:col-span-1"><h3>Column 2</h3></div><div class="md:col-span-1"><h3>Column 3</h3></div></div>',+ children: [{+ name: "html/gridcolumn",+ classesRegex: ["col-span-"],+ }],+ beforeInit: function (node) {+ let properties = [];+ let i = 0;++ node.querySelectorAll('[class*="col-span-"]').forEach(el => {+ let _class = el.getAttribute("class");++ let reg = /([a-zA-Z]+:)?col-span-(\d+)/g;+ let match;+ let data = {};++ while ((match = reg.exec(_class)) != null) {+ data["col" + ((match[1] != undefined) ? "_" + match[1].replace(':', '') : "")] = match[2];+ }++ i++;+ properties.push({+ name: "Column " + i,+ key: "column" + i,+ columnNode: el,+ col:12,+ inline:false,+ inputtype: GridInput,+ data: data,+ onChange: function(node, value, input) {+ let column = this.columnNode;++ //if remove button is clicked remove column and render row properties+ if (input.nodeName == 'BUTTON') {+ column.remove();+ Vvveb.Components.render("html/gridrow");+ return node;+ }++ //GridInput select names are "col", "col-sm", "col-md"; tailwind prefixes are "", "sm:", "md:"+ let isBase = input.name == "col";+ let twPrefix = isBase ? "" : input.name.replace(/^col-/, '') + ":";+ let rePrefix = isBase ? "" : input.name.replace(/^col-/, '') + "\\:";++ let _class = column.getAttribute("class") || "";++ //remove previous column span for this breakpoint+ _class = _class.replace(new RegExp("(^|\\s)" + rePrefix + "col-span-\\d+"), "$1");+ //add new column size+ if (value) _class += " " + twPrefix + "col-span-" + value;+ column.setAttribute("class", _class.trim());++ return node;+ },+ });+ });++ //remove all column properties+ this.properties = this.properties.filter(function(item) {+ return item.key.indexOf("column") === -1;+ });++ //add remaining properties to generated column properties+ properties.push(this.properties[0]);++ this.properties = properties;+ return node;+ },++ properties: [{+ name: "Column",+ key: "column1",+ inputtype: GridInput+ },{+ name: "",+ key: "addChild",+ inputtype: ButtonInput,+ data: {text:"Add column", icon:"plus"},+ onChange: function(node)+ {+ if (!node || typeof node.appendChild !== "function") return node;+ let div = (node.ownerDocument || document).createElement("div");+ div.setAttribute("class", "md:col-span-1");+ div.innerHTML = "<h3>Column</h3>";+ node.appendChild(div);++ //render component properties again to include the new column inputs+ Vvveb.Components.render("html/gridrow");++ return node;+ }+ }]+});++Vvveb.Components.extend("html/link", "html/button", {+ classes: ["btn"],+ name: "Button",+ image: "icons/button.svg",+ html: '<a href="#" class="inline-flex items-center justify-center gap-2 rounded-lg bg-primary px-5 py-2.5 text-sm font-semibold text-white hover:bg-primary-dark">Button</a>',+ properties: [{+ name: "Background",+ key: "background",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["bg-primary", "bg-primary-dark", "bg-blue-600", "bg-green-600", "bg-red-600", "bg-gray-100", "bg-gray-900", "bg-white"],+ data: {+ options: [{+ value: "bg-primary",+ text: "Primary"+ },{+ value: "bg-primary-dark",+ text: "Primary dark"+ },{+ value: "bg-blue-600",+ text: "Blue"+ },{+ value: "bg-green-600",+ text: "Green"+ },{+ value: "bg-red-600",+ text: "Red"+ },{+ value: "bg-gray-100",+ text: "Light"+ },{+ value: "bg-gray-900",+ text: "Dark"+ },{+ value: "bg-white",+ text: "White"+ }]+ }+ },{+ name: "Text color",+ key: "text-color",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["text-white", "text-gray-700", "text-gray-900", "text-primary"],+ data: {+ options: [{+ value: "text-white",+ text: "White"+ },{+ value: "text-gray-700",+ text: "Gray"+ },{+ value: "text-gray-900",+ text: "Dark"+ },{+ value: "text-primary",+ text: "Primary"+ }]+ }+ },{+ name: "Border",+ key: "border",+ htmlAttr: "class",+ inputtype: ToggleInput,+ validValues: ["border"],+ data: {+ on: "border",+ off: ""+ }+ },{+ name: "Rounded",+ key: "rounded",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["rounded-none", "rounded-md", "rounded-lg", "rounded-xl", "rounded-full"],+ data: {+ options: [{+ value: "rounded-none",+ text: "None"+ },{+ value: "rounded-md",+ text: "Medium"+ },{+ value: "rounded-lg",+ text: "Large"+ },{+ value: "rounded-xl",+ text: "Extra large"+ },{+ value: "rounded-full",+ text: "Full"+ }]+ }+ },{+ name: "Padding",+ key: "padding",+ inputtype: SelectInput,+ defaultValue: "md",+ init: function(node) {+ let _class = node.getAttribute("class") || "";+ if (_class.includes("px-6")) return "xl";+ if (_class.includes("px-5")) return "lg";+ if (_class.includes("px-3")) return "sm";+ return "md";+ },+ onChange: function(node, value) {+ const sizes = {+ "sm": ["px-3", "py-2"],+ "md": ["px-5", "py-2.5"],+ "lg": ["px-6", "py-3"],+ "xl": ["px-8", "py-4"]+ };+ const selected = sizes[value] || sizes["md"];+ const all = new Set();+ for (let key in sizes) {+ sizes[key].forEach(cls => all.add(cls));+ }+ const kept = (node.getAttribute("class") || "").split(/\s+/).filter(cl => cl && !all.has(cl));+ node.setAttribute("class", [...new Set(kept.concat(selected))].join(" "));+ return node;+ },+ data: {+ options: [{+ value: "sm",+ text: "Small"+ },{+ value: "md",+ text: "Medium"+ },{+ value: "lg",+ text: "Large"+ },{+ value: "xl",+ text: "Extra large"+ }]+ }+ },{+ name: "Font size",+ key: "font-size",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["text-xs", "text-sm", "text-base", "text-lg"],+ data: {+ options: [{+ value: "text-xs",+ text: "Extra small"+ },{+ value: "text-sm",+ text: "Small"+ },{+ value: "text-base",+ text: "Normal"+ },{+ value: "text-lg",+ text: "Large"+ }]+ }+ }]+});++Vvveb.Components.extend("_base", "html/buttongroup", {+ classes: ["inline-flex"],+ name: "Button Group",+ image: "icons/button_group.svg",+ html: '<div class="inline-flex flex-row rounded-lg border border-gray-300" role="group" aria-label="Basic example">' ++ '<button type="button" class="border-r border-gray-300 px-4 py-2 text-sm hover:bg-gray-50">Left</button>' ++ '<button type="button" class="border-r border-gray-300 px-4 py-2 text-sm hover:bg-gray-50">Middle</button>' ++ '<button type="button" class="px-4 py-2 text-sm hover:bg-gray-50">Right</button></div>',+ properties: [{+ name: "Orientation",+ key: "orientation",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["flex-row", "flex-col"],+ defaultValue: "flex-row",+ data: {+ options: [{+ value: "flex-row",+ text: "Horizontal"+ },{+ value: "flex-col",+ text: "Vertical"+ }]+ }+ }]+});++Vvveb.Components.extend("_base", "html/alert", {+ classes: ["alert"],+ name: "Alert",+ image: "icons/alert.svg",+ html: '<div class="alert rounded-lg border border-yellow-200 bg-yellow-50 p-4 text-yellow-800" role="alert">' ++ '<strong>Warning!</strong> You should check in on some of those fields below.</div>',+ properties: [{+ name: "Color scheme",+ key: "scheme",+ inputtype: SelectInput,+ defaultValue: "warning",+ init: function(node) {+ //detect current scheme from the node's class list+ let _class = node.getAttribute("class") || "";+ for (let scheme in twSchemeClasses) {+ if (!scheme) continue;+ if (twSchemeClasses[scheme].every(cls => cls === "rounded-lg border p-4" || _class.includes(cls))) {+ return scheme;+ }+ }+ return "";+ },+ onChange: function(node, value) {+ return twApplyScheme(node, value);+ },+ data: {+ options: twSchemeOptions()+ }+ }]+});++Vvveb.Components.extend("_base", "html/badge", {+ classes: ["badge"],+ image: "icons/badge.svg",+ name: "Badge",+ html: '<span class="badge inline-flex items-center rounded-full bg-primary-light px-2.5 py-0.5 text-xs font-medium text-primary">Badge</span>',+ properties: [{+ name: "Color scheme",+ key: "scheme",+ inputtype: SelectInput,+ defaultValue: "primary",+ init: function(node) {+ let _class = node.getAttribute("class") || "";+ if (_class.includes("bg-primary")) return "primary";+ if (_class.includes("bg-green-")) return "success";+ if (_class.includes("bg-red-")) return "danger";+ if (_class.includes("bg-yellow-")) return "warning";+ if (_class.includes("bg-sky-")) return "info";+ if (_class.includes("bg-gray-900")) return "dark";+ return "";+ },+ onChange: function(node, value) {+ const schemes = {+ "": ["bg-gray-100", "text-gray-700"],+ "primary": ["bg-primary-light", "text-primary"],+ "info": ["bg-sky-100", "text-sky-800"],+ "success": ["bg-green-100", "text-green-800"],+ "warning": ["bg-yellow-100", "text-yellow-800"],+ "danger": ["bg-red-100", "text-red-800"],+ "dark": ["bg-gray-900", "text-gray-100"]+ };+ const selected = schemes[value] || schemes[""];+ const all = new Set();+ for (let key in schemes) {+ schemes[key].forEach(cls => all.add(cls));+ }+ const kept = (node.getAttribute("class") || "").split(/\s+/).filter(c => c && !all.has(c));+ node.setAttribute("class", [...new Set(kept.concat(selected))].join(" "));+ return node;+ },+ data: {+ options: twSchemeOptions()+ }+ }]+});++Vvveb.Components.extend("_base", "html/card", {+ classes: ["card"],+ image: "icons/panel.svg",+ name: "Card",+ html: '<div class="card overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm">' ++ '<img class="w-full" src="' + Vvveb.baseUrl + 'icons/image.svg" alt="Card image">' ++ '<div class="p-6">' ++ '<h4 class="mb-2 text-lg font-semibold">Card title</h4>' ++ '<p class="mb-4 text-sm text-gray-600">Some quick example text to build on the card title and make up the bulk of the card\'s content.</p>' ++ '<a href="#" class="inline-flex items-center rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-dark">Go somewhere</a>' ++ '</div></div>',+ properties: [{+ name: "Shadow",+ key: "shadow",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["shadow-none", "shadow-sm", "shadow", "shadow-lg", "shadow-xl"],+ data: {+ options: [{+ value: "shadow-none",+ text: "None"+ },{+ value: "shadow-sm",+ text: "Small"+ },{+ value: "shadow",+ text: "Normal"+ },{+ value: "shadow-lg",+ text: "Large"+ },{+ value: "shadow-xl",+ text: "Extra large"+ }]+ }+ },{+ name: "Rounded",+ key: "rounded",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["rounded-none", "rounded-lg", "rounded-xl", "rounded-2xl", "rounded-3xl"],+ data: {+ options: [{+ value: "rounded-none",+ text: "None"+ },{+ value: "rounded-lg",+ text: "Large"+ },{+ value: "rounded-xl",+ text: "Extra large"+ },{+ value: "rounded-2xl",+ text: "2 extra large"+ },{+ value: "rounded-3xl",+ text: "3 extra large"+ }]+ }+ }]+});++Vvveb.Components.extend("_base", "html/listgroup", {+ name: "List Group",+ image: "icons/list_group.svg",+ classes: ["list-group"],+ html: '<ul class="list-group divide-y divide-gray-200 rounded-xl border border-gray-200 bg-white">' ++ '<li class="p-4">Cras justo odio</li>' ++ '<li class="p-4">Dapibus ac facilisis in</li>' ++ '<li class="p-4">Morbi leo risus</li>' ++ '</ul>'+});++Vvveb.Components.extend("_base", "html/listitem", {+ name: "List Item",+ classes: ["list-group-item"],+ html: '<li class="list-group-item p-4">Cras justo odio</li>'+});++Vvveb.Components.extend("_base", "html/breadcrumbs", {+ classes: ["breadcrumb"],+ name: "Breadcrumbs",+ image: "icons/breadcrumbs.svg",+ html: '<ol class="breadcrumb flex flex-wrap items-center gap-2 text-sm text-gray-500">' ++ '<li><a href="#" class="hover:text-primary">Home</a></li>' ++ '<li aria-hidden="true">/</li>' ++ '<li><a href="#" class="hover:text-primary">Library</a></li>' ++ '<li aria-hidden="true">/</li>' ++ '<li class="font-medium text-gray-900" aria-current="page">Data</li>' ++ '</ol>'+});++Vvveb.Components.extend("_base", "html/pagination", {+ classes: ["pagination"],+ name: "Pagination",+ image: "icons/pagination.svg",+ html: '<nav aria-label="Page navigation">' ++ '<ul class="pagination flex items-center gap-1">' ++ '<li><a class="rounded-md border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50" href="#">Previous</a></li>' ++ '<li><a class="rounded-md border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50" href="#">1</a></li>' ++ '<li><a class="rounded-md bg-primary px-3 py-1.5 text-sm font-semibold text-white" href="#" aria-current="page">2</a></li>' ++ '<li><a class="rounded-md border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50" href="#">3</a></li>' ++ '<li><a class="rounded-md border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50" href="#">Next</a></li>' ++ '</ul>' ++ '</nav>',+ properties: [{+ name: "Alignment",+ key: "alignment",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["justify-start", "justify-center", "justify-end"],+ data: {+ options: [{+ value: "justify-start",+ text: "Left"+ },{+ value: "justify-center",+ text: "Center"+ },{+ value: "justify-end",+ text: "Right"+ }]+ }+ }]+});++Vvveb.Components.extend("_base", "html/progress", {+ classes: ["progress"],+ name: "Progress Bar",+ image: "icons/progressbar.svg",+ html: '<div class="progress h-2 w-full rounded-full bg-gray-200"><div class="progress-bar h-full w-1/4 rounded-full bg-primary"></div></div>',+ properties: [{+ name: "Progress",+ key: "progress",+ child:".progress-bar",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["w-1/12", "w-1/4", "w-1/2", "w-3/4", "w-full"],+ data: {+ options: [{+ value: "w-1/12",+ text: "~8%"+ },{+ value: "w-1/4",+ text: "25%"+ },{+ value: "w-1/2",+ text: "50%"+ },{+ value: "w-3/4",+ text: "75%"+ },{+ value: "w-full",+ text: "100%"+ }]+ }+ },{+ name: "Bar color",+ key: "bar-color",+ child:".progress-bar",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["bg-primary", "bg-blue-600", "bg-green-600", "bg-red-600", "bg-yellow-500", "bg-gray-900"],+ data: {+ options: [{+ value: "bg-primary",+ text: "Primary"+ },{+ value: "bg-blue-600",+ text: "Blue"+ },{+ value: "bg-green-600",+ text: "Green"+ },{+ value: "bg-red-600",+ text: "Red"+ },{+ value: "bg-yellow-500",+ text: "Yellow"+ },{+ value: "bg-gray-900",+ text: "Dark"+ }]+ }+ },{+ name: "Track color",+ key: "track-color",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["bg-gray-100", "bg-gray-200", "bg-gray-300"],+ data: {+ options: [{+ value: "bg-gray-100",+ text: "Light"+ },{+ value: "bg-gray-200",+ text: "Medium"+ },{+ value: "bg-gray-300",+ text: "Dark"+ }]+ }+ }]+});++Vvveb.Components.extend("_base", "html/navbar", {+ classes: ["navbar"],+ image: "icons/navbar.svg",+ name: "Nav Bar",+ html: '<nav class="navbar sticky top-0 z-40 border-b border-gray-100 bg-white">' ++ '<div class="container mx-auto flex items-center justify-between px-4 py-3">' ++ '<a class="text-lg font-bold" href="#">Brand</a>' ++ '<button class="rounded-md p-2 hover:bg-gray-100 md:hidden" type="button" aria-label="Toggle navigation">' ++ '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke="currentColor" stroke-width="2"><path d="M4 6h16M4 12h16M4 18h16"/></svg>' ++ '</button>' ++ '<div class="hidden items-center gap-6 md:flex">' ++ '<a class="text-sm font-medium text-gray-700 hover:text-primary" href="#">Home</a>' ++ '<a class="text-sm font-medium text-gray-700 hover:text-primary" href="#">Features</a>' ++ '<a class="text-sm font-medium text-gray-700 hover:text-primary" href="#">Contact</a>' ++ '<a class="inline-flex items-center rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white hover:bg-primary-dark" href="#">Sign up</a>' ++ '</div>' ++ '</div></nav>',+ properties: [{+ name: "Placement",+ key: "placement",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["relative", "sticky", "fixed"],+ data: {+ options: [{+ value: "relative",+ text: "Static"+ },{+ value: "sticky",+ text: "Sticky"+ },{+ value: "fixed",+ text: "Fixed"+ }]+ }+ },{+ name: "Background",+ key: "background",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["bg-white", "bg-gray-50", "bg-gray-900", "bg-primary"],+ data: {+ options: [{+ value: "bg-white",+ text: "White"+ },{+ value: "bg-gray-50",+ text: "Light"+ },{+ value: "bg-gray-900",+ text: "Dark"+ },{+ value: "bg-primary",+ text: "Primary"+ }]+ }+ },{+ name: "Border",+ key: "border",+ htmlAttr: "class",+ inputtype: ToggleInput,+ validValues: ["border-b"],+ data: {+ on: "border-b",+ off: ""+ }+ }]+});++/** Tailwind equivalent of the bootstrap jumbotron */+Vvveb.Components.extend("_base", "html/hero", {+ classes: ["hero"],+ image: "icons/jumbotron.svg",+ name: "Hero",+ html: '<section class="hero bg-gray-900 py-24 text-center text-white">' ++ '<div class="container mx-auto px-4">' ++ '<h1 class="mb-4 text-4xl font-bold md:text-5xl">Hello, world!</h1>' ++ '<p class="mx-auto mb-8 max-w-2xl text-lg text-gray-300">This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>' ++ '<a class="inline-flex items-center rounded-lg bg-primary px-6 py-3 text-base font-semibold text-white hover:bg-primary-dark" href="#" role="button">Learn more</a>' ++ '</div></section>',+ properties: [{+ name: "Background",+ key: "background",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["bg-gray-900", "bg-primary", "bg-gradient-to-r", "bg-white"],+ data: {+ options: [{+ value: "bg-gray-900",+ text: "Dark"+ },{+ value: "bg-primary",+ text: "Primary"+ },{+ value: "bg-gradient-to-r",+ text: "Gradient"+ },{+ value: "bg-white",+ text: "Light"+ }]+ }+ },{+ name: "Vertical padding",+ key: "padding",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["py-12", "py-24", "py-32", "py-48"],+ data: {+ options: [{+ value: "py-12",+ text: "Small"+ },{+ value: "py-24",+ text: "Medium"+ },{+ value: "py-32",+ text: "Large"+ },{+ value: "py-48",+ text: "Extra large"+ }]+ }+ },{+ name: "Text align",+ key: "text-align",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["text-left", "text-center", "text-right"],+ data: {+ options: [{+ value: "text-left",+ text: "Left"+ },{+ value: "text-center",+ text: "Center"+ },{+ value: "text-right",+ text: "Right"+ }]+ }+ }]+});++Vvveb.Components.add("html/spinner", {+ name: "Spinner",+ image: "icons/code.svg",+ classes: ["animate-spin"],+ html: '<div class="h-8 w-8 animate-spin rounded-full border-2 border-gray-300 border-t-primary" role="status" aria-label="Loading"></div>',+ properties: [{+ name: "Size",+ key: "size",+ inputtype: SelectInput,+ defaultValue: "md",+ init: function(node) {+ let _class = node.getAttribute("class") || "";+ if (_class.includes("h-16")) return "xl";+ if (_class.includes("h-12")) return "lg";+ if (_class.includes("h-4")) return "sm";+ return "md";+ },+ onChange: function(node, value) {+ const sizes = {+ "sm": ["h-4", "w-4"],+ "md": ["h-8", "w-8"],+ "lg": ["h-12", "w-12"],+ "xl": ["h-16", "w-16"]+ };+ const selected = sizes[value] || sizes["md"];+ const all = new Set();+ for (let key in sizes) {+ sizes[key].forEach(cls => all.add(cls));+ }+ const kept = (node.getAttribute("class") || "").split(/\s+/).filter(cl => cl && !all.has(cl));+ node.setAttribute("class", [...new Set(kept.concat(selected))].join(" "));+ return node;+ },+ data: {+ options: [{+ value: "sm",+ text: "Small"+ },{+ value: "md",+ text: "Medium"+ },{+ value: "lg",+ text: "Large"+ },{+ value: "xl",+ text: "Extra large"+ }]+ }+ },{+ name: "Color",+ key: "color",+ child: "div",+ htmlAttr: "class",+ inputtype: SelectInput,+ validValues: ["border-t-primary", "border-t-blue-600", "border-t-gray-900", "border-t-white"],+ data: {+ options: [{+ value: "border-t-primary",+ text: "Primary"+ },{+ value: "border-t-blue-600",+ text: "Blue"+ },{+ value: "border-t-gray-900",+ text: "Dark"+ },{+ value: "border-t-white",+ text: "White"+ }]+ }+ }]+});++Vvveb.Components.extend("_base", "html/form", {+ nodes: ["form"],+ image: "icons/form.svg",+ name: "Form",+ html: '<form action="" method="POST">' ++ '<div class="mb-4"><label for="email" class="mb-1 block text-sm font-medium text-gray-700">Email address</label>' ++ '<input type="email" id="email" class="' + twInputClass + '" placeholder="[email protected]"></div>' ++ '<div class="mb-4"><label for="password" class="mb-1 block text-sm font-medium text-gray-700">Password</label>' ++ '<input type="password" id="password" class="' + twInputClass + '"></div>' ++ '<div class="mb-4 flex items-center gap-2">' ++ '<input type="checkbox" id="remember" class="h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary">' ++ '<label for="remember" class="text-sm text-gray-700">Remember me</label></div>' ++ '<button type="submit" class="inline-flex items-center rounded-lg bg-primary px-5 py-2.5 text-sm font-semibold text-white hover:bg-primary-dark">Submit</button>' ++ '</form>'+});++Vvveb.Components.extend("_base", "html/textinput", {+ html: '<div class="mb-4"><label class="mb-1 block text-sm font-medium text-gray-700">Text</label>' ++ '<input type="text" class="' + twInputClass + '"></div>'+});++Vvveb.Components.extend("_base", "html/selectinput", {+ html: '<div class="mb-4"><label class="mb-1 block text-sm font-medium text-gray-700">Choose an option </label>' ++ '<select class="' + twInputClass + '"><option value="value1">Text 1</option><option value="value2">Text 2</option><option value="value3">Text 3</option></select></div>'+});++Vvveb.Components.extend("_base", "html/textareainput", {+ html: '<div class="mb-4"><label class="mb-1 block text-sm font-medium text-gray-700">Your response:</label>' ++ '<textarea rows="4" class="' + twInputClass + '"></textarea></div>'+});++Vvveb.Components.extend("_base", "html/fileinput", {+ html: '<div class="mb-4"><input type="file" class="' + twInputClass + ' file:mr-3 file:rounded-md file:border-0 file:bg-gray-100 file:px-3 file:py-1.5 file:text-sm file:font-medium hover:file:bg-gray-200"></div>'+});++Vvveb.Components.extend("_base", "html/table", {+ nodes: ["table"],+ classes: ["table"],+ image: "icons/table.svg",+ name: "Table",+ html: '<table class="table min-w-full divide-y divide-gray-200 text-sm">' ++ '<thead class="bg-gray-50">' ++ '<tr>' ++ '<th scope="col" class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">#</th>' ++ '<th scope="col" class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">First Name</th>' ++ '<th scope="col" class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">Last Name</th>' ++ '<th scope="col" class="px-6 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500">Username</th>' ++ '</tr>' ++ '</thead>' ++ '<tbody class="divide-y divide-gray-200 bg-white">' ++ '<tr><td class="px-6 py-4">1</td><td class="px-6 py-4">Mark</td><td class="px-6 py-4">Otto</td><td class="px-6 py-4">@mdo</td></tr>' ++ '<tr><td class="px-6 py-4">2</td><td class="px-6 py-4">Jacob</td><td class="px-6 py-4">Thornton</td><td class="px-6 py-4">@fat</td></tr>' ++ '<tr><td class="px-6 py-4">3</td><td class="px-6 py-4">Larry</td><td class="px-6 py-4">the Bird</td><td class="px-6 py-4">@twitter</td></tr>' ++ '</tbody>' ++ '</table>',+ properties: [{+ name: "Striped rows",+ key: "striped",+ child: "tbody",+ htmlAttr: "class",+ inputtype: ToggleInput,+ validValues: ["odd:bg-gray-50"],+ data: {+ on: "odd:bg-gray-50",+ off: ""+ }+ },{+ name: "Hover rows",+ key: "hover",+ child: "tbody",+ htmlAttr: "class",+ inputtype: ToggleInput,+ validValues: ["hover:bg-gray-50"],+ data: {+ on: "hover:bg-gray-50",+ off: ""+ }+ },{+ name: "Compact",+ key: "compact",+ htmlAttr: "class",+ inputtype: ToggleInput,+ validValues: ["text-xs"],+ data: {+ on: "text-xs",+ off: ""+ }+ }]+});diff --git a/public/js/vvvebjs/components-widgets.js b/public/js/vvvebjs/components-widgets.jsold mode 100644new mode 100755index e45917b..c66b1af--- a/public/js/vvvebjs/components-widgets.js+++ b/public/js/vvvebjs/components-widgets.js@@ -38,29 +38,43 @@ Vvveb.Components.extend("_base", "widgets/googlemaps", {key: '',init: function (node) {- let iframe = node.querySelector('iframe');- let url = new URL(iframe.getAttribute("src"));- let params = new URLSearchParams(url.search);+ if (!node || typeof node.querySelector !== "function") return node;+ const iframe = node.querySelector('iframe');+ if (!iframe) return node;+ let params;+ try {+ const url = new URL(iframe.getAttribute("src"));+ params = new URLSearchParams(url.search);+ } catch (e) {+ return node;+ }+ const panel = document.querySelector(".component-properties");- this.z = params.get("z");- this.q = params.get("q");- this.t = params.get("t");- this.key = params.get("key");-- document.querySelector(".component-properties input[name=z]").value = this.z;- document.querySelector(".component-properties input[name=q]").value = this.q;- document.querySelector(".component-properties select[name=t]").value = this.t;- document.querySelector(".component-properties input[name=key]").value = this.key;+ this.z = params.get("z") ?? "";+ this.q = params.get("q") ?? "";+ this.t = params.get("t") ?? "";+ this.key = params.get("key") ?? "";++ if (panel) {+ const set = (selector, value) => { const el = panel.querySelector(selector); if (el) el.value = value ?? ""; };+ set('input[name=z]', this.z);+ set('input[name=q]', this.q);+ set('select[name=t]', this.t);+ set('input[name=key]', this.key);+ }},onChange: function (node, property, value) {- map_iframe = node.querySelector('iframe');+ if (!node || !property) return node;+ const map_iframe = typeof node.querySelector === "function" ? node.querySelector('iframe') : null;+ if (!map_iframe) return node;this[property.key] = value;- mapurl = 'https://maps.google.com/maps?q=' + this.q + '&z=' + this.z + '&t=' + this.t + '&output=embed';+ let mapurl = 'https://maps.google.com/maps?q=' + encodeURIComponent(this.q ?? "") + '&z=' + (this.z ?? "") + '&t=' + (this.t ?? "") + '&output=embed';+ if (this.key) mapurl += '&key=' + encodeURIComponent(this.key);- map_iframe.setAttribute("src",mapurl);+ map_iframe.setAttribute("src", mapurl);return node;},@@ -113,23 +127,36 @@ Vvveb.Components.extend("_base", "widgets/openstreetmap", {layer: 'mapnik', //map typeinit: function (node) {- let iframe = node.querySelector('iframe');- let url = new URL(iframe.getAttribute("src"));- let params = new URLSearchParams(url.search);+ if (!node || typeof node.querySelector !== "function") return node;+ const iframe = node.querySelector('iframe');+ if (!iframe) return node;+ let params;+ try {+ const url = new URL(iframe.getAttribute("src"));+ params = new URLSearchParams(url.search);+ } catch (e) {+ return node;+ }+ const panel = document.querySelector(".component-properties");- this.bbox = params.get("bbox");- this.layer = params.get("layer");+ this.bbox = params.get("bbox") ?? "";+ this.layer = params.get("layer") ?? "";- document.querySelector(".component-properties input[name=bbox]").value = this.bbox;- document.querySelector(".component-properties input[name=layer]").value = this.layer;+ if (panel) {+ const set = (selector, value) => { const el = panel.querySelector(selector); if (el) el.value = value ?? ""; };+ set('input[name=bbox]', this.bbox);+ set('select[name=layer]', this.layer);+ }},onChange: function (node, property, value) {- map_iframe = node.querySelector('iframe');+ if (!node || !property) return node;+ let map_iframe = typeof node.querySelector === "function" ? node.querySelector('iframe') : null;+ if (!map_iframe) return node;this[property.key] = value;- mapurl = 'https://www.openstreetmap.org/export/embed.html?bbox=' + this.bbox + '&layer=' + this.layer;+ let mapurl = 'https://www.openstreetmap.org/export/embed.html?bbox=' + (this.bbox ?? "") + '&layer=' + (this.layer ?? "");map_iframe.setAttribute("src",mapurl);@@ -140,25 +167,22 @@ Vvveb.Components.extend("_base", "widgets/openstreetmap", {name: "Map",key: "bbox",inputtype: TextInput-/* },{+ },{name: "Layer",key: "layer",inputtype: SelectInput,data:{options: [{- value: "",+ value: "mapnik",text: "Default"},{- value: "Y",- text: "CyclOSM"- },{- value: "C",+ value: "cyclemap",text: "Cycle Map"},{- value: "T",+ value: "transportmap",text: "Transport Map"}]- }*/+ }}]});@@ -185,23 +209,27 @@ Vvveb.Components.extend("_base", "widgets/embed-video", {vimeoRegex : /(?:vimeo\.com(?:[^\d]+))(\d+)/i,init: function (node) {- iframe = node.querySelector('iframe');- video = node.querySelector('video');+ if (!node || typeof node.querySelector !== "function") return node;+ const iframe = node.querySelector('iframe');+ const video = node.querySelector('video');+ const panel = document.querySelector(".component-properties");+ const show = (key, display) => { const el = panel && panel.querySelector(`[data-key=${key}]`); if (el) el.style.display = display; };- document.querySelector(".component-properties [data-key=url]").style.display = "none";- document.querySelector(".component-properties [data-key=poster]").style.display = "none";+ show("url", "none");+ show("poster", "none");//check if html5if (video) {this.url = video.src;+ this.t = "h";} else if (iframe) {//vimeo or youtube- let src = iframe.getAttribute("src");+ const src = iframe.getAttribute("src");let match;- if (src && src.indexOf("youtube") && (match = src.match(this.youtubeRegex))) {//youtube+ if (src && src.indexOf("youtube") > -1 && (match = src.match(this.youtubeRegex))) {//youtubethis.video_id = match[1];this.t = "y";- } else if (src && src.indexOf("vimeo") && (match = src.match(this.vimeoRegex))) { //vimeo+ } else if (src && src.indexOf("vimeo") > -1 && (match = src.match(this.vimeoRegex))) { //vimeothis.video_id = match[1];this.t = "v";} else {@@ -209,47 +237,58 @@ Vvveb.Components.extend("_base", "widgets/embed-video", {}}- document.querySelector(".component-properties input[name=video_id]").value = this.video_id;- document.querySelector(".component-properties input[name=url]").value = this.url;- document.querySelector(".component-properties select[name=t]").value = this.t;+ if (panel) {+ const set = (selector, value) => { const el = panel.querySelector(selector); if (el) el.value = value; };+ set('input[name=video_id]', this.video_id);+ set('input[name=url]', this.url);+ set('select[name=t]', this.t);+ }},onChange: function (node, property, value) {+ if (!node || !property) return node;this[property.key] = value;- //if (property.key == "t")- {- switch (this.t) {- case 'y':- document.querySelector(".component-properties [data-key=video_id]").style.display = "";- document.querySelector(".component-properties [data-key=url]").style.display = "none";- document.querySelector(".component-properties [data-key=poster]").style.display = "none";-- newnode = generateElements(`<iframe width="100%" height="100%" allowfullscreen="true" frameborder="0" allow="autoplay"- src="https://www.youtube.com/embed/${this.video_id}?autoplay=${this.autoplay}&controls=${this.controls}&loop=${this.loop}&playsinline=${this.playsinline}&mute=${this.mute}">- </iframe>`)[0];- break;- case 'v':- document.querySelector(".component-properties [data-key=video_id]").style.display = "";- document.querySelector(".component-properties [data-key=url]").style.display = "none";- document.querySelector(".component-properties [data-key=poster]").style.display = "none";- newnode = generateElements(`<iframe width="100%" height="100%" allowfullscreen="true" frameborder="0" allow="autoplay"- src="https://player.vimeo.com/video/${this.video_id}?autoplay=${this.autoplay}&controls=${this.controls}&loop=${this.loop}&playsinline=${this.playsinline}&mute=${this.mute}">- </iframe>`)[0];- break;- case 'h':- document.querySelector(".component-properties [data-key=video_id]").style.display = "none";- document.querySelector(".component-properties [data-key=url]").style.display = "";- document.querySelector(".component-properties [data-key=poster]").style.display = "";- newnode = generateElements('<video poster="' + this.poster + '" src="' + this.url + '" ' + (this.autoplay?' autoplay ':'') + (this.controls?' controls ':'') + (this.loop?' loop ':'') + (this.playsinline?' playsinline ':'') + (this.mute?' mute ':'') + ' style="height: 100%; width: 100%;"></video>')[0];- break;- }-- node.querySelector(":scope > iframe,:scope > video").replaceWith(newnode);- return node;+ this.video_id = this.video_id ?? "";+ this.url = this.url ?? "";+ this.poster = this.poster ?? "";++ const panel = document.querySelector(".component-properties");+ const show = (key, display) => { const el = panel && panel.querySelector(`[data-key=${key}]`); if (el) el.style.display = display; };+ let newnode;++ switch (this.t) {+ case 'y':+ show("video_id", "");+ show("url", "none");+ show("poster", "none");++ newnode = generateElements(`<iframe width="100%" height="100%" allowfullscreen="true" frameborder="0" allow="autoplay"+ src="https://www.youtube.com/embed/${this.video_id}?autoplay=${this.autoplay}&controls=${this.controls}&loop=${this.loop}&playsinline=${this.playsinline}&mute=${this.mute}">+ </iframe>`)[0];+ break;+ case 'v':+ show("video_id", "");+ show("url", "none");+ show("poster", "none");+ newnode = generateElements(`<iframe width="100%" height="100%" allowfullscreen="true" frameborder="0" allow="autoplay"+ src="https://player.vimeo.com/video/${this.video_id}?autoplay=${this.autoplay}&controls=${this.controls}&loop=${this.loop}&playsinline=${this.playsinline}&mute=${this.mute}">+ </iframe>`)[0];+ break;+ case 'h':+ show("video_id", "none");+ show("url", "");+ show("poster", "");+ newnode = generateElements('<video poster="' + this.poster + '" src="' + this.url + '" ' + (this.autoplay?' autoplay ':'') + (this.controls?' controls ':'') + (this.loop?' loop ':'') + (this.playsinline?' playsinline ':'') + (this.mute?' mute ':'') + ' style="height: 100%; width: 100%;"></video>')[0];+ break;+ }++ if (newnode) {+ const current = node.querySelector(":scope > iframe, :scope > video");+ if (current) current.replaceWith(newnode);}return node;- },+ },properties: [{name: "Provider",@@ -273,15 +312,16 @@ Vvveb.Components.extend("_base", "widgets/embed-video", {inputtype: TextInput,onChange: function(node, value, input, component) {- let youtube = /(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]+)/i;- let vimeo = /(?:vimeo\.com(?:[^\d]+))(\d+)/i;let id = false;let t = false;-console.log(value);- if (((id = value.match(youtube)) && (t = "y")) || ((id = value.match(vimeo)) && (t = "v"))) {- document.querySelector(".component-properties select[name=t]").value = t;- document.querySelector(".component-properties input[name=video_id]").value = id[1];-console.log(id);+ value = String(value ?? "");++ if (component && (((id = value.match(component.youtubeRegex)) && (t = "y")) || ((id = value.match(component.vimeoRegex)) && (t = "v")))) {+ let typeSelect = document.querySelector(".component-properties select[name=t]");+ if (typeSelect) typeSelect.value = t;+ let idInput = document.querySelector(".component-properties input[name=video_id]");+ if (idInput) idInput.value = id[1];+component.t = t;component.video_id = id[1];@@ -389,13 +429,13 @@ Vvveb.Components.extend("_base", "widgets/facebookcomments", {></div></div>',properties: [{name: "Href",- key: "business",+ key: "href",htmlAttr: "data-href",child:".fb-comments",inputtype: TextInput},{- name: "Item name",- key: "item_name",+ name: "Number of posts",+ key: "numposts",htmlAttr: "data-numposts",child:".fb-comments",inputtype: TextInput@@ -412,7 +452,7 @@ Vvveb.Components.extend("_base", "widgets/facebookcomments", {child:".fb-comments",inputtype: TextInput},{- name: "Currency code",+ name: "Width",key: "width",htmlAttr: "data-width",child:".fb-comments",@@ -450,30 +490,40 @@ Vvveb.Components.extend("_base", "widgets/twitter", {tweet:'',//locationinit: function (node) {+ if (!node || typeof node.querySelector !== "function") return node;let iframe = node.querySelector('iframe');- let src = iframe.getAttribute("src");- let url = new URL(src);- let params = new URLSearchParams(url.search);+ if (!iframe) return node;+ let src = iframe.getAttribute("src") || "";+ let params;+ try {+ params = new URLSearchParams(new URL(src).search);+ } catch (e) {+ //relative urls have no origin for URL()+ params = new URLSearchParams((src.split("?")[1] || ""));+ }this.tweet = params.get("id");if (!this.tweet) {- if (match = src.match(this.twitterRegex)) {+ const match = src.match(this.twitterRegex);+ if (match) {this.tweet = match[1];}-}- document.querySelector(".component-properties input[name=tweet]").value = this.tweet;+ const tweetInput = document.querySelector(".component-properties input[name=tweet]");+ if (tweetInput) tweetInput.value = this.tweet;},onChange: function (node, property, value) {- tweet_iframe = node.querySelector('iframe');+ if (!node || !property) return node;+ let tweet_iframe = typeof node.querySelector === "function" ? node.querySelector('iframe') : null;+ if (!tweet_iframe) return node;if (property.key == "tweet") {this[property.key] = value;- tweeturl = 'https://platform.twitter.com/embed/Tweet.html?embedId=twitter-widget-0&frame=false&hideCard=false&hideThread=false&id=' + this.tweet;+ let tweeturl = 'https://platform.twitter.com/embed/Tweet.html?embedId=twitter-widget-0&frame=false&hideCard=false&hideThread=false&id=' + this.tweet;tweet_iframe.setAttribute("src",tweeturl);}@@ -487,11 +537,12 @@ Vvveb.Components.extend("_base", "widgets/twitter", {inputtype: TextInput,onChange: function(node, value, input, component) {- let twitterRegex = /(?:twitter\.com(?:[^\d]+))(\d+)/i;let id = false;+ value = String(value ?? "");- if (id = value.match(twitterRegex)) {- document.querySelector(".component-properties input[name=tweet]").value = id[1];+ if (component && component.twitterRegex && (id = value.match(component.twitterRegex))) {+ let tweetInput = document.querySelector(".component-properties input[name=tweet]");+ if (tweetInput) tweetInput.value = id[1];component.tweet = id[1];return id[1];@@ -611,18 +662,19 @@ Vvveb.Components.extend("_base", "widgets/facebookpage", {child:".fb-page",inputtype: TextInput}],- onChange: function(node, input, value, component) {-- let newElement = generateElements(this.html)[0];- newElement.find(".fb-page").setAttribute(input.htmlAttr, value);-- frameHead.querySelector("[data-fbcssmodules]").remove();- frameBody.querySelector("[data-fbcssmodules]").remove();- frameHead.querySelector("script[src^='https://connect.facebook.net']").remove();--- node.parent().html(newElement.html());- return newElement;+ /**+ * Re-apply the changed attribute on the .fb-page element.+ * (the facebook sdk re-parses data-* attributes on page load)+ */+ onChange: function(node, property, value) {+ if (!node || !property) return node;+ const fbPage = (typeof node.querySelector === "function" ? node.querySelector(".fb-page") : null) ?? node;++ if (property.htmlAttr) {+ fbPage.setAttribute(property.htmlAttr, value ?? "");+ }++ return node;}});@@ -668,19 +720,22 @@ Vvveb.Components.extend("_base", "widgets/chartjs", {},dragStart: function (node) {+ if (!node) return node;//check if chartjs is included and if not add it when drag starts to allow the script to load- body = Vvveb.Builder.frameBody;+ let body = Vvveb.Builder.frameBody;+ if (!body) return node;if (!body.querySelector("#chartjs-script")) {body.append(generateElements('<script id="chartjs-script" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.2/Chart.bundle.min.js"></script>')[0]);body.append(generateElements('<script>\- $(document).ready(function() {\- $(".chartjs").each(function () {\- ctx = $("canvas", this).get(0).getContext("2d");\- config = JSON.parse(this.dataset.chart);\+ document.addEventListener("DOMContentLoaded", function() {\+ let ctx, config, chartjs;\+ document.querySelectorAll(".chartjs").forEach(function (el) {\+ ctx = el.querySelector("canvas").getContext("2d");\+ config = JSON.parse(el.dataset.chart);\chartjs = new Chart(ctx, config);\});\- \});\+ });\</script>')[0]);}@@ -689,17 +744,29 @@ Vvveb.Components.extend("_base", "widgets/chartjs", {drawChart: function () {- if (this.chartjs != null) this.chartjs.destroy();+ //Chart lives in the iframe where the library is injected, not in the builder window+ let frameWindow = Vvveb.Builder.iframe && Vvveb.Builder.iframe.contentWindow;+ let ChartLib = (frameWindow && frameWindow.Chart) || (typeof Chart !== "undefined" ? Chart : null);+ if (!ChartLib || !this.node || !this.config || !this.ctx) return;+ if (this.chartjs != null && typeof this.chartjs.destroy === "function") this.chartjs.destroy();this.node.dataset.chart = JSON.stringify(this.config);- config = Object.assign({}, this.config);//avoid passing by reference to avoid chartjs to fill the object- this.chartjs = new Chart(this.ctx, config);+ let config = Object.assign({}, this.config);//avoid passing by reference to avoid chartjs to fill the object+ this.chartjs = new ChartLib(this.ctx, config);},init: function (node) {+ if (!node) return node;this.node = node;- this.ctx = node.querySelector("canvas").getContext("2d");- this.config = JSON.parse(node.dataset.chart);+ let canvas = typeof node.querySelector === "function" ? node.querySelector("canvas") : null;+ if (!canvas || typeof canvas.getContext !== "function") return node;+ this.ctx = canvas.getContext("2d");+ try {+ this.config = JSON.parse(node.dataset.chart);+ } catch (e) {+ return node;+ }+ if (!this.config) return node;this.drawChart();return node;@@ -742,11 +809,17 @@ Vvveb.Components.extend("_base", "widgets/chartjs", {}]},init: function(node) {- return JSON.parse(node.dataset.chart).type;+ try {+ return (node && node.dataset && node.dataset.chart ? JSON.parse(node.dataset.chart).type : "") ?? "";+ } catch (e) {+ return "";+ }},onChange: function(node, value, input, component) {+ if (!component) return node;+ if (!component.config) component.config = {};component.config.type = value;- component.drawChart();+ if (typeof component.drawChart === "function") component.drawChart();return node;}@@ -754,12 +827,15 @@ Vvveb.Components.extend("_base", "widgets/chartjs", {});function lottieAfterDrop(node) {+ if (!node) return node;//check if lottie js is included and if not add it when drag starts to allow the script to load- body = Vvveb.Builder.frameBody;+ let body = Vvveb.Builder.frameBody;+ if (!body) return node;if (!body.querySelector("#lottie-js")) {- let lib = document.createElement('script');- let code = document.createElement('script');+ const doc = body.ownerDocument || document;+ let lib = doc.createElement('script');+ let code = doc.createElement('script');lib.id = 'lottie-js';lib.type = 'text/javascript';lib.src = 'https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js';@@ -794,10 +870,12 @@ function lottieAfterDrop(node) {body.appendChild(code);lib.addEventListener('load', function() {- Vvveb.Builder.iframe.contentWindow.initLottie();+ let frameWindow = Vvveb.Builder.iframe && Vvveb.Builder.iframe.contentWindow;+ if (frameWindow && typeof frameWindow.initLottie === "function") frameWindow.initLottie();});} else {- Vvveb.Builder.iframe.contentWindow.initLottie(true);+ let frameWindow = Vvveb.Builder.iframe && Vvveb.Builder.iframe.contentWindow;+ if (frameWindow && typeof frameWindow.initLottie === "function") frameWindow.initLottie(true);}return node;@@ -814,7 +892,9 @@ Vvveb.Components.add("widgets/lottie", {afterDrop: lottieAfterDrop,onChange: function (node, property, value) {- Vvveb.Builder.iframe.contentWindow.initLottie();+ if (!node) return node;+ let frameWindow = Vvveb.Builder.iframe && Vvveb.Builder.iframe.contentWindow;+ if (frameWindow && typeof frameWindow.initLottie === "function") frameWindow.initLottie();Vvveb.Builder.selectNode(node);return node;},diff --git a/public/js/vvvebjs/elements-changes.js b/public/js/vvvebjs/elements-changes.jsold mode 100644new mode 100755index 3e5a4cb..7880ef4--- a/public/js/vvvebjs/elements-changes.js+++ b/public/js/vvvebjs/elements-changes.js@@ -20,216 +20,219 @@*/function ucFirst(str) {- if (!str) return str;+ if (typeof str !== "string" || !str) return str;- return str[0].toUpperCase() + str.slice(1);+ return str[0].toUpperCase() + str.slice(1);}-const snakeCaseToCamelCase = str => str.replace(/(_|^|-)\w/g, letter => `${letter.toUpperCase().replace(/[-_]/, '')}`);+const snakeCaseToCamelCase = str => typeof str === "string" ? str.replace(/(_|^|-)\w/g, letter => `${letter.toUpperCase().replace(/[-_]/, '')}`) : str;function getElementByXpath(path, element = window.FrameDocument) {- let elements = window.FrameDocument.evaluate(path, element, null, XPathResult.ANY_TYPE, null);-- components = [];- let currentComponent = elements.iterateNext();- while (currentComponent) {- components.push(currentComponent);- currentComponent = elements.iterateNext();- }-- return components;+ if (!window.FrameDocument || !element) return [];++ let elements;+ try {+ elements = window.FrameDocument.evaluate(path, element, null, XPathResult.ANY_TYPE, null);+ } catch (e) {+ return [];+ }++ const nodes = [];+ try {+ let current = elements.iterateNext();+ while (current) {+ nodes.push(current);+ current = elements.iterateNext();+ }+ } catch (e) {+ return [];+ }++ return nodes;}function getComponents() {-- let elements = getElementByXpath(".//*[ @*[starts-with(name(), 'data-v-component-')] ]", window.FrameDocument);- return elements;+ return getElementByXpath(".//*[ @*[starts-with(name(), 'data-v-component-')] ]", window.FrameDocument);}function getElements() {-- let nodes = window.FrameDocument.querySelectorAll("[data-v-id]");- let component = false;+ if (!window.FrameDocument || typeof window.FrameDocument.querySelectorAll !== "function") return [];+ const nodes = window.FrameDocument.querySelectorAll("[data-v-id]");let components = [];-- for (let i = 0; i < nodes.length; i++) {- let node = nodes[i];- let componentName = node.dataset.vComponent ?? node.dataset.vType;- if (!componentName) {- for (attribute of node.attributes) {- if (attribute.name.startsWith("data-v-component-")) {- componentName = attribute.name.replace("data-v-component-","");- break;- }- }- }-- let type = "data-v-" + componentName + "-";- let name = "";-- let fields = [];- let fieldsNodes = getElementByXpath(".//*[ @*[starts-with(name(), 'data-v-')] ]", node);- let duplicateFiels = [];-- for (let j = 0; j < fieldsNodes.length; j++) {- let fieldNode = fieldsNodes[j];- let field = false;- let content = "";- let preview = "";-- for (attribute of fieldNode.attributes) {++ for (const node of nodes) {+ let componentName = node.dataset.vComponent ?? node.dataset.vType;+ if (!componentName) {+ for (const attribute of node.attributes) {+ if (attribute.name.startsWith("data-v-component-")) {+ componentName = attribute.name.replace("data-v-component-", "");+ break;+ }+ }+ }++ //nodes without a component type carry no editable fields, skip them+ if (!componentName) continue;++ const type = "data-v-" + componentName + "-";+ let name = "";++ const fields = [];+ const fieldsNodes = getElementByXpath(".//*[ @*[starts-with(name(), 'data-v-')] ]", node);+ const seenFields = [];//don't add duplicate or children fields++ for (const fieldNode of fieldsNodes) {+ for (const attribute of fieldNode.attributes) {let attr = attribute.name;- let value = attribute.value;-- if (attr.indexOf(type) == 0) {- attr = attr.replace(type, "").toLowerCase();-- let nodeType = "text";-- if (attr == "image" || fieldNode.nodeName == "IMG") {- preview = content = fieldNode.getAttribute("src");//fieldNode.src- nodeType = "img";- } else if (attr == "url" || fieldNode.nodeName == "A") {- preview = content = fieldNode.getAttribute("href");//fieldNode.href- nodeType = "url";- } else {- //content = fieldNode.textContent.trim();- content = fieldNode.innerHTML.trim();- preview = fieldNode.textContent.substr(0, 100);- }-- field = {"name":attr, "node":fieldNode, "value": content, "preview": preview, nodeType};-- if (attr == "name") {- name = content;- }++ if (attr.indexOf(type) !== 0) continue;++ attr = attr.replace(type, "").toLowerCase();+ if (seenFields.includes(attr)) continue;++ let content = "";+ let preview = "";+ let nodeType = "text";++ if (attr == "image" || fieldNode.nodeName == "IMG") {+ preview = content = fieldNode.getAttribute("src") ?? "";+ nodeType = "img";+ } else if (attr == "url" || fieldNode.nodeName == "A") {+ preview = content = fieldNode.getAttribute("href") ?? "";+ nodeType = "url";+ } else {+ content = String(fieldNode.innerHTML ?? "").trim();+ preview = String(fieldNode.textContent ?? "").slice(0, 100);+ }++ if (attr == "name") {+ name = content;}-- }--- if (field) {- if (!duplicateFiels.includes(field.name)) {//don't add duplicate or children fields- fields.push(field);- duplicateFiels.push(field.name);- }- }- }-- component = {"id": node.dataset.vId, name, "type":node.dataset.vType, component:componentName, node, fields};- components.push(component);++ fields.push({"name": attr, "node": fieldNode, "value": content, "preview": preview, nodeType});+ seenFields.push(attr);+ }+ }++ components.push({"id": node.dataset.vId, name, "type": node.dataset.vType, component: componentName, node, fields});}- return components;+ return components;}function getComponentFields() {-- return getElementByXpath(".//*[ @*[starts-with(name(), 'data-v-component-')] ]//*[ @*[starts-with(name(), 'data-v-')] ]", window.FrameDocument);+ return getElementByXpath(".//*[ @*[starts-with(name(), 'data-v-component-')] ]//*[ @*[starts-with(name(), 'data-v-')] ]", window.FrameDocument);}-class ChangeManager {-- styles = {};- cssContainer = false;+originalContent = {};-- constructor() {- }setOriginalContent() {this.originalContent = getElements();}-+diff(original, changed, includeNode = true, includePreview = true) {-- let changes = {};- let _new = {};-- //todo match by component type and id- for (i in changed) {- let component = {...changed[i]};//copy by value- let origComponent = original[i];-- if ((origComponent === undefined) || (origComponent.id != component.id)) {- console.warn("id mismatch", component, origComponent);++ const changes = {};++ const originalById = {};+ for (const i in original) {+ const orig = original[i];+ if (orig && orig.id != null) originalById[orig.id] = orig;+ }++ for (const i in changed) {+ const component = {...changed[i]};//copy by value+ const origComponent = original[i];++ //new components can't be matched against the original snapshot yet+ if (origComponent === undefined) {+ console.warn("new component skipped", component);continue;}-- if (origComponent) {- if (!includeNode) {- delete component['node'];- }-- if (component["fields"]) {- let fields = [];-- for (j in component["fields"]) {-- let field = component["fields"][j];- let origField = origComponent["fields"][j];-- if (field && origField && (field.value != origField.value)) {-- if (!changes[i]) {- changes[i] = component;- //changes[i]["fields"] = [];- field["oldValue"] = origField.value;- }-- if (!includeNode) {- delete field['node'];- }-- if (!includePreview) {- delete field['preview'];- }-- fields.push(field);- }++ if (!component["fields"]) continue;++ if (!includeNode) {+ delete component['node'];+ }++ const origFieldsByName = {};+ for (const j in origComponent["fields"]) {+ const origField = origComponent["fields"][j];+ if (origField) origFieldsByName[origField.name] = origField;+ }++ const fields = [];++ for (const j in component["fields"]) {+ const field = component["fields"][j];+ if (!field) continue;+ const origField = origFieldsByName[field.name];++ if (origField && (field.value != origField.value)) {+ field["oldValue"] = origField.value;++ if (!changes[i]) {+ changes[i] = component;}- if (changes[i]) {- changes[i]["fields"] = fields;++ if (!includeNode) {+ delete field['node'];+ }++ if (!includePreview) {+ delete field['preview'];}++ fields.push(field);}- } else {- //new- changes[i] = component;+ }++ if (changes[i]) {+ changes[i]["fields"] = fields;}}-+return changes;}getChangedElements(includeNode = false, includePreview = false) {-- return this.diff(this.originalContent, getElements(), includeNode);+ return this.diff(this.originalContent, getElements(), includeNode, includePreview);}-+render() {- let selector = "#save-offcanvas .components";- let changes = this.getChangedElements(false, true);- let result = "";-- for (i in changes) {- let component = changes[i];- let fields = "";-- for (j in component["fields"]) {- let field = component["fields"][j];- fields += tmpl("vvveb-save-component-field", field);- }-- component["fields"] = fields;- component["id"] = i;- result += tmpl("vvveb-save-component", component);- }-- let element = document.querySelector(selector);- element.innerHTML = result;- //+ const selector = "#save-offcanvas .components";+ const changes = this.getChangedElements(false, true);+ let result = "";++ for (const i in changes) {+ const component = changes[i];+ let fields = "";++ for (const j in component["fields"]) {+ try {+ fields += tmpl("vvveb-save-component-field", component["fields"][j]);+ } catch (e) {+ console.error(e);+ }+ }++ component["fields"] = fields;+ component["id"] = i;+ try {+ result += tmpl("vvveb-save-component", component);+ } catch (e) {+ console.error(e);+ }+ }++ const element = document.querySelector(selector);+ if (element) {+ element.innerHTML = result;+ }}}diff --git a/public/js/vvvebjs/icons/accordion.svg b/public/js/vvvebjs/icons/accordion.svgold mode 100755new mode 100644index 94debfc..de69f11--- a/public/js/vvvebjs/icons/accordion.svg+++ b/public/js/vvvebjs/icons/accordion.svg@@ -1,109 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="150mm"- height="150mm"- viewBox="0 0 150 150"- version="1.1"- id="svg18"- sodipodi:docname="accordion-min (1).svg"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">- <metadata- id="metadata24">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs22" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview20"- showgrid="false"- inkscape:zoom="0.41627778"- inkscape:cx="288.26905"- inkscape:cy="283.46457"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg18" />- <g- transform="translate(-35.883 -48.843)"- stroke-miterlimit="0"- stroke-linecap="round"- stroke-width="3"- stroke="#000"- fill="none"- id="g14"- style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none">- <rect- width="112.577"- height="33.841"- x="57.38"- y="57.278"- ry="1.975"- stroke-linejoin="round"- id="rect2"- style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none" />- <path- d="M67.527 74.198l49.034-.035M142.736 70.67l6.773 8.608 7.62-8.043M67.47 142.601l49.034-.035"- stroke-linejoin="round"- id="path4"- style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none" />- <rect- width="112.577"- height="33.841"- x="57.323"- y="125.681"- ry="0"- id="rect6"- style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none" />- <path- d="M142.679 139.074l6.773 8.607 7.62-8.043"- stroke-linejoin="round"- id="path8"- style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none" />- <rect- width="112.577"- height="33.841"- x="57.323"- y="159.522"- ry="1.975"- stroke-linejoin="round"- id="rect10"- style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none" />- <path- d="M67.47 176.442l49.034-.035M142.68 172.914l6.772 8.608 7.62-8.043"- stroke-linejoin="round"- id="path12"- style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="accordion">+ <!-- Tabler outline glyph @list-tree (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M9 6h11" /> <path d="M12 12h8" /> <path d="M15 18h5" /> <path d="M5 6v.01" /> <path d="M8 12v.01" /> <path d="M11 18v.01" /></g>- <path- d="M134.014 40.423V80.14M21.436 32.641v45.927"- fill="none"- stroke="#000"- stroke-width="5.292"- stroke-miterlimit="4.667"- id="path16"- style="stroke-width:3;stroke-miterlimit:3;stroke-dasharray:none" /></svg>diff --git a/public/js/vvvebjs/icons/alert.svg b/public/js/vvvebjs/icons/alert.svgold mode 100644new mode 100755index 4dfd445..d037cd0--- a/public/js/vvvebjs/icons/alert.svg+++ b/public/js/vvvebjs/icons/alert.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="128" x2="128" y1="104" y2="144"/><path d="M114.2,40l-88,152A16,16,0,0,0,40,216H216a16,16,0,0,0,13.8-24l-88-152A15.9,15.9,0,0,0,114.2,40Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><circle cx="128" cy="180" r="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="alert">+ <!-- Tabler outline glyph @alert-triangle (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 9v4" /> <path d="M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0" /> <path d="M12 16h.01" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/archives.svg b/public/js/vvvebjs/icons/archives.svgindex b00b1ee..f02e654 100644--- a/public/js/vvvebjs/icons/archives.svg+++ b/public/js/vvvebjs/icons/archives.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><rect fill="none" height="40" rx="8" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" width="208" x="24" y="56"/><path d="M216,96v96a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="104" x2="152" y1="136" y2="136"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="archives">+ <!-- Tabler outline glyph @archive (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2" /> <path d="M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10" /> <path d="M10 12l4 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/arrow-down.svg b/public/js/vvvebjs/icons/arrow-down.svgindex 249280a..191a067 100755--- a/public/js/vvvebjs/icons/arrow-down.svg+++ b/public/js/vvvebjs/icons/arrow-down.svg@@ -1 +1,6 @@-<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><path fill="none" stroke="#777777" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M112 184l144 144 144-144"/></svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="arrow down">+ <!-- Tabler outline glyph @arrow-down (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 5l0 14" /> <path d="M18 13l-6 6" /> <path d="M6 13l6 6" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/arrow-right.svg b/public/js/vvvebjs/icons/arrow-right.svgindex 521bdf9..315d55d 100755--- a/public/js/vvvebjs/icons/arrow-right.svg+++ b/public/js/vvvebjs/icons/arrow-right.svg@@ -1 +1,6 @@-<svg xmlns="http://www.w3.org/2000/svg" class="ionicon" viewBox="0 0 512 512"><path fill="none" stroke="#777777" stroke-linecap="round" stroke-linejoin="round" stroke-width="48" d="M184 112l144 144-144 144"/></svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="arrow right">+ <!-- Tabler outline glyph @arrow-right (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M5 12l14 0" /> <path d="M13 18l6 -6" /> <path d="M13 6l6 6" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/audio.svg b/public/js/vvvebjs/icons/audio.svgindex d5d4902..45505b6 100644--- a/public/js/vvvebjs/icons/audio.svg+++ b/public/js/vvvebjs/icons/audio.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M218.9,77.1a71.9,71.9,0,0,1,0,101.8" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M80,168H32a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H80l72-56V224Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="80" x2="80" y1="88" y2="168"/><path d="M190.6,105.4a31.9,31.9,0,0,1,0,45.2" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="audio">+ <!-- Tabler outline glyph @volume (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M15 8a5 5 0 0 1 0 8" /> <path d="M17.7 5a9 9 0 0 1 0 14" /> <path d="M6 15h-2a1 1 0 0 1 -1 -1v-4a1 1 0 0 1 1 -1h2l3.5 -4.5a.8 .8 0 0 1 1.5 .5v14a.8 .8 0 0 1 -1.5 .5l-3.5 -4.5" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/badge.svg b/public/js/vvvebjs/icons/badge.svgindex 176d43c..bd1caa2 100755--- a/public/js/vvvebjs/icons/badge.svg+++ b/public/js/vvvebjs/icons/badge.svg@@ -1,81 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="69.035049mm"- height="53.390339mm"- viewBox="0 0 244.61238 189.17836"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="badge.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.98994949"- inkscape:cx="160.15716"- inkscape:cy="93.418188"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="18"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="18"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-39.478688,-359.04335)">- <rect- style="fill:#000000"- id="rect3361"- width="173.74623"- height="61.619305"- x="74.911758"- y="422.82288"- ry="30.809652" />- <text- xml:space="preserve"- style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"- x="103.72372"- y="464.62762"- id="text3338"- sodipodi:linespacing="125%"><tspan- sodipodi:role="line"- id="tspan3340"- x="103.72372"- y="464.62762"- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:30px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#ffffff">BADGE</tspan></text>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="badge">+ <!-- Tabler outline glyph @badge (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M17 17v-13l-5 3l-5 -3v13l5 3l5 -3" /></g></svg>diff --git a/public/js/vvvebjs/icons/bell.svg b/public/js/vvvebjs/icons/bell.svgold mode 100755new mode 100644index e53961d..6695353--- a/public/js/vvvebjs/icons/bell.svg+++ b/public/js/vvvebjs/icons/bell.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg fill="none" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M19.22 13.5272L8.14006 18.1353C7.63012 18.3474 7.04408 18.0936 7.04236 17.5413C7.03808 16.1689 7.77445 14.5066 7.57913 13.3144C6.92697 9.33398 6.06771 6.36172 9.19994 5.05904C12.3516 3.74829 13.8228 6.40921 16.1969 9.73031C16.8934 10.7047 18.6001 11.348 19.5746 12.3285C19.9639 12.7203 19.73 13.3151 19.22 13.5272Z" stroke="black"/><path d="M12.8518 17.4823C13.0622 17.9929 12.8189 18.5774 12.3082 18.7878C11.7976 18.9982 11.2131 18.7548 11.0027 18.2442" stroke="black" stroke-linecap="round"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="bell">+ <!-- Tabler outline glyph @bell (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6" /> <path d="M9 17v1a3 3 0 0 0 6 0v-1" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/blockquote.svg b/public/js/vvvebjs/icons/blockquote.svgindex 46ba200..6aa6423 100644--- a/public/js/vvvebjs/icons/blockquote.svg+++ b/public/js/vvvebjs/icons/blockquote.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M108,144H40a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8h60a8,8,0,0,1,8,8v88a40,40,0,0,1-40,40" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M224,144H156a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8h60a8,8,0,0,1,8,8v88a40,40,0,0,1-40,40" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="blockquote">+ <!-- Tabler outline glyph @quote (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M10 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" /> <path d="M19 11h-4a1 1 0 0 1 -1 -1v-3a1 1 0 0 1 1 -1h3a1 1 0 0 1 1 1v6c0 2.667 -1.333 4.333 -4 5" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/breadcrumbs.svg b/public/js/vvvebjs/icons/breadcrumbs.svgindex b601f73..73c8264 100755--- a/public/js/vvvebjs/icons/breadcrumbs.svg+++ b/public/js/vvvebjs/icons/breadcrumbs.svg@@ -1,77 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="93.848511mm"- height="76.074524mm"- viewBox="0 0 332.53409 269.55537"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="breadcrumbs.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="1.979899"- inkscape:cx="341.74652"- inkscape:cy="110.79218"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="30"- fit-margin-left="20"- fit-margin-right="20"- fit-margin-bottom="30"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-2222.1699,-1136.8864)">- <path- style="fill:#000000;fill-opacity:1"- d="m 2371.0967,1243.1898 c -2.3701,0.099 -4.3103,1.9236 -4.3103,4.5676 0,1.8187 0.3813,2.4054 6.6781,10.2658 3.673,4.5851 10.2397,12.8924 10.2397,13.0196 l 0,0.9565 c 0,0.1555 -5.8292,7.5636 -8.6006,11.0206 -8.2638,10.308 -8.3172,10.3868 -8.3172,12.2952 0,2.012 1.5903,4.1962 3.3826,4.6461 2.7984,0.7023 3.6371,-0.071 13.8439,-12.7658 5.3394,-6.6407 10.0693,-12.6894 10.511,-13.4414 1.5124,-2.5743 1.0724,-3.3335 -9.7858,-16.8924 -5.5885,-6.9785 -10.6207,-12.9019 -11.1831,-13.1623 -0.8297,-0.3839 -1.6681,-0.5425 -2.4583,-0.5095 z"- id="path4672"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cssccsscscssc" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 2335.8239,1271.5233 -43.7167,-0.5464"- id="path4703"- inkscape:connector-curvature="0" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 2478.7666,1273.0753 -43.7167,-0.5464"- id="path4703-9"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="breadcrumbs">+ <!-- Tabler outline glyph @chevrons-right (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M7 7l5 5l-5 5" /> <path d="M13 7l5 5l-5 5" /></g></svg>diff --git a/public/js/vvvebjs/icons/button.svg b/public/js/vvvebjs/icons/button.svgindex 48e6d74..72c9cfe 100755--- a/public/js/vvvebjs/icons/button.svg+++ b/public/js/vvvebjs/icons/button.svg@@ -1,78 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="164.46278mm"- height="142.39598mm"- viewBox="0 0 582.74218 504.55268"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="button.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.7"- inkscape:cx="738.30243"- inkscape:cy="-223.70595"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="30"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="10"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-70.885489,-14.238365)">- <path- style="fill:#000000"- d="m 494.20923,481.2624 c -4.6854,-2.50327 -4.4316,-2.11736 -24.10388,-36.64404 l -3.07088,-5.38967 -7.66263,7.59102 c -8.13374,8.05773 -13.76404,10.75814 -19.45333,9.33021 -2.87277,-0.72102 -9.20193,-5.82536 -10.70453,-8.63299 -0.50535,-0.94425 -3.42336,-16.07004 -6.48446,-33.61287 -3.0611,-17.54282 -5.81619,-33.13353 -6.12242,-34.64603 l -0.55679,-2.75 -129.87134,0 c -90.95044,0 -131.45945,-0.33118 -135.17056,-1.10508 -17.73365,-3.69813 -34.95224,-19.30464 -41.88038,-37.95936 l -2.39009,-6.43557 -0.29823,-80.19822 c -0.33269,-89.46525 -0.46937,-87.3458 6.48631,-100.58248 7.10143,-13.51406 21.51272,-24.67588 36.38628,-28.18188 5.59245,-1.31826 32.30232,-1.50788 212.39691,-1.50788 180.09462,0 206.80442,0.18962 212.39692,1.50788 20.5408,4.84188 38.8697,23.27981 43.0061,43.26179 0.7416,3.58214 1.0922,30.31426 1.0822,82.5 -0.016,85.87755 0.1158,83.97342 -6.7422,97.09769 -4.9252,9.42539 -15.4162,19.91854 -24.8352,24.84037 -10.8995,5.69541 -16.4344,6.75842 -35.3679,6.79258 l -16.5399,0.0298 4.2315,3.72016 c 13.4089,11.78837 7.5867,28.09936 -10.9815,30.76527 -2.6125,0.37509 -4.75,0.95136 -4.75,1.28062 0,0.32925 4.7957,6.90478 10.657,14.61227 6.8974,9.06976 10.9578,15.35205 11.5095,17.80746 1.0597,4.71633 -0.5174,11.47299 -3.492,14.96055 -1.196,1.40227 -9.0737,7.18309 -17.506,12.84627 -13.6584,9.17309 -15.8954,10.34087 -20.5,10.7015 -4.0696,0.31874 -6.1253,-0.10637 -9.6685,-1.99941 z m 19.2893,-27.18065 c 4.8658,-3.28081 8.5848,-6.45933 8.3312,-7.12039 -0.2521,-0.65676 -6.7948,-9.57166 -14.5394,-19.81089 -14.9828,-19.80897 -15.7561,-21.50261 -12.6024,-27.60126 1.6973,-3.28229 6.4453,-5.28645 16.8142,-7.09742 3.7361,-0.65252 6.6611,-1.51115 6.5,-1.90806 -0.5607,-1.38137 -90.98982,-82.17213 -91.45484,-81.70711 -0.25755,0.25754 1.7678,13.22647 4.50078,28.81984 2.73297,15.59336 7.29376,41.85157 10.13508,58.35157 2.84133,16.5 5.36722,30.61928 5.61309,31.37617 0.28927,0.89049 3.60499,-1.66813 9.3953,-7.25 8.3125,-8.01329 9.24329,-8.62617 13.10062,-8.62617 6.12167,0 9.52267,4.20169 22.91307,28.30737 6.3227,11.38243 11.7227,20.58222 12,20.44398 0.2772,-0.13823 4.4592,-2.91817 9.2933,-6.17763 z M 412.20922,354.56032 c 0,-0.52124 -2.25,-13.73134 -5,-29.35578 -2.75,-15.62443 -5,-30.06589 -5,-32.09213 0,-4.95342 3.36286,-11.24517 7.29034,-13.63988 4.19527,-2.55799 12.14153,-2.6135 16.20966,-0.11324 1.65,1.01409 21.60199,18.56241 44.33776,38.99626 l 41.33775,37.15248 25.7286,0 c 14.2119,0 28.3846,-0.48638 31.6622,-1.08658 11.8373,-2.16767 21.1926,-9.74167 25.6504,-20.76634 l 2.2833,-5.64709 0,-80.50001 0,-80.5 -2.9127,-6.30823 c -3.4972,-7.57413 -9.4554,-13.17986 -17.4402,-16.40843 l -5.6471,-2.28335 -205.00002,-0.28093 c -146.5729,-0.20086 -206.90217,0.035 -211.674,0.82753 -12.26064,2.03632 -21.6278,9.99579 -25.06243,21.29607 -0.97267,3.20016 -1.2636,22.46132 -1.2636,83.65734 0,74.50822 0.11557,79.8518 1.84055,85.10268 3.62286,11.02805 13.09994,19.71811 23.7969,21.82071 6.13704,1.20629 258.86259,1.33216 258.86259,0.12892 z"- id="path4198"- inkscape:connector-curvature="0" />- <text- xml:space="preserve"- style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"- x="180.2063"- y="273.24332"- id="text4200"- sodipodi:linespacing="125%"><tspan- sodipodi:role="line"- id="tspan4202"- x="180.2063"- y="273.24332"- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:90.00000763px;font-family:Arial;-inkscape-font-specification:'Arial Bold'">BUTTON</tspan></text>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="button">+ <!-- Tabler outline glyph @square (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14" /></g></svg>diff --git a/public/js/vvvebjs/icons/button_group.svg b/public/js/vvvebjs/icons/button_group.svgindex 6110328..126518d 100755--- a/public/js/vvvebjs/icons/button_group.svg+++ b/public/js/vvvebjs/icons/button_group.svg@@ -1,81 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="115.13439mm"- height="109.32118mm"- viewBox="0 0 407.95651 387.35848"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="button_group.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.9899495"- inkscape:cx="103.20824"- inkscape:cy="228.42086"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="35"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="35"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-1617.6138,-733.71057)">- <rect- style="opacity:0;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- id="rect4634"- width="417.69809"- height="307.08636"- x="1581.8502"- y="992.8822" />- <rect- style="opacity:0;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- id="rect4636"- width="582.14288"- height="339.28571"- x="1523.015"- y="981.98187" />- <path- style="fill:#000000"- d="m 1773.8216,857.77397 c -34.1582,0.40227 -68.383,-0.73055 -102.5019,1.04297 -8.8181,1.79892 -15.0763,10.08581 -18.2324,17.95118 0.4197,34.28185 -1.0035,68.65955 1.4277,102.8789 0.4016,4.86956 2.7687,9.6398 7.0625,11.80469 l 4.1016,2.00976 c 11.5719,4.27617 18.2784,2.28297 27.3279,3.22935 58.965,0.53252 117.7987,0.0267 176.5705,0.36245 33.8593,-0.50409 68.4353,0.12373 102.4707,-0.52539 8.613,-3.97798 17.7055,-11.50875 17.2324,-21.93359 1.4684,-32.75127 0.5413,-65.55829 0.8164,-98.33203 -4.0908,-9.19578 -12.3444,-18.76226 -23.3984,-17.85743 -64.2737,-1.20767 -128.5921,-0.38261 -192.877,-0.63086 z m 151.0039,12.5 c 15.4164,0.51071 31.1027,-1.00724 46.2325,1.14063 8.3287,3.86848 5.703,13.99257 6.3501,21.24196 -0.1059,28.20646 0.9964,56.82043 -1.1509,84.70921 -2.2273,7.62791 -11.5343,6.04029 -17.6068,6.4189 -25.6865,0.51047 -51.3807,0.35871 -77.0709,0.44243 4e-4,-37.98698 -5e-4,-75.97396 0,-113.96094 14.416,0.003 28.832,0.005 43.248,0.008 z m -163.248,59.49415 0,54.45898 c -29.7102,-0.42128 -59.5834,0.75166 -89.1699,-1.19531 -7.8875,-2.7507 -5.6947,-12.44595 -6.3968,-18.77886 -0.3394,-28.55113 -1.0666,-57.39736 0.3929,-85.75044 1.0949,-6.9006 9.0814,-8.70027 14.9872,-8.01189 26.6357,-0.41419 53.4761,-0.13077 80.1866,-0.22248 z m 60,-59.5 48,0 0,113.96484 c -32,0.0224 -64,0.0224 -96,0 l 0,-113.96484 z"- id="path4601"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccc" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="button group">+ <!-- Tabler outline glyph @layout-grid (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4" /> <path d="M14 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4" /> <path d="M4 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4" /> <path d="M14 15a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v4a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -4" /></g></svg>diff --git a/public/js/vvvebjs/icons/button_toolbar.svg b/public/js/vvvebjs/icons/button_toolbar.svgindex 84fe436..214d02b 100755--- a/public/js/vvvebjs/icons/button_toolbar.svg+++ b/public/js/vvvebjs/icons/button_toolbar.svg@@ -1,87 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="115.13439mm"- height="99.326332mm"- viewBox="0 0 407.95651 351.94366"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="button_toolbar.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="1.979899"- inkscape:cx="239.59456"- inkscape:cy="269.0279"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="30"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="30"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-1617.6138,-751.42706)">- <rect- style="opacity:0;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- id="rect4634"- width="417.69809"- height="307.08636"- x="1581.8502"- y="992.8822" />- <rect- style="opacity:0;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:20;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- id="rect4636"- width="582.14288"- height="339.28571"- x="1523.015"- y="981.98187" />- <path- style="fill:#000000"- d="m 1723.1028,862.41603 c -27.017,0.35882 -54.0866,-0.65166 -81.0725,0.93033 -6.9744,1.60465 -11.9244,8.99661 -14.4206,16.01258 0.3319,30.57965 -0.7937,61.2448 1.1291,91.76869 0.3178,4.34369 2.1899,8.59877 5.5861,10.52987 l 3.2442,1.79272 c 9.1525,3.81437 14.4569,2.03643 21.6145,2.8806 46.6375,0.47501 93.1712,0.0238 139.656,0.32331 26.7805,-0.44965 54.1279,0.11037 81.0478,-0.46865 6.8123,-3.54839 14.0039,-10.26589 13.6297,-19.56492 1.1614,-29.21436 0.4281,-58.47845 0.6458,-87.71285 -3.2357,-8.2027 -9.7637,-16.73607 -18.5067,-15.92895 -50.8365,-1.07725 -101.7081,-0.34129 -152.5534,-0.56273 z m 119.4344,11.15008 c 12.1934,0.45556 24.6003,-0.89846 36.5669,1.01745 6.5876,3.45071 4.5107,12.48147 5.0226,18.94798 -0.083,25.16036 0.7881,50.68422 -0.9103,75.5612 -1.7616,6.80415 -9.1229,5.38798 -13.9257,5.72571 -20.3166,0.45534 -40.639,0.31997 -60.9582,0.39465 3e-4,-33.88465 -5e-4,-67.7693 0,-101.65395 11.4021,0.003 22.8042,0.004 34.2063,0.007 z m -129.1187,53.0692 0,48.57779 c -23.4989,-0.37579 -47.1267,0.67048 -70.5278,-1.06623 -6.2383,-2.45364 -4.5041,-11.10187 -5.0594,-16.75087 -0.2683,-25.46781 -0.8436,-51.19885 0.3108,-76.48999 0.866,-6.15538 7.1829,-7.7607 11.8539,-7.14666 21.0671,-0.36946 42.2962,-0.11665 63.4225,-0.19846 z m 47.4562,-53.07442 37.9649,0 0,101.65744 c -25.31,0.02 -50.6199,0.02 -75.93,0 l 0,-101.65744 z"- id="path4601"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccc" />- <path- style="fill:#000000"- d="m 1977.4773,863.34738 c -26.6662,0.35883 -19.2213,-0.70797 -46.2072,0.87402 -6.9744,1.60465 -11.9243,8.99661 -14.4205,16.01257 0.3319,30.57965 -0.7937,61.2448 1.1291,91.76868 0.3177,4.34372 2.1899,8.59877 5.5861,10.52987 l 3.2441,1.79276 c 9.1527,3.81431 14.4571,2.03636 21.6146,2.88056 46.6375,0.47499 -0.1651,0.0241 46.3196,0.32335 26.7805,-0.44966 -23.6523,0.11034 3.2676,-0.46866 6.8123,-3.5484 14.0039,-10.26593 13.6296,-19.56492 1.1615,-29.21437 0.4281,-58.47846 0.6458,-87.71287 -3.2356,-8.20269 -9.6233,-14.99025 -18.5067,-15.92894 -50.8364,-1.07725 34.5431,-0.28498 -16.3021,-0.50642 z m 25.4067,11.09376 c 12.1934,0.45556 -18.8159,-4.4464 -5.6565,1.01745 6.5874,3.45072 4.5106,12.48147 5.0225,18.94798 -0.083,25.16036 0.788,50.68423 -0.9103,75.56123 -1.7616,6.80414 -9.1229,5.38799 -13.9258,5.72571 -20.3164,0.45528 41.5859,0.31996 21.2667,0.39462 3e-4,-33.88467 -5e-4,-67.7693 0,-101.65395 11.4021,0.003 -17.197,0.004 -5.7948,0.007 z m -0.2256,53.0692 0,48.57779 c -23.4989,-0.3758 -47.1266,0.67052 -70.5277,-1.06622 -6.2385,-2.45364 -4.5042,-11.10191 -5.0594,-16.75091 -0.2685,-25.46778 -0.8438,-51.19881 0.3106,-76.48996 0.866,-6.15538 7.1829,-7.7607 11.854,-7.14666 21.0671,-0.36946 42.2963,-0.11665 63.4225,-0.19845 z m -39.2133,-53.07441 37.9649,0 0,101.65746 c -25.3099,0.0196 33.8273,0.0196 8.5172,0 l 0,-101.65746 z"- id="path4601-9"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccc" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="button toolbar">+ <!-- Tabler outline glyph @adjustments-horizontal (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M4 6l8 0" /> <path d="M16 6l4 0" /> <path d="M6 12a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M4 12l2 0" /> <path d="M10 12l10 0" /> <path d="M15 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M4 18l11 0" /> <path d="M19 18l1 0" /></g></svg>diff --git a/public/js/vvvebjs/icons/calendar.svg b/public/js/vvvebjs/icons/calendar.svgold mode 100755new mode 100644index 420efcc..b666c92--- a/public/js/vvvebjs/icons/calendar.svg+++ b/public/js/vvvebjs/icons/calendar.svg@@ -1,79 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- enable-background="new 0 0 512 512"- height="300"- id="Layer_1"- version="1.1"- viewBox="0 0 300.00001 300"- width="300"- xml:space="preserve"- sodipodi:docname="calendar.svg"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata- id="metadata19"><rdf:RDF><cc:Work- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs- id="defs17" /><sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="768"- inkscape:window-height="480"- id="namedview15"- showgrid="false"- fit-margin-top="0"- fit-margin-left="0"- fit-margin-right="0"- fit-margin-bottom="0"- inkscape:zoom="0.4609375"- inkscape:cx="133.07121"- inkscape:cy="124.3"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="0"- inkscape:current-layer="Layer_1" /><g- id="g12"- transform="translate(-105.57286,-112.3339)"><line- stroke-miterlimit="10"- x1="128"- x2="384"- y1="225.7"- y2="225.7"- id="line2"- style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /><polyline- points=" 180.3,159.7 128,159.7 128,375.3 384,375.3 384,159.7 331.7,159.7 "- stroke-miterlimit="10"- id="polyline4"- style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /><line- stroke-miterlimit="10"- x1="300.29999"- x2="211.7"- y1="159.7"- y2="159.7"- id="line6"- style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /><line- stroke-miterlimit="10"- x1="196"- x2="196"- y1="136.7"- y2="182.7"- id="line8"- style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /><line- stroke-miterlimit="10"- x1="316"- x2="316"- y1="136.7"- y2="182.7"- id="line10"- style="fill:none;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /></g></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="calendar">+ <!-- Tabler outline glyph @calendar (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12" /> <path d="M16 3v4" /> <path d="M8 3v4" /> <path d="M4 11h16" /> <path d="M11 15h1" /> <path d="M12 15v3" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/carousel.svg b/public/js/vvvebjs/icons/carousel.svgold mode 100755new mode 100644index 88a906c..273f26a--- a/public/js/vvvebjs/icons/carousel.svg+++ b/public/js/vvvebjs/icons/carousel.svg@@ -1,3 +1,6 @@-<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24">- <path d="M8 3.508c-.827 0-1.492.665-1.492 1.492A.508.508 0 0 1 6 5.508H4c-.827 0-1.492.665-1.492 1.492v10c0 .827.665 1.492 1.492 1.492h2a.508.508 0 0 1 .508.508c0 .827.665 1.492 1.492 1.492h8c.827 0 1.492-.665 1.492-1.492a.508.508 0 0 1 .508-.508h2c.827 0 1.492-.665 1.492-1.492V7c0-.827-.665-1.492-1.492-1.492h-2A.508.508 0 0 1 17.492 5c0-.827-.665-1.492-1.492-1.492Zm-.035.984a.508.508 0 0 1 .035 0h8a.508.508 0 0 1 .508.508l.002 14a.508.508 0 0 1-.508.508H8A.508.508 0 0 1 7.492 19V5a.508.508 0 0 1 .473-.508Zm-4 2a.508.508 0 0 1 .035 0h2A.508.508 0 0 1 6.508 7v10a.508.508 0 0 1-.508.508H4A.508.508 0 0 1 3.492 17V7a.508.508 0 0 1 .473-.508Zm14 0a.508.508 0 0 1 .035 0h2a.508.508 0 0 1 .508.508v10a.508.508 0 0 1-.508.508h-2a.508.508 0 0 1-.508-.508V7a.508.508 0 0 1 .473-.508z"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="carousel">+ <!-- Tabler outline glyph @carousel-horizontal (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M7 6a1 1 0 0 1 1 -1h8a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-8a1 1 0 0 1 -1 -1l0 -12" /> <path d="M22 17h-1a1 1 0 0 1 -1 -1v-8a1 1 0 0 1 1 -1h1" /> <path d="M2 17h1a1 1 0 0 0 1 -1v-8a1 1 0 0 0 -1 -1h-1" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/cart.svg b/public/js/vvvebjs/icons/cart.svgindex 96be181..1840989 100755--- a/public/js/vvvebjs/icons/cart.svg+++ b/public/js/vvvebjs/icons/cart.svg@@ -1,62 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- width="410.42029"- height="450.50851"- viewBox="0 0 410.42028 450.50852"- sodipodi:docname="cart.svg">- <metadata- id="metadata8">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs6" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview4"- showgrid="false"- fit-margin-top="50"- fit-margin-left="0"- fit-margin-right="0"- fit-margin-bottom="50"- inkscape:zoom="0.65186406"- inkscape:cx="657.7526"- inkscape:cy="496.57728"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg2" />- <path- style="fill:#000000"- d="m 150.31135,399.86319 c -12.06557,-3.0499 -24.6715,-13.3048 -29.78335,-24.2286 -8.20764,-17.5393 -5.43256,-34.1537 8.04981,-48.1942 17.95603,-18.6993 44.00275,-18.6993 61.95878,0 10.01817,10.4329 14.577,23.9902 12.1614,36.1663 -4.02336,20.28 -21.34936,35.9017 -40.85027,36.8318 -4.28479,0.2044 -9.47615,-0.054 -11.53637,-0.5753 z m 21.24585,-17.0584 c 5.56792,-2.5175 10.52588,-7.1669 13.24572,-12.4215 2.94826,-5.6958 3.52276,-16.6702 1.23349,-23.5626 -6.14097,-18.4887 -32.35108,-24.1607 -46.45803,-10.0538 -6.20141,6.2014 -8.44441,12.6682 -7.80249,22.4955 1.04065,15.9317 11.51727,25.577 27.78131,25.577 5.40139,0 8.75917,-0.5693 12,-2.0346 z m 154.75415,17.0584 c -16.898,-4.2715 -30.6923,-19.24 -33.9692,-36.8608 -3.9842,-21.424 13.7084,-44.9185 36.9651,-49.0869 12.96681,-2.324 26.85531,2.7215 37.22931,13.5249 10.0182,10.4329 14.577,23.9902 12.1614,36.1663 -4.0233,20.28 -21.3493,35.9017 -40.8502,36.8318 -4.28481,0.2044 -9.47621,-0.054 -11.53641,-0.5753 z m 21.24591,-17.0584 c 9.7616,-4.4136 15.0468,-12.298 15.7813,-23.5424 0.8222,-12.588 -4.0659,-21.9559 -14.113,-27.0471 -11.3075,-5.7299 -25.24521,-3.8503 -33.63081,4.5353 -6.2188,6.2188 -8.4614,12.6754 -7.8189,22.5118 1.0407,15.9317 11.5173,25.577 27.7814,25.577 5.40131,0 8.75911,-0.5693 12.00001,-2.0346 z M 164.0104,288.56839 c -5.40222,-2.1012 -10.11228,-5.5847 -12.75128,-9.4307 -1.41687,-2.0649 -22.18201,-50.3294 -46.14476,-107.25439 C 81.15161,114.9583 60.787291,67.820801 59.860331,67.133301 c -1.24589,-0.92404 -8.40329,-1.25 -27.44721,-1.25 -17.01676,0 -26.6034901,-0.38349 -28.2412801,-1.12972 -5.71698,-2.60483 -5.51005,-11.42832 0.32471,-13.84516 1.91526,-0.79332 11.0774101,-1.05076 29.7457301,-0.83578 l 26.97795,0.31066 4.82112,3 c 2.65162,1.65 6.06922,4.575 7.59466,6.5 1.59027,2.0068 21.341089,47.597819 46.295169,106.863579 23.93689,56.84998 44.28986,104.21251 45.22881,105.25001 1.64776,1.8208 4.70667,1.8864 87.87786,1.8864 l 86.17071,0 2.1658,-2.3054 c 2.7409,-2.9175 54.1829,-129.66656 54.1829,-133.50231 0,-1.67535 -0.9462,-3.73249 -2.3029,-5.00709 l -2.3029,-2.16344 -133.28381,-0.26087 -133.28381,-0.26088 -2.50569,-2.91315 c -2.95642,-3.43717 -2.6225,-8.00122 0.79285,-10.83685 1.98443,-1.6476 9.89863,-1.74871 135.24695,-1.72804 150.94161,0.0249 137.28741,-0.77281 145.44741,8.49738 4.8756,5.53903 7.6779,13.56868 6.937,19.87714 -0.2651,2.25694 -12.3473,33.35352 -26.8494,69.10352 -28.3676,69.93089 -28.302,69.80079 -37.566,74.53289 l -4.8297,2.4671 -87.00011,0.1851 c -65.05902,0.1384 -87.76834,-0.1138 -90.04675,-1 z"- id="path4298"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="cart">+ <!-- Tabler outline glyph @shopping-cart (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M15 19a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M17 17h-11v-14h-2" /> <path d="M6 5l14 1l-1 7h-13" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/categories.svg b/public/js/vvvebjs/icons/categories.svgindex b82d735..236e13b 100644--- a/public/js/vvvebjs/icons/categories.svg+++ b/public/js/vvvebjs/icons/categories.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="96" x2="216" y1="64" y2="64"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="96" x2="216" y1="128" y2="128"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="96" x2="216" y1="192" y2="192"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="40" x2="56" y1="64" y2="64"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="40" x2="56" y1="128" y2="128"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="40" x2="56" y1="192" y2="192"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="categories">+ <!-- Tabler outline glyph @category (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 4h6v6h-6l0 -6" /> <path d="M14 4h6v6h-6l0 -6" /> <path d="M4 14h6v6h-6l0 -6" /> <path d="M14 17a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/categories2.svg b/public/js/vvvebjs/icons/categories2.svgold mode 100755new mode 100644index 132c62d..3f97a3d--- a/public/js/vvvebjs/icons/categories2.svg+++ b/public/js/vvvebjs/icons/categories2.svg@@ -1,89 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- enable-background="new 0 0 512 512"- id="Layer_1"- version="1.1"- viewBox="0 0 300 300"- xml:space="preserve"- sodipodi:docname="categories.svg"- width="300"- height="300"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata- id="metadata21"><rdf:RDF><cc:Work- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs- id="defs19" /><sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="768"- inkscape:window-height="480"- id="namedview17"- showgrid="false"- fit-margin-top="0"- fit-margin-left="0"- fit-margin-right="0"- fit-margin-bottom="0"- inkscape:zoom="0.4609375"- inkscape:cx="136.2"- inkscape:cy="126.29999"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="0"- inkscape:current-layer="Layer_1" /><g- id="g14"- transform="translate(-106.78305,-101.82541)"><rect- height="61.5"- stroke-miterlimit="10"- width="61.5"- x="124.8"- y="134.7"- id="rect2"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /><line- stroke-miterlimit="10"- x1="210.3"- x2="387.20001"- y1="165.39999"- y2="165.39999"- id="line4"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /><rect- height="61.5"- stroke-miterlimit="10"- width="61.5"- x="124.8"- y="225.3"- id="rect6"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /><line- stroke-miterlimit="10"- x1="210.3"- x2="387.20001"- y1="256"- y2="256"- id="line8"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /><rect- height="61.5"- stroke-miterlimit="10"- width="61.5"- x="124.8"- y="315.79999"- id="rect10"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /><line- stroke-miterlimit="10"- x1="210.3"- x2="387.20001"- y1="346.60001"- y2="346.60001"- id="line12"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /></g></svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="categories2">+ <!-- Tabler outline glyph @tags (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 8v4.172a2 2 0 0 0 .586 1.414l5.71 5.71a2.41 2.41 0 0 0 3.408 0l3.592 -3.592a2.41 2.41 0 0 0 0 -3.408l-5.71 -5.71a2 2 0 0 0 -1.414 -.586h-4.172a2 2 0 0 0 -2 2" /> <path d="M18 19l1.592 -1.592a4.82 4.82 0 0 0 0 -6.816l-4.592 -4.592" /> <path d="M7 10h-.01" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/chart.svg b/public/js/vvvebjs/icons/chart.svgold mode 100644new mode 100755index 31fe24d..98c73aa--- a/public/js/vvvebjs/icons/chart.svg+++ b/public/js/vvvebjs/icons/chart.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><polyline fill="none" points="224 208 32 208 32 48" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="208 64 128 144 96 112 32 176" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="208 104 208 64 168 64" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="chart">+ <!-- Tabler outline glyph @chart-bar (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 13a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -6" /> <path d="M15 9a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -10" /> <path d="M9 5a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v14a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1l0 -14" /> <path d="M4 20h14" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/checkbox.svg b/public/js/vvvebjs/icons/checkbox.svgold mode 100644new mode 100755index 81799d4..f12af73--- a/public/js/vvvebjs/icons/checkbox.svg+++ b/public/js/vvvebjs/icons/checkbox.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><polyline fill="none" points="172 104 113.3 160 84 132" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><rect fill="none" height="176" rx="8" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" width="176" x="40" y="40"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="checkbox">+ <!-- Tabler outline glyph @checkbox (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M9 11l3 3l8 -8" /> <path d="M20 12v6a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h9" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/checkout.svg b/public/js/vvvebjs/icons/checkout.svgindex 00f51de..fa581bf 100755--- a/public/js/vvvebjs/icons/checkout.svg+++ b/public/js/vvvebjs/icons/checkout.svg@@ -1,3 +1,6 @@-<svg xmlns="http://www.w3.org/2000/svg" width="451.874" height="421.692">- <path style="fill:#000" d="M173.62 400.215c-11.657-3.118-23.26-12.912-28.553-24.099-8.014-16.941-4.652-35.23 8.984-48.866 17.575-17.576 41.556-17.576 59.14 0 17.699 17.69 17.699 43.448 0 61.137-6.703 6.701-14.247 10.872-22.458 12.418-7.009 1.32-10.418 1.202-17.113-.59zm19.1-15.555c6.765-2.306 11.592-6.538 14.817-12.992 2.64-5.284 3.083-7.27 3.083-13.85 0-17.694-11.581-28.861-28.842-27.809-15.123.922-24.126 10.183-24.983 25.7-.8 14.494 4.918 24.021 17.278 28.784 3.994 1.538 14.351 1.631 18.647.167zm158.217 16.113c-21.315-4.214-38.368-28.447-34.532-49.073 3.548-19.08 18.412-34.067 36.811-37.116 11.75-1.947 24.344 2.282 34.002 11.416 19.221 18.179 19.136 46.065-.195 63.733-10.91 9.972-22.913 13.644-36.086 11.04zm17.81-16.482c6.388-2.177 11.321-6.646 14.493-13.13 2.276-4.65 2.748-6.944 2.748-13.342 0-17.175-10.794-28.04-27.796-27.978-10.133.036-19.014 5.415-23.907 14.478-2.953 5.47-3.133 21.18-.303 26.5 3.598 6.763 9.76 11.975 16.631 14.065 4.287 1.304 13.445 1.005 18.135-.593zm-180.674-95.787c-5.405-2.103-10.113-5.586-12.747-9.431-1.415-2.065-21.994-48.304-45.732-102.754-23.737-54.45-43.862-99.788-44.722-100.75-1.418-1.589-4.172-1.75-29.86-1.75-18.902 0-29.122-.376-30.778-1.13-3.519-1.604-5.195-6.054-3.668-9.74.654-1.58 2.305-3.38 3.668-4 1.653-.754 11.742-1.13 30.255-1.13 31.88 0 34.188.415 41.275 7.424 4.023 3.98 7.674 11.922 47.856 104.118 23.925 54.895 44.32 100.855 45.322 102.133l1.823 2.325h85.805c67.448 0 86.017-.268 86.797-1.25 1.113-1.403 50.679-115.874 52.912-122.2 1.638-4.638 1.142-7.75-1.685-10.576-1.81-1.81-3.38-1.974-18.927-1.974-10.47 0-17.901-.432-19.433-1.13-5.553-2.53-5.553-11.21 0-13.74 1.53-.698 8.877-1.127 19.183-1.12 15.487.008 17.075.183 21.82 2.392 8.417 3.919 14.56 14.194 14.636 24.481.038 5.18-2.027 10.403-26.542 67.117-17.265 39.941-27.681 62.82-29.716 65.264-1.723 2.071-5.015 4.771-7.314 6l-4.181 2.236-86.5.185c-64.677.138-87.269-.114-89.547-1zm85.086-103.733c-34.8-5.45-63.231-32.566-70.1-66.858-1.991-9.943-1.552-26.183.963-35.594.881-3.3 3.921-10.725 6.755-16.5 4.636-9.45 6.212-11.56 15.747-21.096 9.535-9.535 11.647-11.112 21.096-15.748 13.164-6.458 19.737-8.222 33.094-8.88 38.439-1.89 73.828 24.407 84.074 62.475 3.21 11.925 2.974 29.851-.545 41.556-8.693 28.914-29.689 49.925-58.122 58.164-9.819 2.846-23.878 3.904-32.962 2.481zm26.763-16.543c3.959-.874 10.997-3.404 15.642-5.622 11.236-5.366 22.818-16.725 28.332-27.787 20.09-40.308-.564-87.41-42.804-97.61-9.068-2.19-24.902-2.204-33.472-.03-24.06 6.105-42.535 24.58-48.64 48.64-2.173 8.57-2.16 24.404.03 33.472 5.886 24.37 25.57 43.738 49.799 48.998 8.648 1.878 22.462 1.85 31.113-.06zm-19.981-15.598c-1.198-.58-2.716-2.349-3.371-3.932-.677-1.633-1.956-2.88-2.956-2.88-3.292 0-17.804-8.019-20.907-11.552-5.488-6.25-2.913-14.447 4.539-14.447 2.739 0 7.374 3.031 7.374 4.823 0 .878 4.58 3.686 8.349 5.12l2.65 1.007v-10.475c0-8.525-.272-10.475-1.462-10.475-6.707 0-20.532-9.35-23.174-15.674-4.615-11.046 2.821-24.974 16.694-31.267 2.444-1.109 5.23-2.025 6.193-2.037 1.061-.014 1.75-.79 1.75-1.975 0-6.08 5.627-10.273 10.87-8.101 2.737 1.134 5.13 4.622 5.13 7.48 0 .81 2.64 1.99 6.75 3.016 8.606 2.15 14.638 5.676 17.75 10.38 3.67 5.544 4.093 9.154 1.464 12.495-1.861 2.367-2.81 2.741-6.295 2.485-3.424-.252-4.489-.882-6.426-3.802-2.276-3.432-8.029-6.922-11.493-6.974-1.551-.023-1.75 1.103-1.75 9.89v9.918l5.021 1.077c22.982 4.928 30.177 25.835 13.94 40.504-4.34 3.921-13.131 8.558-16.258 8.575-.988.005-2.558 1.336-3.488 2.958-2.6 4.53-6.589 5.944-10.894 3.863zm17.69-23.938c4.245-2.385 5.989-5.384 5.989-10.298 0-4.175-1.789-5.685-7.5-6.328l-4.5-.507v9.63c0 6.41.372 9.63 1.114 9.63.612 0 2.816-.957 4.897-2.127zM275.62 85.371v-9.448l-2.878 1.003c-5.66 1.973-9.343 8.744-7.068 12.995 1.057 1.974 6.072 4.776 8.696 4.858.914.03 1.25-2.496 1.25-9.408zM143.94 136.63c-3.263-1.578-4.848-6.124-3.374-9.682 1.935-4.672 4.347-5.13 27.054-5.13 22.706 0 25.118.458 27.053 5.13 1.527 3.687-.149 8.137-3.668 9.74-3.234 1.474-44 1.423-47.064-.058z"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="checkout">+ <!-- Tabler outline glyph @credit-card (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -8" /> <path d="M3 10l18 0" /> <path d="M7 15l.01 0" /> <path d="M11 15l2 0" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/chevron-down.svg b/public/js/vvvebjs/icons/chevron-down.svgindex 048d43a..c103198 100755--- a/public/js/vvvebjs/icons/chevron-down.svg+++ b/public/js/vvvebjs/icons/chevron-down.svg@@ -1,67 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="24mm"- height="24mm"- viewBox="0 0 85.039372 85.039372"- id="svg2"- version="1.1"- inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"- sodipodi:docname="chevron-down.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="7.919596"- inkscape:cx="104.35529"- inkscape:cy="57.973773"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="30"- fit-margin-left="20"- fit-margin-right="20"- fit-margin-bottom="30"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-2281.6285,-1307.1106)">- <path- style="fill:#000000;fill-opacity:1"- d="m 2352.4841,1341.7154 c -0.099,-2.3701 -1.9236,-4.3103 -4.5676,-4.3103 -1.8187,0 -2.4054,0.3813 -10.2658,6.6781 -4.5851,3.673 -12.8924,10.2397 -13.0196,10.2397 h -0.9565 c -0.1555,0 -7.5636,-5.8292 -11.0206,-8.6006 -10.308,-8.2638 -10.3868,-8.3172 -12.2952,-8.3172 -2.012,0 -4.1962,1.5903 -4.6461,3.3826 -0.7023,2.7984 0.071,3.6371 12.7658,13.8439 6.6407,5.3394 12.6894,10.0693 13.4414,10.511 2.5743,1.5124 3.3335,1.0724 16.8924,-9.7858 6.9785,-5.5885 12.9019,-10.6207 13.1623,-11.1831 0.3839,-0.8297 0.5425,-1.6681 0.5095,-2.4583 z"- id="path4672"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cssccsscscssc" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="chevron down">+ <!-- Tabler outline glyph @chevron-down (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M6 9l6 6l6 -6" /></g></svg>diff --git a/public/js/vvvebjs/icons/chevron-right.svg b/public/js/vvvebjs/icons/chevron-right.svgindex 006e17e..45b0244 100755--- a/public/js/vvvebjs/icons/chevron-right.svg+++ b/public/js/vvvebjs/icons/chevron-right.svg@@ -1,67 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="24mm"- height="24mm"- viewBox="0 0 85.039372 85.039372"- id="svg2"- version="1.1"- inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"- sodipodi:docname="chevron-right.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="7.919596"- inkscape:cx="104.10275"- inkscape:cy="58.478849"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="30"- fit-margin-left="20"- fit-margin-right="20"- fit-margin-bottom="30"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-2281.6285,-1307.1106)">- <path- style="fill:#000000;fill-opacity:1"- d="m 2315.6723,1378.7639 c -2.3701,-0.099 -4.3103,-1.9236 -4.3103,-4.5676 0,-1.8187 0.3813,-2.4054 6.6781,-10.2658 3.673,-4.5851 10.2397,-12.8924 10.2397,-13.0196 v -0.9565 c 0,-0.1555 -5.8292,-7.5636 -8.6006,-11.0206 -8.2638,-10.308 -8.3172,-10.3868 -8.3172,-12.2952 0,-2.012 1.5903,-4.1962 3.3826,-4.6461 2.7984,-0.7023 3.6371,0.071 13.8439,12.7658 5.3394,6.6407 10.0693,12.6894 10.511,13.4414 1.5124,2.5743 1.0724,3.3335 -9.7858,16.8924 -5.5885,6.9785 -10.6207,12.9019 -11.1831,13.1623 -0.8297,0.3839 -1.6681,0.5425 -2.4583,0.5095 z"- id="path4672"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cssccsscscssc" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="chevron right">+ <!-- Tabler outline glyph @chevron-right (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M9 6l6 6l-6 6" /></g></svg>diff --git a/public/js/vvvebjs/icons/code.svg b/public/js/vvvebjs/icons/code.svgindex 9450b02..80ebc55 100644--- a/public/js/vvvebjs/icons/code.svg+++ b/public/js/vvvebjs/icons/code.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><polyline fill="none" points="64 88 16 128 64 168" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="192 88 240 128 192 168" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="160" x2="96" y1="40" y2="216"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="code">+ <!-- Tabler outline glyph @code (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M7 8l-4 4l4 4" /> <path d="M17 8l4 4l-4 4" /> <path d="M14 4l-4 16" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/container.svg b/public/js/vvvebjs/icons/container.svgold mode 100644new mode 100755index 8717bbd..a95501e--- a/public/js/vvvebjs/icons/container.svg+++ b/public/js/vvvebjs/icons/container.svg@@ -1 +1,6 @@-<svg class="ionicon" width="256" height="256" xmlns="http://www.w3.org/2000/svg"><path d="M162.148 216.77h24.978c13.795 0 24.978-11.184 24.978-24.98v-24.978m0-71.367V70.467c0-13.795-11.183-24.978-24.978-24.978h-24.978M90.78 216.769H65.802c-13.795 0-24.978-11.183-24.978-24.978v-24.979m0-71.367V70.467c0-13.795 11.183-24.978 24.978-24.978h24.979" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="32" style="stroke-width:8.52418;stroke-miterlimit:4;stroke-dasharray:none"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="container">+ <!-- Tabler outline glyph @box (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5" /> <path d="M12 12l8 -4.5" /> <path d="M12 12l0 9" /> <path d="M12 12l-8 -4.5" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/currency.svg b/public/js/vvvebjs/icons/currency.svgindex 20e4c62..2d2d281 100644--- a/public/js/vvvebjs/icons/currency.svg+++ b/public/js/vvvebjs/icons/currency.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><rect fill="none" height="128" rx="8" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" width="224" x="16" y="64"/><circle cx="128" cy="128" fill="none" r="32" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="176" x2="240" y1="64" y2="120"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="176" x2="240" y1="192" y2="136"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="80" x2="16" y1="64" y2="120"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="80" x2="16" y1="192" y2="136"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="currency">+ <!-- Tabler outline glyph @coin (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /> <path d="M14.8 9a2 2 0 0 0 -1.8 -1h-2a2 2 0 1 0 0 4h2a2 2 0 1 1 0 4h-2a2 2 0 0 1 -1.8 -1" /> <path d="M12 7v10" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/dots_three.svg b/public/js/vvvebjs/icons/dots_three.svgindex 6d1bdbd..095de62 100644--- a/public/js/vvvebjs/icons/dots_three.svg+++ b/public/js/vvvebjs/icons/dots_three.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><circle cx="128" cy="128" fill="none" r="24" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><circle cx="48" cy="128" fill="none" r="24" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><circle cx="208" cy="128" fill="none" r="24" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="dots three">+ <!-- Tabler outline glyph @dots (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /> <path d="M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /> <path d="M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/envelope.svg b/public/js/vvvebjs/icons/envelope.svgindex 0fa5410..92a4ed6 100755--- a/public/js/vvvebjs/icons/envelope.svg+++ b/public/js/vvvebjs/icons/envelope.svg@@ -1,52 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- viewBox="0 0 32 32"- version="1.1"- id="svg4"- sodipodi:docname="envelope.svg"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">- <metadata- id="metadata10">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs8" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview6"- showgrid="false"- inkscape:zoom="20.85965"- inkscape:cx="9.9090031"- inkscape:cy="24.959951"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg4" />- <path- d="M 3 8 L 3 26 L 29 26 L 29 8 Z M 7.3125 10 L 24.6875 10 L 16 15.78125 Z M 5 10.875 L 15.4375 17.84375 L 16 18.1875 L 16.5625 17.84375 L 27 10.875 L 27 24 L 5 24 Z"- id="path2"- style="stroke:#ffffff;stroke-opacity:1;fill:#000000;fill-opacity:1" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="envelope">+ <!-- Tabler outline glyph @mail (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10" /> <path d="M3 7l9 6l9 -6" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/facebook.svg b/public/js/vvvebjs/icons/facebook.svgindex d228d72..561c0fd 100755--- a/public/js/vvvebjs/icons/facebook.svg+++ b/public/js/vvvebjs/icons/facebook.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg height="60px" version="1.1" viewBox="0 0 60 60" width="60px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill="none" fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g id="Facebook" stroke="#000000" stroke-width="2" transform="translate(1.000000, 1.000000)"><path d="M39.0432,58 L39.0432,35.696 L46.2462,35.696 L47.3202,27.003 L39.0432,27.003 L39.0432,21.454 C39.0432,18.94 39.7132,17.225 43.1872,17.225 L47.6142,17.219 L47.6142,9.45 C46.8472,9.342 44.2202,9.102 41.1612,9.102 C34.7782,9.102 30.4082,13.157 30.4082,20.596 L30.4082,27.003 L23.1822,27.003 L23.1822,35.696 L30.4082,35.696 L30.4082,58 L39.0432,58 L39.0432,58 Z" id="Stroke-1"/><path d="M54,58 L4,58 C1.791,58 0,56.209 0,54 L0,4 C0,1.791 1.791,0 4,0 L54,0 C56.209,0 58,1.791 58,4 L58,54 C58,56.209 56.209,58 54,58 L54,58 Z" id="Stroke-99" stroke-linejoin="round"/></g></g></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="facebook">+ <!-- Tabler outline glyph @brand-facebook (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/factory.svg b/public/js/vvvebjs/icons/factory.svgold mode 100755new mode 100644index bc0de6d..b3c26c2--- a/public/js/vvvebjs/icons/factory.svg+++ b/public/js/vvvebjs/icons/factory.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="80" x2="108" y1="176" y2="176"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="148" x2="176" y1="176" y2="176"/><polyline fill="none" points="216 216 216 136 168 136 104 88 104 136 40 88 40 216" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="16" x2="240" y1="216" y2="216"/><path d="M216,136,201,30.9a8,8,0,0,0-7.9-6.9H174.9a8,8,0,0,0-7.9,6.9l-13.5,94.3" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="factory">+ <!-- Tabler outline glyph @building-factory (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 21c1.147 -4.02 1.983 -8.027 2 -12h6c.017 3.973 .853 7.98 2 12" /> <path d="M12.5 13h4.5c.025 2.612 .894 5.296 2 8" /> <path d="M9 5a2.4 2.4 0 0 1 2 -1a2.4 2.4 0 0 1 2 1a2.4 2.4 0 0 0 2 1a2.4 2.4 0 0 0 2 -1a2.4 2.4 0 0 1 2 -1a2.4 2.4 0 0 1 2 1" /> <path d="M3 21l19 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/file-manager-layout.svg b/public/js/vvvebjs/icons/file-manager-layout.svgindex d0a1cb2..edf0392 100755--- a/public/js/vvvebjs/icons/file-manager-layout.svg+++ b/public/js/vvvebjs/icons/file-manager-layout.svg@@ -1 +1,6 @@-<svg viewBox="0 -64 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M63.633-5.914h394.856v394.857H63.633V12.034ZM88.31 16.521v349.002h167.335V16.521Zm190.698 0v351.183h156.08V16.521Z" fill="#999999" style="stroke-width:1.12175"/><path d="M88.311 109.535V16.521h167.335V202.55H88.311Z" fill="gray" fill-opacity=".329" style="fill:gray;fill-opacity:.33333334;stroke-width:.923722"/></svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="file manager layout">+ <!-- Tabler outline glyph @folders (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M9 3h3l2 2h5a2 2 0 0 1 2 2v7a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2" /> <path d="M17 16v2a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2h2" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/file.svg b/public/js/vvvebjs/icons/file.svgindex b767c61..d1be6c2 100644--- a/public/js/vvvebjs/icons/file.svg+++ b/public/js/vvvebjs/icons/file.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M200,224H56a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h96l56,56V216A8,8,0,0,1,200,224Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="152 32 152 88 208 88" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="file">+ <!-- Tabler outline glyph @file (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/file_text.svg b/public/js/vvvebjs/icons/file_text.svgindex 5ab45c7..f36ae90 100644--- a/public/js/vvvebjs/icons/file_text.svg+++ b/public/js/vvvebjs/icons/file_text.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M200,224H56a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h96l56,56V216A8,8,0,0,1,200,224Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="152 32 152 88 208 88" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="96" x2="160" y1="136" y2="136"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="96" x2="160" y1="168" y2="168"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="file text">+ <!-- Tabler outline glyph @file-text (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2" /> <path d="M9 9l1 0" /> <path d="M9 13l6 0" /> <path d="M9 17l6 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/filters.svg b/public/js/vvvebjs/icons/filters.svgold mode 100644new mode 100755index 5b159fe..bb7f31e--- a/public/js/vvvebjs/icons/filters.svg+++ b/public/js/vvvebjs/icons/filters.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="128" x2="128" y1="108" y2="216"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="128" x2="128" y1="40" y2="68"/><circle cx="128" cy="88" fill="none" r="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="200" x2="200" y1="188" y2="216"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="200" x2="200" y1="40" y2="148"/><circle cx="200" cy="168" fill="none" r="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="56" x2="56" y1="156" y2="216"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="56" x2="56" y1="40" y2="116"/><circle cx="56" cy="136" fill="none" r="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="filters">+ <!-- Tabler outline glyph @filter (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/flag.svg b/public/js/vvvebjs/icons/flag.svgold mode 100755new mode 100644index f944f3e..ef60652--- a/public/js/vvvebjs/icons/flag.svg+++ b/public/js/vvvebjs/icons/flag.svg@@ -1,3 +1,6 @@-<svg style="enable-background:new 0 0 512 512" viewBox="0 0 512 512" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">- <path d="M368 112c-11 1.4-24.9 3.5-39.7 3.5-23.1 0-44-5.7-65.2-10.2-21.5-4.6-43.7-9.3-67.2-9.3-46.9 0-62.8 10.1-64.4 11.2l-3.4 2.4V416h16V272.7c6-2.5 21.8-6.9 51.9-6.9 21.8 0 42.2 8.3 63.9 13 22 4.7 44.8 9.6 69.5 9.6 14.7 0 27.7-2 38.7-3.3 6-.7 11.3-1.4 16-2.2V109.5c-4.7.9-10.1 1.7-16.1 2.5zm0 157c-11 1.4-23.9 3.5-38.7 3.5-23.1 0-45-4.7-66.2-9.2-21.5-4.6-43.6-13.3-67.1-13.3-25.7 0-41.9 3-51.9 6V118.7c6-2.5 21.9-6.8 51.9-6.8 21.8 0 42.2 4.3 63.9 9 22 4.7 43.8 10.6 68.5 10.6 14.7 0 28.7-2 39.7-3.3L368 269z"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="flag">+ <!-- Tabler outline glyph @flag (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M5 5a5 5 0 0 1 7 0a5 5 0 0 0 7 0v9a5 5 0 0 1 -7 0a5 5 0 0 0 -7 0v-9" /> <path d="M5 21v-7" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/flipbox.svg b/public/js/vvvebjs/icons/flipbox.svgold mode 100755new mode 100644index c7d3c8d..0233dca--- a/public/js/vvvebjs/icons/flipbox.svg+++ b/public/js/vvvebjs/icons/flipbox.svg@@ -1,81 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="200mm"- height="200mm"- viewBox="0 0 200 200"- version="1.1"- id="svg14"- sodipodi:docname="flipbox-min (1).svg"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">- <metadata- id="metadata20">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs18" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview16"- showgrid="false"- inkscape:zoom="0.88305852"- inkscape:cx="656.47789"- inkscape:cy="51.282386"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg14" />- <g- stroke-miterlimit="6"- id="g12"- stroke-linejoin="round"- stroke-linecap="round"- stroke-width="7"- stroke="#000"- fill-rule="evenodd"- fill="#fff">- <path- d="M11.397 38.115V146.23l99.475-27.451V27.845zM11.397 146.231l77.677 35.287 101.63-38.561-79.832-24.177z"- id="path2"- style="stroke-width:3.96874997;stroke-miterlimit:6;stroke-dasharray:none;stroke-linejoin:round;stroke-linecap:round" />- <path- d="M110.872 27.845l79.832 9.045v106.067l-79.832-24.177z"- id="path4"- style="stroke-width:3.96874997;stroke-miterlimit:6;stroke-dasharray:none;stroke-linejoin:round;stroke-linecap:round" />- <path- d="M11.397 38.115l77.677 13.2 101.63-14.425-79.832-9.045z"- id="path6"- style="stroke-width:3.96874997;stroke-miterlimit:6;stroke-dasharray:none;stroke-linejoin:round;stroke-linecap:round" />- <path- d="M 88.965291,51.244924 V 181.44792 l 101.629979,-38.561 V 36.819924 Z"- id="path8"- style="fill:#eeeeee;fill-opacity:0.93300003;stroke:#000000;stroke-width:3.96875;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:6;stroke-dasharray:none;stroke-opacity:1"- inkscape:connector-curvature="0" />- <path- d="M11.397 38.115l77.677 13.2v130.203L11.397 146.23z"- id="path10"- style="stroke:#000000;stroke-opacity:1;stroke-width:3.96874997;stroke-miterlimit:6;stroke-dasharray:none;stroke-linejoin:round;stroke-linecap:round" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="flipbox">+ <!-- Tabler outline glyph @flip-horizontal (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 3l0 18" /> <path d="M16 7l0 10l5 0l-5 -10" /> <path d="M8 7l0 10l-5 0l5 -10" /></g></svg>diff --git a/public/js/vvvebjs/icons/folder.svg b/public/js/vvvebjs/icons/folder.svgold mode 100644new mode 100755index e738e89..48d086d--- a/public/js/vvvebjs/icons/folder.svg+++ b/public/js/vvvebjs/icons/folder.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M224,88V200.9a7.1,7.1,0,0,1-7.1,7.1H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.3a8.1,8.1,0,0,1,4.8,1.6l27.8,20.8a8.1,8.1,0,0,0,4.8,1.6H216A8,8,0,0,1,224,88Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="folder">+ <!-- Tabler outline glyph @folder (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/form.svg b/public/js/vvvebjs/icons/form.svgindex 5ed323f..217f39f 100755--- a/public/js/vvvebjs/icons/form.svg+++ b/public/js/vvvebjs/icons/form.svg@@ -1,66 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="164.44658mm"- height="135.4117mm"- viewBox="0 0 582.68474 479.80519"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="form.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.35"- inkscape:cx="958.49961"- inkscape:cy="393.90652"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="10"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="10"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-653.01497,-260.03377)">- <path- style="fill:#000000"- d="m 695.99753,702.79586 c -3.29033,-1.01058 -6.42025,-3.05298 -9.6911,-6.32383 -8.67255,-8.67254 -8.00984,8.43585 -7.71213,-199.09539 l 0.26316,-183.44881 2.97438,-5.37025 c 3.26844,-5.90119 7.52011,-9.64979 13.27359,-11.703 3.0929,-1.10375 45.17225,-1.34668 239.53411,-1.38286 209.50556,-0.039 236.19046,0.12672 239.44616,1.48705 5.8648,2.45046 9.611,5.84578 12.7973,11.59881 l 2.9744,5.37025 0.2632,183.44881 c 0.2976,207.50369 0.9581,190.42511 -7.6992,199.08249 -8.7173,8.71722 14.5485,7.97766 -248.49546,7.89905 -203.69032,-0.0609 -233.68107,-0.2578 -237.92841,-1.56232 z m 474.72357,-18.00439 2.6363,-2.63637 0,-182.30787 0,-182.30787 -2.4134,-2.80577 -2.4134,-2.80576 -234.17316,0 -234.17315,0 -2.41341,2.80576 -2.41342,2.80577 0,182.49198 0,182.49199 2.64602,2.45225 2.64603,2.45225 233.71763,0 233.71756,0 2.6364,-2.63636 z m -424.859,-118.9667 c -5.33966,-1.9541 -12.08777,-8.74985 -14.24953,-14.35014 -1.59912,-4.14269 -1.75511,-9.5684 -1.75511,-61.0468 l 0,-56.5 2.37298,-4.77734 c 3.03756,-6.11529 9.18859,-11.36649 15.51484,-13.24519 7.50743,-2.22947 365.71692,-2.22947 373.22432,0 6.3262,1.8787 12.4773,7.1299 15.5148,13.24519 l 2.373,4.77734 0,56.5 c 0,52.26633 -0.1365,56.85384 -1.822,61.22212 -2.2133,5.73583 -9.7925,12.8964 -15.4422,14.58908 -3.0067,0.90083 -48.5105,1.17173 -187.85176,1.11834 -158.72511,-0.0608 -184.43062,-0.27051 -187.87934,-1.5326 z m 374.0819,-17.7027 2.4134,-2.80577 0,-53.50998 c 0,-54.88046 -0.084,-56.15702 -3.9133,-59.09669 -2.315,-1.77734 -365.85837,-1.77734 -368.1733,0 -3.82813,2.93915 -3.91334,4.22231 -3.91334,58.92995 0,57.76408 -0.10743,56.58493 5.357,58.80091 1.19219,0.48346 82.82067,0.78437 183.97968,0.67819 l 181.83656,-0.19085 2.4133,-2.80576 z m -338.58654,-22.6538 0,-7.95956 8.25,-0.29044 8.25,-0.29044 0.26688,-25.75 0.26688,-25.75 -8.51688,0 -8.51688,0 0,-8.5 0,-8.5 25,0 25,0 0,8.5 0,8.5 -8.51688,0 -8.51688,0 0.26688,25.75 0.26688,25.75 8.25,0.29044 8.25,0.29044 0,7.95956 0,7.95956 -25,0 -25,0 0,-7.95956 z"- id="path4552"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="form">+ <!-- Tabler outline glyph @forms (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 3a3 3 0 0 0 -3 3v12a3 3 0 0 0 3 3" /> <path d="M6 3a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3" /> <path d="M13 7h7a1 1 0 0 1 1 1v8a1 1 0 0 1 -1 1h-7" /> <path d="M5 7h-1a1 1 0 0 0 -1 1v8a1 1 0 0 0 1 1h1" /> <path d="M17 12h.01" /> <path d="M13 12h.01" /></g></svg>diff --git a/public/js/vvvebjs/icons/grid_column.svg b/public/js/vvvebjs/icons/grid_column.svgindex 0256878..f7d5b28 100644--- a/public/js/vvvebjs/icons/grid_column.svg+++ b/public/js/vvvebjs/icons/grid_column.svg@@ -1 +1,6 @@-<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h256v256H0z"/><rect fill="none" height="97.872" rx="8" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" transform="rotate(90)" width="176" x="40" y="-173.872"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="grid column">+ <!-- Tabler outline glyph @layout-columns (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12" /> <path d="M12 4l0 16" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/grid_row.svg b/public/js/vvvebjs/icons/grid_row.svgold mode 100644new mode 100755index 67c54dd..adf2103--- a/public/js/vvvebjs/icons/grid_row.svg+++ b/public/js/vvvebjs/icons/grid_row.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><rect fill="none" height="56" rx="8" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" transform="translate(212 44) rotate(90)" width="176" x="-4" y="100"/><rect fill="none" height="56" rx="8" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" transform="translate(300 -44) rotate(90)" width="176" x="84" y="100"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="grid row">+ <!-- Tabler outline glyph @layout-rows (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12" /> <path d="M4 12l16 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/heading.svg b/public/js/vvvebjs/icons/heading.svgold mode 100644new mode 100755index a1e6a92..7ccaf9d--- a/public/js/vvvebjs/icons/heading.svg+++ b/public/js/vvvebjs/icons/heading.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="56" x2="56" y1="56" y2="200"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="200" x2="56" y1="128" y2="128"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="200" x2="200" y1="56" y2="200"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="heading">+ <!-- Tabler outline glyph @letter-case (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0" /> <path d="M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5" /> <path d="M3 13h7" /> <path d="M21 12v7" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/hr.svg b/public/js/vvvebjs/icons/hr.svgindex 7e0dc8f..55ae471 100755--- a/public/js/vvvebjs/icons/hr.svg+++ b/public/js/vvvebjs/icons/hr.svg@@ -1,66 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="155.46788mm"- height="90.225418mm"- viewBox="0 0 550.87046 319.69636"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="hr.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="1.4"- inkscape:cx="598.88886"- inkscape:cy="97.815052"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="20"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="20"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-88.307329,-127.06777)">- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:10;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 209.54403,272.67502 303.24089,-1.10754"- id="path4392"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="hr">+ <!-- Tabler outline glyph @minus (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M5 12l14 0" /></g></svg>diff --git a/public/js/vvvebjs/icons/icon-list.svg b/public/js/vvvebjs/icons/icon-list.svgold mode 100755new mode 100644index b8f9360..f71e67b--- a/public/js/vvvebjs/icons/icon-list.svg+++ b/public/js/vvvebjs/icons/icon-list.svg@@ -1,4 +1,6 @@-<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">- <path style="fill:none;fill-opacity:1;stroke:#000;stroke-width:.72249913;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" d="M8.446 12.38c0 .96-1.16 1.441-1.84.762-.678-.679-.198-1.84.763-1.84.595 0 1.077.483 1.077 1.078zM7.369 17.865c-.96 0-1.441 1.16-.762 1.84.678.679 1.84.198 1.84-.762 0-.596-.483-1.079-1.078-1.078zM7.369 4.572c-.96 0-1.441 1.16-.762 1.84.678.679 1.84.198 1.84-.762 0-.596-.483-1.078-1.078-1.078z" transform="translate(1.15 2.637)"/>- <path style="fill:#000;fill-opacity:1;stroke:none;stroke-width:.72249913;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" d="M23.098 11.763h-12.12c-.826 0-.826 1.238 0 1.238h12.12c.825 0 .825-1.238 0-1.238zM23.071 18.43h-12.12c-.826 0-.826 1.237 0 1.237h12.12c.826 0 .826-1.238 0-1.238zM10.95 6.335h12.121c.826 0 .826-1.238 0-1.238h-12.12c-.826 0-.826 1.238 0 1.238z" transform="translate(1.15 2.637)"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="icon list">+ <!-- Tabler outline glyph @list (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M9 6l11 0" /> <path d="M9 12l11 0" /> <path d="M9 18l11 0" /> <path d="M5 6l0 .01" /> <path d="M5 12l0 .01" /> <path d="M5 18l0 .01" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/icon.svg b/public/js/vvvebjs/icons/icon.svgold mode 100755new mode 100644index 2d749c0..ac5a840--- a/public/js/vvvebjs/icons/icon.svg+++ b/public/js/vvvebjs/icons/icon.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="512px" id="Layer_1" style="enable-background:new 0 0 512 512;" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M480,207H308.6L256,47.9L203.4,207H32l140.2,97.9L117.6,464L256,365.4L394.4,464l-54.7-159.1L480,207z M362.6,421.2 l-106.6-76l-106.6,76L192,298.7L84,224h131l41-123.3L297,224h131l-108,74.6L362.6,421.2z"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="icon">+ <!-- Tabler outline glyph @star (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/image-compare.svg b/public/js/vvvebjs/icons/image-compare.svgold mode 100755new mode 100644index a022cce..48933f1--- a/public/js/vvvebjs/icons/image-compare.svg+++ b/public/js/vvvebjs/icons/image-compare.svg@@ -1,72 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- id="svg2"- version="1.1"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"- width="512"- height="451.54492"- viewBox="0 0 511.99999 451.54493"- sodipodi:docname="image-compare.svg">- <metadata- id="metadata8">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs6" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1379"- id="namedview4"- showgrid="false"- fit-margin-top="50"- fit-margin-left="0"- fit-margin-right="0"- fit-margin-bottom="50"- inkscape:zoom="1.84375"- inkscape:cx="267.7197"- inkscape:cy="284.69382"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg2" />- <path- style="fill:#000000"- d="m 0,50 0,143.54492 0,208 256,0 256,0 0,-208 L 512,50 0,50 Z m 16,15.544922 240,0 240,0 0,159.999998 0,160 -240,0 -240,0 0,-160 0,-159.999998 z m 267.80078,56.244138 c -13.25249,0.19801 -26.45038,7.40757 -33.08984,21.53125 -2.7168,5.77928 -3.16394,7.84939 -3.17774,14.72461 -0.0102,5.07292 0.62171,9.82942 1.72852,13 3.53364,10.12244 13.38298,19.71767 23.60156,22.99219 2.96211,0.9492 7.52615,1.37807 12.63672,1.1875 14.22491,-0.53043 25.48789,-7.81501 31.75,-20.53516 2.97829,-6.04977 3.25,-7.40003 3.25,-16.14453 0,-8.76642 -0.26753,-10.08511 -3.28711,-16.21875 -6.85381,-13.92208 -20.15962,-20.73511 -33.41211,-20.53711 z m 0.1875,15.7168 c 6.6457,-0.15748 13.29519,2.85463 17.61719,9.24218 6.15816,9.10125 5.21659,19.08475 -2.5293,26.79688 -2.74616,2.73419 -6.22091,5.04368 -8.6914,5.77734 -5.15867,1.53195 -7.89226,1.48796 -12.625,-0.20117 -5.59382,-1.99646 -8.47064,-4.18042 -11.47266,-8.71679 -3.70345,-5.59628 -4.37288,-14.82342 -1.48438,-20.44141 4.12728,-8.02732 11.65375,-12.27855 19.18555,-12.45703 z m -92.09766,39.03906 c -0.54728,0 -110.24906,140.21601 -116.552729,148.97266 -0.97653,1.35654 -0.25696,2.35733 4.5,6.25781 3.114319,2.5536 5.887109,4.65301 6.162109,4.66601 0.275,0.013 24.28502,-30.60094 53.35547,-68.03125 29.07045,-37.4303 53.17985,-67.67353 53.57617,-67.20898 0.39631,0.46455 11.51611,13.89375 24.71094,29.84375 53.94027,65.20334 83.6797,101.07108 84.8164,102.29492 0.96951,1.04385 2.30083,0.38945 6.8711,-3.37304 3.11817,-2.56705 5.66615,-4.94979 5.66015,-5.29493 -0.006,-0.34514 -5.40586,-7.14804 -12,-15.11914 C 296.3961,301.58162 291,294.82903 291,294.54687 c 0,-0.28217 14.17477,-14.68327 31.5,-32.00195 l 31.5,-31.48828 36.26953,36.25781 36.26953,36.25977 5.46289,-5.53125 5.46289,-5.53125 -41.73046,-41.73047 -41.73047,-41.73047 -36.75196,36.74219 L 280.5,282.5332 236.56055,229.53906 c -24.16717,-29.1466 -44.26868,-52.99414 -44.66993,-52.99414 z"- id="path4173"- inkscape:connector-curvature="0" />- <path- style="fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:30;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="M 261.53406,19.341523 V 433.71442"- id="path812-3"- inkscape:connector-curvature="0" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="M 236.47458,19.070337 V 433.44323"- id="path812"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="image compare">+ <!-- Tabler outline glyph @git-compare (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M16 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /> <path d="M11 6h5a2 2 0 0 1 2 2v8" /> <path d="M14 9l-3 -3l3 -3" /> <path d="M13 18h-5a2 2 0 0 1 -2 -2v-8" /> <path d="M10 15l3 3l-3 3" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/image.svg b/public/js/vvvebjs/icons/image.svgindex 2a7a80c..9e5b8e4 100644--- a/public/js/vvvebjs/icons/image.svg+++ b/public/js/vvvebjs/icons/image.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><rect fill="none" height="160" rx="8" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" width="192" x="32" y="48"/><path d="M32,168l50.3-50.3a8,8,0,0,1,11.4,0l44.6,44.6a8,8,0,0,0,11.4,0l20.6-20.6a8,8,0,0,1,11.4,0L224,184" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><circle cx="156" cy="100" r="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="image">+ <!-- Tabler outline glyph @photo (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M15 8h.01" /> <path d="M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12" /> <path d="M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5" /> <path d="M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/images.svg b/public/js/vvvebjs/icons/images.svgindex dfa4000..ba70f3b 100755--- a/public/js/vvvebjs/icons/images.svg+++ b/public/js/vvvebjs/icons/images.svg@@ -1,52 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- viewBox="0 0 32 32"- version="1.1"- id="svg4"- sodipodi:docname="images.svg"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">- <metadata- id="metadata10">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs8" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview6"- showgrid="false"- inkscape:zoom="7.375"- inkscape:cx="16.271186"- inkscape:cy="16"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg4" />- <path- d="M 2 5 L 2 23 L 6 23 L 6 27 L 30 27 L 30 9 L 26 9 L 26 5 Z M 4 7 L 24 7 L 24 21 L 4 21 Z M 6 9 L 6 19 L 22 19 L 22 9 Z M 8 11 L 20 11 L 20 17 L 8 17 Z M 26 11 L 28 11 L 28 25 L 8 25 L 8 23 L 26 23 Z"- id="path2"- style="stroke:#ffffff;stroke-opacity:1" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="images">+ <!-- Tabler outline glyph @photo (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M15 8h.01" /> <path d="M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v12a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3v-12" /> <path d="M3 16l5 -5c.928 -.893 2.072 -.893 3 0l5 5" /> <path d="M14 14l1 -1c.928 -.893 2.072 -.893 3 0l3 3" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/instagram.svg b/public/js/vvvebjs/icons/instagram.svgindex 0d98c5b..200f21d 100755--- a/public/js/vvvebjs/icons/instagram.svg+++ b/public/js/vvvebjs/icons/instagram.svg@@ -1,62 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- enable-background="new 0 0 512 512"- height="396"- version="1.1"- viewBox="0 0 396 396"- width="396"- xml:space="preserve"- id="svg13"- sodipodi:docname="instagram.svg"- inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"><metadata- id="metadata19"><rdf:RDF><cc:Work- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs- id="defs17" /><sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview15"- showgrid="false"- fit-margin-top="0"- fit-margin-left="0"- fit-margin-right="0"- fit-margin-bottom="0"- inkscape:zoom="2.6074563"- inkscape:cx="185.34101"- inkscape:cy="276.94744"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg13" /><g- id="Ebene_3"- transform="translate(-58,-58)" /><g- id="Ebene_1"- transform="translate(-58,-58)" /><g- id="Ebene_2"- transform="translate(-58,-58)"><g- id="g10"><path- d="m 394.9302,137.18461 c 7.07316,0 12.828,-5.75484 12.828,-12.828 0,-7.07317 -5.75484,-12.82801 -12.828,-12.82801 -7.07317,0 -12.82801,5.75484 -12.82801,12.82801 0,7.07316 5.75484,12.828 12.82801,12.828 z"- id="path4"- inkscape:connector-curvature="0"- style="stroke-width:1.97353947" /><path- d="M 416,58 H 96 C 75.047,58 58,75.047 58,96 v 320 c 0,20.953 17.047,38 38,38 h 320 c 20.953,0 38,-17.047 38,-38 V 96 C 454,75.047 436.953,58 416,58 Z m 26,38 v 90 H 330.117 C 311.51,166.309 285.167,154 256,154 c -29.167,0 -55.51,12.309 -74.117,32 H 166 V 70 h 250 c 14.337,0 26,11.664 26,26 z m -186,70 c 49.626,0 90,40.374 90,90 0,49.626 -40.374,90 -90,90 -49.626,0 -90,-40.374 -90,-90 0,-49.626 40.374,-90 90,-90 z M 118,186 V 70 h 36 V 186 Z M 96,70 h 10 V 186 H 70 V 96 C 70,81.664 81.663,70 96,70 Z M 416,442 H 96 C 81.663,442 70,430.336 70,416 V 198 H 172.145 C 160.712,214.479 154,234.469 154,256 c 0,56.243 45.757,102 102,102 56.243,0 102,-45.757 102,-102 0,-21.531 -6.712,-41.521 -18.145,-58 H 442 v 218 c 0,14.336 -11.663,26 -26,26 z"- id="path6"- inkscape:connector-curvature="0" /><path- d="m 256,310 c 29.775,0 54,-24.224 54,-54 0,-29.776 -24.225,-54 -54,-54 -29.775,0 -54,24.224 -54,54 0,29.776 24.225,54 54,54 z m 0,-96 c 23.159,0 42,18.841 42,42 0,23.159 -18.841,42 -42,42 -23.159,0 -42,-18.841 -42,-42 0,-23.159 18.841,-42 42,-42 z"- id="path8"- inkscape:connector-curvature="0" /></g></g></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="instagram">+ <!-- Tabler outline glyph @brand-instagram (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10" /> <path d="M8.5 12a3.5 3.5 0 1 0 7 0a3.5 3.5 0 0 0 -7 0" /> <path d="M17 7v.01" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/jumbotron.svg b/public/js/vvvebjs/icons/jumbotron.svgindex 6bb1035..5920836 100755--- a/public/js/vvvebjs/icons/jumbotron.svg+++ b/public/js/vvvebjs/icons/jumbotron.svg@@ -1,66 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="164.51341mm"- height="128.23308mm"- viewBox="0 0 582.92154 454.36916"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="jumbotron.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.98994948"- inkscape:cx="193.52265"- inkscape:cy="91.275997"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="10"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="10"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-1379.6937,-525.05662)">- <path- style="fill:#000000"- d="m 1416.7259,942.41828 c -1.9305,-1.9305 -2.0068,-3.8223 -0.2142,-5.31 0.9939,-0.8249 34.6537,-1.0584 125.75,-0.8725 l 124.3928,0.2539 0.3268,2.3051 c 0.7797,5.5003 8.1493,5.1949 -125.3778,5.1949 -110.7632,0 -123.466,-0.1598 -124.8776,-1.5714 z m 0,-36 c -1.9946,-1.9946 -1.9946,-3.8626 0,-5.8572 1.4203,-1.4202 25.8918,-1.5714 254.4286,-1.5714 228.5368,0 253.0083,0.1512 254.4286,1.5715 0.8643,0.8642 1.5714,2.1821 1.5714,2.9285 0,0.7465 -0.7071,2.0643 -1.5714,2.9286 -1.4203,1.4203 -25.8918,1.5714 -254.4286,1.5714 -228.5368,0 -253.0083,-0.1511 -254.4286,-1.5714 z m -0.596,-35.9582 c -0.9707,-1.1696 -1.0045,-2.111 -0.1439,-4 l 1.1256,-2.4704 254.0429,0 254.0429,0 1.1256,2.4704 c 0.8606,1.889 0.8268,2.8304 -0.1439,4 -1.1333,1.3655 -28.501,1.5296 -255.0246,1.5296 -226.5236,0 -253.8913,-0.1641 -255.0246,-1.5296 z m 0.2265,-35.6684 c -1.597,-1.5971 -1.5246,-4.2893 0.1529,-5.6815 0.9971,-0.8274 68.3721,-1.0578 255.141,-0.8724 240.4567,0.2387 253.8442,0.3438 254.8901,2.0019 0.8052,1.2765 0.8052,2.2236 0,3.5 -1.0459,1.6581 -14.4407,1.7633 -255.0429,2.002 -196.6823,0.1951 -254.2101,-0.019 -255.1411,-0.95 z m 1.3731,-61.8952 -2.6027,-3.0931 0.2639,-102.3793 0.2638,-102.3792 2.2778,-2.2776 2.2778,-2.2776 250.9444,0 250.9444,0 2.2778,2.2776 2.2778,2.2776 0.2638,102.3792 0.2639,102.3793 -2.6027,3.0931 -2.6028,3.0932 -250.8222,0 -250.8222,0 -2.6028,-3.0932 z m 491.1803,-104.6568 -0.2553,-89.75 -237.5,0 -237.5,0 -0.2553,89.75 -0.2554,89.75 238.0107,0 238.0107,0 -0.2554,-89.75 z"- id="path4177"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="jumbotron">+ <!-- Tabler outline glyph @presentation (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 4l18 0" /> <path d="M4 4v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-10" /> <path d="M12 16l0 4" /> <path d="M9 20l6 0" /> <path d="M8 12l3 -3l2 2l3 -3" /></g></svg>diff --git a/public/js/vvvebjs/icons/label.svg b/public/js/vvvebjs/icons/label.svgindex cfc37ae..4913a3c 100755--- a/public/js/vvvebjs/icons/label.svg+++ b/public/js/vvvebjs/icons/label.svg@@ -1,73 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="58.083462mm"- height="48.229645mm"- viewBox="0 0 205.80754 170.89244"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="label.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.98994949"- inkscape:cx="144.84593"- inkscape:cy="82.710532"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="20"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="20"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-56.810231,-366.62162)">- <text- xml:space="preserve"- style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"- x="88.571426"- y="466.64792"- id="text3338"- sodipodi:linespacing="125%"><tspan- sodipodi:role="line"- id="tspan3340"- x="88.571426"- y="466.64792"- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold'">LABEL</tspan></text>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="label">+ <!-- Tabler outline glyph @tag (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M6.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /> <path d="M3 6v5.172a2 2 0 0 0 .586 1.414l7.71 7.71a2.41 2.41 0 0 0 3.408 0l5.592 -5.592a2.41 2.41 0 0 0 0 -3.408l-7.71 -7.71a2 2 0 0 0 -1.414 -.586h-5.172a3 3 0 0 0 -3 3" /></g></svg>diff --git a/public/js/vvvebjs/icons/left-column-layout.svg b/public/js/vvvebjs/icons/left-column-layout.svgindex 56b3624..1be9847 100755--- a/public/js/vvvebjs/icons/left-column-layout.svg+++ b/public/js/vvvebjs/icons/left-column-layout.svg@@ -1 +1,6 @@-<svg viewBox="0 -64 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M61.812-4.921h394.856v394.856H61.812V13.027ZM86.49 17.514v349.002h167.336V17.514Zm190.698 0v351.182H433.27V17.514Z" fill="#999999" style="stroke-width:1.12175"/><path d="M86.49 190.924V15.334h167.336v351.182H86.49Z" fill="gray" fill-opacity=".329" style="fill:gray;fill-opacity:.27058825;stroke-width:1.26917"/></svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="left column layout">+ <!-- Tabler outline glyph @layout-sidebar (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12" /> <path d="M9 4l0 16" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/link.svg b/public/js/vvvebjs/icons/link.svgold mode 100644new mode 100755index c5b8d46..e136d28--- a/public/js/vvvebjs/icons/link.svg+++ b/public/js/vvvebjs/icons/link.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="94.1" x2="161.9" y1="161.9" y2="94"/><path d="M145,178.9l-28.3,28.3a48,48,0,0,1-67.9-67.9L77.1,111" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M178.9,145l28.3-28.3a48,48,0,0,0-67.9-67.9L111,77.1" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="link">+ <!-- Tabler outline glyph @link (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M9 15l6 -6" /> <path d="M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464" /> <path d="M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/list.svg b/public/js/vvvebjs/icons/list.svgold mode 100755new mode 100644index 69299ab..e8166ce--- a/public/js/vvvebjs/icons/list.svg+++ b/public/js/vvvebjs/icons/list.svg@@ -1,7 +1,6 @@-<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">- <path fill="none" d="M0 0h256v256H0z"/>- <path fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" d="M88 64h128M88 128h128M88 192h128"/>- <circle cx="44" cy="128" r="8"/>- <circle cx="44" cy="64" r="8"/>- <circle cx="44" cy="192" r="8"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="list">+ <!-- Tabler outline glyph @list (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M9 6l11 0" /> <path d="M9 12l11 0" /> <path d="M9 18l11 0" /> <path d="M5 6l0 .01" /> <path d="M5 12l0 .01" /> <path d="M5 18l0 .01" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/list_group.svg b/public/js/vvvebjs/icons/list_group.svgindex 02f32d0..050fe65 100755--- a/public/js/vvvebjs/icons/list_group.svg+++ b/public/js/vvvebjs/icons/list_group.svg@@ -1,66 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="164.44295mm"- height="184.47113mm"- viewBox="0 0 582.67186 653.63784"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="list_group.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.98994948"- inkscape:cx="913.3468"- inkscape:cy="515.40298"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="20"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="20"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-659.86944,-547.8843)">- <path- style="fill:#000000"- d="m 745.69471,1129.0745 c -19.3659,-4.1098 -36.2739,-17.8223 -44.7352,-36.2804 -6.125,-13.3616 -5.823,-1.2803 -5.5315,-221.33686 l 0.2667,-201.23411 2.3321,-6.5 c 6.2373,-17.38463 17.3545,-30.41714 32.2323,-37.78531 15.5524,-7.70227 -0.5198,-7.17996 220.9356,-7.17996 221.25699,0 205.53259,-0.50545 220.96619,7.1028 14.8268,7.30921 25.8983,20.32832 32.1984,37.86247 l 2.3354,6.5 0.2781,200.5 c 0.3088,222.62587 0.6914,209.05167 -6.299,223.49997 -8.8383,18.2678 -24.9271,30.8264 -44.7327,34.9174 -6.8458,1.414 -28.7349,1.5739 -205.45419,1.5011 -170.9354,-0.071 -198.7427,-0.2832 -204.7922,-1.5671 z m 410.99999,-33.3275 c 6.3748,-3.157 12.3669,-9.1491 15.5239,-15.5239 l 2.4761,-5 0.284,-52.25 0.2839,-52.24997 -224.03389,0 -224.034,0 0,50.46507 c 0,55.391 -0.01,55.3001 6.1527,64.2565 3.3749,4.9056 10.3805,10.023 16.2436,11.8653 3.301,1.0372 43.031,1.2526 203.1037,1.1013 l 198.99999,-0.1882 5,-2.4761 z m 18.5,-221.02387 0,-64 -223.99999,0 -224,0 0,64 0,64 224,0 223.99999,0 0,-64 z m -0.216,-148.25 -0.284,-52.25 -2.4476,-4.97392 c -3.1218,-6.34409 -9.2344,-12.45663 -15.5785,-15.57848 l -4.9739,-2.4476 -200.49999,0 -200.5,0 -4.9739,2.4476 c -6.3441,3.12185 -12.4566,9.23439 -15.5785,15.57848 l -2.4476,4.97392 -0.284,52.25 -0.2839,52.25 224.0679,0 224.06789,0 -0.2839,-52.25 z"- id="path4286"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="list group">+ <!-- Tabler outline glyph @list (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M9 6l11 0" /> <path d="M9 12l11 0" /> <path d="M9 18l11 0" /> <path d="M5 6l0 .01" /> <path d="M5 12l0 .01" /> <path d="M5 18l0 .01" /></g></svg>diff --git a/public/js/vvvebjs/icons/logo.svg b/public/js/vvvebjs/icons/logo.svgold mode 100755new mode 100644index a8e07c8..4b0bd47--- a/public/js/vvvebjs/icons/logo.svg+++ b/public/js/vvvebjs/icons/logo.svg@@ -45,7 +45,7 @@id="circle4"fill="none"stroke="#000"- stroke-width="1"+ stroke-width="1.25"stroke-linecap="round"stroke-linejoin="round"stroke-miterlimit="10"@@ -56,7 +56,7 @@id="path6"fill="none"stroke="#000"- stroke-width="1"+ stroke-width="1.25"stroke-linecap="round"stroke-linejoin="round"stroke-miterlimit="10"@@ -67,7 +67,7 @@id="path8"fill="none"stroke="#000"- stroke-width="1"+ stroke-width="1.25"stroke-linecap="round"stroke-linejoin="round"stroke-miterlimit="10"diff --git a/public/js/vvvebjs/icons/lottie.svg b/public/js/vvvebjs/icons/lottie.svgindex 555f5bb..c3f2b69 100644--- a/public/js/vvvebjs/icons/lottie.svg+++ b/public/js/vvvebjs/icons/lottie.svg@@ -1 +1,6 @@-<svg width="180" height="180" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient x1=".003" y1=".103" x2=".954" y2=".725" id="a"><stop stop-color="#2BEAED" offset="0%"/><stop stop-color="#0FCCCE" offset="100%"/></linearGradient></defs><g transform="translate(13.637 13.58)" style="stroke-width:3;stroke-miterlimit:4;stroke-dasharray:none" fill="none" fill-rule="evenodd"><rect fill="url(#a)" width="156.235" height="156.644" rx="12.688" style="fill:none;fill-opacity:1;stroke:#000;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/><path d="M119.052 30.826c4.285.634 7.243 4.628 6.61 8.918-.632 4.292-4.618 7.26-8.905 6.624-7.591-1.124-18.963 10.697-31.695 35.003-16.254 31.03-31.382 45.815-47.31 44.635-4.32-.32-7.562-4.088-7.243-8.413.319-4.326 4.079-7.576 8.4-7.256 7.865.583 19.418-11.742 32.264-36.266 16.357-31.229 31.691-45.644 47.879-43.245Z" fill="#FFF" style="fill:none;stroke:#000;stroke-width:5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/></g></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="lottie">+ <!-- Tabler outline glyph @player-play (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M7 4v16l13 -8l-13 -8" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/mail.svg b/public/js/vvvebjs/icons/mail.svgold mode 100755new mode 100644index 927bca0..1cac144--- a/public/js/vvvebjs/icons/mail.svg+++ b/public/js/vvvebjs/icons/mail.svg@@ -1,5 +1,6 @@-<?xml version="1.0" ?><svg style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">- .st0{display:none;}- .st1{display:inline;}- .st2{fill:none;stroke:#000;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}-</style><g class="st0" id="Layer_1"/><g id="Layer_2"><path class="st2" d="M20.1,40l38.1,31.5c3.3,2.8,8.2,2.8,11.5,0L107.9,40"/><path class="st2" d="M107.9,85.6V36.1c0-2.1-1.7-3.7-3.7-3.7H23.9c-2.1,0-3.7,1.7-3.7,3.7v55.7c0,2.1,1.7,3.7,3.7,3.7h84"/></g></svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="mail">+ <!-- Tabler outline glyph @mail (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10" /> <path d="M3 7l9 6l9 -6" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/manufacturers.svg b/public/js/vvvebjs/icons/manufacturers.svgold mode 100755new mode 100644index 69eeeaa..6f62113--- a/public/js/vvvebjs/icons/manufacturers.svg+++ b/public/js/vvvebjs/icons/manufacturers.svg@@ -1,3 +1,6 @@-<svg viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">- <path clip-rule="evenodd" d="M6 47V20a4 4 0 0 1 4-4v-4a2 2 0 0 1 2-2h2V2a1 1 0 1 1 2 0v8h2a2 2 0 0 1 2 2v4a4 4 0 0 1 4 4v8h7v-6h4v-3h6v3h1v25H6zm12-34a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v3h6v-3zm4 7a2 2 0 0 0-2-2H10a2 2 0 0 0-2 2v25h14V20zm9 10h-7v15h7V30zm9-6h-7v21h7V24zm-4 3h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0 6h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0 6h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm-9-6h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm0 6h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1zm-9 3h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1zm0-6h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1zm0-6h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1zm0-6h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1zm-5 18h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1zm0-6h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1zm0-6h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1zm0-6h-1a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1z" fill-rule="evenodd"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="manufacturers">+ <!-- Tabler outline glyph @building-warehouse (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 21v-13l9 -4l9 4v13" /> <path d="M13 13h4v8h-10v-6h6" /> <path d="M13 21v-9a1 1 0 0 0 -1 -1h-2a1 1 0 0 0 -1 1v3" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/map.svg b/public/js/vvvebjs/icons/map.svgold mode 100644new mode 100755index 1d06910..4a88837--- a/public/js/vvvebjs/icons/map.svg+++ b/public/js/vvvebjs/icons/map.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><polyline fill="none" points="96 184 32 200 32 56 96 40" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polygon fill="none" points="160 216 96 184 96 40 160 72 160 216" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="160 72 224 56 224 200 160 216" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="map">+ <!-- Tabler outline glyph @map (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 7l6 -3l6 3l6 -3v13l-6 3l-6 -3l-6 3v-13" /> <path d="M9 4v13" /> <path d="M15 7v13" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/menu.svg b/public/js/vvvebjs/icons/menu.svgold mode 100755new mode 100644index f0ec2d9..265834c--- a/public/js/vvvebjs/icons/menu.svg+++ b/public/js/vvvebjs/icons/menu.svg@@ -1,66 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="90.815338mm"- height="170.57832mm"- viewBox="0 0 321.78665 604.41139"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="navbar.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.7"- inkscape:cx="760.62432"- inkscape:cy="535.36161"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="50"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="50"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-96.80657,-658.99298)">- <path- style="fill:#000000"- d="m 134.6999,1084.1985 c -1.61905,-1.619 -2,-3.3333 -2,-9 0,-12.3121 -14.91031,-11 125.00001,-11 139.9103,0 125,-1.3121 125,11 0,12.3121 14.9103,11 -125,11 -119.66668,0 -121.02205,-0.022 -123.00001,-2 z m 2.31537,-116.00064 c -3.24458,-1.31666 -4.31537,-4.1357 -4.31537,-11.36102 0,-5.82359 0.2717,-6.70688 2.63486,-8.56574 2.63229,-2.07056 2.75143,-2.07258 122.36515,-2.07258 119.6137,0 119.7329,0.002 122.3652,2.07258 2.386,1.8769 2.6348,2.71617 2.6348,8.88922 0,5.22146 -0.4473,7.36908 -1.9115,9.17742 l -1.9116,2.36078 -119.8384,0.19293 c -67.86627,0.10926 -120.78595,-0.19154 -122.02314,-0.69359 z m -2.12681,-112.03831 c -1.84654,-1.72031 -2.18856,-3.1268 -2.18856,-9 0,-12.26619 -14.88402,-10.96104 125.00001,-10.96104 119.6667,0 121.0221,0.022 123,2 1.6093,1.60932 2,3.33333 2,8.82569 0,5.84184 -0.3336,7.13908 -2.3144,9 l -2.3145,2.17431 -120.497,0 c -119.88212,0 -120.50815,-0.0104 -122.68555,-2.03896 z"- id="path3345"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="menu">+ <!-- Tabler outline glyph @menu-2 (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 6l16 0" /> <path d="M4 12l16 0" /> <path d="M4 18l16 0" /></g></svg>diff --git a/public/js/vvvebjs/icons/minus1.svg b/public/js/vvvebjs/icons/minus1.svgindex 0e65a86..0ea4050 100755--- a/public/js/vvvebjs/icons/minus1.svg+++ b/public/js/vvvebjs/icons/minus1.svg@@ -1,60 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- style="enable-background:new 0 0 48 48;"- version="1.1"- viewBox="0 0 48 48"- xml:space="preserve"- id="svg14"- sodipodi:docname="minus1.svg"- inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"><metadata- id="metadata20"><rdf:RDF><cc:Work- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs- id="defs18" /><sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="725"- inkscape:window-height="480"- id="namedview16"- showgrid="false"- inkscape:zoom="27.812867"- inkscape:cx="36.615642"- inkscape:cy="23.286846"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="0"- inkscape:current-layer="svg14"- showguides="false" /><style- type="text/css"- id="style2">- .st0{display:none;}- .st1{fill:none;stroke:#303030;stroke-width:0.7;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}- .st2{fill:#303030;}-</style><g- class="st0"- id="Padding__x26__Artboard" /><g- id="Icons"><path- class="st1"- d="M30.1311,35.0978H17.8689c-2.74303,0-4.9667-2.22366-4.9667-4.9667V17.8689 c0-2.74303,2.22367-4.9667,4.9667-4.9667H30.1311c2.74303,0,4.9667,2.22367,4.9667,4.9667V30.1311 C35.0978,32.87414,32.87414,35.0978,30.1311,35.0978z"- id="path5" /><g- id="g11"><line- class="st1"- x1="16.477573"- x2="32.07962"- y1="24"- y2="24"- id="line9"- style="fill:none;stroke:#303030;stroke-width:0.99607682;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" /></g></g></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="minus1">+ <!-- Tabler outline glyph @minus (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M5 12l14 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/minus_round.svg b/public/js/vvvebjs/icons/minus_round.svgindex 4ec870a..7fb7eec 100755--- a/public/js/vvvebjs/icons/minus_round.svg+++ b/public/js/vvvebjs/icons/minus_round.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 512 512" height="512px" id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M256.142,6.652c-137.533,0-249,111.467-249,249c0,137.534,111.467,249,249,249 c137.534,0,249-111.466,249-249C505.142,118.12,393.675,6.652,256.142,6.652z M256.142,484.732 c-126.309,0-229.08-102.77-229.08-229.08c0-126.309,102.771-229.08,229.08-229.08c126.309,0,229.08,102.771,229.08,229.08 C485.222,381.962,382.45,484.732,256.142,484.732z" fill="#37404D"/><rect fill="#37404D" height="19.92" width="258.298" x="127.323" y="245.692"/></g></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="minus round">+ <!-- Tabler outline glyph @circle-minus (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" /> <path d="M9 12l6 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/navbar.svg b/public/js/vvvebjs/icons/navbar.svgindex f0ec2d9..118ba61 100755--- a/public/js/vvvebjs/icons/navbar.svg+++ b/public/js/vvvebjs/icons/navbar.svg@@ -1,66 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="90.815338mm"- height="170.57832mm"- viewBox="0 0 321.78665 604.41139"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="navbar.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.7"- inkscape:cx="760.62432"- inkscape:cy="535.36161"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="50"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="50"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-96.80657,-658.99298)">- <path- style="fill:#000000"- d="m 134.6999,1084.1985 c -1.61905,-1.619 -2,-3.3333 -2,-9 0,-12.3121 -14.91031,-11 125.00001,-11 139.9103,0 125,-1.3121 125,11 0,12.3121 14.9103,11 -125,11 -119.66668,0 -121.02205,-0.022 -123.00001,-2 z m 2.31537,-116.00064 c -3.24458,-1.31666 -4.31537,-4.1357 -4.31537,-11.36102 0,-5.82359 0.2717,-6.70688 2.63486,-8.56574 2.63229,-2.07056 2.75143,-2.07258 122.36515,-2.07258 119.6137,0 119.7329,0.002 122.3652,2.07258 2.386,1.8769 2.6348,2.71617 2.6348,8.88922 0,5.22146 -0.4473,7.36908 -1.9115,9.17742 l -1.9116,2.36078 -119.8384,0.19293 c -67.86627,0.10926 -120.78595,-0.19154 -122.02314,-0.69359 z m -2.12681,-112.03831 c -1.84654,-1.72031 -2.18856,-3.1268 -2.18856,-9 0,-12.26619 -14.88402,-10.96104 125.00001,-10.96104 119.6667,0 121.0221,0.022 123,2 1.6093,1.60932 2,3.33333 2,8.82569 0,5.84184 -0.3336,7.13908 -2.3144,9 l -2.3145,2.17431 -120.497,0 c -119.88212,0 -120.50815,-0.0104 -122.68555,-2.03896 z"- id="path3345"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="navbar">+ <!-- Tabler outline glyph @layout-navbar (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12" /> <path d="M4 9l16 0" /></g></svg>diff --git a/public/js/vvvebjs/icons/page.svg b/public/js/vvvebjs/icons/page.svgnew file mode 100644index 0000000..83a69d4--- /dev/null+++ b/public/js/vvvebjs/icons/page.svg@@ -0,0 +1,6 @@+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="page">+ <!-- Tabler outline glyph @file (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M14 3v4a1 1 0 0 0 1 1h4" /> <path d="M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/pagination.svg b/public/js/vvvebjs/icons/pagination.svgindex 6a8fae1..4ac5764 100755--- a/public/js/vvvebjs/icons/pagination.svg+++ b/public/js/vvvebjs/icons/pagination.svg@@ -1,3 +1,6 @@-<svg xmlns="http://www.w3.org/2000/svg" width="430.802" height="371.076" viewBox="0 0 403.877 347.884">- <path style="fill:#000" d="M1168.572 599.734c-143.95 0-149.63.069-153 1.864-4.898 2.609-8.816 6.456-11.341 11.136l-2.159 4v40.5c0 17.28.06 60.614 1.864 64 1.769 3.322 3.988 6.083 6.636 8.278l.01-55.028c0-1.569.01-2.203.01-3.687v58.724c2.588 2.142 5.586 3.743 8.983 4.786 1.02.313 38.626.54 91.004.6v.113h7.984v-.11c16.225.013 33.325.016 51.5-.006l48.5-.056v.171h8.021v-.18l91.5-.105 4-2.158a26.386 26.386 0 0 0 4.485-3.076c0-.003.01-.005.01-.008v-.002a28.022 28.022 0 0 0 6.639-8.256c1.803-3.386 1.865-31.063 1.865-64v-40.5l-2.16-4c-2.526-4.68-6.441-8.528-11.34-11.137-3.37-1.795-9.05-1.863-153-1.863zM1326.568 729.5v5.52zm-100.005-121.268 45.25.008c42.643.006 45.413.115 48.107 1.891 1.572 1.037 3.708 3.172 4.744 4.744 1.639 2.485 1.843 7.099 1.875 48.865-.032 29.642-.251 53.39-1.875 55.852-1.036 1.572-3.172 3.708-4.744 4.744h.01c-2.29 1.51-10.76 1.8-93.365 1.86v-56.463zm-116 .002v117.961c-82.592-.059-91.06-.35-93.35-1.859-1.572-1.037-3.706-3.172-4.742-4.744-1.66-2.518-1.853-26.12-1.88-57.705.037-39.88.26-44.566 1.872-47.012 1.036-1.572 3.172-3.706 4.744-4.742 2.694-1.776 5.466-1.887 48.11-1.893zm8 0h100V726.2c-15.702.008-28.58.022-49.995.022-21.42 0-34.302-.013-50.005-.022v-56.465zm159.595 35.205a25.752 25.752 0 0 0-1.86.055c-7.101.456-10.397 2.667-13.653 9.166-2.658 5.304-2.126 7.815 1.775 8.395 1.712.254 2.535-.573 4.018-4.032 2.592-6.048 8.196-8.4 13.439-5.64 2.958 1.557 3.652 2.792 3.67 6.53.018 3.806-3.823 7.321-7.998 7.321-3.152 0-5.308 2.097-4.81 4.68.236 1.23 1.919 2.128 5.46 2.914 6.28 1.395 7.245 1.966 8.385 4.965 2.132 5.607-3.094 11.441-10.25 11.441-4.28 0-7.39-2.22-9.559-6.826-1.311-2.786-2.332-3.674-4.222-3.674-5.757 0-2.11 11.806 4.77 15.438 2.305 1.217 5.766 1.99 9.029 2.017 14.872.125 23.438-14.4 14.652-24.841l-2.557-3.04 2.307-3.122c1.714-2.32 2.29-4.393 2.234-8.063-.126-8.49-5.758-13.613-14.83-13.684zm-109.078.004c-3.551.025-7.162.878-9.31 2.47-6.292 4.66-9.316 13.122-5.432 15.2 2.281 1.221 5.225-.353 5.225-2.795 0-5.62 8.163-9.602 13.755-6.71 3.287 1.699 4.245 3.388 4.245 7.486 0 3.625-1.443 5.556-15.19 20.363-6.497 6.998-11.81 13.096-11.81 13.55 0 .456.539 1.366 1.199 2.026.832.832 6.036 1.202 16.965 1.202 14.904 0 15.824-.114 16.869-2.065 2.119-3.96-.208-4.935-11.77-4.935h-10.492l8.627-9.067c10.076-10.588 12.602-14.944 12.602-21.746 0-5.92-2.934-10.855-8.022-13.494-1.974-1.024-4.699-1.504-7.46-1.485zm-108.039.079c-.813.047-1.75.562-3.107 1.625-4.674 3.66-13.371 12.179-13.371 13.095 0 1.123 2.9 3.992 4.035 3.992.491 0 2.431-1.35 4.31-3 1.88-1.65 3.696-3 4.035-3 .34 0 .62 7.401.62 16.448v16.447l-5.243.303c-5.375.31-6.776 1.71-5.375 5.361.811 2.113 25.822 2.102 27.577-.012 2.472-2.979.83-5.016-4.47-5.546l-4.99-.5-.5-21.893c-.429-18.786-.731-22.038-2.128-22.918-.462-.29-.905-.43-1.393-.402zm-50.478 85.99v5.508h.01v-5.498c0-.003-.01-.007-.01-.01z" transform="translate(-966.64 -493.435)"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="pagination">+ <!-- Tabler outline glyph @dots (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /> <path d="M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" /> <path d="M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/panel.svg b/public/js/vvvebjs/icons/panel.svgindex 55938ee..1a39997 100755--- a/public/js/vvvebjs/icons/panel.svg+++ b/public/js/vvvebjs/icons/panel.svg@@ -1,66 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="164.44295mm"- height="184.47113mm"- viewBox="0 0 582.67186 653.63784"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="panel.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.98994948"- inkscape:cx="418.98084"- inkscape:cy="230.0202"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="20"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="20"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-1154.2354,-262.50153)">- <path- style="fill:#555555"- d="m 1240.0607,843.69181 c -19.3659,-4.1099 -36.2739,-17.8224 -44.7352,-36.2805 -6.125,-13.3615 -5.823,-1.2803 -5.5315,-221.33684 l 0.2667,-201.23411 2.3321,-6.5 c 6.2373,-17.38463 17.3545,-30.41714 32.2323,-37.78531 15.5524,-7.70227 -0.5198,-7.17996 220.9356,-7.17996 221.257,0 205.5326,-0.50545 220.9662,7.1028 14.8268,7.30921 25.8983,20.32832 32.1984,37.86247 l 2.3354,6.5 0.2781,200.5 c 0.3088,222.62585 0.6914,209.05165 -6.299,223.50005 -8.8382,18.2677 -24.9272,30.8264 -44.7327,34.9173 -6.8458,1.414 -28.7349,1.574 -205.4542,1.5011 -170.9354,-0.07 -198.7427,-0.2832 -204.7922,-1.567 z m 411,-33.3276 c 6.3748,-3.157 12.3669,-9.149 15.5239,-15.5238 l 2.4761,-5 0.2629,-148.25 0.2629,-148.25005 -224.0129,0 -224.0129,0 0,146.46505 c 0,161.492 -0.4139,150.7111 6.1527,160.2565 3.3749,4.9057 10.3805,10.023 16.2436,11.8653 3.301,1.0372 43.031,1.2526 203.1037,1.1013 l 199,-0.1881 5,-2.4762 z m 18.2966,-385.27385 c -0.2958,-36.15505 -0.303,-36.26303 -2.7442,-41.22392 -3.1219,-6.34409 -9.2344,-12.45663 -15.5785,-15.57848 l -4.9739,-2.4476 -200.5,0 -200.5,0 -4.9739,2.4476 c -6.3441,3.12185 -12.4566,9.23439 -15.5785,15.57848 -2.4412,4.96089 -2.4484,5.06887 -2.7442,41.22392 l -0.2965,36.25 224.0931,0 224.0931,0 -0.2965,-36.25 z"- id="path4254"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="panel">+ <!-- Tabler outline glyph @layout-sidebar (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12" /> <path d="M9 4l0 16" /></g></svg>diff --git a/public/js/vvvebjs/icons/paragraph.svg b/public/js/vvvebjs/icons/paragraph.svgold mode 100644new mode 100755index 62a9157..db5ea97--- a/public/js/vvvebjs/icons/paragraph.svg+++ b/public/js/vvvebjs/icons/paragraph.svg@@ -1 +1,6 @@-<svg width="201.635" height="201.635" viewBox="0 0 53.349 53.349" xmlns="http://www.w3.org/2000/svg"><path style="fill:#000;stroke-width:.28;stroke-miterlimit:4;stroke-dasharray:none;stroke:#000;stroke-opacity:1;stroke-linejoin:round;stroke-linecap:round" d="M114.696 164.875c-.513-.288-.488.19-.488-9.308v-8.683h-5.101c-5.504 0-5.844-.022-7.368-.466-3.773-1.099-6.991-4.087-8.389-7.79-1.24-3.286-1.016-6.848.63-10.034 1.776-3.434 4.91-5.809 8.84-6.698l.847-.192 10.306-.028c11.379-.031 10.66-.064 10.951.498.187.36.098.768-.227 1.041-.255.215-.27.217-1.775.217h-1.518v40.966l-.216.257c-.273.325-.681.414-1.042.227-.563-.29-.52 1.449-.52-21.041v-20.41h-3.64V164.409l-.233.258c-.281.312-.719.399-1.057.209zm-.488-30.57V123.42l-5.27.034c-4.946.032-5.318.045-6.033.208-2.114.483-3.744 1.33-5.206 2.705-1.642 1.545-2.735 3.549-3.192 5.855-.2 1.013-.195 3.266.01 4.204.876 4.008 3.494 6.99 7.16 8.154 1.741.552 2.15.583 7.98.599l4.55.012z" transform="translate(-82.938 -115.355)"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="paragraph">+ <!-- Tabler outline glyph @pilcrow (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M13 4v16" /> <path d="M17 4v16" /> <path d="M19 4h-9.5a4.5 4.5 0 0 0 0 9h3.5" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/play-button.svg b/public/js/vvvebjs/icons/play-button.svgindex de271ec..4ca6b81 100755--- a/public/js/vvvebjs/icons/play-button.svg+++ b/public/js/vvvebjs/icons/play-button.svg@@ -1,42 +1,6 @@-<?xml version="1.0" encoding="iso-8859-1"?>-<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->-<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"- viewBox="0 0 60 60" style="enable-background:new 0 0 60 60;" xml:space="preserve">-<g>- <path d="M45.563,29.174l-22-15c-0.307-0.208-0.703-0.231-1.031-0.058C22.205,14.289,22,14.629,22,15v30- c0,0.371,0.205,0.711,0.533,0.884C22.679,45.962,22.84,46,23,46c0.197,0,0.394-0.059,0.563-0.174l22-15- C45.836,30.64,46,30.331,46,30S45.836,29.36,45.563,29.174z M24,43.107V16.893L43.225,30L24,43.107z"/>- <path d="M30,0C13.458,0,0,13.458,0,30s13.458,30,30,30s30-13.458,30-30S46.542,0,30,0z M30,58C14.561,58,2,45.439,2,30- S14.561,2,30,2s28,12.561,28,28S45.439,58,30,58z"/>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-<g>-</g>-</svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="play button">+ <!-- Tabler outline glyph @player-play (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M7 4v16l13 -8l-13 -8" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/plus_round.svg b/public/js/vvvebjs/icons/plus_round.svgindex 49e6a7b..dedc721 100755--- a/public/js/vvvebjs/icons/plus_round.svg+++ b/public/js/vvvebjs/icons/plus_round.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 512 512" height="512px" id="Layer_1" version="1.1" viewBox="0 0 512 512" width="512px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M256.108,3.02c-139.743,0-253,113.257-253,253s113.257,252.995,253,252.995 c139.743,0,253-113.252,253-252.995S395.852,3.02,256.108,3.02z M256.108,488.775c-128.338,0-232.76-104.417-232.76-232.755 c0-128.339,104.422-232.76,232.76-232.76c128.338,0,232.76,104.421,232.76,232.76C488.868,384.358,384.446,488.775,256.108,488.775 z" fill="#37404D"/><polygon fill="#37404D" points="266.228,104.22 245.988,104.22 245.988,245.9 104.98,245.9 104.98,266.14 245.988,266.14 245.988,407.148 266.228,407.148 266.228,266.14 407.908,266.14 407.908,245.9 266.228,245.9 "/></g></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="plus round">+ <!-- Tabler outline glyph @circle-plus (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" /> <path d="M9 12h6" /> <path d="M12 9v6" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/plus_square.svg b/public/js/vvvebjs/icons/plus_square.svgindex bc54534..c348642 100755--- a/public/js/vvvebjs/icons/plus_square.svg+++ b/public/js/vvvebjs/icons/plus_square.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg fill="none" height="24" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><rect height="18" rx="2" ry="2" width="18" x="3" y="3"/><line x1="12" x2="12" y1="8" y2="16"/><line x1="8" x2="16" y1="12" y2="12"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="plus square">+ <!-- Tabler outline glyph @square-plus (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M9 12h6" /> <path d="M12 9v6" /> <path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/post.svg b/public/js/vvvebjs/icons/post.svgindex 5ab45c7..2118119 100644--- a/public/js/vvvebjs/icons/post.svg+++ b/public/js/vvvebjs/icons/post.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M200,224H56a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h96l56,56V216A8,8,0,0,1,200,224Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="152 32 152 88 208 88" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="96" x2="160" y1="136" y2="136"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="96" x2="160" y1="168" y2="168"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="post">+ <!-- Tabler outline glyph @article (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12" /> <path d="M7 8h10" /> <path d="M7 12h10" /> <path d="M7 16h10" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/posts.svg b/public/js/vvvebjs/icons/posts.svgindex 2650cb8..e2fb02c 100644--- a/public/js/vvvebjs/icons/posts.svg+++ b/public/js/vvvebjs/icons/posts.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M168,224H56a8,8,0,0,1-8-8V72a8,8,0,0,1,8-8h80l40,40V216A8,8,0,0,1,168,224Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M80,64V40a8,8,0,0,1,8-8h80l40,40V184a8,8,0,0,1-8,8H176" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="88" x2="136" y1="152" y2="152"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="88" x2="136" y1="184" y2="184"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="posts">+ <!-- Tabler outline glyph @news (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11" /> <path d="M8 8l4 0" /> <path d="M8 12l4 0" /> <path d="M8 16l4 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/posts2.svg b/public/js/vvvebjs/icons/posts2.svgold mode 100755new mode 100644index 7aa72f2..7df6946--- a/public/js/vvvebjs/icons/posts2.svg+++ b/public/js/vvvebjs/icons/posts2.svg@@ -1,77 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- enable-background="new 0 0 512 512"- height="200"- id="Layer_1"- version="1.1"- viewBox="0 0 200 200"- width="200"- xml:space="preserve"- sodipodi:docname="posts.svg"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata- id="metadata19"><rdf:RDF><cc:Work- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs- id="defs17" /><sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="768"- inkscape:window-height="480"- id="namedview15"- showgrid="false"- fit-margin-top="0"- fit-margin-left="0"- fit-margin-right="0"- fit-margin-bottom="0"- inkscape:zoom="0.4609375"- inkscape:cx="78.5"- inkscape:cy="91.2"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="0"- inkscape:current-layer="Layer_1" /><g- id="g12"- transform="translate(-153.63559,-153.70847)"><path- d="m 329.5,342.2 h -147 V 169.8 h 112 c 13.7,13.7 21.3,21.3 35,35 z"- stroke-miterlimit="10"- id="path2"- inkscape:connector-curvature="0"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:5" /><polyline- points=" 294.5,169.8 294.5,206.5 329.5,206.5 "- stroke-miterlimit="10"- id="polyline4"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:5" /><line- stroke-miterlimit="10"- x1="216"- x2="296"- y1="226"- y2="226"- id="line6"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:5" /><line- stroke-miterlimit="10"- x1="216"- x2="296"- y1="256"- y2="256"- id="line8"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:5" /><line- stroke-miterlimit="10"- x1="216"- x2="256"- y1="286"- y2="286"- id="line10"- style="fill:none;stroke:#000000;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:5" /></g></svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="posts2">+ <!-- Tabler outline glyph @news (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11" /> <path d="M8 8l4 0" /> <path d="M8 12l4 0" /> <path d="M8 16l4 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/price-table.svg b/public/js/vvvebjs/icons/price-table.svgold mode 100755new mode 100644index f14602e..09e88db--- a/public/js/vvvebjs/icons/price-table.svg+++ b/public/js/vvvebjs/icons/price-table.svg@@ -1,143 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="48mm"- height="48mm"- viewBox="0 0 48 48"- version="1.1"- id="svg825"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"- sodipodi:docname="price-table.svg">- <defs- id="defs819" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="2.8"- inkscape:cx="58.367284"- inkscape:cy="153.14715"- inkscape:document-units="mm"- inkscape:current-layer="layer1"- showgrid="false"- showguides="true"- inkscape:guide-bbox="true"- inkscape:window-width="2560"- inkscape:window-height="1379"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1">- <sodipodi:guide- position="-48.475445,94.305057"- orientation="1,0"- id="guide1430"- inkscape:locked="false" />- </sodipodi:namedview>- <metadata- id="metadata822">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(0,-249)">- <rect- style="fill:none;fill-opacity:1;stroke:#000009;stroke-width:1.15513849;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- id="rect1373"- width="13.185587"- height="21.334726"- x="1.6606182"- y="263.00998"- ry="0.24695937" />- <rect- style="fill:none;fill-opacity:1;stroke:#000009;stroke-width:1.3136493;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- id="rect1373-3"- width="13.027077"- height="27.927393"- x="17.454111"- y="259.49722"- ry="0.32327256" />- <rect- style="fill:none;fill-opacity:1;stroke:#000009;stroke-width:1.15513849;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- id="rect1373-6"- width="13.185587"- height="21.334726"- x="33.21283"- y="263.01865"- ry="0.24695937" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05700576;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 3.7013752,270.56043 c 7.8779588,0.0395 9.1843548,0 9.1843548,0"- id="path1396"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cc" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05700576;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 3.7013752,273.83103 c 7.8779588,0.0395 9.1843548,0 9.1843548,0"- id="path1396-7"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cc" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05700576;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 3.7013752,277.51456 c 7.8779578,0.0395 9.1843538,0 9.1843538,0"- id="path1396-7-5"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cc" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05700576;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 19.649219,270.38291 c 7.877959,0.0395 9.184354,0 9.184354,0"- id="path1396-3"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cc" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05700576;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 19.649219,273.65352 c 7.877959,0.0395 9.184354,0 9.184354,0"- id="path1396-7-56"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cc" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05700576;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 19.649219,277.33704 c 7.877958,0.0395 9.184353,0 9.184353,0"- id="path1396-7-5-2"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cc" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05700576;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 35.540148,270.5948 c 7.877959,0.0395 9.184355,0 9.184355,0"- id="path1396-3-9"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cc" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05700576;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 35.540148,273.86541 c 7.877959,0.0395 9.184355,0 9.184355,0"- id="path1396-7-56-1"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cc" />- <path- style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05700576;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- d="m 35.540148,277.54893 c 7.877958,0.0395 9.184353,0 9.184353,0"- id="path1396-7-5-2-2"- inkscape:connector-curvature="0"- sodipodi:nodetypes="cc" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="price table">+ <!-- Tabler outline glyph @table (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14" /> <path d="M3 10h18" /> <path d="M10 3v18" /></g></svg>diff --git a/public/js/vvvebjs/icons/product.svg b/public/js/vvvebjs/icons/product.svgold mode 100644new mode 100755index 13aa729..158771a--- a/public/js/vvvebjs/icons/product.svg+++ b/public/js/vvvebjs/icons/product.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M224,177.3V78.7a8.1,8.1,0,0,0-4.1-7l-88-49.5a7.8,7.8,0,0,0-7.8,0l-88,49.5a8.1,8.1,0,0,0-4.1,7v98.6a8.1,8.1,0,0,0,4.1,7l88,49.5a7.8,7.8,0,0,0,7.8,0l88-49.5A8.1,8.1,0,0,0,224,177.3Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="177 152.5 177 100.5 80 47" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="222.9 74.6 128.9 128 33.1 74.6" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="128.9" x2="128" y1="128" y2="234.8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="product">+ <!-- Tabler outline glyph @package (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 3l8 4.5l0 9l-8 4.5l-8 -4.5l0 -9l8 -4.5" /> <path d="M12 12l8 -4.5" /> <path d="M12 12l0 9" /> <path d="M12 12l-8 -4.5" /> <path d="M16 5.25l-8 4.5" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/product_gallery.svg b/public/js/vvvebjs/icons/product_gallery.svgindex e801280..4a15e21 100755--- a/public/js/vvvebjs/icons/product_gallery.svg+++ b/public/js/vvvebjs/icons/product_gallery.svg@@ -1,68 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- width="519.15308"- height="610.30658"- viewBox="0 0 519.15306 610.30659"- sodipodi:docname="product_gallery.svg">- <metadata- id="metadata8">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs6" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview4"- showgrid="false"- fit-margin-top="100"- fit-margin-left="0"- fit-margin-right="0"- fit-margin-bottom="100"- inkscape:zoom="1.3037281"- inkscape:cx="389.22813"- inkscape:cy="331.49871"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg2" />- <path- style="fill:#000000"- d="m 269.28295,208.69082 c -13.25249,0.19801 -26.45038,7.40757 -33.08984,21.53125 -2.7168,5.77928 -3.16394,7.84939 -3.17774,14.72461 -0.0102,5.07292 0.62171,9.82942 1.72852,13 3.53364,10.12244 13.38298,19.71767 23.60156,22.99219 2.96211,0.9492 7.52615,1.37807 12.63672,1.1875 14.22491,-0.53043 25.48789,-7.81501 31.75,-20.53516 2.97829,-6.04977 3.25,-7.40003 3.25,-16.14453 0,-8.76642 -0.26753,-10.08511 -3.28711,-16.21875 -6.85381,-13.92208 -20.15962,-20.73511 -33.41211,-20.53711 z m 0.1875,15.7168 c 6.6457,-0.15748 13.29519,2.85463 17.61719,9.24218 6.15816,9.10125 5.21659,19.08475 -2.5293,26.79688 -2.74616,2.73419 -6.22091,5.04368 -8.6914,5.77734 -5.15867,1.53195 -7.89226,1.48796 -12.625,-0.20117 -5.59382,-1.99646 -8.47064,-4.18042 -11.47266,-8.71679 -3.70345,-5.59628 -4.37288,-14.82342 -1.48438,-20.44141 4.12728,-8.02732 11.65375,-12.27855 19.18555,-12.45703 z m -92.09766,39.03906 c -0.54728,0 -110.24906,140.21601 -116.552729,148.97266 -0.97653,1.35654 -0.25696,2.35733 4.5,6.25781 3.114319,2.5536 5.887109,4.65301 6.162109,4.66601 0.275,0.013 24.285017,-30.60094 53.35547,-68.03125 29.07045,-37.4303 53.17985,-67.67353 53.57617,-67.20898 0.39631,0.46455 11.51611,13.89375 24.71094,29.84375 53.94027,65.20334 83.6797,101.07108 84.8164,102.29492 0.96951,1.04385 2.30083,0.38945 6.8711,-3.37304 3.11817,-2.56705 5.66615,-4.94979 5.66015,-5.29493 -0.006,-0.34514 -5.40586,-7.14804 -12,-15.11914 -6.59413,-7.97111 -11.99023,-14.7237 -11.99023,-15.00586 0,-0.28217 14.17477,-14.68327 31.5,-32.00195 l 31.5,-31.48828 36.26953,36.25781 36.26953,36.25977 5.46289,-5.53125 5.46289,-5.53125 -41.73046,-41.73047 -41.73047,-41.73047 -36.75196,36.74219 -36.75195,36.74023 -43.93945,-52.99414 c -24.16717,-29.1466 -44.26868,-52.99414 -44.66993,-52.99414 z"- id="path4173"- inkscape:connector-curvature="0"- sodipodi:nodetypes="ssssssssssssssssssssssssssssssscccccccccss" />- <path- style="fill:#000000"- d="m 35.214345,100.2144 c -14.561124,5.14752 -27.1159756,16.10302 -32.7076356,30.66553 -4.1417,7.78145 -1.02418,17.18187 -2.02055895,25.66449 0.04976,98.91767 -1.082213,197.84236 -0.0511,296.75591 0.60201095,13.11442 -0.616145,27.92542 8.49804695,38.63672 6.4654886,8.15923 15.4782996,15.14251 25.8046866,17.26953 51.380303,1.79469 102.829056,0.77621 154.236326,1.08515 98.67473,-0.18576 197.4572,0.0266 296.06446,-0.50507 14.35289,-5.75056 27.75129,-17.36876 31.60742,-32.78711 3.34296,-25.14544 1.78739,-50.66332 2.38326,-75.96476 -0.23082,-64.91179 0.76809,-129.84301 -0.67818,-194.74227 -0.51085,-11.10343 -0.61543,-23.44993 -8.56641,-32.21484 -7.125,-9.49584 -17.63292,-17.50681 -30.0016,-17.49781 -42.56153,-2.32129 -85.23721,-0.88058 -127.8441,-1.32474 -40.75131,-0.006 -81.50261,-0.0115 -122.25391,-0.0173 -8.70705,-14.88052 -14.39739,-32.28745 -27.19922,-44.36913 -6.1259,-4.92034 -13.59589,-8.62783 -20.94531,-10.8379 -48.76156,0.1232 -97.631453,-0.245182 -146.326175,0.1836 z M 141.5913,117.20073 c 14.62191,0.66133 29.75485,-1.33906 43.88672,3.14257 10.99511,6.01093 14.62916,19.0161 20.79687,29.08204 4.0505,7.8185 8.10315,15.63589 12.15235,23.45507 82.0147,0.47099 164.13037,-0.12356 246.08489,1.05111 8.10815,0.95463 17.59528,-0.77619 24.65144,4.10709 4.10284,4.43722 9.61844,8.74674 9.47461,15.54297 2.5872,35.03991 1.01228,70.32521 1.37601,105.48433 -0.14897,58.33659 -0.28698,116.67321 -0.4307,175.00981 -4.25737,8.11354 -11.1422,16.19283 -20.24024,18.24208 -146.39424,-0.11506 -292.796,0.91537 -439.185217,-0.50016 -8.216948,0.32261 -14.384311,-7.49299 -18.83822,-13.34543 -5.740004,-7.71986 -2.152961,-17.8387 -3.172489,-26.76559 0.08001,-96.50417 -0.965923,-193.01448 -0.06601,-289.51489 0.919915,-10.58814 -0.792314,-22.12373 3.914281,-32.04569 4.893353,-5.26151 10.167422,-11.45117 18.036528,-11.40078 32.691664,-2.25385 65.637527,-1.0097 98.443937,-1.54032 1.03841,-0.001 2.07683,-0.003 3.11524,-0.004 z"- id="path4409"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="product gallery">+ <!-- Tabler outline glyph @camera (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M5 7h1a2 2 0 0 0 2 -2a1 1 0 0 1 1 -1h6a1 1 0 0 1 1 1a2 2 0 0 0 2 2h1a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-9a2 2 0 0 1 2 -2" /> <path d="M9 13a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/products.svg b/public/js/vvvebjs/icons/products.svgold mode 100644new mode 100755index 8220273..cdefede--- a/public/js/vvvebjs/icons/products.svg+++ b/public/js/vvvebjs/icons/products.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M224,177.3V78.7a8.1,8.1,0,0,0-4.1-7l-88-49.5a7.8,7.8,0,0,0-7.8,0l-88,49.5a8.1,8.1,0,0,0-4.1,7v98.6a8.1,8.1,0,0,0,4.1,7l88,49.5a7.8,7.8,0,0,0,7.8,0l88-49.5A8.1,8.1,0,0,0,224,177.3Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="222.9 74.6 128.9 128 33.1 74.6" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="128.9" x2="128" y1="128" y2="234.8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="products">+ <!-- Tabler outline glyph @shopping-bag (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M6.331 8h11.339a2 2 0 0 1 1.977 2.304l-1.255 8.152a3 3 0 0 1 -2.966 2.544h-6.852a3 3 0 0 1 -2.965 -2.544l-1.255 -8.152a2 2 0 0 1 1.977 -2.304" /> <path d="M9 11v-5a3 3 0 0 1 6 0v5" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/progressbar.svg b/public/js/vvvebjs/icons/progressbar.svgindex febae55..5c1b566 100755--- a/public/js/vvvebjs/icons/progressbar.svg+++ b/public/js/vvvebjs/icons/progressbar.svg@@ -1,67 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="196.91806mm"- height="114.06055mm"- viewBox="0 0 697.74116 404.15151"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="progressbar.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="0.98994948"- inkscape:cx="100.96427"- inkscape:cy="-52.506834"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="50"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="50"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-1472.2521,-673.92805)">- <path- style="fill:#000000"- d="m 1559.4312,904.16099 c -6.2252,-5.50885 -7.2993,-9.66672 -7.2993,-28.25443 0,-18.78254 1.2362,-23.0676 8.1219,-28.15435 3.4717,-2.56457 18.1459,-2.7175 261.1538,-2.71974 247.3154,0 257.6198,0.10941 261.1305,2.83748 5.8101,4.51421 7.5754,11.03523 7.5754,27.98377 0,16.15468 -1.3948,22.32795 -6.2037,27.45647 -2.8933,3.0854 -4.8146,3.11113 -261.9825,3.49644 -255.3031,0.38244 -259.1177,0.34402 -262.4961,-2.64564 z m 517.5948,-15.92591 c 0.7411,-1.07385 1.2873,-6.21654 1.2873,-12.12226 0,-5.90571 -0.5462,-11.04853 -1.2873,-12.12226 -0.9702,-1.40556 -15.9005,-1.86496 -60.6101,-1.86496 l -59.3228,0 0,13.98722 0,13.98722 59.3228,0 c 44.7096,0 59.6399,-0.4594 60.6101,-1.86496 z"- id="path4149"- inkscape:connector-curvature="0"- sodipodi:nodetypes="sscscscsscssscccsc" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="progressbar">+ <!-- Tabler outline glyph @progress (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M10 20.777a8.942 8.942 0 0 1 -2.48 -.969" /> <path d="M14 3.223a9.003 9.003 0 0 1 0 17.554" /> <path d="M4.579 17.093a8.961 8.961 0 0 1 -1.227 -2.592" /> <path d="M3.124 10.5c.16 -.95 .468 -1.85 .9 -2.675l.169 -.305" /> <path d="M6.907 4.579a8.954 8.954 0 0 1 3.093 -1.356" /></g></svg>diff --git a/public/js/vvvebjs/icons/radio.svg b/public/js/vvvebjs/icons/radio.svgindex 2d20cbd..63d2b45 100755--- a/public/js/vvvebjs/icons/radio.svg+++ b/public/js/vvvebjs/icons/radio.svg@@ -1,66 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="146.3224mm"- height="182.82587mm"- viewBox="0 0 518.46522 647.80814"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="radio.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="1.4"- inkscape:cx="580.96955"- inkscape:cy="320.51904"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="30"- fit-margin-left="10"- fit-margin-right="10"- fit-margin-bottom="30"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(-107.65521,-21.660061)">- <path- style="fill:#000000"- d="m 198.15622,562.24348 c -14.07659,-2.05064 -25.82957,-8.01018 -36.10095,-18.30554 -10.86155,-10.88691 -16.5388,-22.42626 -18.48985,-37.58172 -4.00551,-31.11414 17.65146,-62.26932 48.31037,-69.49807 8.13497,-1.91807 22.76091,-1.90374 30.2846,0.0297 28.98846,7.44928 48.49364,32.3831 48.44533,61.92852 -0.0188,11.50475 -1.99757,19.83687 -6.98821,29.42586 -9.76249,18.7576 -27.31948,31.12281 -48.31938,34.03083 -8.66218,1.19952 -8.7057,1.19944 -17.14191,-0.0295 z m 24.91422,-28.71704 c 11.68041,-5.46592 19.25627,-15.41799 21.65763,-28.45065 3.64125,-19.76173 -10.15661,-39.57208 -30.44189,-43.7071 -27.81245,-5.66938 -52.23356,21.45327 -43.79437,48.63903 6.98369,22.49706 31.41178,33.42388 52.57863,23.51872 z m -24.82245,-10.63839 c -5.76906,-2.05643 -10.78046,-6.58943 -13.97333,-12.63942 -2.54537,-4.82308 -2.7995,-6.1467 -2.40697,-12.5367 0.6951,-11.31569 6.54108,-19.2528 16.86259,-22.89445 11.74872,-4.1452 25.01011,1.39886 31.18873,13.03874 2.89131,5.44691 3.01034,16.36884 0.2393,21.95703 -5.78993,11.67622 -19.76733,17.40327 -31.91032,13.0748 z m 130.13509,-13.09722 c -3.50662,-1.90267 -5.77216,-6.30743 -5.72713,-11.13495 0.0439,-4.70339 1.72007,-7.84048 5.53199,-10.35332 2.85938,-1.88491 6.0609,-1.93333 128.2783,-1.93975 114.2473,-0.006 125.5909,0.13822 128.1145,1.62895 5.6775,3.35381 7.7208,11.21314 4.5229,17.39719 -3.278,6.33885 4.9518,5.97121 -132.6835,5.92723 -108.87922,-0.0348 -125.65837,-0.23468 -128.03706,-1.52535 z M 194.12049,407.87636 c -20.15046,-4.43597 -35.30853,-16.31135 -44.79182,-35.09156 -8.20763,-16.25394 -8.10473,-38.79513 0.25267,-55.35105 8.15794,-16.16079 21.3035,-27.50041 38.53915,-33.24463 5.83398,-1.94432 8.9989,-2.32386 19,-2.27845 10.27252,0.0466 13.07967,0.43085 19.5,2.66895 11.41118,3.97788 16.75336,7.37129 25.50434,16.2006 12.96558,13.08163 18.49567,26.40958 18.49567,44.57598 0,18.07082 -5.84689,32.01014 -18.91499,45.0944 -15.30794,15.32687 -37.12684,21.92946 -57.58502,17.42576 z m 29.71115,-28.30073 c 11.40802,-5.62062 18.86534,-15.79233 20.9934,-28.63477 2.65939,-16.04889 -5.97481,-32.41121 -21.00414,-39.80409 -6.25999,-3.07926 -7.31451,-3.28006 -17.18482,-3.27218 -9.83377,0.008 -10.90568,0.21185 -16.53184,3.1464 -7.40561,3.86268 -14.75356,11.54554 -18.29338,19.12714 -2.30437,4.93552 -2.66974,7.01821 -2.66974,15.21807 0,8.19986 0.36537,10.28255 2.66974,15.21807 3.18711,6.82617 10.73101,15.19101 16.23034,17.99656 8.00498,4.08384 10.93351,4.74094 20.10562,4.51133 7.92635,-0.19842 9.83777,-0.62575 15.68482,-3.50653 z M 330.0357,356.93479 c -7.25396,-3.15838 -9.97702,-13.05203 -5.24729,-19.06491 4.54646,-5.77989 -1.81872,-5.51368 131.83213,-5.51368 133.6508,0 127.2856,-0.26621 131.8321,5.51368 2.9796,3.78799 2.9796,11.18465 0,14.97264 -4.5485,5.7825 1.8543,5.51705 -132.05,5.47454 -100.92113,-0.032 -123.84166,-0.28276 -126.36694,-1.38227 z M 191.27688,253.83233 c -7.88174,-1.9858 -19.99866,-8.42868 -26.41919,-14.04777 -18.91683,-16.55551 -26.35888,-43.73861 -18.5971,-67.92838 5.91806,-18.44379 22.41611,-34.94184 40.8599,-40.8599 24.18977,-7.76178 51.37287,-0.31973 67.92838,18.5971 5.97523,6.82747 12.12158,18.71913 14.15539,27.38714 2.36936,10.09816 1.5248,26.64286 -1.81816,35.61721 -7.09391,19.04399 -20.44763,32.40088 -39.52406,39.53345 -8.52652,3.18803 -27.2316,4.05778 -36.58516,1.70115 z m 24.88351,-25.02814 c 19.4812,-5.07287 32.07929,-24.1094 28.56768,-43.16758 -2.39434,-12.9946 -9.97803,-22.98511 -21.56295,-28.40635 -21.2586,-9.94809 -45.68007,0.94538 -52.68073,23.49883 -6.46043,20.81303 6.2028,42.90719 27.6361,48.21808 6.87993,1.70475 11.0717,1.67153 18.0399,-0.14298 z m 112.33292,-26.13172 c -5.55228,-3.44587 -7.51107,-11.24754 -4.35587,-17.34902 3.27668,-6.3364 -4.91868,-5.96727 132.4831,-5.96727 137.4017,0 129.2064,-0.36913 132.4831,5.96727 3.1979,6.18405 1.1546,14.04338 -4.5229,17.39719 -2.5241,1.49102 -13.8447,1.63319 -128.1145,1.60893 -114.10717,-0.0242 -125.58129,-0.1728 -127.97293,-1.6571 z"- id="path4488"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="radio">+ <!-- Tabler outline glyph @radio (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M14 3l-9.371 3.749a1 1 0 0 0 -.629 .928v11.323a1 1 0 0 0 1 1h14a1 1 0 0 0 1 -1v-11a1 1 0 0 0 -1 -1h-14.5" /> <path d="M4 12h16" /> <path d="M7 12v-2" /> <path d="M17 16v.01" /> <path d="M13 16v.01" /></g></svg>diff --git a/public/js/vvvebjs/icons/rating.svg b/public/js/vvvebjs/icons/rating.svgold mode 100755new mode 100644index 6caf2a2..f1e19f1--- a/public/js/vvvebjs/icons/rating.svg+++ b/public/js/vvvebjs/icons/rating.svg@@ -1,3 +1,6 @@-<svg xmlns="http://www.w3.org/2000/svg" width="48mm" height="48mm" viewBox="0 0 48 48">- <path style="fill:none;fill-opacity:1;stroke:#000009;stroke-width:1.04241371;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m12.004 279.169-4.046-2.561-4.115 2.45 1.185-4.64-3.6-3.156 4.778-.307 1.889-4.4 1.768 4.45 4.768.437-3.686 3.057zM27.967 279.323l-4.046-2.56-4.114 2.449 1.185-4.64-3.601-3.156 4.779-.306 1.889-4.4 1.768 4.45 4.768.436-3.686 3.057zM43.947 279.478l-4.046-2.561-4.114 2.45 1.185-4.64-3.601-3.156 4.779-.306 1.889-4.4 1.768 4.45 4.768.436-3.686 3.057z" transform="translate(0 -249)"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="rating">+ <!-- Tabler outline glyph @star (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/reviews.svg b/public/js/vvvebjs/icons/reviews.svgindex 1767641..822f4aa 100644--- a/public/js/vvvebjs/icons/reviews.svg+++ b/public/js/vvvebjs/icons/reviews.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M78,201.3,45.1,228.9A8,8,0,0,1,32,222.8V64a8,8,0,0,1,8-8H216a8,8,0,0,1,8,8V192a8,8,0,0,1-8,8H81.7Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="96" x2="160" y1="112" y2="112"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="96" x2="160" y1="144" y2="144"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="reviews">+ <!-- Tabler outline glyph @message-star (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M8 9h8" /> <path d="M8 13h4.5" /> <path d="M10.325 19.605l-2.325 1.395v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v4.5" /> <path d="M17.8 20.817l-2.172 1.138a.392 .392 0 0 1 -.568 -.41l.415 -2.411l-1.757 -1.707a.389 .389 0 0 1 .217 -.665l2.428 -.352l1.086 -2.193a.392 .392 0 0 1 .702 0l1.086 2.193l2.428 .352a.39 .39 0 0 1 .217 .665l-1.757 1.707l.414 2.41a.39 .39 0 0 1 -.567 .411l-2.172 -1.138" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/right-column-layout.svg b/public/js/vvvebjs/icons/right-column-layout.svgindex 7441838..6eecb19 100755--- a/public/js/vvvebjs/icons/right-column-layout.svg+++ b/public/js/vvvebjs/icons/right-column-layout.svg@@ -1 +1,6 @@-<svg viewBox="0 -64 512 512" xmlns="http://www.w3.org/2000/svg"><path d="M62.945-1.63H457.8v394.855H62.945V16.317Zm24.678 22.434v349.002H254.96V20.804Zm190.698 0v351.183h156.081V20.804Z" fill="#777777" style="stroke-width:1.12175"/><path d="M278.32 196.395V20.805h156.082v351.182H278.321z" fill="gray" fill-opacity=".329" style="fill:gray;fill-opacity:.27058825;stroke-width:1.22575"/></svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="right column layout">+ <!-- Tabler outline glyph @layout-sidebar-right (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12" /> <path d="M15 4l0 16" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/search.svg b/public/js/vvvebjs/icons/search.svgindex 439acac..4e40641 100755--- a/public/js/vvvebjs/icons/search.svg+++ b/public/js/vvvebjs/icons/search.svg@@ -1,69 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- height="32px"- version="1.1"- viewBox="0 0 32 32"- width="32px"- id="svg2"- inkscape:version="0.91 r13725"- sodipodi:docname="search.svg">- <metadata- id="metadata15">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="708"- inkscape:window-height="480"- id="namedview13"- showgrid="false"- inkscape:zoom="10.429825"- inkscape:cx="16"- inkscape:cy="16"- inkscape:window-x="1217"- inkscape:window-y="547"- inkscape:window-maximized="0"- inkscape:current-layer="Page-1" />- <desc- id="desc6" />- <defs- id="defs8" />- <g- fill="none"- fill-rule="evenodd"- id="Page-1"- stroke="none"- stroke-width="1">- <g- fill="#157EFB"- id="icon-111-search"- style="fill:#000000">- <path- d="M19.4271164,20.4271164 C18.0372495,21.4174803 16.3366522,22 14.5,22 C9.80557939,22 6,18.1944206 6,13.5 C6,8.80557939 9.80557939,5 14.5,5 C19.1944206,5 23,8.80557939 23,13.5 C23,15.8472103 22.0486052,17.9722103 20.5104077,19.5104077 L26.5077736,25.5077736 C26.782828,25.782828 26.7761424,26.2238576 26.5,26.5 C26.2219324,26.7780676 25.7796227,26.7796227 25.5077736,26.5077736 L19.4271164,20.4271164 L19.4271164,20.4271164 Z M14.5,21 C18.6421358,21 22,17.6421358 22,13.5 C22,9.35786417 18.6421358,6 14.5,6 C10.3578642,6 7,9.35786417 7,13.5 C7,17.6421358 10.3578642,21 14.5,21 L14.5,21 Z"- id="search"- style="fill:#000000" />- </g>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="search">+ <!-- Tabler outline glyph @search (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0" /> <path d="M21 21l-6 -6" /></g></svg>diff --git a/public/js/vvvebjs/icons/section.svg b/public/js/vvvebjs/icons/section.svgindex 559e6db..3b06664 100644--- a/public/js/vvvebjs/icons/section.svg+++ b/public/js/vvvebjs/icons/section.svg@@ -1 +1,6 @@-<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h256v256H0z"/><path d="M224 64v136.9a7.1 7.1 0 0 1-7.1 7.1H40a8 8 0 0 1-8-8V64a8 8 0 0 1 8-8c65.563-.186 120.122.454 176 0a8 8 0 0 1 8 8z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path style="fill:none;fill-rule:evenodd;stroke:#000;stroke-width:8.1495;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m32.538 79.272 189.154.94M32.397 186.45l189.155.94"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="section">+ <!-- Tabler outline glyph @layout-dashboard (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1" /> <path d="M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1" /> <path d="M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1" /> <path d="M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/select_input.svg b/public/js/vvvebjs/icons/select_input.svgindex 6f7fd1d..d997747 100644--- a/public/js/vvvebjs/icons/select_input.svg+++ b/public/js/vvvebjs/icons/select_input.svg@@ -1 +1,6 @@-<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h256v256H0z"/><path fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="6.623" d="M152.576 72.94v109.673"/><path d="M144 72h88a8 8 0 0 1 8 8v96a8 8 0 0 1-8 8h-88M144 184H26.667A10.667 8 0 0 1 16 176V80a10.667 8 0 0 1 10.667-8H144" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path style="fill:#000;fill-opacity:1;stroke:none;stroke-width:10.9399;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" d="m196.197 159.495-28.318-49.05h56.636z" transform="matrix(.77502 0 0 .43057 45.644 73.247)"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="select input">+ <!-- Tabler outline glyph @selector (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M8 9l4 -4l4 4" /> <path d="M16 15l-4 4l-4 -4" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/separator.svg b/public/js/vvvebjs/icons/separator.svgold mode 100755new mode 100644index 9999273..43397d7--- a/public/js/vvvebjs/icons/separator.svg+++ b/public/js/vvvebjs/icons/separator.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg class="icon icon-tabler icon-tabler-separator-vertical" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none" stroke="none"/><line x1="12" x2="12" y1="4" y2="20"/><polyline points="8 8 4 12 8 16"/><polyline points="16 16 20 12 16 8"/></svg>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="separator">+ <!-- Tabler outline glyph @separator-horizontal (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 12l16 0" /> <path d="M8 8l4 -4l4 4" /> <path d="M16 16l-4 4l-4 -4" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/slider.svg b/public/js/vvvebjs/icons/slider.svgindex 4cccda1..c80354f 100755--- a/public/js/vvvebjs/icons/slider.svg+++ b/public/js/vvvebjs/icons/slider.svg@@ -1,62 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- width="512"- height="522.03394"- viewBox="0 0 512 522.03394"- sodipodi:docname="slider.svg">- <metadata- id="metadata8">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs6" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview4"- showgrid="false"- fit-margin-top="50"- fit-margin-left="0"- fit-margin-right="0"- fit-margin-bottom="50"- inkscape:zoom="0.65186406"- inkscape:cx="467.15454"- inkscape:cy="543.67035"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg2" />- <path- style="fill:#000000"- d="m 214.4,468.6 c -4.6134,-4.61342 -4.6134,-8.58658 0,-13.2 5.6497,-5.64969 13.1313,-4.15942 16.2191,3.23069 1.2103,2.89685 1.2103,3.84177 0,6.73862 -3.0878,7.39011 -10.5694,8.88038 -16.2191,3.23069 z m 36.7101,2.00449 C 242.3423,465.74491 245.955,452 256,452 c 2.9615,0 4.5539,0.70769 6.9231,3.07692 8.1287,8.12874 -1.7453,21.10767 -11.813,15.52757 z m 34.0068,-0.23518 c -1.2805,-0.89688 -2.9617,-3.14688 -3.7359,-5 C 278.7543,459.08296 283.7564,452 290.8225,452 295.4499,452 301,457.4533 301,462 c 0,4.5467 -5.5501,10 -10.1775,10 -1.8576,0 -4.4251,-0.73381 -5.7056,-1.63069 z M 0,241.5 0,50 l 256,0 255.99999,0 0,191.5 0,191.5 L 256,433 0,433 0,241.5 Z m 496,0 0,-175.5 -240,0 -240,0 0,175.5 0,175.5 240,0 240,0 0,-175.5 z M 44.5,258 27.5221,241 l 16.978,-17.00008 16.978,-17.00008 5.493,5.49298 5.493,5.49297 -7.457,7.50711 -7.457,7.5071 76.767,0 76.767,0 -0.292,7.75 -0.2921,7.75 -75.9687,0.25634 -75.9686,0.25634 7.439,7.48905 7.4391,7.48905 -5.4362,5.50461 C 65.0146,272.52293 62.323,275 62.0231,275 61.7233,275 53.8379,267.35 44.5,258 Z m 401.4955,11.49539 -5.4363,-5.50461 7.439,-7.48901 7.4391,-7.48901 -75.4687,-0.25638 L 304.5,248.5 l -0.2921,-7.75 -0.292,-7.75 75.267,0 75.267,0 -7.457,-7.5071 -7.457,-7.50711 5.4929,-5.49282 5.4928,-5.49282 17.4782,17.4996 17.4781,17.4996 -16.4776,16.50032 C 459.9377,267.57485 452.2772,275 451.9772,275 c -0.3,0 -2.9918,-2.47707 -5.9817,-5.50461 z"- id="path4170"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="slider">+ <!-- Tabler outline glyph @slideshow (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M15 6l.01 0" /> <path d="M3 6a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3l0 -8" /> <path d="M3 13l4 -4a3 5 0 0 1 3 0l4 4" /> <path d="M13 12l2 -2a3 5 0 0 1 3 0l3 3" /> <path d="M8 21l.01 0" /> <path d="M12 21l.01 0" /> <path d="M16 21l.01 0" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/social-icons.svg b/public/js/vvvebjs/icons/social-icons.svgindex 801199f..ca15a20 100644--- a/public/js/vvvebjs/icons/social-icons.svg+++ b/public/js/vvvebjs/icons/social-icons.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><circle cx="128" cy="128" fill="none" r="24" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><circle cx="96" cy="56" fill="none" r="24" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><circle cx="200" cy="104" fill="none" r="24" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><circle cx="200" cy="184" fill="none" r="24" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><circle cx="56" cy="192" fill="none" r="24" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="118.3" x2="105.7" y1="106.1" y2="77.9"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="177.2" x2="150.8" y1="111.6" y2="120.4"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="181.1" x2="146.9" y1="169.3" y2="142.7"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="110.1" x2="73.9" y1="143.9" y2="176.1"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="social icons">+ <!-- Tabler outline glyph @share (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 12a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M15 6a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M15 18a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" /> <path d="M8.7 10.7l6.6 -3.4" /> <path d="M8.7 13.3l6.6 3.4" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/star.svg b/public/js/vvvebjs/icons/star.svgold mode 100644new mode 100755index d8a4220..a787bdf--- a/public/js/vvvebjs/icons/star.svg+++ b/public/js/vvvebjs/icons/star.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M132.4,190.7l50.4,32c6.5,4.1,14.5-2,12.6-9.5l-14.6-57.4a8.7,8.7,0,0,1,2.9-8.8l45.2-37.7c5.9-4.9,2.9-14.8-4.8-15.3l-59-3.8a8.3,8.3,0,0,1-7.3-5.4l-22-55.4a8.3,8.3,0,0,0-15.6,0l-22,55.4a8.3,8.3,0,0,1-7.3,5.4L31.9,94c-7.7.5-10.7,10.4-4.8,15.3L72.3,147a8.7,8.7,0,0,1,2.9,8.8L61.7,209c-2.3,9,7.3,16.3,15,11.4l46.9-29.7A8.2,8.2,0,0,1,132.4,190.7Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="star">+ <!-- Tabler outline glyph @star (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/stopwatch.svg b/public/js/vvvebjs/icons/stopwatch.svgindex 0c113a5..06d82e0 100644--- a/public/js/vvvebjs/icons/stopwatch.svg+++ b/public/js/vvvebjs/icons/stopwatch.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="128" x2="128" y1="80" y2="128"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="169.6" x2="128" y1="152" y2="128"/><polyline fill="none" points="71.8 99.7 31.8 99.7 31.8 59.7" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M65.8,190.2a88,88,0,1,0,0-124.4l-34,33.9" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="stopwatch">+ <!-- Tabler outline glyph @clock (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" /> <path d="M12 7v5l3 3" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/stream-solid.svg b/public/js/vvvebjs/icons/stream-solid.svgindex fb798d0..3c3abdf 100755--- a/public/js/vvvebjs/icons/stream-solid.svg+++ b/public/js/vvvebjs/icons/stream-solid.svg@@ -1,52 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- viewBox="0 0 32 32"- version="1.1"- id="svg4"- sodipodi:docname="stream-solid.svg"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)">- <metadata- id="metadata10">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs8" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview6"- showgrid="false"- inkscape:zoom="7.375"- inkscape:cx="16.271186"- inkscape:cy="16"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg4" />- <path- d="M 5 5 L 5 11 L 24 11 L 24 5 L 5 5 z M 7 7 L 22 7 L 22 9 L 7 9 L 7 7 z M 9 13 L 9 19 L 28 19 L 28 13 L 9 13 z M 11 15 L 26 15 L 26 17 L 11 17 L 11 15 z M 5 21 L 5 27 L 24 27 L 24 21 L 5 21 z M 7 23 L 22 23 L 22 25 L 7 25 L 7 23 z"- id="path2"- style="stroke:#ffffff;stroke-opacity:1" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="stream solid">+ <!-- Tabler outline glyph @broadcast (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M18.364 19.364a9 9 0 1 0 -12.728 0" /> <path d="M15.536 16.536a5 5 0 1 0 -7.072 0" /> <path d="M11 13a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/table.svg b/public/js/vvvebjs/icons/table.svgindex f149e0d..98487e1 100755--- a/public/js/vvvebjs/icons/table.svg+++ b/public/js/vvvebjs/icons/table.svg@@ -1,4 +1,6 @@-<svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg">- <path fill="none" d="M0 0h256v256H0z"/>- <path d="M32 56h192v136a8 8 0 0 1-8 8H40a8 8 0 0 1-8-8V56h0ZM32 104h192M32 152h192M88 104v96" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="table">+ <!-- Tabler outline glyph @table (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14" /> <path d="M3 10h18" /> <path d="M10 3v18" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/tabs.svg b/public/js/vvvebjs/icons/tabs.svgold mode 100755new mode 100644index e2fc217..b997ae3--- a/public/js/vvvebjs/icons/tabs.svg+++ b/public/js/vvvebjs/icons/tabs.svg@@ -1,68 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- id="Icons"- version="1.1"- viewBox="0 0 32 32"- xml:space="preserve"- sodipodi:docname="tabs.svg"- inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"><metadata- id="metadata23"><rdf:RDF><cc:Work- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs- id="defs21" /><sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview19"- showgrid="false"- inkscape:zoom="7.375"- inkscape:cx="16.271186"- inkscape:cy="16"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="Icons" /><style- type="text/css"- id="style2">.st0{fill:none;stroke:#000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10}</style><path- class="st0"- d="M12 10V5H4c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h24c1.1 0 2-.9 2-2V10H12z"- id="path4"- stroke-width="1"- stroke-miterlimit="10"- stroke-dasharray="none"- style="stroke-width:1;stroke-miterlimit:10;stroke-dasharray:none" /><path- class="st0"- d="M30 10H12V5h16c1.1 0 2 .9 2 2v3z"- id="path6"- stroke-width="1"- stroke-miterlimit="10"- stroke-dasharray="none"- style="stroke-width:1;stroke-miterlimit:10;stroke-dasharray:none" /><path- class="st0"- id="line8"- stroke-width="1"- stroke-miterlimit="10"- stroke-dasharray="none"- d="M18 5v5"- style="stroke-width:1;stroke-miterlimit:10;stroke-dasharray:none" /><path- class="st0"- id="line10"- stroke-width="1"- stroke-miterlimit="10"- stroke-dasharray="none"- d="M24 5v5"- style="stroke-width:1;stroke-miterlimit:10;stroke-dasharray:none" /></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="tabs">+ <!-- Tabler outline glyph @tabs (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10" /> <path d="M6.36 5a2 2 0 0 1 1.962 1.608l.356 1.784a2 2 0 0 0 1.962 1.608h8.36a2 2 0 0 1 2 2" /> <path d="M12.36 5a2 2 0 0 1 1.962 1.608l.356 1.784a2 2 0 0 0 1.962 1.608" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/tags.svg b/public/js/vvvebjs/icons/tags.svgindex d73acd7..7e3a431 100644--- a/public/js/vvvebjs/icons/tags.svg+++ b/public/js/vvvebjs/icons/tags.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M122.7,25.9,42,42,25.9,122.7a8,8,0,0,0,2.2,7.2L132.5,234.3a7.9,7.9,0,0,0,11.3,0l90.5-90.5a7.9,7.9,0,0,0,0-11.3L129.9,28.1A8,8,0,0,0,122.7,25.9Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><circle cx="84" cy="84" r="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="tags">+ <!-- Tabler outline glyph @tags (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 8v4.172a2 2 0 0 0 .586 1.414l5.71 5.71a2.41 2.41 0 0 0 3.408 0l3.592 -3.592a2.41 2.41 0 0 0 0 -3.408l-5.71 -5.71a2 2 0 0 0 -1.414 -.586h-4.172a2 2 0 0 0 -2 2" /> <path d="M18 19l1.592 -1.592a4.82 4.82 0 0 0 0 -6.816l-4.592 -4.592" /> <path d="M7 10h-.01" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/testimonial.svg b/public/js/vvvebjs/icons/testimonial.svgold mode 100755new mode 100644index cb2bb5e..b12ebd8--- a/public/js/vvvebjs/icons/testimonial.svg+++ b/public/js/vvvebjs/icons/testimonial.svg@@ -1,4 +1,6 @@-<?xml version="1.0" ?>-<svg height="32" width="32" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">- <path d="M3.55 17.707c-.232 0-.417-.293-.419-.656l-.022-5.874c-.002-.363.187-.659.42-.656l3.966.044c.346-.263-.138-1.966-1.404-2.621-1.075-.557-.049-1.667-.101-1.856 1.766.433 2.426 1.117 2.882 1.447.726.592 1.856 2.14 2.138 3.29v0c.042.103.03.222.03.352l.023 5.874c.002.363-.187.656-.419.656zM13.49 17.707c-.231 0-.417-.293-.418-.656l-.022-5.874c-.002-.363.187-.659.419-.656l3.967.044c.346-.263-.138-1.966-1.404-2.621-1.075-.557-.05-1.667-.102-1.856 1.767.433 2.426 1.117 2.883 1.447.725.592 1.855 2.14 2.138 3.29v0c.041.103.03.222.03.352l.022 5.874c.002.363-.186.656-.419.656z" style="opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#333;stroke-width:.83120376;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:markers fill stroke" transform="matrix(1.33333 0 0 -1.33333 0 32)"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="testimonial">+ <!-- Tabler outline glyph @user-heart (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0" /> <path d="M6 21v-2a4 4 0 0 1 4 -4h.5" /> <path d="M18 22l3.35 -3.284a2.143 2.143 0 0 0 .005 -3.071a2.242 2.242 0 0 0 -3.129 -.006l-.224 .22l-.223 -.22a2.242 2.242 0 0 0 -3.128 -.006a2.143 2.143 0 0 0 -.006 3.071l3.355 3.296" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/text_area.svg b/public/js/vvvebjs/icons/text_area.svgindex b1d2c5f..13842f3 100644--- a/public/js/vvvebjs/icons/text_area.svg+++ b/public/js/vvvebjs/icons/text_area.svg@@ -1 +1,6 @@-<svg width="566.273" height="641.809" viewBox="0 0 530.881 601.696" xmlns="http://www.w3.org/2000/svg"><g transform="translate(-110.786 -44.879)"><rect style="fill:none;stroke-width:18.74999964;stroke-linecap:round;stroke-linejoin:round;paint-order:fill markers stroke;stroke:#000;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" width="444.716" height="453.915" x="148.204" y="115.759" ry="1.002"/><path style="fill:none;fill-rule:evenodd;stroke:#000;stroke-width:16.875;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M272.427 198.128c0 113.116-.262 114.053-.262 114.053"/><path style="fill:none;fill-rule:evenodd;stroke:#000;stroke-width:18.4884;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M240.396 197.012h61.697v0"/><path style="fill:none;fill-rule:evenodd;stroke:#000;stroke-width:18.3492;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M240.553 313.727h60.77v0"/></g></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="text area">+ <!-- Tabler outline glyph @letter-case (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M14 15.5a3.5 3.5 0 1 0 7 0a3.5 3.5 0 1 0 -7 0" /> <path d="M3 19v-10.5a3.5 3.5 0 0 1 7 0v10.5" /> <path d="M3 13h7" /> <path d="M21 12v7" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/text_input.svg b/public/js/vvvebjs/icons/text_input.svgindex 41f6369..efb49ac 100644--- a/public/js/vvvebjs/icons/text_input.svg+++ b/public/js/vvvebjs/icons/text_input.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="112" x2="112" y1="48" y2="208"/><path d="M144,72h88a8,8,0,0,1,8,8v96a8,8,0,0,1-8,8H144" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M112,184H24a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8h88" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="50" x2="78" y1="112" y2="112"/><line fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" x1="64" x2="64" y1="112" y2="148"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="text input">+ <!-- Tabler outline glyph @cursor-text (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">+ <path d="M10 12h4" /> <path d="M9 4a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3" /> <path d="M15 4a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/twitter.svg b/public/js/vvvebjs/icons/twitter.svgold mode 100644new mode 100755index f9cb65f..167ec1d--- a/public/js/vvvebjs/icons/twitter.svg+++ b/public/js/vvvebjs/icons/twitter.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M128,88c0-22,18.5-40.3,40.5-40a40,40,0,0,1,36.2,24H240l-32.3,32.3A127.9,127.9,0,0,1,80,224c-32,0-40-12-40-12s32-12,48-36c0,0-64-32-48-120,0,0,40,40,88,48Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="twitter">+ <!-- Tabler outline glyph @brand-twitter (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c0 -.249 1.51 -2.772 1.818 -4.013l0 .001" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/user.svg b/public/js/vvvebjs/icons/user.svgindex 732ae84..08084a0 100755--- a/public/js/vvvebjs/icons/user.svg+++ b/public/js/vvvebjs/icons/user.svg@@ -1,62 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- width="399.99997"- height="559.89838"- viewBox="0 0 399.99996 559.89838"- sodipodi:docname="user.svg">- <metadata- id="metadata8">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <defs- id="defs6" />- <sodipodi:namedview- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1"- objecttolerance="10"- gridtolerance="10"- guidetolerance="10"- inkscape:pageopacity="0"- inkscape:pageshadow="2"- inkscape:window-width="2560"- inkscape:window-height="1391"- id="namedview4"- showgrid="false"- fit-margin-top="80"- fit-margin-left="0"- fit-margin-right="0"- fit-margin-bottom="80"- inkscape:zoom="0.65186406"- inkscape:cx="201.29045"- inkscape:cy="-228.31031"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1"- inkscape:current-layer="svg2" />- <path- style="fill:#000000"- d="m 0,468.5043 c 0,-38.97714 9.497,-72.51672 27.6877,-97.7813 7.4638,-10.36639 23.7152,-25.97863 34.3943,-33.04164 14.1626,-9.36699 31.6128,-17.38503 48.4645,-22.26846 l 8.2726,-2.39729 11.6587,5.91334 c 12.8389,6.51195 28.1919,11.85075 42.0222,14.61259 12.6224,2.52064 42.3776,2.52064 55,0 13.8197,-2.75973 29.1805,-8.09922 41.9877,-14.59507 l 11.6241,-5.89582 8.573,2.48541 c 17.0002,4.92853 33.7318,12.62579 48.3152,22.22713 11.0659,7.2855 30.0648,26.14402 36.9078,36.63516 16.67737,25.5685 25.09217,57.12726 25.09217,94.10595 l 0,11.39405 -199.99997,0 -200,0 0,-11.39405 z M 383.5465,453.64835 C 379.3327,392.9162 349.3194,352.9645 293.3197,333.54461 l -10.1804,-3.5304 -9.8196,4.84586 c -45.6668,22.53591 -100.3741,22.5409 -146.7115,0.0134 l -9.8918,-4.80902 -10.1082,3.50528 c -47.7151,16.54646 -77.6966,49.57175 -86.9965,95.82862 -1.6955,8.43328 -3.5652,24.4284 -3.5944,30.75 l -0.017,3.75 184.1288,0 184.1288,0 -0.7111,-10.25 z M 189,287.31868 c -1.375,-0.244 -5.2,-0.9119 -8.5,-1.48421 -18.7547,-3.2526 -36.8771,-12.64566 -51.7627,-26.82916 -33.6847,-32.09607 -42.1509,-80.03418 -21.4766,-121.60696 5.0176,-10.08962 9.322,-16.08181 18.2007,-25.33762 31.804,-33.154959 79.7273,-41.431959 121.0386,-20.905029 28.2913,14.057479 48.773,41.012989 55.6524,73.242649 1.6517,7.73816 1.6517,31.26184 0,39 -4.3287,20.28002 -12.981,36.9599 -26.6524,51.38036 -15.2381,16.0731 -32.9658,26.16553 -54,30.74247 -6.926,1.50706 -27.6711,2.65442 -32.5,1.7975 z m 28.5,-17.31346 c 17.3347,-3.5957 31.9802,-11.51004 44.5385,-24.06838 21.0679,-21.06786 30.0439,-50.73085 24.0684,-79.53849 -3.5957,-17.33469 -11.5101,-31.98016 -24.0684,-44.5385 -34.475,-34.474949 -89.703,-34.503849 -124.1419,-0.0649 -34.4389,34.4389 -34.41,89.66698 0.065,124.14194 21.0689,21.06891 50.7294,30.04419 79.5384,24.06838 z"- id="path4266"- inkscape:connector-curvature="0" />+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="user">+ <!-- Tabler outline glyph @user (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0" /> <path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2" />+ </g></svg>diff --git a/public/js/vvvebjs/icons/vendor.svg b/public/js/vvvebjs/icons/vendor.svgindex d53cb4b..7d45723 100644--- a/public/js/vvvebjs/icons/vendor.svg+++ b/public/js/vvvebjs/icons/vendor.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M48,139.6V208a8,8,0,0,0,8,8H200a8,8,0,0,0,8-8V139.6" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M54,40H202a8.1,8.1,0,0,1,7.7,5.8L224,96H32L46.3,45.8A8.1,8.1,0,0,1,54,40Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M96,96v16a32,32,0,0,1-64,0V96" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M160,96v16a32,32,0,0,1-64,0V96" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><path d="M224,96v16a32,32,0,0,1-64,0V96" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="vendor">+ <!-- Tabler outline glyph @briefcase (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M3 9a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v9a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -9" /> <path d="M8 7v-2a2 2 0 0 1 2 -2h4a2 2 0 0 1 2 2v2" /> <path d="M12 12l0 .01" /> <path d="M3 13a20 20 0 0 0 18 0" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/video.svg b/public/js/vvvebjs/icons/video.svgold mode 100644new mode 100755index e802d8b..300bcc4--- a/public/js/vvvebjs/icons/video.svg+++ b/public/js/vvvebjs/icons/video.svg@@ -1 +1,6 @@-<?xml version="1.0" ?><svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"><rect fill="none" height="256" width="256"/><path d="M24,60H152a32,32,0,0,1,32,32v96a8,8,0,0,1-8,8H48a32,32,0,0,1-32-32V68A8,8,0,0,1,24,60Z" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/><polyline fill="none" points="184 112 240 80 240 176 184 144" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/></svg>\ No newline at end of file+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="video">+ <!-- Tabler outline glyph @video (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M15 10l4.553 -2.276a1 1 0 0 1 1.447 .894v6.764a1 1 0 0 1 -1.447 .894l-4.553 -2.276v-4" /> <path d="M3 8a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -8" />+ </g>+</svg>diff --git a/public/js/vvvebjs/icons/well.svg b/public/js/vvvebjs/icons/well.svgindex 5315dfe..e033cde 100755--- a/public/js/vvvebjs/icons/well.svg+++ b/public/js/vvvebjs/icons/well.svg@@ -1,82 +1,6 @@-<?xml version="1.0" encoding="UTF-8" standalone="no"?>-<!-- Created with Inkscape (http://www.inkscape.org/) -->--<svg- xmlns:dc="http://purl.org/dc/elements/1.1/"- xmlns:cc="http://creativecommons.org/ns#"- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"- xmlns:svg="http://www.w3.org/2000/svg"- xmlns="http://www.w3.org/2000/svg"- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"- width="112.66362mm"- height="53.315735mm"- viewBox="0 0 399.2018 188.91402"- id="svg2"- version="1.1"- inkscape:version="0.91 r13725"- sodipodi:docname="well.svg">- <defs- id="defs4" />- <sodipodi:namedview- id="base"- pagecolor="#ffffff"- bordercolor="#666666"- borderopacity="1.0"- inkscape:pageopacity="0.0"- inkscape:pageshadow="2"- inkscape:zoom="2.8"- inkscape:cx="159.5224"- inkscape:cy="51.239926"- inkscape:document-units="px"- inkscape:current-layer="layer1"- showgrid="false"- fit-margin-top="10"- fit-margin-left="30"- fit-margin-right="30"- fit-margin-bottom="10"- inkscape:window-width="2560"- inkscape:window-height="1391"- inkscape:window-x="0"- inkscape:window-y="0"- inkscape:window-maximized="1" />- <metadata- id="metadata7">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata>- <g- inkscape:label="Layer 1"- inkscape:groupmode="layer"- id="layer1"- transform="translate(37.816022,-359.17555)">- <rect- style="fill:#e6e6e6;stroke:#e6e6e6;stroke-width:24.33243179;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"- id="rect3361"- width="162.27094"- height="93.715446"- x="80.649406"- y="406.77484"- ry="0"- rx="0" />- <text- xml:space="preserve"- style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"- x="100.15229"- y="461.05621"- id="text3338"- sodipodi:linespacing="125%"><tspan- sodipodi:role="line"- id="tspan3340"- x="100.15229"- y="461.05621"- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:32.5px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000">Hello</tspan></text>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="well">+ <!-- Tabler outline glyph @frame (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M4 7l16 0" /> <path d="M4 17l16 0" /> <path d="M7 4l0 16" /> <path d="M17 4l0 16" /></g></svg>diff --git a/public/js/vvvebjs/icons/youtube.svg b/public/js/vvvebjs/icons/youtube.svgold mode 100755new mode 100644index 6128c8a..c302356--- a/public/js/vvvebjs/icons/youtube.svg+++ b/public/js/vvvebjs/icons/youtube.svg@@ -1,3 +1,6 @@-<svg viewBox="0 0 24 24" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">- <path d="M12.001 20.781h-.005c-.604-.006-5.922-.063-7.675-.233-.126-.021-.206-.031-.293-.042-.642-.078-1.774-.216-2.678-1.175-.801-.823-1.055-2.385-1.098-2.689-.01-.084-.231-1.908-.231-3.786v-1.722c0-1.891.228-3.751.23-3.771.043-.311.295-1.878 1.109-2.714.967-1.026 2.068-1.133 2.598-1.184l.128-.014c3.146-.231 7.862-.233 7.909-.233s4.771.002 7.892.23l.158.017c.527.051 1.627.157 2.605 1.193.801.826 1.055 2.387 1.098 2.691.01.084.23 1.909.23 3.784v1.722c0 1.894-.229 3.754-.229 3.773-.045.311-.297 1.875-1.109 2.711-.963 1.022-2.061 1.133-2.586 1.185l-.137.015c-3.173.232-7.87.242-7.916.242zm-.006-16.762c-.047 0-4.734.002-7.839.231l-.117.012c-.502.048-1.335.129-2.101.941-.535.549-.813 1.681-.894 2.264-.001.013-.222 1.825-.222 3.667v1.722c0 1.829.215 3.607.224 3.683.081.573.359 1.701.883 2.239.709.753 1.584.859 2.163.931.136.016.229.027.339.048 1.717.165 7.332.223 7.569.225l.001.4v-.4c.046 0 4.729-.012 7.847-.239l.123-.013c.5-.05 1.33-.133 2.092-.942.533-.549.813-1.68.893-2.262.002-.013.223-1.824.223-3.669v-1.722a33.91 33.91 0 0 0-.225-3.68c-.08-.574-.357-1.701-.883-2.242-.773-.822-1.607-.902-2.105-.95l-.148-.016c-3.082-.226-7.776-.228-7.823-.228zM8.893 16.27l-.002-9.035 8.556 4.534-8.554 4.501zm.799-7.704.001 6.377 6.037-3.177-6.038-3.2z"/>+<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 24 24" role="img" aria-label="youtube">+ <!-- Tabler outline glyph @brand-youtube (tabler/tabler-icons, MIT) - Vvveb builder component icon -->+ <g fill="none" stroke="#334155" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round">+ <path d="M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8" /> <path d="M10 9l5 3l-5 3l0 -6" />+ </g></svg>diff --git a/public/js/vvvebjs/inputs.js b/public/js/vvvebjs/inputs.jsindex b323a32..b6dea50 100755--- a/public/js/vvvebjs/inputs.js+++ b/public/js/vvvebjs/inputs.js@@ -18,18 +18,16 @@** https://github.com/givanz/Vvveb*/-+let Input = {-+init: function(name) {},-onChange: function(event, node, input) {if (event && event.target) {const e = new CustomEvent('propertyChange', { detail: {value : input.value ?? this.value, input: this, origEvent:event} });event.currentTarget.dispatchEvent(e);- //event.data.element.trigger('propertyChange', [this.value, this, event]);}},@@ -38,33 +36,31 @@ let Input = {},setValue: function(value) {- if (this.element[0] && value) {+ if (this.element?.[0] && value) {let input = this.element[0].querySelector('input');-- if (input) {++ if (input) {input.value = value;}}},-- render: function(name, data) {++ render: function(name, data, events) {let html = this.renderTemplate(name, data);this.element = generateElements(html);-- //bind events- if (this.events)- for (let i in this.events) {- ev = this.events[i][0];- fun = this[ this.events[i][1] ];- el = this.events[i][2];-- //this.element[0].querySelector(el).addEventListener(ev, function (ev, el, fun, target, event) {- this.element[0].addEventListener(ev, function (ev, el, fun, target, event) {- if (event.target.closest(el)) {- //target, event, element, input- return fun.call(event.target, event, target, this);- }- }.bind(this, ev, el, fun, this.element[0]));+ events = events ?? this.events;++ if (events && this.element[0]) {+ for (const [ev, handler, selector] of events) {+ const fun = this[handler];++ this.element[0].addEventListener(ev, function (ev, selector, fun, target, event) {+ if (event.target.closest(selector)) {+ //target, event, element, input+ return fun.call(event.target, event, target, this);+ }+ }.bind(this, ev, selector, fun, this.element[0]));+ }}return this.element[0];@@ -73,11 +69,11 @@ let Input = {let TextInput = { ...Input, ...{- events: [- //event, listener, child element- ["focusout", "onChange", "input"],- ],-+ events: [+ //event, listener, child element+ ["focusout", "onChange", "input"],+ ],+init: function(data) {return this.render("textinput", data);},@@ -86,51 +82,44 @@ let TextInput = { ...Input, ...{let TextareaInput = { ...Input, ...{- events: [- ["keyup", "onChange", "textarea"],- ],-+ events: [+ ["input", "onChange", "textarea"],+ ],+setValue: function(value) {- if (this.element[0] && value) {+ if (this.element?.[0] && value) {let input = this.element[0].querySelector('textarea');-- if (input) {++ if (input) {input.value = value;}}},-+init: function(data) {return this.render("textareainput", data);},- }+ }}let CheckboxInput = { ...Input, ...{- events: [- ["change", "onCheck", "input"],- ],-+ events: [+ ["change", "onCheck", "input"],+ ],+onCheck: function(event, node, input) {input.value = this.checked;return input.onChange.call(this, event, node, input);},setValue: function(value) {- if (this.element[0]) {- let input = this.element[0].querySelector('input');-- if (input) {- if (value) {- input.checked = true;- } else {- input.checked = false;- }- }+ const input = this.element?.[0]?.querySelector('input');+ if (input) {+ input.checked = Boolean(value);}},-+init: function(data) {return this.render("checkboxinput", data);},@@ -138,45 +127,29 @@ let CheckboxInput = { ...Input, ...{}let SelectInput = { ...Input, ...{-- events: [- ["change", "onChange", "select"],- ],-++ events: [+ ["change", "onChange", "select"],+ ],setValue: function(value) {- if (this.element[0] && value) {+ if (this.element?.[0] && value) {let input = this.element[0].querySelector('select');-- if (input) {++ if (input) {input.value = value;}}},-+init: function(data) {return this.render("select", data);},}}-let IconSelectInput = { ...Input, ...{-- events: [- ["change", "onChange", "select"],- ],-+let IconSelectInput = { ...SelectInput, ...{- setValue: function(value) {- if (this.element[0] && value) {- let input = this.element[0].querySelector('select');-- if (input) {- input.value = value;- }- }- },-init: function(data) {return this.render("icon-select", data);},@@ -184,96 +157,94 @@ let IconSelectInput = { ...Input, ...{}let HtmlListSelectInput = { ...Input, ...{-+data:{},cache:{},-- events: [- //["click", "onChange", "li"],- ["change", "onListChange", "select"],- ["keyup", "searchElement", "input.search"],- ["click", "clearSearch", "button.clear-backspace"],- ],-++ events: [+ //["click", "onChange", "li"],+ ["change", "onListChange", "select"],+ ["input", "searchElement", "input.search"],+ ["click", "clearSearch", "button.clear-backspace"],+ ],+clearSearch : function(event, element, input) {- let search = element.querySelector("input.search");- if (search) {- search.value = "";- input.searchElement(event, element, input);- }-+ const search = element.querySelector("input.search");+ if (!search) return;++ search.value = "";+ input.searchElement(event, element, input);search.dispatchEvent(new KeyboardEvent("keyup", {bubbles: true,cancelable: true,}));},-searchElement : function(event, element, input) {- searchText = this.value;-+ const searchText = this.value;+delay(() => {- element.querySelectorAll("li").forEach((el, i) => {-- if (!searchText || el.title.indexOf(searchText) > -1) {- el.style.display = '';- } else {- el.style.display = 'none';- }+ element.querySelectorAll("li").forEach((el) => {+ el.style.display = (!searchText || el.title.indexOf(searchText) > -1) ? "" : "none";});-}, 500);- },+ },onElementClick: function(event, element, input) {let data = input.data;let svg = this.closest(data.insertElement);let value = svg.outerHTML ?? "<svg></svg>";input.value = value;- let ret = input.onChange.call(this, event, element, input);-- return element;+ return input.onChange.call(this, event, element, input);},-+onListChange: function(event, element, input) {- let url = input.data.url.replace('{value}', this.value);+ let url = input.data.url ? String(input.data.url).replace('{value}', this.value) : "";++ if (!url) {+ console.warn("Vvveb: missing list url for html-list-select input");+ return;+ }+let elements = element.querySelector(".elements");-+elements.innerHTML = `<div class="p-4"><div class="spinner-border spinner-border-sm" role="status"><span class="visually-hidden">Loading...</span></div> Loading...</div>`;-+//cache ajax requests- if (input.cache[url] != undefined) {+ if (input.cache[url] !== undefined) {elements.innerHTML = input.cache[url];- } else {- fetch(url)- .then((response) => {- if (!response.ok) { throw new Error(response) }- return response.text()- })- .then((text) => {- input.cache[url] = text;- elements.innerHTML = text;- })- .catch(error => {- console.log(error.statusText);- displayToast("danger", "Error", "Error loading list");- });+ return;}++ fetch(url)+ .then((response) => {+ if (!response.ok) { throw new Error(`HTTP ${response.status} ${response.statusText}`); }+ return response.text()+ })+ .then((text) => {+ input.cache[url] = text;+ elements.innerHTML = text;+ })+ .catch(error => {+ console.error("Vvveb: error loading list", error);+ displayToast("danger", "Error", "Error loading list");+ });},-+setValue: function(value) {- let select = this.element[0].querySelector("select");+ let select = this.element?.[0]?.querySelector("select");if (value && select) {select.value = value;}},-+init: function(data) {this.data = data;- this.events.push(["click", "onElementClick", data.clickElement]);- let template = this.render("html-list-select", data);+ //pass a copy so the click binding doesn't stack up on the shared events array+ const events = [...(this.events ?? []), ["click", "onElementClick", data.clickElement]];+ let template = this.render("html-list-select", data, events);let select = template.querySelector("select");this.onListChange.call(select, new Event('change'), template, this);return template;@@ -283,15 +254,10 @@ let HtmlListSelectInput = { ...Input, ...{let LinkInput = { ...TextInput, ...{- events: [- ["change", "onChange", "input"],- ],- /*- setValue: function(value) {- //value = value.replace(/(?<!\/)www\./, 'https://www.');- this.element.querySelector('input').value = value;- },- */+ events: [+ ["change", "onChange", "input"],+ ],+init: function(data) {return this.render("textinput", data);},@@ -300,10 +266,10 @@ let LinkInput = { ...TextInput, ...{let DateInput = { ...TextInput, ...{- events: [- ["change", "onChange", "input"],- ],-+ events: [+ ["change", "onChange", "input"],+ ],+init: function(data) {return this.render("dateinput", data);},@@ -312,21 +278,26 @@ let DateInput = { ...TextInput, ...{let RangeInput = { ...Input, ...{- events: [- ["change", "onRangeChange", "input"],- ],-+ events: [+ ["change", "onRangeChange", "input"],+ ],+onRangeChange: function(event, node, input) {this.parentNode.querySelector('input[type=number]').value = this.value;this.parentNode.querySelector('input[type=range]').value = this.value;return input.onChange.call(this, event, node, input);- },+ },setValue: function(value) {- this.element[0].querySelector('input[type=number]').value = value;- this.element[0].querySelector('input[type=range]').value = value;+ const root = this.element?.[0];+ if (!root) return;++ const number = root.querySelector('input[type=number]');+ const range = root.querySelector('input[type=range]');+ if (number) number.value = value;+ if (range) range.value = value;},-+init: function(data) {return this.render("rangeinput", data);},@@ -335,10 +306,10 @@ let RangeInput = { ...Input, ...{let NumberInput = { ...Input, ...{- events: [- ["change", "onChange", "input"],- ],-+ events: [+ ["change", "onChange", "input"],+ ],+init: function(data) {return this.render("numberinput", data);},@@ -350,21 +321,21 @@ let CssUnitInput = { ...Input, ...{number:0,unit:"px",- events: [- ["change", "onInputChange", "select"],- ["change", "onInputChange", "input"],- ["keyup", "onInputChange", "input"],- ],-+ events: [+ ["change", "onInputChange", "select"],+ ["change", "onInputChange", "input"],+ ["input", "onInputChange", "input"],+ ],+onInputChange: function(event, node, input) {if (node) {let number = node.querySelector("input").value;let unit = node.querySelector("select").value;- if (this.value != "") input[this.name] = this.value;// this.name = unit or number+ if (this.value != "") input[this.name] = this.value;// this.name = unit or numberif (unit == "") unit = "px";//if unit is not set use default px-- let value = "";++ let value = "";if (unit == "auto") {node.classList.add("auto");value = unit;@@ -373,26 +344,29 @@ let CssUnitInput = { ...Input, ...{node.classList.remove("auto");value = number + (unit ? unit : "");}-+input.value = value;return input.onChange.call(this, event, node, input);}},-+setValue: function(value) {- if (value && this.element) {+ if (value && this.element?.[0]) {let element = this.element[0];this.number = parseFloat(value);- this.unit = value.replace(this.number, '').trim();-- if (this.unit == "auto") element.classList.add("auto");+ this.unit = isNaN(this.number) ? value.trim() : value.replace(String(this.number), '').trim();++ element.classList.toggle("auto", this.unit == "auto");- element.querySelector("input[type=number]").value = this.number;- element.querySelector("select").value = this.unit;+ const numberInput = element.querySelector("input[type=number]");+ if (numberInput) numberInput.value = this.number;++ const unitSelect = element.querySelector("select");+ if (unitSelect) unitSelect.value = this.unit;}},-+init: function(data) {return this.render("cssunitinput", data);},@@ -401,43 +375,39 @@ let CssUnitInput = { ...Input, ...{let ColorInput = { ...Input, ...{- //html5 color input only supports setting values as hex colors even if the picker returns only rgb- rgb2hex: function(value) {- if (value) {- value = value.trim();-- if (rgb = value.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i)) {-- return (rgb && rgb.length === 4) ? "#" +- ("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +- ("0" + parseInt(rgb[2],10).toString(16)).slice(-2) +- ("0" + parseInt(rgb[3],10).toString(16)).slice(-2) : rgb;- }- }-- return value;+ //html5 color input only supports setting values as hex colors even if the picker returns only rgb+ rgb2hex: function(value) {+ if (!value) return value;++ value = value.trim();+ const rgb = value.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);++ if (!rgb || rgb.length !== 4) return value;++ const hex = (part) => ("0" + parseInt(part, 10).toString(16)).slice(-2);+ return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);},- events: [- ["change", "onChange", "input"],- ],+ events: [+ ["change", "onChange", "input"],+ ],setValue: function(value) {- if (this.element[0] && value) {+ if (this.element?.[0] && value) {let input = this.element[0].querySelector('input');-- if (input) {++ if (input) {input.value = this.rgb2hex(value);}}},-+init: function(data) {//if no palette provided use defaultif (!data.palette) {data.palette = Vvveb.ColorPalette.getAll();}-+return this.render("colorinput", data);},}@@ -445,69 +415,79 @@ let ColorInput = { ...Input, ...{let ImageInput = { ...Input, ...{- events: [- ["focusout", "onChange", "input[type=text]"],- ["change", "onUpload", "input[type=file]"],+ events: [+ ["focusout", "onChange", "input[type=text]"],+ ["change", "onUpload", "input[type=file]"],],setValue: function(value) {-- //don't set blob value to avoid slowing down the page- if (value.indexOf("data:image") == -1) {- element.querySelector('input[type="text"]').value = value;+ //don't set blob value to avoid slowing down the page+ if (this.element?.[0] && value && !value.startsWith("data:image")) {+ this.element[0].querySelector('input[type="text"]').value = value;}},- onUpload: function(event, node) {-- if (this.files && this.files[0]) {- let reader = new FileReader();- reader.onload = imageIsLoaded;- reader.readAsDataURL(this.files[0]);- //reader.readAsBinaryString(this.files[0]);- file = this.files[0];- }-- function imageIsLoaded(e) {-- image = e.target.result;-- event.data.element.trigger('propertyChange', [image, this]);-- //return;//remove this line to enable php upload-- let formData = new FormData();- formData.append("file", file);-- $.ajax({- type: "POST",- url: 'upload.php',//set your server side upload script url- data: formData,- processData: false,- contentType: false,- success: function (data) {- console.log("File uploaded at: ", data);-- //if image is succesfully uploaded set image url- event.data.element.trigger('propertyChange', [data, this]);-- //update src input- event.data.element.querySelector('input[type="text"]').value = data;- },- error: function (data) {- alert(data.responseText);- }- });+ /**+ * Show a local preview right away, upload to the media manager endpoint+ * (global uploadUrl, same contract as the tinymce image uploader) and+ * update the value with the returned url.+ */+ onUpload: async function(event, node, input) {+ const file = this.files?.[0];+ if (!file) return;++ const root = input.element?.[0] ?? node;++ //preview/update immediately with the local data url+ const reader = new FileReader();+ reader.onload = () => {+ input.value = reader.result;+ input.onChange.call(this, event, node, input);+ };+ reader.readAsDataURL(file);++ if (typeof uploadUrl === "undefined" || !uploadUrl) {+ console.warn("Vvveb: no uploadUrl configured, skipping image upload");+ return;+ }++ try {+ const formData = new FormData();+ formData.append("files[]", file, file.name);+ formData.append("mediaPath", window.mediaPath ?? "");+ formData.append("onlyFilename", "true");+ formData.append("csrf", document.querySelector("[name=csrf]")?.value ?? "");++ const response = await fetch(uploadUrl, {method: "POST", body: formData, credentials: "same-origin"});+ if (!response.ok) throw new Error(`HTTP ${response.status} ${response.statusText}`);++ const json = await response.json();+ const result = Array.isArray(json) ? json[0] : json;++ displayToast(result?.success ? "success" : "danger", "Upload", result?.message ?? "Image upload failed");++ const url = result?.file ? (window.mediaPath ?? "") + "/" + result.file : null;+ if (!url) return;++ //replace preview with the uploaded url and update the src input+ const textInput = root.querySelector('input[type="text"]');+ if (textInput) textInput.value = url;++ input.value = url;+ input.onChange.call(this, event, node, input);+ } catch (e) {+ console.error("Vvveb: image upload failed", e);+ displayToast("danger", "Error", "Error uploading image");}- }+ }}}let FileUploadInput = { ...TextInput, ...{- events: [- ["focusout", "onChange", "input"],- ],+ events: [+ ["focusout", "onChange", "input"],+ ],init: function(data) {return this.render("textinput", data);@@ -518,26 +498,25 @@ let FileUploadInput = { ...TextInput, ...{let RadioInput = { ...Input, ...{events: [- ["change", "onChange", "input"],- ],+ ["change", "onChange", "input"],+ ],setValue: function(value) {- if (this.element[0] && value) {+ if (this.element?.[0] && value) {let input = this.element[0].querySelector('input');-- if (input) {- if (value == input.value) {- input.setAttribute("checked", "true");- input.checked = true;++ if (input) {+ const selected = (value == input.value);+ input.checked = selected;+ if (selected) {+ input.setAttribute("checked", "checked");} else {- input.checked = false;input.removeAttribute("checked");}-}}},-+init: function(data) {return this.render("radioinput", data);},@@ -547,19 +526,22 @@ let RadioInput = { ...Input, ...{let RadioButtonInput = { ...RadioInput, ...{setValue: function(value) {- if (this.element[0] && value) {+ if (this.element?.[0] && value) {let inputs = this.element[0].querySelectorAll('input');- inputs.forEach((el, i) => {+ let selected = null;+ inputs.forEach((el) => {if (value == el.value) {selected = el;} else {el.checked = false;el.removeAttribute("checked");- }+ }});- selected.checked = true;- selected.setAttribute("checked", "checked");+ if (selected) {+ selected.checked = true;+ selected.setAttribute("checked", "checked");+ }}},@@ -570,9 +552,10 @@ let RadioButtonInput = { ...RadioInput, ...{}let ToggleInput = { ...Input, ...{+events: [- ["change", "onToggleChange", "input"],- ],+ ["change", "onToggleChange", "input"],+ ],onToggleChange: function(event, node, input) {input.value = this.checked ? this.getAttribute("data-value-on") : this.getAttribute("data-value-off");@@ -580,21 +563,21 @@ let ToggleInput = { ...Input, ...{},setValue: function(value) {- if (this.element[0]) {+ if (this.element?.[0]) {let input = this.element[0].querySelector('input');- if (input) {- if (value == input.getAttribute("data-value-on")) {- input.checked = true;- input.setAttribute("checked", true);+ if (input) {+ const selected = (value == input.getAttribute("data-value-on"));+ input.checked = selected;+ if (selected) {+ input.setAttribute("checked", "checked");} else {- input.checked = false;input.removeAttribute("checked");}}}},-+init: function(data) {return this.render("toggle", data);},@@ -603,10 +586,10 @@ let ToggleInput = { ...Input, ...{let ValueTextInput = { ...TextInput, ...{- events: [- ["focusout", "onChange", "input"],- ],-+ events: [+ ["focusout", "onChange", "input"],+ ],+init: function(data) {return this.render("textinput", data);},@@ -615,10 +598,10 @@ let ValueTextInput = { ...TextInput, ...{let GridLayoutInput = { ...TextInput, ...{- events: [- ["focusout", "onChange", "input"],- ],-+ events: [+ ["focusout", "onChange", "input"],+ ],+init: function(data) {return this.render("textinput", data);},@@ -627,10 +610,10 @@ let GridLayoutInput = { ...TextInput, ...{let ProductsInput = { ...TextInput, ...{- events: [- ["focusout", "onChange", "input"],- ],-+ events: [+ ["focusout", "onChange", "input"],+ ],+init: function(data) {return this.render("textinput", data);},@@ -638,25 +621,22 @@ let ProductsInput = { ...TextInput, ...{}let GridInput = { ...Input, ...{-- events: [- ["change", "onChange", "select" /*'select'*/],- ["click", "onChange", "button" /*'select'*/],- ],-+ events: [+ ["change", "onChange", "select" /*'select'*/],+ ["click", "onChange", "button" /*'select'*/],+ ],setValue: function(value) {- if (this.element[0] && value) {+ if (this.element?.[0] && value) {let input = this.element[0].querySelector('select');-- if (input) {++ if (input) {input.value = value;- input.querySelector("option[selected]").selected = true;}}},-+init: function(data) {return this.render("grid", data);},@@ -664,17 +644,16 @@ let GridInput = { ...Input, ...{}let TextValueInput = { ...Input, ...{-- events: [- ["focusout", "onChange", "input"],- ["click", "onChange", "button" /*'select'*/],- ],-+ events: [+ ["focusout", "onChange", "input"],+ ["click", "onChange", "button" /*'select'*/],+ ],+setValue: function(value) {return false;},-+init: function(data) {return this.render("textvalue", data);},@@ -683,21 +662,20 @@ let TextValueInput = { ...Input, ...{let ButtonInput = { ...Input, ...{- events: [- ["click", "onChange", "button" /*'select'*/],- ],-+ events: [+ ["click", "onChange", "button" /*'select'*/],+ ],setValue: function(value) {- if (this.element[0] && value) {+ if (this.element?.[0] && value) {let input = this.element[0].querySelector('button');-- if (input) {++ if (input) {input.value = value;}- }+ }},-+init: function(data) {return this.render("button", data);},@@ -706,75 +684,82 @@ let ButtonInput = { ...Input, ...{let SectionInput = { ...Input, ...{- events: [- //["click", "onChange", "button" /*'select'*/],- ],--setValue: function(value) {return false;},-+init: function(data) {return this.render("sectioninput", data);},}}+let PopOverInput = { ...Input, ...{++ setValue: function(value) {+ return false;+ },++ init: function(data) {+ return this.render("popoverinput", data);+ },+ }+}+let ListInput = { ...Input, ...{-- events: [- ["change", "onChange", "select"],- ["click", "remove", ".delete-btn"],- ["click", "add", ".btn-new"],- ["click", "select", ".section-item"],- ],-++ events: [+ ["change", "onChange", "select"],+ ["click", "remove", ".delete-btn"],+ ["click", "add", ".btn-new"],+ ["click", "select", ".section-item"],+ ],remove: function(event, node, input) {- let sectionItem = this.closest(".section-item");- let index = [...sectionItem.parentNode.children].indexOf(sectionItem);//sectionItem.index();- let data = input.data;-+ const sectionItem = this.closest(".section-item");+ if (!sectionItem) return false;++ const index = [...sectionItem.parentNode.children].indexOf(sectionItem);//sectionItem.index();+ const data = input.data;+if (data.removeElement) {let container = input.node;if (data.container) {- container.querySelector(data.container);+ container = container.querySelector(data.container) ?? container;}- container.querySelector(data.selector + ":nth-child(" + (index + 1) + ")").remove();+ container.querySelector(data.selector + ":nth-child(" + (index + 1) + ")")?.remove();}sectionItem.remove();-+event.action = "remove";event.index = index;- input.onChange(event, node, input, this);+ input.onChange(event, node, input);event.preventDefault();return false;},add: function(event, node, input) {- let newElement = input.data.newElement ?? false;+ const data = input.data ?? {};+ const newElement = data.newElement ?? false;if (newElement) {let container = input.node;if (data.container) {- container.querySelector(data.container);- }+ container = container.querySelector(data.container) ?? container;+ }container.append(generateElements(newElement)[0]);}-+event.action = "add";- input.onChange(event, node, input, this);+ input.onChange(event, node, input);return false;- },-+ },+select: function(event, node, input) {- let sectionItem = this.closest(".section-item");- if (sectionItem.parentNode) {- let index = [...sectionItem.parentNode.children].indexOf(sectionItem);//sectionItem.index();-+ const sectionItem = this.closest(".section-item");+ if (sectionItem?.parentNode) {event.action = "select";- event.index = index;- input.onChange(event, node, input, this);+ event.index = [...sectionItem.parentNode.children].indexOf(sectionItem);//sectionItem.index();+ input.onChange(event, node, input);}return false;},@@ -789,13 +774,14 @@ let ListInput = { ...Input, ...{let elements = this.node.querySelectorAll(data.container + " " + this.selector);let options = [];-- elements.forEach(function (e, i) {++ elements.forEach((e, i) => {let element = e;if (data.nameElement) {- element = element.querySelector(data.nameElement);+ element = element.querySelector(data.nameElement) ?? e;}- let name = (data.name = "text" ? element.textContent.substr(0, 15) : element.id);+ //"text" (or unset) labels items by their text content, otherwise by element id+ const name = (!data.name || data.name == "text") ? element.textContent.slice(0, 15) : element.id;options.push({name: name,type: (data.prefix ?? "") + (i + 1) + (data.suffix ?? ""),@@ -808,8 +794,8 @@ let ListInput = { ...Input, ...{let list = this.render("listinput", data);let items = list.querySelectorAll(".section-item");- let i = 0;- for (const item of items) {++ items.forEach((item, i) => {const container = item.querySelector(".tree") ?? item;let properties = {};if (data.elementProperties) {@@ -818,10 +804,9 @@ let ListInput = { ...Input, ...{properties[prop].element = elements[i];}}-+Vvveb.Components.renderProperties(null, properties, null, container);- i++;- }+ });return list;},@@ -830,10 +815,10 @@ let ListInput = { ...Input, ...{let AutocompleteInput = { ...Input, ...{- events: [- ["autocomplete.change", "onAutocompleteChange", "input"],- ["input", "onAutocompleteChange", "input"],- ],+ events: [+ ["autocomplete.change", "onAutocompleteChange", "input"],+ ["input", "onAutocompleteChange", "input"],+ ],onAutocompleteChange: function(event, node, input) {input.value = event.detail.value;@@ -842,16 +827,14 @@ let AutocompleteInput = { ...Input, ...{setValue: function(value) {if (this.element && value) {- let input = this.element.querySelectorAll('input').forEach(e => e.value = value);+ this.element.querySelectorAll('input').forEach(e => e.value = value);}- },+ },init: function(data) {-this.element = this.render("textinput", data);-- let autocomplete = new _AutocompleteInput(this.element.querySelector("input"), data);-+ this.autocomplete = new _AutocompleteInput(this.element.querySelector("input"), data);+return this.element;}}@@ -859,9 +842,9 @@ let AutocompleteInput = { ...Input, ...{let AutocompleteList = { ...Input, ...{- events: [- ["autocompletelist.change", "onAutocompleteChange", "input"],- ],+ events: [+ ["autocompletelist.change", "onAutocompleteChange", "input"],+ ],onAutocompleteChange: function(event, node, input) {input.value = event.detail;@@ -870,16 +853,14 @@ let AutocompleteList = { ...Input, ...{setValue: function(value) {if (this.element && value) {- let input = this.element.querySelectorAll('input').forEach(e => e.value = value);- }+ this.element.querySelectorAll('input').forEach(e => e.value = value);+ }},init: function(data) {-this.element = this.render("textinput", data);-- let autocomplete = new _AutocompleteList(this.element.querySelector("input"), data);-+ this.autocomplete = new _AutocompleteList(this.element.querySelector("input"), data);+return this.element;}}@@ -887,42 +868,43 @@ let AutocompleteList = { ...Input, ...{let TagsInput = { ...Input, ...{- events: [- ["tagsinput.change", "onTagsInputChange", "input"],- ],+ separator: " ",++ events: [+ ["tagsinput.change", "onTagsInputChange", "input"],+ ],onTagsInputChange: function(event, node, input) {let tags = "";for (const tag in event.detail[0]) {- if (tags) tags += " ";- tags += tag;+ if (tag) {+ if (tags) tags += input.separator;+ tags += tag;+ }}+input.value = tags;return input.onChange.call(this, event, node, input);},setValue: function(value) {if (this.autocomplete && value) {- this.autocomplete.tagsInput.setValue(value.split(" "));+ this.autocomplete.tagsInput.setValue(value.trim().split(this.separator));}},init: function(data) {-+ this.separator = data.separator ?? " ";this.element = this.render("tagsinput", data);this.autocomplete = new _TagsInput(this.element.querySelector("input"), data);-+return this.element;}}}-let NoticeInput = { ...Input, ...{- events: [- ],-init: function(data) {return this.render("noticeinput", data);},diff --git a/public/js/vvvebjs/plugin-aos.js b/public/js/vvvebjs/plugin-aos.jsold mode 100755new mode 100644index 0031ced..d080ab9--- a/public/js/vvvebjs/plugin-aos.js+++ b/public/js/vvvebjs/plugin-aos.js@@ -32,12 +32,12 @@ The edited page should include the aos library https://github.com/michalsnik/aos</script>*///clean aos classes on save-window.addEventListener("vvveb.getHtml.before", function(event) {+window.addEventListener("Vvveb.getHtml.before", function(event) {let doc = event.detail;doc.querySelectorAll("[data-aos]").forEach(e => e.classList.remove("aos-animate", "aos-init"));});-window.addEventListener("vvveb.getHtml.after", function(event) {+window.addEventListener("Vvveb.getHtml.after", function(event) {let doc = event.detail;doc.querySelectorAll("[data-aos]").forEach(e => e.classList.add("aos-animate", "aos-init"));});@@ -275,7 +275,7 @@ let ComponentBaseAnimateScroll = {sort: base_sort++,section: advanced_section,inputtype: ButtonInput,- data: {text:"Play animation", icon:"la-play"},+ data: {text:"Play animation", icon:"player-play"},onChange: function(node, value) {node.classList.remove("aos-init","aos-animate");delay(() => node.classList.add("aos-init","aos-animate"),diff --git a/public/js/vvvebjs/plugin-bootstrap-colorpicker.js b/public/js/vvvebjs/plugin-bootstrap-colorpicker.jsindex 20de489..a7f3613 100755--- a/public/js/vvvebjs/plugin-bootstrap-colorpicker.js+++ b/public/js/vvvebjs/plugin-bootstrap-colorpicker.js@@ -1,12 +1,11 @@-let ColorInput = { ...ColorInput, ...{+ColorInput = { ...ColorInput, ...{events: [["change", "onChange", "input"],],setValue: function(value) {- let color = this.rgb2hex(value);- $('input', this.element).val();+ $('input', this.element).val(value);$('i', this.element).css('background-color', value);},@@ -16,5 +15,5 @@ let ColorInput = { ...ColorInput, ...{return colorinput;},}-);+};diff --git a/public/js/vvvebjs/plugin-codemirror.js b/public/js/vvvebjs/plugin-codemirror.jsindex 1c4cd4a..a7b5b1b 100755--- a/public/js/vvvebjs/plugin-codemirror.js+++ b/public/js/vvvebjs/plugin-codemirror.js@@ -55,7 +55,7 @@ Vvveb.CodeEditor = {//load code when a new url is loadedVvveb.Builder.documentFrame.addEventListener("load", () => Vvveb.CodeEditor.setValue());- window.addEventListener("vvveb.Builder.selectNode", (e) => Vvveb.CodeEditor.setSelection(e));+ window.addEventListener("Vvveb.Builder.selectNode", (e) => Vvveb.CodeEditor.setSelection(e));}this.isActive = true;@@ -124,7 +124,7 @@ Vvveb.ModalCodeEditor.init = function (modal = false, editor = false) {let self = this;this.modal.querySelector('.save-btn').addEventListener("click", function(event) {- window.dispatchEvent(new CustomEvent("vvveb.ModalCodeEditor.save", {detail: self.getValue()}));+ window.dispatchEvent(new CustomEvent("Vvveb.ModalCodeEditor.save", {detail: self.getValue()}));self.hide();return false;});@@ -169,8 +169,8 @@ Vvveb.CssEditor = {delay(() => Vvveb.StyleManager.setCss(e.getValue()), 1000);});- window.addEventListener("vvveb.Builder.selectNode", (e) => Vvveb.CssEditor.setSelection(e));- window.addEventListener("vvveb.StyleManager.setStyle", Vvveb.CssEditor.setStyle);+ window.addEventListener("Vvveb.Builder.selectNode", (e) => Vvveb.CssEditor.setSelection(e));+ window.addEventListener("Vvveb.StyleManager.setStyle", Vvveb.CssEditor.setStyle);}this.setValue(Vvveb.StyleManager.getCss());diff --git a/public/js/vvvebjs/section.js b/public/js/vvvebjs/section.jsindex 898c400..061b474 100644--- a/public/js/vvvebjs/section.js+++ b/public/js/vvvebjs/section.js@@ -19,11 +19,35 @@* https://github.com/givanz/Vvveb*/-let bgVideoTemplate = '<video playsinline loop muted autoplay src="../../media/demo/sample.webm" poster="../../media/demo/sample.webp"><video>';-let bgYoutubeTemplate = '<div class="iframe-container"><iframe src="https://www.youtube.com/embed/XJpVLAYgUzY?autoplay=1&loop=1&playsinline=1&controls=0&mute=1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe></div>';+let bgVideoTemplate = '<video playsinline loop muted autoplay src="../../media/demo/sample.webm" poster="../../media/demo/sample.webp"></video>';+let bgYoutubeTemplate = '<div class="iframe-container"><iframe src="https://www.youtube.com/embed/C6fOoy7Se_4?autoplay=1&loop=1&playsinline=1&controls=0&mute=1" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe></div>';let bgImageTemplate = '<img src="../../media/demo/sample.webp">';let defaultSeparatorSvg = '<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 41" width="100%" height="300" fill="var(--bs-body-bg)" preserveAspectRatio="none"><defs><style>.cls-1{fill:inherit}</style></defs><title>rough-edges-bottom</title><path class="cls-1" d="M0,185l125-26,33,17,58-12s54,19,55,19,50-11,50-11l56,6,60-8,63,15v15H0Z" transform="translate(0 -159)"/></svg>';+//background type -> element selector / template used to create it inside .background-container+const backgrounds = {+ "bg-image": {selector: "img", template: bgImageTemplate},+ "bg-video": {selector: "video", template: bgVideoTemplate},+ "bg-yt": {selector: ".iframe-container", template: bgYoutubeTemplate},+};++function getBackgroundType(node) {+ if (!node || typeof node.querySelector !== "function") return "";+ const container = node.querySelector(":scope > .background-container");+ if (!container) return "";++ const isVisible = (el) => el && (el.offsetParent || el.offsetHeight || !el.classList.contains("d-none"));++ let type = "";+ for (const [value, bg] of Object.entries(backgrounds)) {+ if (isVisible(container.querySelector(":scope > " + bg.selector))) {+ type = value;+ }+ }++ return type;+}+let section_sort = 1;let SectionContent = [{@@ -36,56 +60,55 @@ let SectionContent = [{name: "Container width",key: "container-width",sort: section_sort++,- child:":scope > .container, :scope > .container-fluid",+ child: ":scope > .container, :scope > .container-fluid",htmlAttr: "class",validValues: ["container", "container-fluid"],inputtype: RadioButtonInput,data: {- extraclass:"btn-group-sm btn-group-fullwidth",+ extraclass: "btn-group-sm btn-group-fullwidth",options: [{- value: "container",- icon:"la la-box",- text: "Boxed",- title: "Boxed"- },{- value: "container-fluid",- icon:"la la-arrows-alt-h",- title: "Full",- text: "Full"+ value: "container",+ icon: "box",+ text: "Boxed",+ title: "Boxed"+ },{+ value: "container-fluid",+ icon: "arrows-horizontal",+ text: "Full",+ title: "Full"}]}},{name: "Container height",key: "container-height",sort: section_sort++,- child:":scope > .container:first-child, :scope > .container-fluid:first-child",+ child: ":scope > .container:first-child, :scope > .container-fluid:first-child",htmlAttr: "class",validValues: ["", "vh-100"],inputtype: RadioButtonInput,data: {- extraclass:"btn-group-sm btn-group-fullwidth",- options: [{- value: "container",- icon:"la la-expand",- text: "Auto",- title: "Auto",- checked:true,+ extraclass: "btn-group-sm btn-group-fullwidth",+ options: [{+ value: "container",+ icon: "maximize",+ text: "Auto",+ title: "Auto",+ checked: true,},{- value: "vh-100",- icon:"la la-arrows-alt-v",- title: "Full",- text: "Full"+ value: "vh-100",+ icon: "arrows-vertical",+ text: "Full",+ title: "Full"}]}}-];+];let SectionBackground = [{key: "section_background_header",inputtype: SectionInput,name:false,sort: section_sort++,- //section: style_section,data: {header:"Background"},},{name: false,@@ -102,27 +125,27 @@ let SectionBackground = [{checked:true,},{value: "bg-image",- icon:"la la-image",+ icon:"photo",text: "Image",- title: "Image",- },{/*+ title: "Image",+ },{/*value: "gradient",- icon:"la la-palette",+ icon:"palette",text: "Gradient",title: "Gradient",- },{*/+ },*/value: "bg-video",- icon:"la la-video",+ icon:"video",text: "Video",title: "Video",},{value: "bg-yt",- icon:"lab la-youtube",+ icon:"brand-youtube",text: "Youtube",title: "Youtube",/*},{value: "slideshow",- icon:"la la-arrows-alt-h",+ icon:"arrows-horizontal",text: "Slider",title: "Slider",*/}],@@ -130,97 +153,54 @@ let SectionBackground = [{hideGroups : function() {document.querySelectorAll('.mb-2[data-group="bg-image"],.mb-2[data-group="bg-video"],.mb-2[data-group="bg-yt"]').forEach(e => e.classList.add("d-none"));},-+onChange : function(node, value, input) {+ if (!node || typeof node.querySelector !== "function") return node;this.hideGroups();- document.querySelectorAll('.mb-2[data-group="'+ input.value + '"].d-none').forEach((el, i) => {- el.classList.remove("d-none");- });+ document.querySelectorAll(`.mb-2[data-group="${input.value}"].d-none`).forEach((el) => el.classList.remove("d-none"));let container = node.querySelector(":scope > .background-container");if (!container) {container = generateElements('<div class="background-container"></div>')[0];node.appendChild(container);}-- let img = node.querySelector(":scope > .background-container > img");- let video = node.querySelector(":scope > .background-container > video");- let yt = node.querySelector(":scope > .background-container > .iframe-container ");-- container.querySelectorAll(":scope > *").forEach((el, i) => {- el.classList.add("d-none");- });-- switch (value) {- case "bg-image":- if (img) {- img.classList.remove("d-none");- } else {- container.append(generateElements(bgImageTemplate)[0]);- //reselect element to load image- node.click();- }- break;- case "bg-video":- if (video) {- video.classList.remove("d-none");- } else {- container.append(generateElements(bgVideoTemplate)[0]);- //reselect element to load video- node.click();- }- break;- case "bg-yt":- if (yt) {- yt.classList.remove("d-none");- } else {- container.append(generateElements(bgYoutubeTemplate)[0]);- //reselect element to load video- node.click();- }- break;- }+ //hide all background types, then show or create the selected one+ container.querySelectorAll(":scope > *").forEach((el) => el.classList.add("d-none"));++ const bg = backgrounds[value];+ if (bg) {+ const element = container.querySelector(":scope > " + bg.selector);+ if (element) {+ element.classList.remove("d-none");+ } else {+ container.append(generateElements(bg.template)[0]);+ //reselect element to load image / video+ if (typeof node.click === "function") node.click();+ }+ }return node;- },+ },init: function(node) {- let selected = "none";- let img = node.querySelector(":scope > .background-container > img");- let video = node.querySelector(":scope > .background-container > video");- let yt = node.querySelector(":scope > .background-container > .iframe-container ");-- if (img && (img.offsetParent || img.offsetHeight || !img.classList.contains("d-none"))) {- selected = "bg-image";- }-- if (video && (video.offsetParent || video.offsetHeight || !video.classList.contains("d-none"))) {- selected = "bg-video";- }-- if (yt && (yt.offsetParent || yt.offsetHeight || !yt.classList.contains("d-none"))) {- selected = "bg-yt";- }-this.hideGroups();- return selected;- },+ return getBackgroundType(node) || "none";+ },},{name: "Image",key: "src",sort: section_sort++,htmlAttr: "src",- child:":scope > .background-container > img",+ child: ":scope > .background-container > img",group:"bg-image",inline:true,inputtype: ImageInput},{name: "Video",- child: "source",key: "src",sort: section_sort++,htmlAttr: "src",- child:":scope > .background-container > video",+ child: ":scope > .background-container > video",group:"bg-video",inline:true,inputtype: VideoInput@@ -229,7 +209,7 @@ let SectionBackground = [{key: "poster",sort: section_sort++,htmlAttr: "poster",- child:":scope > .background-container > video",+ child: ":scope > .background-container > video",group:"bg-video",inline:true,inputtype: ImageInput@@ -238,20 +218,42 @@ let SectionBackground = [{key: "src",sort: section_sort++,htmlAttr: "src",- child:":scope > .background-container > .iframe-container > iframe",+ child: ":scope > .background-container > .iframe-container > iframe",group:"bg-yt",inline:true,inputtype: TextInput,onChange: function(node, value) {- return value.replace("watch?v=", "embed/") + "?autoplay=1&loop=1&playsinline=1&controls=0&mute=1";+ let url = String(value ?? "").trim();+ if (!url) return "";- return node;+ //convert watch/shorts/short-link urls to embed format+ let match = url.match(/[?&]v=([^&#]+)/) || url.match(/youtu\.be\/([^?&#/]+)/) || url.match(/\/shorts\/([^?&#/]+)/);+ if (match) {+ //keep unrelated params like list= or t=, playback params are re-added below+ let rest = "";+ try {+ const parsed = new URL(url, "https://www.youtube.com");+ parsed.searchParams.delete("v");+ ["autoplay", "loop", "playsinline", "controls", "mute"].forEach(p => parsed.searchParams.delete(p));+ rest = parsed.searchParams.toString();+ } catch (e) {}+ url = "https://www.youtube.com/embed/" + match[1] + (rest ? "?" + rest : "");+ } else {+ url = url.replace("watch?v=", "embed/");+ }++ //youtube playback params only make sense on youtube urls+ if (/youtu\.?be/.test(url) && !url.includes("autoplay=1")) {+ url += (url.includes("?") ? "&" : "?") + "autoplay=1&loop=1&playsinline=1&controls=0&mute=1";+ }++ return url;},},{name: "Parallax",key: "parallax",sort: section_sort++,- child:":scope > .background-container",+ child: ":scope > .background-container",htmlAttr: "class",validValues: ["", "parallax"],inputtype: ToggleInput,@@ -259,8 +261,8 @@ let SectionBackground = [{className: "",on: 'parallax',off: ''- },- },+ },+ },];@@ -269,7 +271,6 @@ let SectionOverlay = [{inputtype: SectionInput,name:false,sort: section_sort++,- //section: style_section,data: {header:"Overlay"},},{//name: "Enable",@@ -285,12 +286,13 @@ let SectionOverlay = [{off: 'false'},onChange : function(node, value, input) {- let group = document.querySelectorAll('.mb-2[data-group="overlay"]');+ if (!node || typeof node.querySelector !== "function") return node;+ const group = document.querySelectorAll('.mb-2[data-group="overlay"]');let overlay = node.querySelector(":scope > .overlay");-+if (value == 'true') {group.forEach(e => e.classList.remove("d-none"));-+if (!overlay) {overlay = generateElements('<div class="overlay"></div>')[0];node.appendChild(overlay);@@ -302,11 +304,12 @@ let SectionOverlay = [{if (overlay) overlay.classList.add("d-none");}- return element;- },+ return node;+ },init: function(node) {- let overlay = node.querySelector(":scope > .overlay");- let group = document.querySelectorAll('.mb-2[data-group="overlay"]');+ if (!node || typeof node.querySelector !== "function") return 'false';+ const overlay = node.querySelector(":scope > .overlay");+ const group = document.querySelectorAll('.mb-2[data-group="overlay"]');if (overlay && overlay.offsetParent) {group.forEach(e => e.classList.remove("d-none"));@@ -315,13 +318,13 @@ let SectionOverlay = [{group.forEach(e => e.classList.add("d-none"));return 'false';}- }+ }},{name: "Color",key: "background-color",sort: section_sort++,htmlAttr: "style",- child:":scope > .overlay",+ child: ":scope > .overlay",group:"overlay",inputtype: ColorInput},{@@ -331,22 +334,24 @@ let SectionOverlay = [{htmlAttr: "style",inline:false,group:"overlay",- child:":scope > .overlay",+ child: ":scope > .overlay",inputtype: RangeInput,data:{- max: 1, //max zoom level+ max: 1,min:0,step:0.1}}];+/**+ * Property definitions shared by the top and bottom separators.+ */function sectionSeparatorProperties(name, title) {return [{key: `section_${name}_separator`,inputtype: SectionInput,name:false,sort: section_sort++,- //section: style_section,data: {header:`${title} Separator`},},{//name: "Enable",@@ -361,12 +366,13 @@ function sectionSeparatorProperties(name, title) {off: 'false'},onChange : function(node, value, input) {- let group = document.querySelectorAll(`[data-group="${name}_separator"]`);+ if (!node || typeof node.querySelector !== "function") return node;+ const group = document.querySelectorAll(`[data-group="${name}_separator"]`);let separator = node.querySelector(`:scope > .${name}.separator`);if (value == 'true') {group.forEach(e => e.classList.remove("d-none"));-+if (!separator) {separator = generateElements(`<div class="separator ${name}">${defaultSeparatorSvg}</div>`)[0];node.appendChild(separator);@@ -375,15 +381,16 @@ function sectionSeparatorProperties(name, title) {}} else {group.forEach(e => e.classList.add("d-none"));- separator.classList.add("d-none");+ if (separator) separator.classList.add("d-none");}- return element;- },+ return node;+ },init: function(node) {- let group = node.querySelectorAll(`[data-group="${name}_separator"]`);- let separator = node.querySelector(`:scope > .${name}.separator`);-+ if (!node || typeof node.querySelector !== "function") return 'false';+ const group = document.querySelectorAll(`[data-group="${name}_separator"]`);+ const separator = node.querySelector(`:scope > .${name}.separator`);+if (separator && separator.offsetParent) {group.forEach(e => e.classList.remove("d-none"));return 'true';@@ -391,7 +398,7 @@ function sectionSeparatorProperties(name, title) {group.forEach(e => e.classList.add("d-none"));return 'false';}- }+ }},{name: "Icon",key: "icon",@@ -401,17 +408,19 @@ function sectionSeparatorProperties(name, title) {child:`.separator.${name} > svg`,inputtype: HtmlListSelectInput,onChange:function(element, value, input, component) {- let newElement = generateElements(value)[0];- let attributes = element.attributes;-+ if (!element || !element.attributes || typeof element.replaceWith !== "function") return element;+ const newElement = generateElements(value || "")[0];+ if (!newElement) return element;+ const attributes = element.attributes;+//keep old svg size and colorsfor (let i = 0; i < attributes.length; i++) {- let attr = attributes[i];+ const attr = attributes[i];if (attr.name && attr.name != "viewBox") {newElement.setAttribute(attr.name, attr.value);}}-+element.replaceWith(newElement);return newElement;},@@ -423,6 +432,12 @@ function sectionSeparatorProperties(name, title) {options: [{value: "digital-red-panther",text: "Red panther"+ },{+ value: "geometric",+ text: "Geometric"+ },{+ value: "organic",+ text: "Organic"}]},},{@@ -450,7 +465,7 @@ function sectionSeparatorProperties(name, title) {max: 640,min:6,step:1- }+ }},{name: "Stroke width",key: "stroke-width",@@ -463,22 +478,13 @@ function sectionSeparatorProperties(name, title) {max: 512,min:1,step:1- }- },/*{- key: "separator_svg_style_header",- inputtype: SectionInput,- name:false,- group:`${name}_separator`,- sort: section_sort++,- //section: style_section,- data: {header:"Svg colors"},- },*/ {+ }+ },{name: "Fill Color",key: "fill",sort: section_sort++,col:12,inline:true,- //section: style_section,group:`${name}_separator`,child:`.separator.${name} > svg`,htmlAttr: "fill",@@ -489,10 +495,9 @@ function sectionSeparatorProperties(name, title) {sort: section_sort++,col:12,inline:true,- //section: style_section,- group:`${name}_separator`,- child:`.separator.${name} > svg`,- htmlAttr: "color",+ group:`${name}_separator`,+ child:`.separator.${name} > svg`,+ htmlAttr: "color",inputtype: ColorInput,},{name: "Stroke",@@ -500,7 +505,6 @@ function sectionSeparatorProperties(name, title) {sort: section_sort++,col:12,inline:true,- //section: style_section,group:`${name}_separator`,child:`.separator.${name} > svg`,htmlAttr: "color",@@ -514,7 +518,6 @@ let SectionBottomSeparator = [{inputtype: SectionInput,name:false,sort: section_sort++,- //section: style_section,data: {header:"Bottom Separator"},},{//name: "Enable",@@ -529,9 +532,9 @@ let SectionBottomSeparator = [{on: "active",off: ""}- },+ },];-+/* Section */let ComponentSectionContent = [...SectionContent,@@ -540,162 +543,45 @@ let ComponentSectionContent = [...sectionSeparatorProperties("top", "Top"),...sectionSeparatorProperties("bottom", "Bottom"),];--let ComponentSectionStyle = [];/*[{- key: "Section Style",- inputtype: SectionInput,- name:false,- //section: style_section,- data: {header:"Style"},- },{- name: "Text1 Style",- key: "text1",- htmlAttr: "innerHTML",- inputtype: TextInput,- //section: style_section,- },{- name: "Name1 Style",- key: "name1",- htmlAttr: "name",- inputtype: TextInput,- //section: style_section,- },{- name: "Type1 Style",- key: "type1",- htmlAttr: "type",- inputtype: SelectInput,- //section: style_section,- data: {- options: [{- value: "button",- text: "button"- },{- value: "reset",- text: "reset"- },{- value: "submit",- text: "submit"- }],- }- },{- name: "Autofocus1 Style",- key: "autofocus1",- htmlAttr: "autofocus",- inputtype: CheckboxInput,- inline:true,- col:6,- //section: style_section- },{- name: "Disabled1 Style",- key: "disabled1",- htmlAttr: "disabled",- inputtype: CheckboxInput,- inline:true,- col:6,- //section: style_section,-}];*/--let ComponentSectionAdvanced = [];/* [{- key: "Section Advanced",- inputtype: SectionInput,- name:false,- section: advanced_section,- data: {header:"Advanced"},- },{- name: "Text1 Advanced",- key: "text1",- htmlAttr: "innerHTML",- inputtype: TextInput,- section: advanced_section,- },{- name: "Name1 Advanced",- key: "name1",- htmlAttr: "name",- inputtype: TextInput,- section: advanced_section,- },{- name: "Type1 Advanced",- key: "type1",- htmlAttr: "type",- inputtype: SelectInput,- section: advanced_section,- data: {- options: [{- value: "button",- text: "button"- },{- value: "reset",- text: "reset"- },{- value: "submit",- text: "submit"- }],- }- },{- name: "Autofocus1 Advanced",- key: "autofocus1",- htmlAttr: "autofocus",- inputtype: CheckboxInput,- inline:true,- col:6,- section: advanced_section- },{- name: "Disabled1 Advanced",- key: "disabled1",- htmlAttr: "disabled",- inputtype: CheckboxInput,- inline:true,- col:6,- section: advanced_section,-}];*/+let ComponentSectionStyle = [];++let ComponentSectionAdvanced = [];+/**+ * Panel init: hide all optional property groups, then show the ones matching+ * the selected node's current background / overlay / separators state.+ */function componentsInit(node) {-- document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));-- let img = node.querySelector(":scope > .background-container img");- let video = node.querySelector(":scope > .background-container video");- let yt = node.querySelector(":scope > .background-container .iframe-container");- let overlay = node.querySelector(":scope > .overlay");- let separatorTop = node.querySelector(":scope > .separator.top");- let separatorBottom = node.querySelector(":scope > .separator.bottom");- let bg = "";-- if (img && (img.offsetParent || img.offsetHeight || !img.classList.contains("d-none"))) {- bg = "bg-image";- }-- if (video && (video.offsetParent || video.offsetHeight || !video.classList.contains("d-none"))) {- bg = "bg-video";- }-- if (yt && (yt.offsetParent || yt.offsetHeight || !yt.classList.contains("d-none"))) {- bg = "bg-yt";- }-- let showSection = function (section) {- document.querySelectorAll('.mb-2[data-group="' + section + '"]').forEach(e => e.classList.remove("d-none"));- }-- if (bg) {- showSection(bg);- }-- if (overlay && overlay.offsetParent) {- showSection("overlay");- }-- if (separatorTop && separatorTop.offsetParent) {- showSection("top_separator");- }-- if (separatorBottom && separatorBottom.offsetParent) {- showSection("bottom_separator");- }+ if (!node || typeof node.querySelector !== "function") return;++ document.querySelectorAll('.mb-2[data-group]').forEach(e => e.classList.add("d-none"));++ const showSection = function (section) {+ document.querySelectorAll(`.mb-2[data-group="${section}"]`).forEach(e => e.classList.remove("d-none"));+ };++ const bg = getBackgroundType(node);+ if (bg) {+ showSection(bg);+ }++ const overlay = node.querySelector(":scope > .overlay");+ if (overlay?.offsetParent) {+ showSection("overlay");+ }++ const separatorTop = node.querySelector(":scope > .separator.top");+ if (separatorTop?.offsetParent) {+ showSection("top_separator");+ }++ const separatorBottom = node.querySelector(":scope > .separator.bottom");+ if (separatorBottom?.offsetParent) {+ showSection("bottom_separator");+ }}-//Vvveb.Components.add("elements/section", {Vvveb.Components.extend("_base", "elements/section", {nodes: ["section"],name: "Section",@@ -706,14 +592,13 @@ Vvveb.Components.extend("_base", "elements/section", {</div></section>`,properties: [- ...ComponentSectionContent,+ ...ComponentSectionContent,...ComponentSectionStyle,...ComponentSectionAdvanced],- init: componentsInit-});+ init: componentsInit+});-//Vvveb.Components.add("elements/header", {Vvveb.Components.extend("_base", "elements/header", {nodes: ["header"],name: "Header",@@ -724,14 +609,13 @@ Vvveb.Components.extend("_base", "elements/header", {</div></header>`,properties: [- ...ComponentSectionContent,+ ...ComponentSectionContent,...ComponentSectionStyle,...ComponentSectionAdvanced],- init: componentsInit-});+ init: componentsInit+});-//Vvveb.Components.add("elements/footer", {Vvveb.Components.extend("_base", "elements/footer", {nodes: ["footer"],name: "Footer",@@ -742,9 +626,9 @@ Vvveb.Components.extend("_base", "elements/footer", {</div></footer>`,properties: [- ...ComponentSectionContent,+ ...ComponentSectionContent,...ComponentSectionStyle,...ComponentSectionAdvanced],init: componentsInit-});+});diff --git a/public/js/vvvebjs/undo.js b/public/js/vvvebjs/undo.jsindex 7c16c5f..24d9925 100755--- a/public/js/vvvebjs/undo.js+++ b/public/js/vvvebjs/undo.js@@ -128,4 +128,3 @@ Vvveb.Undo = {this.undoIndex = -1;}};-