@innovastudio/contentbuilder 1.5.174 → 1.5.176

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 (!row) return;else {
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 _defineProperty$2(obj, key, value) {
13681
- if (key in obj) {
13682
- Object.defineProperty(obj, key, {
13683
- value: value,
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
- function ownKeys$2(object, enumerableOnly) {
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
- function _objectSpread2$2(target) {
13710
- for (var i = 1; i < arguments.length; i++) {
13711
- var source = arguments[i] != null ? arguments[i] : {};
13712
-
13713
- if (i % 2) {
13714
- ownKeys$2(Object(source), true).forEach(function (key) {
13715
- _defineProperty$2(target, key, source[key]);
13716
- });
13717
- } else if (Object.getOwnPropertyDescriptors) {
13718
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
13719
- } else {
13720
- ownKeys$2(Object(source)).forEach(function (key) {
13721
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
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
- function _objectWithoutPropertiesLoose(source, excluded) {
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
- function _objectWithoutProperties(source, excluded) {
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 sourceSymbolKeys = Object.getOwnPropertySymbols(source);
13753
-
13754
- for (i = 0; i < sourceSymbolKeys.length; i++) {
13755
- key = sourceSymbolKeys[i];
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
- function _slicedToArray(arr, i) {
13766
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
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
- function _arrayWithHoles(arr) {
13770
- if (Array.isArray(arr)) return arr;
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
- function _iterableToArrayLimit(arr, i) {
13774
- if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
13775
- var _arr = [];
13776
- var _n = true;
13777
- var _d = false;
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
- function _unsupportedIterableToArray$1(o, minLen) {
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
- function _arrayLikeToArray$1(arr, len) {
13810
- if (len == null || len > arr.length) len = arr.length;
13811
-
13812
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
13813
-
13814
- return arr2;
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
- function _nonIterableRest() {
13818
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
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.33.0/min/vs'
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
- /** the local state of the module */
14086
+ var _excluded = ["monaco"];
14129
14087
 
14088
+ /** the local state of the module */
14130
14089
  var _state$create = index.create({
14131
- config: config$1,
14132
- isInitialized: false,
14133
- resolve: null,
14134
- reject: null,
14135
- monaco: null
14136
- }),
14137
- _state$create2 = _slicedToArray(_state$create, 2),
14138
- getState = _state$create2[0],
14139
- setState = _state$create2[1];
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
- monaco = _validators$config.monaco,
14149
- config = _objectWithoutProperties(_validators$config, ["monaco"]);
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
- isInitialized = _ref.isInitialized,
14168
- resolve = _ref.resolve;
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
- reject = _ref2.reject;
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
- resolve = _ref3.resolve,
14251
- reject = _ref3.reject;
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
- require(['vs/editor/editor.main'], function (monaco) {
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 (_ref4) {
14290
- var monaco = _ref4.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,
@@ -14439,7 +14380,14 @@ class HtmlUtil {
14439
14380
  const cell = util.cellSelected();
14440
14381
  cell.innerHTML = html;
14441
14382
  let builderActive = this.builder.doc.querySelector('.builder-active');
14442
- if (builderActive) this.builder.applyBehaviorOn(builderActive);
14383
+ if (builderActive) {
14384
+ this.builder.applyBehaviorOn(builderActive);
14385
+
14386
+ // reinit after apply html
14387
+ if (this.builder.win.builderRuntime && builderActive.querySelector('[data-cb-type]')) {
14388
+ this.builder.win.builderRuntime.reinitialize(builderActive);
14389
+ }
14390
+ }
14443
14391
 
14444
14392
  //Trigger Change event
14445
14393
  this.builder.opts.onChange();
@@ -14458,7 +14406,14 @@ class HtmlUtil {
14458
14406
  if (!row) return;
14459
14407
  row.innerHTML = html;
14460
14408
  let builderActive = this.builder.doc.querySelector('.builder-active');
14461
- if (builderActive) this.builder.applyBehaviorOn(builderActive);
14409
+ if (builderActive) {
14410
+ this.builder.applyBehaviorOn(builderActive);
14411
+
14412
+ // reinit after apply html
14413
+ if (this.builder.win.builderRuntime && builderActive.querySelector('[data-cb-type]')) {
14414
+ this.builder.win.builderRuntime.reinitialize(builderActive);
14415
+ }
14416
+ }
14462
14417
 
14463
14418
  //Trigger Change event
14464
14419
  this.builder.opts.onChange();
@@ -14493,6 +14448,12 @@ class HtmlUtil {
14493
14448
  // let builderActive = this.builder.doc.querySelector('.builder-active');
14494
14449
  // if(builderActive) this.builder.applyBehaviorOn(builderActive);
14495
14450
  this.builder.applyBehaviorOn(area);
14451
+
14452
+ // reinit after apply html
14453
+ if (this.builder.win.builderRuntime && area.querySelector('[data-cb-type]')) {
14454
+ this.builder.win.builderRuntime.reinitialize(area);
14455
+ }
14456
+
14496
14457
  /*else {
14497
14458
  const builders = this.builder.doc.querySelectorAll(this.builder.opts.container);
14498
14459
  if(builders.length > 1) {
@@ -15090,6 +15051,11 @@ class HtmlUtil {
15090
15051
  element.removeAttribute(name);
15091
15052
  }
15092
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
+ });
15093
15059
 
15094
15060
  // Remove runtime-added classes
15095
15061
  const type = element.getAttribute('data-cb-type');
@@ -15113,9 +15079,11 @@ class HtmlUtil {
15113
15079
  });
15114
15080
  }
15115
15081
  // Cleanup data-item-id
15116
- let elms = element.querySelectorAll('[data-item-id]');
15082
+ let elms = element.querySelectorAll('[data-item-id],[data-slide-id],[contenteditable]');
15117
15083
  elms.forEach(elm => {
15118
15084
  elm.removeAttribute('data-item-id');
15085
+ elm.removeAttribute('data-slide-id');
15086
+ elm.removeAttribute('contenteditable');
15119
15087
  });
15120
15088
 
15121
15089
  // Clean data-edit-id in editable area
@@ -51152,9 +51120,10 @@ class SettingsUIGenerator {
51152
51120
  generateForm(pluginName, element, onChange) {
51153
51121
  const plugin = this.runtime.getPlugin(pluginName);
51154
51122
  if (!plugin || !plugin.settings) {
51155
- console.warn(`Plugin "${pluginName}" has no settings schema`);
51123
+ // console.warn(`Plugin "${pluginName}" has no settings schema`);
51156
51124
  if (!plugin.editor) return this.createEmptyForm();
51157
51125
  }
51126
+ if (!plugin.settings) plugin.settings = {};
51158
51127
  const form = document.createElement('div');
51159
51128
  form.className = 'cb-settings-form';
51160
51129
 
@@ -51530,6 +51499,7 @@ class SettingsUIGenerator {
51530
51499
  */
51531
51500
  getCurrentValues(element, settings) {
51532
51501
  const values = {};
51502
+ if (!settings) return values;
51533
51503
  Object.keys(settings).forEach(key => {
51534
51504
  if (key.startsWith('_')) return;
51535
51505
  const attrName = 'data-cb-' + key.replace(/([A-Z])/g, '-$1').toLowerCase();
@@ -63025,6 +62995,40 @@ class ElementTool {
63025
62995
  dom.addClass(quickadd, 'center');
63026
62996
  }
63027
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
+ }
63028
63032
 
63029
63033
  //handleQuickAddClickOut
63030
63034
  const handleQuickAddClickOut = e => {
@@ -63585,6 +63589,14 @@ class ElementTool {
63585
63589
  let elementTool = this.elementTool;
63586
63590
  let elm = this.builder.activeElement;
63587
63591
  if (!elm) return;
63592
+ const editableArea = elm.closest('[data-edit-actions]');
63593
+ if (editableArea) {
63594
+ const editActions = editableArea.dataset.editActions || '';
63595
+ if (editActions.includes('no-add')) {
63596
+ // Adding elements is disabled
63597
+ return;
63598
+ }
63599
+ }
63588
63600
  if (elm.closest('.is-dock')) return;
63589
63601
  // if(elm.closest('[data-cb-type]')) return;
63590
63602
 
@@ -97775,6 +97787,25 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
97775
97787
  }
97776
97788
  applyBehaviorOn(builder) {
97777
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
+ }
97778
97809
 
97779
97810
  // upload
97780
97811
  if (this.opts.onImageUpload) {
@@ -102813,7 +102844,7 @@ Please obtain a license at: https://innovastudio.com/contentbox`);
102813
102844
  if (lockIndicator) lockIndicator.style.display = '';
102814
102845
  let linkTool = this.doc.querySelector('#divLinkTool');
102815
102846
  if (linkTool) linkTool.style.display = '';
102816
- let spacerTool = this.builderStuff.querySelector('.is-spacer-tool');
102847
+ let spacerTool = this.doc.querySelector('.is-spacer-tool');
102817
102848
  if (spacerTool) spacerTool.style.display = '';
102818
102849
  this.element.image.hideImageTool();
102819
102850
  this.doc.querySelectorAll('.icon-active').forEach(elm => elm.classList.remove('icon-active'));