Browse Source

Build

pull/2992/head
Artur Arseniev 6 years ago
parent
commit
08ea530762
  1. 223
      dist/grapes.js
  2. 6
      dist/grapes.min.js
  3. 2
      dist/grapes.min.js.map
  4. 2
      package-lock.json
  5. 2
      package.json

223
dist/grapes.js

@ -24059,6 +24059,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
var win = this.getWindow(); var win = this.getWindow();
var conf = em.get('Config'); var conf = em.get('Config');
var extStyles = []; var extStyles = [];
win._isEditor = true;
config.styles.forEach(function (href) { config.styles.forEach(function (href) {
return extStyles.push(Object(underscore__WEBPACK_IMPORTED_MODULE_3__["isString"])(href) ? { return extStyles.push(Object(underscore__WEBPACK_IMPORTED_MODULE_3__["isString"])(href) ? {
tag: 'link', tag: 'link',
@ -27711,8 +27712,9 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(backbone__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(backbone__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! underscore */ "./node_modules/underscore/modules/index-all.js"); /* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! underscore */ "./node_modules/underscore/modules/index-all.js");
/* harmony import */ var utils_mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/mixins */ "./src/utils/mixins.js"); /* harmony import */ var utils_mixins__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! utils/mixins */ "./src/utils/mixins.js");
/* harmony import */ var dom_components_view_ToolbarView__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! dom_components/view/ToolbarView */ "./src/dom_components/view/ToolbarView.js"); /* harmony import */ var utils_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! utils/dom */ "./src/utils/dom.js");
/* harmony import */ var dom_components_model_Toolbar__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dom_components/model/Toolbar */ "./src/dom_components/model/Toolbar.js"); /* harmony import */ var dom_components_view_ToolbarView__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! dom_components/view/ToolbarView */ "./src/dom_components/view/ToolbarView.js");
/* harmony import */ var dom_components_model_Toolbar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! dom_components/model/Toolbar */ "./src/dom_components/model/Toolbar.js");
@ -27725,6 +27727,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
var $ = backbone__WEBPACK_IMPORTED_MODULE_2___default.a.$; var $ = backbone__WEBPACK_IMPORTED_MODULE_2___default.a.$;
var showOffsets; var showOffsets;
/** /**
@ -27750,7 +27753,7 @@ var showOffsets;
/* harmony default export */ __webpack_exports__["default"] = ({ /* harmony default export */ __webpack_exports__["default"] = ({
init: function init(o) { init: function init(o) {
Object(underscore__WEBPACK_IMPORTED_MODULE_3__["bindAll"])(this, 'onHover', 'onOut', 'onClick', 'onFrameScroll', 'onFrameUpdated'); Object(underscore__WEBPACK_IMPORTED_MODULE_3__["bindAll"])(this, 'onHover', 'onOut', 'onClick', 'onFrameScroll', 'onFrameUpdated', 'onContainerChange');
}, },
enable: function enable() { enable: function enable() {
this.frameOff = this.canvasOff = this.adjScroll = null; this.frameOff = this.canvasOff = this.adjScroll = null;
@ -27783,11 +27786,17 @@ var showOffsets;
var _this = this; var _this = this;
var em = this.em; var em = this.em;
var listenToEl = em.getConfig('listenToEl');
var _em$getContainer = em.getContainer(),
parentNode = _em$getContainer.parentNode;
var method = enable ? 'on' : 'off'; var method = enable ? 'on' : 'off';
var methods = { var methods = {
on: utils_mixins__WEBPACK_IMPORTED_MODULE_4__["on"], on: utils_mixins__WEBPACK_IMPORTED_MODULE_4__["on"],
off: utils_mixins__WEBPACK_IMPORTED_MODULE_4__["off"] off: utils_mixins__WEBPACK_IMPORTED_MODULE_4__["off"]
}; };
!listenToEl.length && parentNode && listenToEl.push(parentNode);
var trigger = function trigger(win, body) { var trigger = function trigger(win, body) {
methods[method](body, 'mouseover', _this.onHover); methods[method](body, 'mouseover', _this.onHover);
@ -27797,6 +27806,7 @@ var showOffsets;
}; };
methods[method](window, 'resize', this.onFrameUpdated); methods[method](window, 'resize', this.onFrameUpdated);
methods[method](listenToEl, 'scroll', this.onContainerChange);
em[method]('component:toggled', this.onSelect, this); em[method]('component:toggled', this.onSelect, this);
em[method]('change:componentHovered', this.onHovered, this); em[method]('change:componentHovered', this.onHovered, this);
em[method]('component:resize component:styleUpdate component:input', this.updateGlobalPos, this); em[method]('component:resize component:styleUpdate component:input', this.updateGlobalPos, this);
@ -27826,7 +27836,7 @@ var showOffsets;
if (!model) { if (!model) {
var parent = $el.parent(); var parent = $el.parent();
while (!model && parent.length > 0) { while (!model && parent.length && !Object(utils_dom__WEBPACK_IMPORTED_MODULE_5__["isDoc"])(parent[0])) {
model = parent.data('model'); model = parent.data('model');
parent = parent.parent(); parent = parent.parent();
} }
@ -27890,7 +27900,7 @@ var showOffsets;
var el = view && view.el; var el = view && view.el;
var result = {}; var result = {};
if (el) { if (el && Object(utils_dom__WEBPACK_IMPORTED_MODULE_5__["isVisible"])(el)) {
var pos = this.getElementPos(el); var pos = this.getElementPos(el);
result = { result = {
el: el, el: el,
@ -28022,7 +28032,7 @@ var showOffsets;
if (!model) { if (!model) {
var parent = $el.parent(); var parent = $el.parent();
while (!model && parent.length > 0) { while (!model && parent.length && !Object(utils_dom__WEBPACK_IMPORTED_MODULE_5__["isDoc"])(parent[0])) {
model = parent.data('model'); model = parent.data('model');
parent = parent.parent(); parent = parent.parent();
} }
@ -28312,8 +28322,8 @@ var showOffsets;
if (!this.toolbar) { if (!this.toolbar) {
toolbarEl.innerHTML = ''; toolbarEl.innerHTML = '';
this.toolbar = new dom_components_model_Toolbar__WEBPACK_IMPORTED_MODULE_6__["default"](toolbar); this.toolbar = new dom_components_model_Toolbar__WEBPACK_IMPORTED_MODULE_7__["default"](toolbar);
var toolbarView = new dom_components_view_ToolbarView__WEBPACK_IMPORTED_MODULE_5__["default"]({ var toolbarView = new dom_components_view_ToolbarView__WEBPACK_IMPORTED_MODULE_6__["default"]({
collection: this.toolbar, collection: this.toolbar,
editor: this.editor, editor: this.editor,
em: em em: em
@ -28479,6 +28489,9 @@ var showOffsets;
updateAttached: Object(underscore__WEBPACK_IMPORTED_MODULE_3__["debounce"])(function () { updateAttached: Object(underscore__WEBPACK_IMPORTED_MODULE_3__["debounce"])(function () {
this.updateGlobalPos(); this.updateGlobalPos();
}), }),
onContainerChange: Object(underscore__WEBPACK_IMPORTED_MODULE_3__["debounce"])(function () {
this.em.refreshCanvas();
}, 150),
/** /**
* Returns element's data info * Returns element's data info
@ -34531,16 +34544,20 @@ __webpack_require__.r(__webpack_exports__);
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! backbone */ "./node_modules/backbone/backbone.js"); /* harmony import */ var _ComponentView__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ComponentView */ "./src/dom_components/view/ComponentView.js");
/* harmony import */ var backbone__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(backbone__WEBPACK_IMPORTED_MODULE_0__);
/* harmony default export */ __webpack_exports__["default"] = (backbone__WEBPACK_IMPORTED_MODULE_0___default.a.View.extend({ /* harmony default export */ __webpack_exports__["default"] = (_ComponentView__WEBPACK_IMPORTED_MODULE_0__["default"].extend({
initialize: function initialize() { initialize: function initialize() {
var $el = this.$el, _ComponentView__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.initialize.apply(this, arguments);
model = this.model; },
$el.data('model', model); // Clear methods used on Nodes with attributes
model.view = this; _setAttributes: function _setAttributes() {},
}, renderAttributes: function renderAttributes() {},
setAttribute: function setAttribute() {},
updateAttributes: function updateAttributes() {},
initClasses: function initClasses() {},
initComponents: function initComponents() {},
delegateEvents: function delegateEvents() {},
_createElement: function _createElement() { _createElement: function _createElement() {
return document.createTextNode(''); return document.createTextNode('');
}, },
@ -34655,20 +34672,9 @@ var compProt = _ComponentView__WEBPACK_IMPORTED_MODULE_2__["default"].prototype;
* @return string * @return string
*/ */
getContent: function getContent() { getContent: function getContent() {
var rte = this.rte; var activeRte = this.activeRte;
var canGetRteContent = activeRte && typeof activeRte.getContent === 'function';
var _ref = rte || {}, return canGetRteContent ? activeRte.getContent() : this.getChildrenContainer().innerHTML;
activeRte = _ref.activeRte;
var content = '';
if (activeRte && typeof activeRte.getContent === 'function') {
content = activeRte.getContent();
} else {
content = this.getChildrenContainer().innerHTML;
}
return content;
}, },
/** /**
@ -36114,7 +36120,11 @@ var View = backbone__WEBPACK_IMPORTED_MODULE_1___default.a.View;
view = definition.view, view = definition.view,
isType = definition.isType; isType = definition.isType;
model = model instanceof Model || Object(underscore__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(model) ? model : ModelInst.extend(model || {}); model = model instanceof Model || Object(underscore__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(model) ? model : ModelInst.extend(model || {});
view = view instanceof View || Object(underscore__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(view) ? view : ViewInst.extend(view || {}); view = view instanceof View || Object(underscore__WEBPACK_IMPORTED_MODULE_0__["isFunction"])(view) ? view : ViewInst.extend(view || {}); // New API
if (this.extendViewApi && !definition.model && !definition.view) {
view = view.extend(definition);
}
if (type) { if (type) {
type.model = model; type.model = model;
@ -36880,6 +36890,13 @@ __webpack_require__.r(__webpack_exports__);
// 'translate' - Use translate CSS from transform property // 'translate' - Use translate CSS from transform property
// To get more about this feature read: https://github.com/artf/grapesjs/issues/1936 // To get more about this feature read: https://github.com/artf/grapesjs/issues/1936
dragMode: 0, dragMode: 0,
// When the editor is placed in a scrollable container (eg. modals) this might
// cause elements inside the canvas (eg. floating toolbars) to be misaligned.
// To avoid that, you can specify an array of DOM elements on which their scroll will
// trigger the canvas update.
// Be default, if the array is empty, the first parent element will be appended.
// listenToEl: [document.querySelector('#scrollable-el')],
listenToEl: [],
// Import asynchronously CSS to use as icons // Import asynchronously CSS to use as icons
cssIcons: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css', cssIcons: 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css',
// Dom element // Dom element
@ -37961,7 +37978,8 @@ var logs = {
* @private * @private
*/ */
getSelectedAll: function getSelectedAll() { getSelectedAll: function getSelectedAll() {
return this.get('selected').models; var sel = this.get('selected');
return sel && sel.models || [];
}, },
/** /**
@ -38230,7 +38248,8 @@ var logs = {
var clb = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; var clb = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
this.getCacheLoad(1, function (res) { this.getCacheLoad(1, function (res) {
_this9.get('storables').forEach(function (module) { _this9.get('storables').forEach(function (module) {
return module.load(res); module.load(res);
module.postLoad && module.postLoad(_this9);
}); });
clb && clb(res); clb && clb(res);
@ -39028,7 +39047,7 @@ var defaultConfig = {
editors: editors, editors: editors,
plugins: plugins, plugins: plugins,
// Will be replaced on build // Will be replaced on build
version: '0.16.20', version: '0.16.21',
/** /**
* Initialize the editor with passed options * Initialize the editor with passed options
@ -40018,7 +40037,8 @@ var ItemsView;
* */ * */
toggleVisibility: function toggleVisibility(e) { toggleVisibility: function toggleVisibility(e) {
e && e.stopPropagation(); e && e.stopPropagation();
var model = this.model; var model = this.model,
em = this.em;
var prevDspKey = '__prev-display'; var prevDspKey = '__prev-display';
var prevDisplay = model.get(prevDspKey); var prevDisplay = model.get(prevDspKey);
var style = model.getStyle(); var style = model.getStyle();
@ -40038,6 +40058,7 @@ var ItemsView;
} }
model.setStyle(style); model.setStyle(style);
em && em.trigger('component:toggled'); // Updates Style Manager #2938
}, },
/** /**
@ -45276,7 +45297,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
/** /**
* Get property by its CSS name and sector id * Get property by its CSS name and sector id
* @param {string} sectorId Sector id * @param {string} sectorId Sector id
* @param {string} name CSS property name, eg. 'min-height' * @param {string} name CSS property name (or id), eg. 'min-height'
* @return {Property|null} * @return {Property|null}
* @example * @example
* var property = styleManager.getProperty('mySector','min-height'); * var property = styleManager.getProperty('mySector','min-height');
@ -45285,16 +45306,15 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
var sector = this.getSector(sectorId, { var sector = this.getSector(sectorId, {
warn: 1 warn: 1
}); });
var prop = null; var prop;
if (sector) { if (sector) {
prop = sector.get('properties').where({ prop = sector.get('properties').filter(function (prop) {
property: name return prop.get('property') === name || prop.get('id') === name;
}); })[0];
prop = prop.length == 1 ? prop[0] : prop;
} }
return prop; return prop || null;
}, },
/** /**
@ -45760,6 +45780,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
/* harmony default export */ __webpack_exports__["default"] = (backbone__WEBPACK_IMPORTED_MODULE_1___default.a.Collection.extend(domain_abstract_model_TypeableCollection__WEBPACK_IMPORTED_MODULE_2__["default"]).extend({ /* harmony default export */ __webpack_exports__["default"] = (backbone__WEBPACK_IMPORTED_MODULE_1___default.a.Collection.extend(domain_abstract_model_TypeableCollection__WEBPACK_IMPORTED_MODULE_2__["default"]).extend({
extendViewApi: 1,
types: [{ types: [{
id: 'stack', id: 'stack',
model: _PropertyStack__WEBPACK_IMPORTED_MODULE_4__["default"], model: _PropertyStack__WEBPACK_IMPORTED_MODULE_4__["default"],
@ -46117,7 +46138,8 @@ var Property = backbone__WEBPACK_IMPORTED_MODULE_1___default.a.Model.extend({
} }
if (fn && hasValue) { if (fn && hasValue) {
value = "".concat(fn, "(").concat(value, ")"); var fnParameter = fn === 'url' ? "'".concat(value, "'") : value;
value = "".concat(fn, "(").concat(fnParameter, ")");
} }
if (hasValue && this.get('important')) { if (hasValue && this.get('important')) {
@ -49024,9 +49046,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
var clearProp = 'data-clear-style'; var clearProp = 'data-clear-style';
/* harmony default export */ __webpack_exports__["default"] = (backbone__WEBPACK_IMPORTED_MODULE_2___default.a.View.extend({ /* harmony default export */ __webpack_exports__["default"] = (backbone__WEBPACK_IMPORTED_MODULE_2___default.a.View.extend({
template: function template(model) { template: function template() {
var pfx = this.pfx; var pfx = this.pfx,
return "\n <div class=\"".concat(pfx, "label\">\n ").concat(this.templateLabel(model), "\n </div>\n <div class=\"").concat(this.ppfx, "fields\">\n ").concat(this.templateInput(model), "\n </div>\n "); ppfx = this.ppfx;
return "\n <div class=\"".concat(pfx, "label\" data-sm-label></div>\n <div class=\"").concat(ppfx, "fields\" data-sm-fields></div>\n ");
}, },
templateLabel: function templateLabel(model) { templateLabel: function templateLabel(model) {
var pfx = this.pfx, var pfx = this.pfx,
@ -49052,7 +49075,7 @@ var clearProp = 'data-clear-style';
var _this = this; var _this = this;
var o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var o = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
Object(underscore__WEBPACK_IMPORTED_MODULE_3__["bindAll"])(this, 'targetUpdated'); Object(underscore__WEBPACK_IMPORTED_MODULE_3__["bindAll"])(this, 'targetUpdated', '__change', '__updateStyle');
this.config = o.config || {}; this.config = o.config || {};
var em = this.config.em; var em = this.config.em;
this.em = em; this.em = em;
@ -49069,6 +49092,7 @@ var clearProp = 'data-clear-style';
var pfx = this.pfx; var pfx = this.pfx;
this.inputHolderId = '#' + pfx + 'input-holder'; this.inputHolderId = '#' + pfx + 'input-holder';
this.sector = model.collection && model.collection.sector; this.sector = model.collection && model.collection.sector;
this.__destroyFn = this.destroy ? this.destroy.bind(this) : function () {};
model.view = this; model.view = this;
if (!model.get('value')) { if (!model.get('value')) {
@ -49093,6 +49117,11 @@ var clearProp = 'data-clear-style';
var init = this.init && this.init.bind(this); var init = this.init && this.init.bind(this);
init && init(); init && init();
}, },
remove: function remove() {
backbone__WEBPACK_IMPORTED_MODULE_2___default.a.View.prototype.remove.apply(this, arguments);
this.__destroyFn(this._getClbOpts());
},
/** /**
* Triggers when the status changes. The status indicates if the value of * Triggers when the status changes. The status indicates if the value of
@ -49190,6 +49219,7 @@ var clearProp = 'data-clear-style';
*/ */
inputValueChanged: function inputValueChanged(ev) { inputValueChanged: function inputValueChanged(ev) {
ev && ev.stopPropagation(); ev && ev.stopPropagation();
if (this.emit) return;
this.model.setValueFromInput(this.getInputValue()); this.model.setValueFromInput(this.getInputValue());
this.elementUpdated(); this.elementUpdated();
}, },
@ -49589,6 +49619,7 @@ var clearProp = 'data-clear-style';
setValue: function setValue(value) { setValue: function setValue(value) {
var model = this.model; var model = this.model;
var val = Object(underscore__WEBPACK_IMPORTED_MODULE_3__["isUndefined"])(value) ? model.getDefaultValue() : value; var val = Object(underscore__WEBPACK_IMPORTED_MODULE_3__["isUndefined"])(value) ? model.getDefaultValue() : value;
if (this.update) return this.__update(val);
var input = this.getInputEl(); var input = this.getInputEl();
input && (input.value = val); input && (input.value = val);
}, },
@ -49620,16 +49651,70 @@ var clearProp = 'data-clear-style';
this.input = null; this.input = null;
this.$input = null; this.$input = null;
}, },
__update: function __update(value) {
var update = this.update && this.update.bind(this);
update && update(_objectSpread({}, this._getClbOpts(), {
value: value
}));
},
__change: function __change() {
var emit = this.emit && this.emit.bind(this);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
emit && emit.apply(void 0, [this._getClbOpts()].concat(args));
},
__updateStyle: function __updateStyle(value) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
complete = _ref.complete,
opts = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_0___default()(_ref, ["complete"]);
var final = complete !== false;
if (Object(utils_mixins__WEBPACK_IMPORTED_MODULE_4__["isObject"])(value)) {
this.getTargets().forEach(function (target) {
return target.addStyle(value, {
avoidStore: !final
});
});
} else {
this.model.setValueFromInput(value, complete, opts);
}
final && this.elementUpdated();
},
_getClbOpts: function _getClbOpts() {
var model = this.model,
el = this.el;
return {
el: el,
props: model.attributes,
setProps: function setProps() {
return model.set.apply(model, arguments);
},
change: this.__change,
updateStyle: this.__updateStyle,
targets: this.getTargets()
};
},
render: function render() { render: function render() {
this.clearCached(); this.clearCached();
var pfx = this.pfx; var pfx = this.pfx,
var model = this.model; model = this.model,
var el = this.el; el = this.el,
$el = this.$el;
var property = model.get('property'); var property = model.get('property');
var full = model.get('full'); var full = model.get('full');
var cls = model.get('className') || ''; var cls = model.get('className') || '';
var className = "".concat(pfx, "property"); var className = "".concat(pfx, "property");
el.innerHTML = this.template(model); this.createdEl && this.__destroyFn(this._getClbOpts());
$el.empty().append(this.template(model));
$el.find('[data-sm-label]').append(this.templateLabel(model));
var create = this.create && this.create.bind(this);
this.createdEl = create && create(this._getClbOpts());
$el.find('[data-sm-fields]').append(this.createdEl || this.templateInput(model));
el.className = "".concat(className, " ").concat(pfx).concat(model.get('type'), " ").concat(className, "__").concat(property, " ").concat(cls).trim(); el.className = "".concat(className, " ").concat(pfx).concat(model.get('type'), " ").concat(className, "__").concat(property, " ").concat(cls).trim();
el.className += full ? " ".concat(className, "--full") : ''; el.className += full ? " ".concat(className, "--full") : '';
this.updateStatus(); this.updateStatus();
@ -56212,12 +56297,14 @@ var $ = backbone__WEBPACK_IMPORTED_MODULE_1___default.a.$;
/*!**************************!*\ /*!**************************!*\
!*** ./src/utils/dom.js ***! !*** ./src/utils/dom.js ***!
\**************************/ \**************************/
/*! exports provided: motionsEv, empty, replaceWith, appendAtIndex, append, createEl, createCustomEvent, appendVNodes */ /*! exports provided: motionsEv, isDoc, isVisible, empty, replaceWith, appendAtIndex, append, createEl, createCustomEvent, appendVNodes */
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
__webpack_require__.r(__webpack_exports__); __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "motionsEv", function() { return motionsEv; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "motionsEv", function() { return motionsEv; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDoc", function() { return isDoc; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isVisible", function() { return isVisible; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "replaceWith", function() { return replaceWith; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "replaceWith", function() { return replaceWith; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendAtIndex", function() { return appendAtIndex; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendAtIndex", function() { return appendAtIndex; });
@ -56232,6 +56319,12 @@ var KEY_TAG = 'tag';
var KEY_ATTR = 'attributes'; var KEY_ATTR = 'attributes';
var KEY_CHILD = 'children'; var KEY_CHILD = 'children';
var motionsEv = 'transitionend oTransitionEnd transitionend webkitTransitionEnd'; var motionsEv = 'transitionend oTransitionEnd transitionend webkitTransitionEnd';
var isDoc = function isDoc(el) {
return el && el.nodeType === 9;
};
var isVisible = function isVisible(el) {
return el && !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length);
};
var empty = function empty(node) { var empty = function empty(node) {
while (node.firstChild) { while (node.firstChild) {
node.removeChild(node.firstChild); node.removeChild(node.firstChild);
@ -56575,7 +56668,7 @@ __webpack_require__.r(__webpack_exports__);
/*!*****************************!*\ /*!*****************************!*\
!*** ./src/utils/mixins.js ***! !*** ./src/utils/mixins.js ***!
\*****************************/ \*****************************/
/*! exports provided: isCommentNode, isTaggableNode, on, off, hasDnd, upFirst, matches, getModel, getElRect, camelCase, isTextNode, getKeyCode, getKeyChar, isEscKey, getElement, shallowDiff, normalizeFloat, getPointerEvent, getUnitFromValue, capitalize, getViewEl, setViewEl, appendStyles, isComponent, isRule */ /*! exports provided: isCommentNode, isTaggableNode, on, off, hasDnd, upFirst, matches, getModel, getElRect, camelCase, isTextNode, getKeyCode, getKeyChar, isEscKey, getElement, shallowDiff, normalizeFloat, getPointerEvent, getUnitFromValue, capitalize, getViewEl, setViewEl, appendStyles, isObject, isComponent, isRule */
/***/ (function(module, __webpack_exports__, __webpack_require__) { /***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict"; "use strict";
@ -56603,11 +56696,15 @@ __webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getViewEl", function() { return getViewEl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getViewEl", function() { return getViewEl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setViewEl", function() { return setViewEl; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setViewEl", function() { return setViewEl; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendStyles", function() { return appendStyles; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendStyles", function() { return appendStyles; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isObject", function() { return isObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isComponent", function() { return isComponent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isComponent", function() { return isComponent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRule", function() { return isRule; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRule", function() { return isRule; });
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js");
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! underscore */ "./node_modules/underscore/modules/index-all.js"); /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js");
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var underscore__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! underscore */ "./node_modules/underscore/modules/index-all.js");
var elProt = window.Element.prototype; var elProt = window.Element.prototype;
@ -56619,7 +56716,7 @@ var matches = elProt.matches || elProt.webkitMatchesSelector || elProt.mozMatche
var appendStyles = function appendStyles(styles) { var appendStyles = function appendStyles(styles) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var stls = Object(underscore__WEBPACK_IMPORTED_MODULE_1__["isArray"])(styles) ? _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(styles) : [styles]; var stls = Object(underscore__WEBPACK_IMPORTED_MODULE_2__["isArray"])(styles) ? _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(styles) : [styles];
if (stls.length) { if (stls.length) {
var href = stls.shift(); var href = stls.shift();
@ -56656,7 +56753,7 @@ var appendStyles = function appendStyles(styles) {
var shallowDiff = function shallowDiff(objOrig, objNew) { var shallowDiff = function shallowDiff(objOrig, objNew) {
var result = {}; var result = {};
var keysNew = Object(underscore__WEBPACK_IMPORTED_MODULE_1__["keys"])(objNew); var keysNew = Object(underscore__WEBPACK_IMPORTED_MODULE_2__["keys"])(objNew);
for (var prop in objOrig) { for (var prop in objOrig) {
if (objOrig.hasOwnProperty(prop)) { if (objOrig.hasOwnProperty(prop)) {
@ -56675,7 +56772,7 @@ var shallowDiff = function shallowDiff(objOrig, objNew) {
for (var _prop in objNew) { for (var _prop in objNew) {
if (objNew.hasOwnProperty(_prop)) { if (objNew.hasOwnProperty(_prop)) {
if (Object(underscore__WEBPACK_IMPORTED_MODULE_1__["isUndefined"])(objOrig[_prop])) { if (Object(underscore__WEBPACK_IMPORTED_MODULE_2__["isUndefined"])(objOrig[_prop])) {
result[_prop] = objNew[_prop]; result[_prop] = objNew[_prop];
} }
} }
@ -56753,7 +56850,7 @@ var hasDnd = function hasDnd(em) {
var getElement = function getElement(el) { var getElement = function getElement(el) {
if (Object(underscore__WEBPACK_IMPORTED_MODULE_1__["isElement"])(el) || isTextNode(el)) { if (Object(underscore__WEBPACK_IMPORTED_MODULE_2__["isElement"])(el) || isTextNode(el)) {
return el; return el;
} else if (el && el.getEl) { } else if (el && el.getEl) {
return el.getEl(); return el.getEl();
@ -56796,7 +56893,7 @@ var isTaggableNode = function isTaggableNode(el) {
var getModel = function getModel(el, $) { var getModel = function getModel(el, $) {
var model = el; var model = el;
Object(underscore__WEBPACK_IMPORTED_MODULE_1__["isElement"])(el) && (model = $(el).data('model')); Object(underscore__WEBPACK_IMPORTED_MODULE_2__["isElement"])(el) && (model = $(el).data('model'));
return model; return model;
}; };
@ -56848,6 +56945,10 @@ var isEscKey = function isEscKey(ev) {
return getKeyCode(ev) === 27; return getKeyCode(ev) === 27;
}; };
var isObject = function isObject(val) {
return val !== null && !Array.isArray(val) && _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(val) === 'object';
};
var capitalize = function capitalize(str) { var capitalize = function capitalize(str) {
return str && str.charAt(0).toUpperCase() + str.substring(1); return str && str.charAt(0).toUpperCase() + str.substring(1);
}; };

6
dist/grapes.min.js

File diff suppressed because one or more lines are too long

2
dist/grapes.min.js.map

File diff suppressed because one or more lines are too long

2
package-lock.json

@ -1,6 +1,6 @@
{ {
"name": "grapesjs", "name": "grapesjs",
"version": "0.16.20", "version": "0.16.21",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

2
package.json

@ -1,7 +1,7 @@
{ {
"name": "grapesjs", "name": "grapesjs",
"description": "Free and Open Source Web Builder Framework", "description": "Free and Open Source Web Builder Framework",
"version": "0.16.20", "version": "0.16.21",
"author": "Artur Arseniev", "author": "Artur Arseniev",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"homepage": "http://grapesjs.com", "homepage": "http://grapesjs.com",

Loading…
Cancel
Save