@innovastudio/contentbuilder 1.5.95 → 1.5.97
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 +1 -1
- package/public/contentbuilder/contentbuilder.css +2 -0
- package/public/contentbuilder/contentbuilder.esm.js +99 -145
- package/public/contentbuilder/contentbuilder.min.js +8 -8
- package/public/contentbuilder/lang/en.js +5 -1
- package/public/contentbuilder/lang/fr.js +5 -1
- package/public/contentbuilder/themes/colored-blue.css +25 -4
- package/public/contentbuilder/themes/colored-blue2.css +25 -4
- package/public/contentbuilder/themes/colored-blue3.css +25 -4
- package/public/contentbuilder/themes/colored-blue4.css +25 -4
- package/public/contentbuilder/themes/colored-blue5.css +25 -4
- package/public/contentbuilder/themes/colored-blue6.css +25 -4
- package/public/contentbuilder/themes/colored-blue7.css +25 -4
- package/public/contentbuilder/themes/colored-blue8.css +25 -4
- package/public/contentbuilder/themes/colored-dark.css +30 -4
- package/public/contentbuilder/themes/colored-darkblue.css +25 -4
- package/public/contentbuilder/themes/colored-gray.css +25 -4
- package/public/contentbuilder/themes/colored-green.css +25 -4
- package/public/contentbuilder/themes/colored-green2.css +25 -4
- package/public/contentbuilder/themes/colored-green3.css +25 -4
- package/public/contentbuilder/themes/colored-green4.css +25 -4
- package/public/contentbuilder/themes/colored-green5.css +25 -4
- package/public/contentbuilder/themes/colored-magenta.css +25 -4
- package/public/contentbuilder/themes/colored-orange.css +25 -4
- package/public/contentbuilder/themes/colored-orange2.css +25 -4
- package/public/contentbuilder/themes/colored-orange3.css +25 -4
- package/public/contentbuilder/themes/colored-pink.css +25 -4
- package/public/contentbuilder/themes/colored-pink2.css +25 -4
- package/public/contentbuilder/themes/colored-pink3.css +25 -4
- package/public/contentbuilder/themes/colored-pink4.css +25 -4
- package/public/contentbuilder/themes/colored-purple.css +25 -4
- package/public/contentbuilder/themes/colored-purple2.css +25 -4
- package/public/contentbuilder/themes/colored-red.css +25 -4
- package/public/contentbuilder/themes/colored-red2.css +25 -4
- package/public/contentbuilder/themes/colored-red3.css +25 -4
- package/public/contentbuilder/themes/colored-red4.css +25 -4
- package/public/contentbuilder/themes/colored-red5.css +25 -4
- package/public/contentbuilder/themes/colored-yellow.css +25 -4
- package/public/contentbuilder/themes/colored-yellow2.css +25 -4
- package/public/contentbuilder/themes/dark-blue.css +30 -4
- package/public/contentbuilder/themes/dark-blue2.css +30 -4
- package/public/contentbuilder/themes/dark-blue3.css +30 -4
- package/public/contentbuilder/themes/dark-gray.css +30 -4
- package/public/contentbuilder/themes/dark-pink.css +30 -4
- package/public/contentbuilder/themes/dark-purple.css +30 -4
- package/public/contentbuilder/themes/dark-red.css +30 -4
- package/public/contentbuilder/themes/dark.css +30 -4
- package/public/contentbuilder/themes/light-blue.css +25 -4
- package/public/contentbuilder/themes/light-blue2.css +25 -4
- package/public/contentbuilder/themes/light-blue3.css +25 -4
- package/public/contentbuilder/themes/light-cyan.css +25 -4
- package/public/contentbuilder/themes/light-gray.css +25 -4
- package/public/contentbuilder/themes/light-gray2.css +25 -4
- package/public/contentbuilder/themes/light-gray3.css +25 -4
- package/public/contentbuilder/themes/light-green.css +25 -4
- package/public/contentbuilder/themes/light-pink.css +25 -4
- package/public/contentbuilder/themes/light-pink2.css +25 -4
- package/public/contentbuilder/themes/light-purple.css +25 -4
- package/public/contentbuilder/themes/light-purple2.css +25 -4
- package/public/contentbuilder/themes/light-red.css +25 -4
- package/public/contentbuilder/themes/light-yellow.css +25 -4
- package/public/contentbuilder/themes/light-yellow2.css +25 -4
- package/readme.txt +1 -1
package/package.json
CHANGED
@@ -4371,6 +4371,8 @@ button:focus-visible {
|
|
4371
4371
|
text-align: center;
|
4372
4372
|
border-top: transparent 46px solid !important;
|
4373
4373
|
outline: none;
|
4374
|
+
scrollbar-width: thin;
|
4375
|
+
scrollbar-color: #aaa #f0f0f0;
|
4374
4376
|
}
|
4375
4377
|
#_cbhtml .is-design-list > div,
|
4376
4378
|
.is-ui .is-design-list > div {
|
@@ -86,67 +86,21 @@ class Snippets {
|
|
86
86
|
outline: transparent 1px solid;
|
87
87
|
}
|
88
88
|
|
89
|
-
|
90
|
-
|
91
89
|
/* Scrollbar for modal */
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
scrollbar-width: thin;
|
96
|
-
scrollbar-color: rgb(78 78 78 / 62%) auto;
|
97
|
-
}
|
98
|
-
.dark *::-webkit-scrollbar {
|
99
|
-
width: 12px;
|
100
|
-
}
|
101
|
-
.dark *::-webkit-scrollbar-track {
|
102
|
-
background: transparent;
|
90
|
+
.is-design-list {
|
91
|
+
scrollbar-width: thin;
|
92
|
+
scrollbar-color: #aaa #f0f0f0;
|
103
93
|
}
|
104
|
-
.dark
|
105
|
-
background-color:rgb(78 78 78 / 62%);
|
106
|
-
}
|
107
|
-
|
108
|
-
.colored-dark * {
|
94
|
+
.dark .is-design-list {
|
109
95
|
scrollbar-width: thin;
|
110
|
-
scrollbar-color:
|
111
|
-
|
112
|
-
.colored-dark *::-webkit-scrollbar {
|
113
|
-
width: 12px;
|
114
|
-
}
|
115
|
-
.colored-dark *::-webkit-scrollbar-track {
|
116
|
-
background: transparent;
|
96
|
+
scrollbar-color: #696969 #a1a1a1;
|
97
|
+
/* scrollbar-color: rgba(255, 255, 255, 0.3) rgb(80, 80, 80); */
|
117
98
|
}
|
118
|
-
.colored-dark
|
119
|
-
background-color:rgb(100, 100, 100);
|
120
|
-
}
|
121
|
-
|
122
|
-
.colored * {
|
99
|
+
.colored-dark .is-design-list {
|
123
100
|
scrollbar-width: thin;
|
124
|
-
scrollbar-color:
|
101
|
+
scrollbar-color: #7a7a7a #bebebe;
|
125
102
|
}
|
126
|
-
.colored *::-webkit-scrollbar {
|
127
|
-
width: 12px;
|
128
|
-
}
|
129
|
-
.colored *::-webkit-scrollbar-track {
|
130
|
-
background: transparent;
|
131
|
-
}
|
132
|
-
.colored *::-webkit-scrollbar-thumb {
|
133
|
-
background-color: rgba(0, 0, 0, 0.4);
|
134
|
-
}
|
135
103
|
|
136
|
-
.light * {
|
137
|
-
scrollbar-width: thin;
|
138
|
-
scrollbar-color: rgba(0, 0, 0, 0.4) auto;
|
139
|
-
}
|
140
|
-
.light *::-webkit-scrollbar {
|
141
|
-
width: 12px;
|
142
|
-
}
|
143
|
-
.light *::-webkit-scrollbar-track {
|
144
|
-
background: transparent;
|
145
|
-
}
|
146
|
-
.light *::-webkit-scrollbar-thumb {
|
147
|
-
background-color: rgba(0, 0, 0, 0.4);
|
148
|
-
}
|
149
|
-
|
150
104
|
svg {
|
151
105
|
fill: ${this.builder.styleSnippetColor};
|
152
106
|
}
|
@@ -1464,23 +1418,28 @@ const renderQuickAdd = builder => {
|
|
1464
1418
|
|
1465
1419
|
${encodeURIComponent(`
|
1466
1420
|
<div id="_style_{id}" style="display:none">
|
1467
|
-
|
1468
|
-
|
1421
|
+
#{id} {
|
1422
|
+
transition: all 0.3s ease-out;
|
1423
|
+
height: auto;
|
1469
1424
|
}
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1425
|
+
#{id}.collapsed {
|
1426
|
+
overflow: hidden;
|
1427
|
+
height: 0;
|
1428
|
+
}
|
1429
|
+
#status_{id} {
|
1430
|
+
transition: all 0.3s ease-out;
|
1431
|
+
height: auto;
|
1432
|
+
}
|
1433
|
+
#status_{id}.collapsed {
|
1434
|
+
overflow: hidden;
|
1435
|
+
height: 0;
|
1477
1436
|
}
|
1478
1437
|
</div>
|
1479
|
-
<
|
1438
|
+
<form id="form_{id}" method="POST" action="/formsubmission" style="padding: 25px 0 20px">
|
1480
1439
|
<div id="{id}"></div>
|
1481
1440
|
|
1482
|
-
<div id="status_{id}"></div>
|
1483
|
-
</
|
1441
|
+
<div id="status_{id}" class="collapsed"></div>
|
1442
|
+
</form>
|
1484
1443
|
|
1485
1444
|
<script>
|
1486
1445
|
var css = document.querySelector('#_style_{id}').innerHTML;
|
@@ -1502,11 +1461,7 @@ const renderQuickAdd = builder => {
|
|
1502
1461
|
docReady(function() {
|
1503
1462
|
|
1504
1463
|
var elm = document.getElementById('{id}');
|
1505
|
-
var viewer = new FormViewer(elm
|
1506
|
-
onChange: (json) => {
|
1507
|
-
// console.log(json);
|
1508
|
-
},
|
1509
|
-
});
|
1464
|
+
var viewer = new FormViewer(elm);
|
1510
1465
|
|
1511
1466
|
let json = {
|
1512
1467
|
"title": "Register for the Tech Conference",
|
@@ -1562,68 +1517,51 @@ const renderQuickAdd = builder => {
|
|
1562
1517
|
|
1563
1518
|
var statusInfo = document.querySelector('#status_{id}');
|
1564
1519
|
|
1565
|
-
|
1566
|
-
form.addEventListener('submit', async (event) => {
|
1567
|
-
|
1568
|
-
event.preventDefault();
|
1569
|
-
|
1570
|
-
const form = event.target;
|
1571
|
-
const formData = new FormData(form);
|
1572
|
-
|
1573
|
-
fetch('/formsubmission', {
|
1574
|
-
method: 'POST',
|
1575
|
-
body: formData,
|
1576
|
-
})
|
1577
|
-
.then(response=>response.json())
|
1578
|
-
.then(response=>{
|
1579
|
-
console.log(response);
|
1580
|
-
});
|
1581
|
-
});
|
1582
|
-
*/
|
1583
|
-
|
1520
|
+
var form = document.querySelector('#form_{id}');
|
1584
1521
|
|
1585
1522
|
async function handleSubmit(event) {
|
1586
1523
|
event.preventDefault();
|
1587
|
-
|
1588
|
-
var form = event.target;
|
1589
|
-
form.action = '/formsubmission';
|
1590
|
-
form.method = 'POST';
|
1591
1524
|
|
1592
1525
|
var btnSend = form.querySelector('.btn-submitform');
|
1593
1526
|
|
1594
1527
|
btnSend.innerHTML = '<span class="loading-icon"><svg class="animate-spin" style="margin-right:7px;width:20px;height:20px" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg></span>Submit';
|
1595
1528
|
|
1596
1529
|
var data = new FormData(form);
|
1530
|
+
|
1597
1531
|
fetch(form.action, {
|
1598
1532
|
method: form.method,
|
1599
1533
|
body: data,
|
1600
1534
|
headers: {
|
1601
1535
|
'Accept': 'application/json'
|
1602
1536
|
}
|
1603
|
-
})
|
1604
|
-
|
1605
|
-
|
1606
|
-
|
1537
|
+
})
|
1538
|
+
.then(response=>response.json())
|
1539
|
+
.then(data=>{
|
1540
|
+
if(!data.error) {
|
1541
|
+
statusInfo.innerHTML = '<div class="text-center pt-4 pb-4"><i class="bi bi-send-check size-64"></i>' +
|
1542
|
+
'</div><div class="leading-14 text-center size-38 pb-4">Thanks for your submission!</div>';
|
1607
1543
|
form.reset();
|
1544
|
+
|
1545
|
+
elm.classList.add('collapsed');
|
1546
|
+
setTimeout(function(){
|
1547
|
+
statusInfo.classList.remove('collapsed');
|
1548
|
+
},300);
|
1549
|
+
|
1608
1550
|
} else {
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
});
|
1551
|
+
statusInfo.innerHTML = '<div class="leading-14 text-center size-38 pt-4 pb-4">Oops! There was a problem submitting your form.</div>';
|
1552
|
+
|
1553
|
+
// elm.classList.toggle('collapsed');
|
1554
|
+
setTimeout(function(){
|
1555
|
+
// statusInfo.innerHTML = data.error;
|
1556
|
+
statusInfo.classList.remove('collapsed');
|
1557
|
+
},300);
|
1616
1558
|
}
|
1617
1559
|
|
1618
|
-
btnSend.innerHTML = 'Submit';
|
1619
|
-
}).catch(error => {
|
1620
|
-
statusInfo.innerHTML = '<div class="leading-11 text-center size-38 pt-4 pb-4">Oops! There was a problem submitting your form.</div>';
|
1621
|
-
|
1622
1560
|
btnSend.innerHTML = 'Submit';
|
1623
1561
|
});
|
1624
1562
|
}
|
1625
1563
|
|
1626
|
-
|
1564
|
+
form.addEventListener('submit', handleSubmit);
|
1627
1565
|
|
1628
1566
|
});
|
1629
1567
|
</script>
|
@@ -18014,26 +17952,26 @@ const renderSnippetPanel = (builder, snippetOpen) => {
|
|
18014
17952
|
}
|
18015
17953
|
});
|
18016
17954
|
}
|
17955
|
+
|
17956
|
+
/*
|
18017
17957
|
let snippetid;
|
18018
|
-
if
|
18019
|
-
|
18020
|
-
|
18021
|
-
|
18022
|
-
|
18023
|
-
|
18024
|
-
|
18025
|
-
|
18026
|
-
|
18027
|
-
|
18028
|
-
|
18029
|
-
}, {
|
18030
|
-
passive: false
|
17958
|
+
if(isMobile && builder.isContentBox) {
|
17959
|
+
const items = snippetlist.querySelectorAll('.snippet-item');
|
17960
|
+
items.forEach(item=>{
|
17961
|
+
if(item.classList.contains('data-click')) return;
|
17962
|
+
item.addEventListener('touchstart', ()=>{
|
17963
|
+
snippetid = item.getAttribute('data-id');
|
17964
|
+
}, { passive: false });
|
17965
|
+
item.addEventListener('touchend', ()=>{
|
17966
|
+
builder.dropSnippet(snippetid);
|
17967
|
+
}, { passive: false });
|
17968
|
+
item.classList.add('data-click');
|
18031
17969
|
});
|
18032
|
-
item.classList.add('data-click');
|
18033
|
-
});
|
18034
17970
|
}
|
17971
|
+
*/
|
18035
17972
|
}
|
18036
17973
|
});
|
17974
|
+
|
18037
17975
|
inpSnippet.setValue(defaultcatval + '');
|
18038
17976
|
inpSnippet.closeOptions();
|
18039
17977
|
if (builder.opts.snippetList === '#divSnippetList') {
|
@@ -18151,28 +18089,27 @@ const renderSnippetPanel = (builder, snippetOpen) => {
|
|
18151
18089
|
|
18152
18090
|
let activeBuilderArea;
|
18153
18091
|
let itemHeight;
|
18092
|
+
|
18093
|
+
/*
|
18154
18094
|
const isMobile = dom.detectMobileOrTablet();
|
18155
|
-
|
18095
|
+
let snippetid;
|
18156
18096
|
let useClick = false;
|
18157
|
-
if
|
18158
|
-
|
18159
|
-
|
18160
|
-
|
18161
|
-
|
18162
|
-
|
18163
|
-
|
18164
|
-
|
18165
|
-
|
18166
|
-
|
18167
|
-
|
18168
|
-
}
|
18169
|
-
|
18170
|
-
|
18171
|
-
|
18172
|
-
|
18173
|
-
useClick = true;
|
18174
|
-
}
|
18175
|
-
if (!useClick) new Sortable(snippetlist, {
|
18097
|
+
if(isMobile && builder.isContentBox) {
|
18098
|
+
const items = snippetlist.querySelectorAll('.snippet-item');
|
18099
|
+
items.forEach(item=>{
|
18100
|
+
if(item.classList.contains('data-click')) return;
|
18101
|
+
item.addEventListener('touchstart', ()=>{
|
18102
|
+
snippetid = item.getAttribute('data-id');
|
18103
|
+
}, { passive: false });
|
18104
|
+
item.addEventListener('touchend', ()=>{
|
18105
|
+
builder.dropSnippet(snippetid);
|
18106
|
+
}, { passive: false });
|
18107
|
+
item.classList.add('data-click');
|
18108
|
+
});
|
18109
|
+
useClick=true;
|
18110
|
+
}
|
18111
|
+
if(!useClick) */
|
18112
|
+
new Sortable(snippetlist, {
|
18176
18113
|
// forceFallback: safariAgent,
|
18177
18114
|
group: {
|
18178
18115
|
name: 'shared',
|
@@ -50011,6 +49948,12 @@ class Module {
|
|
50011
49948
|
moduleModal.querySelector('div:not(.is-modal-overlay)').style.width = '90vw';
|
50012
49949
|
moduleModal.querySelector('div:not(.is-modal-overlay)').style.maxWidth = w;
|
50013
49950
|
moduleModal.querySelector('div:not(.is-modal-overlay)').style.height = h;
|
49951
|
+
var themeLight = module.getAttribute('data-theme-light');
|
49952
|
+
if (themeLight || modulename === 'form-builder') {
|
49953
|
+
moduleModal.classList.add('theme-light');
|
49954
|
+
} else {
|
49955
|
+
moduleModal.classList.remove('theme-light');
|
49956
|
+
}
|
50014
49957
|
let btnClose = moduleModal.querySelector('.is-modal-close');
|
50015
49958
|
dom.addEventListener(btnClose, 'click', () => {
|
50016
49959
|
util.hideModal(moduleModal);
|
@@ -50064,6 +50007,17 @@ class Module {
|
|
50064
50007
|
btn.style.display = '';
|
50065
50008
|
}
|
50066
50009
|
this.repositionModuleTool();
|
50010
|
+
|
50011
|
+
// Button clicks inside a module can perform tasks that affect column size.
|
50012
|
+
// This can cause the module tool or lockIndicator to have an incorrect position,
|
50013
|
+
// so we hide these tools.
|
50014
|
+
const activeElement = this.builder.doc.activeElement;
|
50015
|
+
if (activeElement.tagName.toLowerCase() === 'button') {
|
50016
|
+
if (this.moduleTool) this.moduleTool.style.display = '';
|
50017
|
+
setTimeout(() => {
|
50018
|
+
this.builder.colTool.lockIndicator.style.display = '';
|
50019
|
+
}, 0);
|
50020
|
+
}
|
50067
50021
|
} else {
|
50068
50022
|
this.builder.activeModule = null;
|
50069
50023
|
if (this.moduleTool) this.moduleTool.style.display = '';
|