@innovastudio/contentbuilder 1.5.51 → 1.5.53

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbuilder",
3
3
  "type": "module",
4
- "version": "1.5.51",
4
+ "version": "1.5.53",
5
5
  "description": "",
6
6
  "main": "public/contentbuilder/contentbuilder.esm.js",
7
7
  "types": "index.d.ts",
@@ -55,7 +55,6 @@
55
55
  "webpack-dev-server": "^4.2.1"
56
56
  },
57
57
  "dependencies": {
58
- "@innovastudio/contentbuilder": "^1.5.44",
59
58
  "@monaco-editor/loader": "^1.3.2",
60
59
  "blueimp-load-image": "^5.16.0",
61
60
  "cropperjs": "^1.5.12",
@@ -76908,10 +76908,16 @@ class Dictation {
76908
76908
  };
76909
76909
  this.opts = Object.assign(this, defaults, opts);
76910
76910
  this.builder = builder;
76911
- const util = this.builder.util;
76912
- this.util = util;
76911
+ } // constructor
76912
+
76913
+ renderPanel() {
76913
76914
  const builderStuff = this.builder.builderStuff;
76914
76915
  this.builderStuff = builderStuff;
76916
+ const util = this.builder.util;
76917
+ this.util = util;
76918
+
76919
+ // const dom = this.builder.dom;
76920
+
76915
76921
  if (localStorage.getItem('_mic') === null) {
76916
76922
  localStorage.setItem('_mic', '0'); // make mic disable by default
76917
76923
  }
@@ -77711,6 +77717,7 @@ class Dictation {
77711
77717
  }
77712
77718
  }
77713
77719
  openDictation() {
77720
+ this.renderPanel();
77714
77721
  if (this.builder.showDisclaimer) {
77715
77722
  if (localStorage.getItem('_disclaimershown') === null) {
77716
77723
  this.builder.util.showModal(this.modalDisclaimer, true, () => {
@@ -86190,7 +86197,7 @@ class ContentBuilder {
86190
86197
  // { name: 'buttoneditor', showInMainToolbar: false, showInElementToolbar: false },
86191
86198
  // ],
86192
86199
  // pluginPath: 'contentbuilder/', // Location of the plugin scripts
86193
- disableConfig: false,
86200
+ disableConfig: true,
86194
86201
  // If you don't specify the plugins param and set the disableConfig to true, then no plugins will be loaded.
86195
86202
 
86196
86203
  modulePath: 'assets/modules/',
@@ -89464,16 +89471,21 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
89464
89471
  }
89465
89472
  closeAIAssistant() {
89466
89473
  let modal = document.querySelector('.is-modal.page-command');
89474
+ if (!modal) return;
89467
89475
  modal.classList.remove('active');
89468
89476
  this.dictation.stopDictation();
89469
89477
  localStorage.setItem('_dictation', '0');
89470
89478
  }
89471
89479
  toggleAIAssistant() {
89472
89480
  let modal = document.querySelector('.is-modal.page-command');
89473
- if (modal.classList.contains('active')) {
89474
- this.closeAIAssistant();
89475
- } else {
89481
+ if (!modal) {
89476
89482
  this.openAIAssistant();
89483
+ } else {
89484
+ if (modal.classList.contains('active')) {
89485
+ this.closeAIAssistant();
89486
+ } else {
89487
+ this.openAIAssistant();
89488
+ }
89477
89489
  }
89478
89490
  }
89479
89491