@innovastudio/contentbuilder 1.5.101 → 1.5.103
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/contentbuilder",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.5.
|
4
|
+
"version": "1.5.103",
|
5
5
|
"description": "",
|
6
6
|
"main": "public/contentbuilder/contentbuilder.esm.js",
|
7
7
|
"types": "index.d.ts",
|
@@ -22,11 +22,14 @@
|
|
22
22
|
"author": "",
|
23
23
|
"license": "SEE LICENSE IN license.txt",
|
24
24
|
"devDependencies": {
|
25
|
+
"@aws-sdk/lib-storage": "^3.800.0",
|
25
26
|
"@babel/core": "^7.15.5",
|
26
27
|
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
27
28
|
"@babel/plugin-transform-runtime": "^7.18.2",
|
28
29
|
"@babel/preset-env": "^7.15.6",
|
29
30
|
"@deepgram/sdk": "^2.3.0",
|
31
|
+
"@fal-ai/client": "^1.4.0",
|
32
|
+
"@google/genai": "^0.12.0",
|
30
33
|
"@rollup/plugin-babel": "^5.3.0",
|
31
34
|
"@rollup/plugin-commonjs": "^20.0.0",
|
32
35
|
"@rollup/plugin-eslint": "^8.0.1",
|
@@ -43,6 +46,7 @@
|
|
43
46
|
"formidable-serverless": "^1.1.1",
|
44
47
|
"mini-css-extract-plugin": "^2.3.0",
|
45
48
|
"multer": "^1.4.5-lts.1",
|
49
|
+
"openai": "^4.96.2",
|
46
50
|
"rollup": "^2.57.0",
|
47
51
|
"rollup-plugin-terser": "^7.0.2",
|
48
52
|
"sass": "^1.42.1",
|
@@ -1407,7 +1407,7 @@ const renderQuickAdd = builder => {
|
|
1407
1407
|
dom.addEventListener(elm, 'click', () => {
|
1408
1408
|
// const mode = quickadd.getAttribute('data-mode');
|
1409
1409
|
|
1410
|
-
let html = `
|
1410
|
+
let html = builder.opts.formTemplate.trim() || `
|
1411
1411
|
<div class="row">
|
1412
1412
|
<div class="column" data-noedit
|
1413
1413
|
data-dialog-width="1600px"
|
@@ -1464,44 +1464,18 @@ const renderQuickAdd = builder => {
|
|
1464
1464
|
var viewer = new FormViewer(elm);
|
1465
1465
|
|
1466
1466
|
let json = {
|
1467
|
-
"title": "
|
1468
|
-
"description": "
|
1467
|
+
"title": "Let’s Build Something Cool!",
|
1468
|
+
"description": "Fuel your creativity with ease.",
|
1469
1469
|
"elements": [
|
1470
1470
|
{
|
1471
|
-
"title": "
|
1472
|
-
"name": "
|
1471
|
+
"title": "Your Name:",
|
1472
|
+
"name": "your_name",
|
1473
1473
|
"type": "short-text",
|
1474
1474
|
"isRequired": true,
|
1475
|
-
"placeholder": "Enter your
|
1476
|
-
},
|
1477
|
-
{
|
1478
|
-
"title": "Ticket Type:",
|
1479
|
-
"name": "ticket_type",
|
1480
|
-
"type": "select",
|
1481
|
-
"isRequired": true,
|
1482
|
-
"choices": [
|
1483
|
-
"Standard Admission",
|
1484
|
-
"VIP Admission",
|
1485
|
-
"Student Discount"
|
1486
|
-
]
|
1475
|
+
"placeholder": "Enter your name"
|
1487
1476
|
},
|
1488
1477
|
{
|
1489
|
-
"title": "
|
1490
|
-
"name": "select_the_sessions_youre_interested_in",
|
1491
|
-
"type": "multi-select",
|
1492
|
-
"choices": [
|
1493
|
-
"Keynote Speech",
|
1494
|
-
"AI Workshop",
|
1495
|
-
"Networking Session"
|
1496
|
-
]
|
1497
|
-
},
|
1498
|
-
{
|
1499
|
-
"title": "Are you attending the networking dinner?",
|
1500
|
-
"name": "are_you_attending_the_networking_dinner",
|
1501
|
-
"type": "switch"
|
1502
|
-
},
|
1503
|
-
{
|
1504
|
-
"title": "Email:",
|
1478
|
+
"title": "Your Best Email:",
|
1505
1479
|
"name": "email",
|
1506
1480
|
"type": "email",
|
1507
1481
|
"isRequired": true,
|
@@ -1509,7 +1483,7 @@ const renderQuickAdd = builder => {
|
|
1509
1483
|
}
|
1510
1484
|
],
|
1511
1485
|
"useSubmitButton": true,
|
1512
|
-
"submitText": "
|
1486
|
+
"submitText": "Let’s Go!"
|
1513
1487
|
};
|
1514
1488
|
|
1515
1489
|
const initialFormData = JSON.stringify(json);
|
@@ -1575,44 +1549,18 @@ const renderQuickAdd = builder => {
|
|
1575
1549
|
${encodeURIComponent(`
|
1576
1550
|
{
|
1577
1551
|
"json": {
|
1578
|
-
"title": "
|
1579
|
-
"description": "
|
1552
|
+
"title": "Let’s Build Something Cool!",
|
1553
|
+
"description": "Fuel your creativity with ease.",
|
1580
1554
|
"elements": [
|
1581
1555
|
{
|
1582
|
-
"title": "
|
1583
|
-
"name": "
|
1556
|
+
"title": "Your Name:",
|
1557
|
+
"name": "your_name",
|
1584
1558
|
"type": "short-text",
|
1585
1559
|
"isRequired": true,
|
1586
1560
|
"placeholder": "Enter your full name"
|
1587
1561
|
},
|
1588
1562
|
{
|
1589
|
-
"title": "
|
1590
|
-
"name": "ticket_type",
|
1591
|
-
"type": "select",
|
1592
|
-
"isRequired": true,
|
1593
|
-
"choices": [
|
1594
|
-
"Standard Admission",
|
1595
|
-
"VIP Admission",
|
1596
|
-
"Student Discount"
|
1597
|
-
]
|
1598
|
-
},
|
1599
|
-
{
|
1600
|
-
"title": "Select the sessions you’re interested in:",
|
1601
|
-
"name": "select_the_sessions_youre_interested_in",
|
1602
|
-
"type": "multi-select",
|
1603
|
-
"choices": [
|
1604
|
-
"Keynote Speech",
|
1605
|
-
"AI Workshop",
|
1606
|
-
"Networking Session"
|
1607
|
-
]
|
1608
|
-
},
|
1609
|
-
{
|
1610
|
-
"title": "Are you attending the networking dinner?",
|
1611
|
-
"name": "are_you_attending_the_networking_dinner",
|
1612
|
-
"type": "switch"
|
1613
|
-
},
|
1614
|
-
{
|
1615
|
-
"title": "Email:",
|
1563
|
+
"title": "Your Best Email:",
|
1616
1564
|
"name": "email",
|
1617
1565
|
"type": "email",
|
1618
1566
|
"isRequired": true,
|
@@ -1620,7 +1568,7 @@ const renderQuickAdd = builder => {
|
|
1620
1568
|
}
|
1621
1569
|
],
|
1622
1570
|
"useSubmitButton": true,
|
1623
|
-
"submitText": "
|
1571
|
+
"submitText": "Let’s Go!"
|
1624
1572
|
},
|
1625
1573
|
"thankYouMessage": "Thanks for your submission!",
|
1626
1574
|
"errorMessage": "Oops! There was a problem submitting your form.",
|
@@ -92404,6 +92352,7 @@ class ContentBuilder {
|
|
92404
92352
|
</div>
|
92405
92353
|
</div>
|
92406
92354
|
`,
|
92355
|
+
formTemplate: '',
|
92407
92356
|
/*
|
92408
92357
|
onZoomStart: () => {
|
92409
92358
|
},
|
@@ -95250,9 +95199,20 @@ Add an image for each feature.`, 'Create a new content showcasing a photo galler
|
|
95250
95199
|
onStart: () => {
|
95251
95200
|
this.uo.saveForUndo(); // Even if cancelled, saveForUndo will make sure not to save if there is no change
|
95252
95201
|
|
95202
|
+
// Set all to uneditable
|
95203
|
+
const editables = this.doc.querySelectorAll('[contenteditable="true"]');
|
95204
|
+
editables.forEach(item => {
|
95205
|
+
item.setAttribute('contenteditable', 'none'); // use 'none' (not false) for later rollback (to differentiate from existing contenteditable="false" elements)
|
95206
|
+
});
|
95207
|
+
|
95253
95208
|
this.elmTool.hide();
|
95254
95209
|
},
|
95255
95210
|
onEnd: () => {
|
95211
|
+
// Back to editable
|
95212
|
+
const editables = this.doc.querySelectorAll('[contenteditable="none"]');
|
95213
|
+
editables.forEach(item => {
|
95214
|
+
item.setAttribute('contenteditable', 'true');
|
95215
|
+
});
|
95256
95216
|
this.util.checkEmpty(); // for multiple instances check
|
95257
95217
|
|
95258
95218
|
// if(this.sortableOnPage) this.sortableOnPage.destroy(); // enable drop as section (ContentBox)
|