@innovastudio/contentbox 1.6.104 → 1.6.107

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@innovastudio/contentbox",
3
3
  "type": "module",
4
- "version": "1.6.104",
4
+ "version": "1.6.107",
5
5
  "description": "",
6
6
  "main": "public/contentbox/contentbox.esm.js",
7
7
  "types": "index.d.ts",
@@ -21,11 +21,14 @@
21
21
  "license": "SEE LICENSE IN license.txt",
22
22
  "devDependencies": {
23
23
  "@aws-sdk/client-s3": "^3.414.0",
24
+ "@aws-sdk/lib-storage": "^3.787.0",
24
25
  "@babel/core": "^7.15.0",
25
26
  "@babel/plugin-proposal-class-properties": "^7.14.5",
26
27
  "@babel/plugin-transform-runtime": "^7.17.0",
27
28
  "@babel/preset-env": "^7.15.0",
28
29
  "@deepgram/sdk": "^2.3.0",
30
+ "@fal-ai/client": "^1.4.0",
31
+ "@google/genai": "^0.10.0",
29
32
  "@rollup/plugin-babel": "^5.3.0",
30
33
  "@rollup/plugin-commonjs": "^25.0.7",
31
34
  "@rollup/plugin-eslint": "^8.0.1",
@@ -40,8 +43,10 @@
40
43
  "express": "^4.17.1",
41
44
  "express-session": "^1.17.2",
42
45
  "formidable-serverless": "^1.1.1",
46
+ "mime-types": "^3.0.1",
43
47
  "mini-css-extract-plugin": "^2.2.0",
44
48
  "multer": "^1.4.5-lts.1",
49
+ "openai": "^4.96.2",
45
50
  "request": "^2.88.2",
46
51
  "rollup": "^2.59.0",
47
52
  "rollup-plugin-terser": "^7.0.2",
@@ -54,7 +59,7 @@
54
59
  "ws": "^8.13.0"
55
60
  },
56
61
  "dependencies": {
57
- "@innovastudio/contentbuilder": "^1.5.101",
62
+ "@innovastudio/contentbuilder": "^1.5.103",
58
63
  "js-beautify": "^1.14.0",
59
64
  "sortablejs": "^1.15.2"
60
65
  }
