@innovastudio/contentbuilder 1.5.175 → 1.5.177
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2541,11 +2541,11 @@ function dispatchEvent$1(_ref) {
|
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
2543
2543
|
|
|
2544
|
-
var _excluded = ["evt"];
|
|
2544
|
+
var _excluded$1 = ["evt"];
|
|
2545
2545
|
var pluginEvent = function pluginEvent(eventName, sortable) {
|
|
2546
2546
|
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
2547
2547
|
originalEvent = _ref.evt,
|
|
2548
|
-
data = _objectWithoutProperties$1(_ref, _excluded);
|
|
2548
|
+
data = _objectWithoutProperties$1(_ref, _excluded$1);
|
|
2549
2549
|
PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2$3({
|
|
2550
2550
|
dragEl: dragEl,
|
|
2551
2551
|
parentEl: parentEl,
|
|
@@ -5399,7 +5399,7 @@ class Util {
|
|
|
5399
5399
|
if (elm && elm.closest('.is-block')) ; else {
|
|
5400
5400
|
// If no active cell, check if it is from .row-add-initial (empty info)
|
|
5401
5401
|
row = this.builder.doc.querySelector('.row-active');
|
|
5402
|
-
if (
|
|
5402
|
+
if (row) {
|
|
5403
5403
|
// Empty content will always use 'row' mode to insert block.
|
|
5404
5404
|
mode = 'row';
|
|
5405
5405
|
}
|
|
@@ -5579,7 +5579,7 @@ class Util {
|
|
|
5579
5579
|
element.insertAdjacentHTML('afterend', html);
|
|
5580
5580
|
newelement = element.nextElementSibling;
|
|
5581
5581
|
}
|
|
5582
|
-
let builderActive = this.builder.doc.querySelector('.builder-active');
|
|
5582
|
+
let builderActive = element.closest('.is-container'); // this.builder.doc.querySelector('.builder-active');
|
|
5583
5583
|
if (builderActive) this.builder.applyBehaviorOn(builderActive);
|
|
5584
5584
|
if (newelement.tagName.toLowerCase() === 'img') {
|
|
5585
5585
|
let checkLoad = setInterval(() => {
|
|
@@ -13677,145 +13677,113 @@ function get_beautify(js_beautify, css_beautify, html_beautify) {
|
|
|
13677
13677
|
|
|
13678
13678
|
var JsBeautify = js$1.exports;
|
|
13679
13679
|
|
|
13680
|
-
function
|
|
13681
|
-
|
|
13682
|
-
|
|
13683
|
-
|
|
13684
|
-
enumerable: true,
|
|
13685
|
-
configurable: true,
|
|
13686
|
-
writable: true
|
|
13687
|
-
});
|
|
13688
|
-
} else {
|
|
13689
|
-
obj[key] = value;
|
|
13690
|
-
}
|
|
13691
|
-
|
|
13692
|
-
return obj;
|
|
13680
|
+
function _arrayLikeToArray$1(r, a) {
|
|
13681
|
+
(null == a || a > r.length) && (a = r.length);
|
|
13682
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
13683
|
+
return n;
|
|
13693
13684
|
}
|
|
13694
|
-
|
|
13695
|
-
|
|
13696
|
-
var keys = Object.keys(object);
|
|
13697
|
-
|
|
13698
|
-
if (Object.getOwnPropertySymbols) {
|
|
13699
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
13700
|
-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
13701
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
13702
|
-
});
|
|
13703
|
-
keys.push.apply(keys, symbols);
|
|
13704
|
-
}
|
|
13705
|
-
|
|
13706
|
-
return keys;
|
|
13685
|
+
function _arrayWithHoles(r) {
|
|
13686
|
+
if (Array.isArray(r)) return r;
|
|
13707
13687
|
}
|
|
13708
|
-
|
|
13709
|
-
|
|
13710
|
-
|
|
13711
|
-
|
|
13712
|
-
|
|
13713
|
-
|
|
13714
|
-
|
|
13715
|
-
|
|
13716
|
-
|
|
13717
|
-
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13688
|
+
function _defineProperty$2(e, r, t) {
|
|
13689
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
13690
|
+
value: t,
|
|
13691
|
+
enumerable: true,
|
|
13692
|
+
configurable: true,
|
|
13693
|
+
writable: true
|
|
13694
|
+
}) : e[r] = t, e;
|
|
13695
|
+
}
|
|
13696
|
+
function _iterableToArrayLimit(r, l) {
|
|
13697
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
13698
|
+
if (null != t) {
|
|
13699
|
+
var e,
|
|
13700
|
+
n,
|
|
13701
|
+
i,
|
|
13702
|
+
u,
|
|
13703
|
+
a = [],
|
|
13704
|
+
f = true,
|
|
13705
|
+
o = false;
|
|
13706
|
+
try {
|
|
13707
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
13708
|
+
} catch (r) {
|
|
13709
|
+
o = true, n = r;
|
|
13710
|
+
} finally {
|
|
13711
|
+
try {
|
|
13712
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
13713
|
+
} finally {
|
|
13714
|
+
if (o) throw n;
|
|
13715
|
+
}
|
|
13723
13716
|
}
|
|
13717
|
+
return a;
|
|
13724
13718
|
}
|
|
13725
|
-
|
|
13726
|
-
return target;
|
|
13727
13719
|
}
|
|
13728
|
-
|
|
13729
|
-
|
|
13730
|
-
if (source == null) return {};
|
|
13731
|
-
var target = {};
|
|
13732
|
-
var sourceKeys = Object.keys(source);
|
|
13733
|
-
var key, i;
|
|
13734
|
-
|
|
13735
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
13736
|
-
key = sourceKeys[i];
|
|
13737
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
13738
|
-
target[key] = source[key];
|
|
13739
|
-
}
|
|
13740
|
-
|
|
13741
|
-
return target;
|
|
13720
|
+
function _nonIterableRest() {
|
|
13721
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13742
13722
|
}
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
if (source == null) return {};
|
|
13746
|
-
|
|
13747
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
13748
|
-
|
|
13749
|
-
var key, i;
|
|
13750
|
-
|
|
13723
|
+
function ownKeys$2(e, r) {
|
|
13724
|
+
var t = Object.keys(e);
|
|
13751
13725
|
if (Object.getOwnPropertySymbols) {
|
|
13752
|
-
var
|
|
13753
|
-
|
|
13754
|
-
|
|
13755
|
-
|
|
13756
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
13757
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
13758
|
-
target[key] = source[key];
|
|
13759
|
-
}
|
|
13726
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
13727
|
+
r && (o = o.filter(function (r) {
|
|
13728
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
13729
|
+
})), t.push.apply(t, o);
|
|
13760
13730
|
}
|
|
13761
|
-
|
|
13762
|
-
return target;
|
|
13731
|
+
return t;
|
|
13763
13732
|
}
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
|
|
13733
|
+
function _objectSpread2$2(e) {
|
|
13734
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
13735
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
13736
|
+
r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) {
|
|
13737
|
+
_defineProperty$2(e, r, t[r]);
|
|
13738
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) {
|
|
13739
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
13740
|
+
});
|
|
13741
|
+
}
|
|
13742
|
+
return e;
|
|
13767
13743
|
}
|
|
13768
|
-
|
|
13769
|
-
|
|
13770
|
-
|
|
13744
|
+
function _objectWithoutProperties(e, t) {
|
|
13745
|
+
if (null == e) return {};
|
|
13746
|
+
var o,
|
|
13747
|
+
r,
|
|
13748
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
13749
|
+
if (Object.getOwnPropertySymbols) {
|
|
13750
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
13751
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
13752
|
+
}
|
|
13753
|
+
return i;
|
|
13771
13754
|
}
|
|
13772
|
-
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
var
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
var _e = undefined;
|
|
13779
|
-
|
|
13780
|
-
try {
|
|
13781
|
-
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
13782
|
-
_arr.push(_s.value);
|
|
13783
|
-
|
|
13784
|
-
if (i && _arr.length === i) break;
|
|
13785
|
-
}
|
|
13786
|
-
} catch (err) {
|
|
13787
|
-
_d = true;
|
|
13788
|
-
_e = err;
|
|
13789
|
-
} finally {
|
|
13790
|
-
try {
|
|
13791
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
13792
|
-
} finally {
|
|
13793
|
-
if (_d) throw _e;
|
|
13794
|
-
}
|
|
13755
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
13756
|
+
if (null == r) return {};
|
|
13757
|
+
var t = {};
|
|
13758
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
13759
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
13760
|
+
t[n] = r[n];
|
|
13795
13761
|
}
|
|
13796
|
-
|
|
13797
|
-
return _arr;
|
|
13762
|
+
return t;
|
|
13798
13763
|
}
|
|
13799
|
-
|
|
13800
|
-
|
|
13801
|
-
if (!o) return;
|
|
13802
|
-
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
13803
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13804
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13805
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13806
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
13764
|
+
function _slicedToArray(r, e) {
|
|
13765
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest();
|
|
13807
13766
|
}
|
|
13808
|
-
|
|
13809
|
-
|
|
13810
|
-
|
|
13811
|
-
|
|
13812
|
-
|
|
13813
|
-
|
|
13814
|
-
|
|
13767
|
+
function _toPrimitive(t, r) {
|
|
13768
|
+
if ("object" != typeof t || !t) return t;
|
|
13769
|
+
var e = t[Symbol.toPrimitive];
|
|
13770
|
+
if (void 0 !== e) {
|
|
13771
|
+
var i = e.call(t, r);
|
|
13772
|
+
if ("object" != typeof i) return i;
|
|
13773
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
13774
|
+
}
|
|
13775
|
+
return ("string" === r ? String : Number)(t);
|
|
13815
13776
|
}
|
|
13816
|
-
|
|
13817
|
-
|
|
13818
|
-
|
|
13777
|
+
function _toPropertyKey(t) {
|
|
13778
|
+
var i = _toPrimitive(t, "string");
|
|
13779
|
+
return "symbol" == typeof i ? i : i + "";
|
|
13780
|
+
}
|
|
13781
|
+
function _unsupportedIterableToArray$1(r, a) {
|
|
13782
|
+
if (r) {
|
|
13783
|
+
if ("string" == typeof r) return _arrayLikeToArray$1(r, a);
|
|
13784
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
13785
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0;
|
|
13786
|
+
}
|
|
13819
13787
|
}
|
|
13820
13788
|
|
|
13821
13789
|
function _defineProperty$1(obj, key, value) {
|
|
@@ -14012,23 +13980,20 @@ var index = {
|
|
|
14012
13980
|
|
|
14013
13981
|
var config$1 = {
|
|
14014
13982
|
paths: {
|
|
14015
|
-
vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.
|
|
13983
|
+
vs: 'https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs'
|
|
14016
13984
|
}
|
|
14017
13985
|
};
|
|
14018
13986
|
|
|
14019
13987
|
function curry(fn) {
|
|
14020
13988
|
return function curried() {
|
|
14021
13989
|
var _this = this;
|
|
14022
|
-
|
|
14023
13990
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14024
13991
|
args[_key] = arguments[_key];
|
|
14025
13992
|
}
|
|
14026
|
-
|
|
14027
13993
|
return args.length >= fn.length ? fn.apply(this, args) : function () {
|
|
14028
13994
|
for (var _len2 = arguments.length, nextArgs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
14029
13995
|
nextArgs[_key2] = arguments[_key2];
|
|
14030
13996
|
}
|
|
14031
|
-
|
|
14032
13997
|
return curried.apply(_this, [].concat(args, nextArgs));
|
|
14033
13998
|
};
|
|
14034
13999
|
};
|
|
@@ -14043,11 +14008,9 @@ function isObject$3(value) {
|
|
|
14043
14008
|
* @param {Object} config - the configuration object
|
|
14044
14009
|
* @return {Object} config - the validated configuration object
|
|
14045
14010
|
*/
|
|
14046
|
-
|
|
14047
14011
|
function validateConfig(config) {
|
|
14048
14012
|
if (!config) errorHandler('configIsRequired');
|
|
14049
14013
|
if (!isObject$3(config)) errorHandler('configType');
|
|
14050
|
-
|
|
14051
14014
|
if (config.urls) {
|
|
14052
14015
|
informAboutDeprecation();
|
|
14053
14016
|
return {
|
|
@@ -14056,22 +14019,18 @@ function validateConfig(config) {
|
|
|
14056
14019
|
}
|
|
14057
14020
|
};
|
|
14058
14021
|
}
|
|
14059
|
-
|
|
14060
14022
|
return config;
|
|
14061
14023
|
}
|
|
14024
|
+
|
|
14062
14025
|
/**
|
|
14063
14026
|
* logs deprecation message
|
|
14064
14027
|
*/
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
14028
|
function informAboutDeprecation() {
|
|
14068
14029
|
console.warn(errorMessages.deprecation);
|
|
14069
14030
|
}
|
|
14070
|
-
|
|
14071
14031
|
function throwError(errorMessages, type) {
|
|
14072
14032
|
throw new Error(errorMessages[type] || errorMessages["default"]);
|
|
14073
14033
|
}
|
|
14074
|
-
|
|
14075
14034
|
var errorMessages = {
|
|
14076
14035
|
configIsRequired: 'the configuration object is required',
|
|
14077
14036
|
configType: 'the configuration object should be an object',
|
|
@@ -14087,7 +14046,6 @@ var compose = function compose() {
|
|
|
14087
14046
|
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
14088
14047
|
fns[_key] = arguments[_key];
|
|
14089
14048
|
}
|
|
14090
|
-
|
|
14091
14049
|
return function (x) {
|
|
14092
14050
|
return fns.reduceRight(function (y, f) {
|
|
14093
14051
|
return f(y);
|
|
@@ -14107,11 +14065,11 @@ function merge(target, source) {
|
|
|
14107
14065
|
}
|
|
14108
14066
|
|
|
14109
14067
|
// The source (has been changed) is https://github.com/facebook/react/issues/5465#issuecomment-157888325
|
|
14068
|
+
|
|
14110
14069
|
var CANCELATION_MESSAGE = {
|
|
14111
14070
|
type: 'cancelation',
|
|
14112
14071
|
msg: 'operation is manually canceled'
|
|
14113
14072
|
};
|
|
14114
|
-
|
|
14115
14073
|
function makeCancelable(promise) {
|
|
14116
14074
|
var hasCanceled_ = false;
|
|
14117
14075
|
var wrappedPromise = new Promise(function (resolve, reject) {
|
|
@@ -14125,29 +14083,28 @@ function makeCancelable(promise) {
|
|
|
14125
14083
|
}, wrappedPromise;
|
|
14126
14084
|
}
|
|
14127
14085
|
|
|
14128
|
-
|
|
14086
|
+
var _excluded = ["monaco"];
|
|
14129
14087
|
|
|
14088
|
+
/** the local state of the module */
|
|
14130
14089
|
var _state$create = index.create({
|
|
14131
|
-
|
|
14132
|
-
|
|
14133
|
-
|
|
14134
|
-
|
|
14135
|
-
|
|
14136
|
-
}),
|
|
14137
|
-
|
|
14138
|
-
|
|
14139
|
-
|
|
14090
|
+
config: config$1,
|
|
14091
|
+
isInitialized: false,
|
|
14092
|
+
resolve: null,
|
|
14093
|
+
reject: null,
|
|
14094
|
+
monaco: null
|
|
14095
|
+
}),
|
|
14096
|
+
_state$create2 = _slicedToArray(_state$create, 2),
|
|
14097
|
+
getState = _state$create2[0],
|
|
14098
|
+
setState = _state$create2[1];
|
|
14099
|
+
|
|
14140
14100
|
/**
|
|
14141
14101
|
* set the loader configuration
|
|
14142
14102
|
* @param {Object} config - the configuration object
|
|
14143
14103
|
*/
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
14104
|
function config(globalConfig) {
|
|
14147
14105
|
var _validators$config = validators.config(globalConfig),
|
|
14148
|
-
|
|
14149
|
-
|
|
14150
|
-
|
|
14106
|
+
monaco = _validators$config.monaco,
|
|
14107
|
+
config = _objectWithoutProperties(_validators$config, _excluded);
|
|
14151
14108
|
setState(function (state) {
|
|
14152
14109
|
return {
|
|
14153
14110
|
config: merge(state.config, config),
|
|
@@ -14155,100 +14112,88 @@ function config(globalConfig) {
|
|
|
14155
14112
|
};
|
|
14156
14113
|
});
|
|
14157
14114
|
}
|
|
14115
|
+
|
|
14158
14116
|
/**
|
|
14159
14117
|
* handles the initialization of the monaco-editor
|
|
14160
14118
|
* @return {Promise} - returns an instance of monaco (with a cancelable promise)
|
|
14161
14119
|
*/
|
|
14162
|
-
|
|
14163
|
-
|
|
14164
14120
|
function init() {
|
|
14165
14121
|
var state = getState(function (_ref) {
|
|
14166
14122
|
var monaco = _ref.monaco,
|
|
14167
|
-
|
|
14168
|
-
|
|
14123
|
+
isInitialized = _ref.isInitialized,
|
|
14124
|
+
resolve = _ref.resolve;
|
|
14169
14125
|
return {
|
|
14170
14126
|
monaco: monaco,
|
|
14171
14127
|
isInitialized: isInitialized,
|
|
14172
14128
|
resolve: resolve
|
|
14173
14129
|
};
|
|
14174
14130
|
});
|
|
14175
|
-
|
|
14176
14131
|
if (!state.isInitialized) {
|
|
14177
14132
|
setState({
|
|
14178
14133
|
isInitialized: true
|
|
14179
14134
|
});
|
|
14180
|
-
|
|
14181
14135
|
if (state.monaco) {
|
|
14182
14136
|
state.resolve(state.monaco);
|
|
14183
14137
|
return makeCancelable(wrapperPromise);
|
|
14184
14138
|
}
|
|
14185
|
-
|
|
14186
14139
|
if (window.monaco && window.monaco.editor) {
|
|
14187
14140
|
storeMonacoInstance(window.monaco);
|
|
14188
14141
|
state.resolve(window.monaco);
|
|
14189
14142
|
return makeCancelable(wrapperPromise);
|
|
14190
14143
|
}
|
|
14191
|
-
|
|
14192
14144
|
compose(injectScripts, getMonacoLoaderScript)(configureLoader);
|
|
14193
14145
|
}
|
|
14194
|
-
|
|
14195
14146
|
return makeCancelable(wrapperPromise);
|
|
14196
14147
|
}
|
|
14148
|
+
|
|
14197
14149
|
/**
|
|
14198
14150
|
* injects provided scripts into the document.body
|
|
14199
14151
|
* @param {Object} script - an HTML script element
|
|
14200
14152
|
* @return {Object} - the injected HTML script element
|
|
14201
14153
|
*/
|
|
14202
|
-
|
|
14203
|
-
|
|
14204
14154
|
function injectScripts(script) {
|
|
14205
14155
|
return document.body.appendChild(script);
|
|
14206
14156
|
}
|
|
14157
|
+
|
|
14207
14158
|
/**
|
|
14208
14159
|
* creates an HTML script element with/without provided src
|
|
14209
14160
|
* @param {string} [src] - the source path of the script
|
|
14210
14161
|
* @return {Object} - the created HTML script element
|
|
14211
14162
|
*/
|
|
14212
|
-
|
|
14213
|
-
|
|
14214
14163
|
function createScript(src) {
|
|
14215
14164
|
var script = document.createElement('script');
|
|
14216
14165
|
return src && (script.src = src), script;
|
|
14217
14166
|
}
|
|
14167
|
+
|
|
14218
14168
|
/**
|
|
14219
14169
|
* creates an HTML script element with the monaco loader src
|
|
14220
14170
|
* @return {Object} - the created HTML script element
|
|
14221
14171
|
*/
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
14172
|
function getMonacoLoaderScript(configureLoader) {
|
|
14225
14173
|
var state = getState(function (_ref2) {
|
|
14226
14174
|
var config = _ref2.config,
|
|
14227
|
-
|
|
14175
|
+
reject = _ref2.reject;
|
|
14228
14176
|
return {
|
|
14229
14177
|
config: config,
|
|
14230
14178
|
reject: reject
|
|
14231
14179
|
};
|
|
14232
14180
|
});
|
|
14233
14181
|
var loaderScript = createScript("".concat(state.config.paths.vs, "/loader.js"));
|
|
14234
|
-
|
|
14235
14182
|
loaderScript.onload = function () {
|
|
14236
14183
|
return configureLoader();
|
|
14237
14184
|
};
|
|
14238
|
-
|
|
14239
14185
|
loaderScript.onerror = state.reject;
|
|
14240
14186
|
return loaderScript;
|
|
14241
14187
|
}
|
|
14188
|
+
|
|
14242
14189
|
/**
|
|
14243
14190
|
* configures the monaco loader
|
|
14244
14191
|
*/
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
14192
|
function configureLoader() {
|
|
14248
14193
|
var state = getState(function (_ref3) {
|
|
14249
14194
|
var config = _ref3.config,
|
|
14250
|
-
|
|
14251
|
-
|
|
14195
|
+
resolve = _ref3.resolve,
|
|
14196
|
+
reject = _ref3.reject;
|
|
14252
14197
|
return {
|
|
14253
14198
|
config: config,
|
|
14254
14199
|
resolve: resolve,
|
|
@@ -14256,21 +14201,19 @@ function configureLoader() {
|
|
|
14256
14201
|
};
|
|
14257
14202
|
});
|
|
14258
14203
|
var require = window.require;
|
|
14259
|
-
|
|
14260
14204
|
require.config(state.config);
|
|
14261
|
-
|
|
14262
|
-
|
|
14205
|
+
require(['vs/editor/editor.main'], function (_ref4) {
|
|
14206
|
+
var monaco = _ref4.m;
|
|
14263
14207
|
storeMonacoInstance(monaco);
|
|
14264
14208
|
state.resolve(monaco);
|
|
14265
14209
|
}, function (error) {
|
|
14266
14210
|
state.reject(error);
|
|
14267
14211
|
});
|
|
14268
14212
|
}
|
|
14213
|
+
|
|
14269
14214
|
/**
|
|
14270
14215
|
* store monaco instance in local state
|
|
14271
14216
|
*/
|
|
14272
|
-
|
|
14273
|
-
|
|
14274
14217
|
function storeMonacoInstance(monaco) {
|
|
14275
14218
|
if (!getState().monaco) {
|
|
14276
14219
|
setState({
|
|
@@ -14278,20 +14221,18 @@ function storeMonacoInstance(monaco) {
|
|
|
14278
14221
|
});
|
|
14279
14222
|
}
|
|
14280
14223
|
}
|
|
14224
|
+
|
|
14281
14225
|
/**
|
|
14282
14226
|
* internal helper function
|
|
14283
14227
|
* extracts stored monaco instance
|
|
14284
14228
|
* @return {Object|null} - the monaco instance
|
|
14285
14229
|
*/
|
|
14286
|
-
|
|
14287
|
-
|
|
14288
14230
|
function __getMonacoInstance() {
|
|
14289
|
-
return getState(function (
|
|
14290
|
-
var monaco =
|
|
14231
|
+
return getState(function (_ref5) {
|
|
14232
|
+
var monaco = _ref5.monaco;
|
|
14291
14233
|
return monaco;
|
|
14292
14234
|
});
|
|
14293
14235
|
}
|
|
14294
|
-
|
|
14295
14236
|
var wrapperPromise = new Promise(function (resolve, reject) {
|
|
14296
14237
|
return setState({
|
|
14297
14238
|
resolve: resolve,
|
|
@@ -15110,6 +15051,11 @@ class HtmlUtil {
|
|
|
15110
15051
|
element.removeAttribute(name);
|
|
15111
15052
|
}
|
|
15112
15053
|
});
|
|
15054
|
+
const areas = element.querySelectorAll('.is-container');
|
|
15055
|
+
Array.from(areas).forEach(area => {
|
|
15056
|
+
area.removeAttribute('data-sort');
|
|
15057
|
+
area.classList.remove('is-builder');
|
|
15058
|
+
});
|
|
15113
15059
|
|
|
15114
15060
|
// Remove runtime-added classes
|
|
15115
15061
|
const type = element.getAttribute('data-cb-type');
|
|
@@ -15133,9 +15079,11 @@ class HtmlUtil {
|
|
|
15133
15079
|
});
|
|
15134
15080
|
}
|
|
15135
15081
|
// Cleanup data-item-id
|
|
15136
|
-
let elms = element.querySelectorAll('[data-item-id]');
|
|
15082
|
+
let elms = element.querySelectorAll('[data-item-id],[data-slide-id],[contenteditable]');
|
|
15137
15083
|
elms.forEach(elm => {
|
|
15138
15084
|
elm.removeAttribute('data-item-id');
|
|
15085
|
+
elm.removeAttribute('data-slide-id');
|
|
15086
|
+
elm.removeAttribute('contenteditable');
|
|
15139
15087
|
});
|
|
15140
15088
|
|
|
15141
15089
|
// Clean data-edit-id in editable area
|
|
@@ -63047,6 +62995,40 @@ class ElementTool {
|
|
|
63047
62995
|
dom.addClass(quickadd, 'center');
|
|
63048
62996
|
}
|
|
63049
62997
|
quickadd.setAttribute('data-mode', 'elm');
|
|
62998
|
+
const plugin = builder.activeElement && builder.activeElement.closest('[data-cb-type]');
|
|
62999
|
+
const btnAddHeadline = quickadd.querySelector('.add-headline');
|
|
63000
|
+
const btnAddQuote = quickadd.querySelector('.add-quote');
|
|
63001
|
+
const btnAddTable = quickadd.querySelector('.add-table');
|
|
63002
|
+
const btnAddCode = quickadd.querySelector('.add-code');
|
|
63003
|
+
const btnAddForm = quickadd.querySelector('.add-form');
|
|
63004
|
+
const btnAddMap = quickadd.querySelector('.add-map');
|
|
63005
|
+
const btnAddYoutube = quickadd.querySelector('.add-youtube');
|
|
63006
|
+
const btnAddVideo = quickadd.querySelector('.add-video');
|
|
63007
|
+
const btnAddMore = quickadd.querySelector('.add-more');
|
|
63008
|
+
const separator = quickadd.querySelector('.pop-separator');
|
|
63009
|
+
if (plugin) {
|
|
63010
|
+
if (btnAddHeadline) btnAddHeadline.style.display = 'none';
|
|
63011
|
+
if (btnAddQuote) btnAddQuote.style.display = 'none';
|
|
63012
|
+
if (btnAddCode) btnAddCode.style.display = 'none';
|
|
63013
|
+
if (btnAddTable) btnAddTable.style.display = 'none';
|
|
63014
|
+
if (btnAddForm) btnAddForm.style.display = 'none';
|
|
63015
|
+
if (btnAddMap) btnAddMap.style.display = 'none';
|
|
63016
|
+
if (btnAddYoutube) btnAddYoutube.style.display = 'none';
|
|
63017
|
+
if (btnAddVideo) btnAddVideo.style.display = 'none';
|
|
63018
|
+
if (btnAddMore) btnAddMore.style.display = 'none';
|
|
63019
|
+
if (separator) separator.style.display = 'none';
|
|
63020
|
+
} else {
|
|
63021
|
+
if (btnAddHeadline) btnAddHeadline.style.display = '';
|
|
63022
|
+
if (btnAddQuote) btnAddQuote.style.display = '';
|
|
63023
|
+
if (btnAddCode) btnAddCode.style.display = '';
|
|
63024
|
+
if (btnAddTable) btnAddTable.style.display = '';
|
|
63025
|
+
if (btnAddForm) btnAddForm.style.display = '';
|
|
63026
|
+
if (btnAddMap) btnAddMap.style.display = '';
|
|
63027
|
+
if (btnAddYoutube) btnAddYoutube.style.display = '';
|
|
63028
|
+
if (btnAddVideo) btnAddVideo.style.display = '';
|
|
63029
|
+
if (btnAddMore) btnAddMore.style.display = '';
|
|
63030
|
+
if (separator) separator.style.display = '';
|
|
63031
|
+
}
|
|
63050
63032
|
|
|
63051
63033
|
//handleQuickAddClickOut
|
|
63052
63034
|
const handleQuickAddClickOut = e => {
|
|
@@ -97805,6 +97787,25 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
|
97805
97787
|
}
|
|
97806
97788
|
applyBehaviorOn(builder) {
|
|
97807
97789
|
const util = this.util;
|
|
97790
|
+
if (builder.closest('[data-cb-type]')) {
|
|
97791
|
+
// Fix buttons not wrapped in <div style="white-space: nowrap;">
|
|
97792
|
+
let linkButtons = builder.querySelectorAll('a[role="button"]');
|
|
97793
|
+
Array.prototype.forEach.call(linkButtons, btn => {
|
|
97794
|
+
if (btn.parentNode && btn.parentNode === builder) {
|
|
97795
|
+
btn.outerHTML = `
|
|
97796
|
+
<div style="white-space: nowrap;">
|
|
97797
|
+
${btn.outerHTML}
|
|
97798
|
+
</div>
|
|
97799
|
+
`;
|
|
97800
|
+
}
|
|
97801
|
+
});
|
|
97802
|
+
linkButtons = builder.querySelectorAll('a[role="button"]');
|
|
97803
|
+
Array.prototype.forEach.call(linkButtons, btn => {
|
|
97804
|
+
btn.parentNode.setAttribute('contenteditable', 'false');
|
|
97805
|
+
btn.setAttribute('contenteditable', 'true');
|
|
97806
|
+
});
|
|
97807
|
+
return;
|
|
97808
|
+
}
|
|
97808
97809
|
|
|
97809
97810
|
// upload
|
|
97810
97811
|
if (this.opts.onImageUpload) {
|
|
@@ -102843,7 +102844,7 @@ Please obtain a license at: https://innovastudio.com/contentbox`);
|
|
|
102843
102844
|
if (lockIndicator) lockIndicator.style.display = '';
|
|
102844
102845
|
let linkTool = this.doc.querySelector('#divLinkTool');
|
|
102845
102846
|
if (linkTool) linkTool.style.display = '';
|
|
102846
|
-
let spacerTool = this.
|
|
102847
|
+
let spacerTool = this.doc.querySelector('.is-spacer-tool');
|
|
102847
102848
|
if (spacerTool) spacerTool.style.display = '';
|
|
102848
102849
|
this.element.image.hideImageTool();
|
|
102849
102850
|
this.doc.querySelectorAll('.icon-active').forEach(elm => elm.classList.remove('icon-active'));
|