@@ -27828,7 +27828,7 @@ const renderQuickAdd = builder => {
27828
27828
  dom.addEventListener(elm, 'click', () => {
27829
27829
  // const mode = quickadd.getAttribute('data-mode');
27830
27830
 
27831
- let html = `
27831
+ let html = builder.opts.formTemplate.trim() || `
27832
27832
  <div class="row">
27833
27833
  <div class="column" data-noedit
27834
27834
  data-dialog-width="1600px"
@@ -27885,44 +27885,18 @@ const renderQuickAdd = builder => {
27885
27885
  var viewer = new FormViewer(elm);
27886
27886
 
27887
27887
  let json = {
27888
- "title": "Register for the Tech Conference",
27889
- "description": "Join us for an insightful and engaging experience.",
27888
+ "title": "Let’s Build Something Cool!",
27889
+ "description": "Fuel your creativity with ease.",
27890
27890
  "elements": [
27891
27891
  {
27892
- "title": "Full Name:",
27893
- "name": "full_name",
27892
+ "title": "Your Name:",
27893
+ "name": "your_name",
27894
27894
  "type": "short-text",
27895
27895
  "isRequired": true,
27896
- "placeholder": "Enter your full name"
27897
- },
27898
- {
27899
- "title": "Ticket Type:",
27900
- "name": "ticket_type",
27901
- "type": "select",
27902
- "isRequired": true,
27903
- "choices": [
27904
- "Standard Admission",
27905
- "VIP Admission",
27906
- "Student Discount"
27907
- ]
27896
+ "placeholder": "Enter your name"
27908
27897
  },
27909
27898
  {
27910
- "title": "Select the sessions you’re interested in:",
27911
- "name": "select_the_sessions_youre_interested_in",
27912
- "type": "multi-select",
27913
- "choices": [
27914
- "Keynote Speech",
27915
- "AI Workshop",
27916
- "Networking Session"
27917
- ]
27918
- },
27919
- {
27920
- "title": "Are you attending the networking dinner?",
27921
- "name": "are_you_attending_the_networking_dinner",
27922
- "type": "switch"
27923
- },
27924
- {
27925
- "title": "Email:",
27899
+ "title": "Your Best Email:",
27926
27900
  "name": "email",
27927
27901
  "type": "email",
27928
27902
  "isRequired": true,
@@ -27930,7 +27904,7 @@ const renderQuickAdd = builder => {
27930
27904
  }
27931
27905
  ],
27932
27906
  "useSubmitButton": true,
27933
- "submitText": "Submit"
27907
+ "submitText": "Let’s Go!"
27934
27908
  };
27935
27909
 
27936
27910
  const initialFormData = JSON.stringify(json);
@@ -27996,44 +27970,18 @@ const renderQuickAdd = builder => {
27996
27970
  ${encodeURIComponent(`
27997
27971
  {
27998
27972
  "json": {
27999
- "title": "Register for the Tech Conference",
28000
- "description": "Join us for an insightful and engaging experience.",
27973
+ "title": "Let’s Build Something Cool!",
27974
+ "description": "Fuel your creativity with ease.",
28001
27975
  "elements": [
28002
27976
  {
28003
- "title": "Full Name:",
28004
- "name": "full_name",
27977
+ "title": "Your Name:",
27978
+ "name": "your_name",
28005
27979
  "type": "short-text",
28006
27980
  "isRequired": true,
28007
27981
  "placeholder": "Enter your full name"
28008
27982
  },
28009
27983
  {
28010
- "title": "Ticket Type:",
28011
- "name": "ticket_type",
28012
- "type": "select",
28013
- "isRequired": true,
28014
- "choices": [
28015
- "Standard Admission",
28016
- "VIP Admission",
28017
- "Student Discount"
28018
- ]
28019
- },
28020
- {
28021
- "title": "Select the sessions you’re interested in:",
28022
- "name": "select_the_sessions_youre_interested_in",
28023
- "type": "multi-select",
28024
- "choices": [
28025
- "Keynote Speech",
28026
- "AI Workshop",
28027
- "Networking Session"
28028
- ]
28029
- },
28030
- {
28031
- "title": "Are you attending the networking dinner?",
28032
- "name": "are_you_attending_the_networking_dinner",
28033
- "type": "switch"
28034
- },
28035
- {
28036
- "title": "Email:",
27984
+ "title": "Your Best Email:",
28037
27985
  "name": "email",
28038
27986
  "type": "email",
28039
27987
  "isRequired": true,
@@ -28041,7 +27989,7 @@ const renderQuickAdd = builder => {
28041
27989
  }
28042
27990
  ],
28043
27991
  "useSubmitButton": true,
28044
- "submitText": "Submit"
27992
+ "submitText": "Let’s Go!"
28045
27993
  },
28046
27994
  "thankYouMessage": "Thanks for your submission!",
28047
27995
  "errorMessage": "Oops! There was a problem submitting your form.",
@@ -118825,6 +118773,7 @@ class ContentBuilder {
118825
118773
  </div>
118826
118774
  </div>
118827
118775
  `,
118776
+ formTemplate: '',
118828
118777
  /*
118829
118778
  onZoomStart: () => {
118830
118779
  },
@@ -121671,9 +121620,20 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
121671
121620
  onStart: () => {
121672
121621
  this.uo.saveForUndo(); // Even if cancelled, saveForUndo will make sure not to save if there is no change
121673
121622
 
121623
+ // Set all to uneditable
121624
+ const editables = this.doc.querySelectorAll('[contenteditable="true"]');
121625
+ editables.forEach(item => {
121626
+ item.setAttribute('contenteditable', 'none'); // use 'none' (not false) for later rollback (to differentiate from existing contenteditable="false" elements)
121627
+ });
121628
+
121674
121629
  this.elmTool.hide();
121675
121630
  },
121676
121631
  onEnd: () => {
121632
+ // Back to editable
121633
+ const editables = this.doc.querySelectorAll('[contenteditable="none"]');
121634
+ editables.forEach(item => {
121635
+ item.setAttribute('contenteditable', 'true');
121636
+ });
121677
121637
  this.util.checkEmpty(); // for multiple instances check
121678
121638
 
121679
121639
  // if(this.sortableOnPage) this.sortableOnPage.destroy(); // enable drop as section (ContentBox)
@@ -156501,6 +156461,7 @@ class ContentBox {
156501
156461
  </div>
156502
156462
  </div>
156503
156463
  `,
156464
+ formTemplate: '',
156504
156465
  // pageTemplate: `
156505
156466
  // <!DOCTYPE html>
156506
156467
  // <html lang="en">
@@ -159940,6 +159901,7 @@ Add an image for each feature.`, 'Create a new block showcasing a photo gallery
159940
159901
  imageRenameOnEdit: this.settings.imageRenameOnEdit,
159941
159902
  icons: this.settings.icons,
159942
159903
  sectionTemplate: this.settings.sectionTemplate,
159904
+ formTemplate: this.settings.formTemplate,
159943
159905
  onBlockSectionAdd: () => {
159944
159906
  this.pageSetup();
159945
159907
  },