@innovastudio/contentbox 1.4.17 → 1.4.18
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
@@ -70,7 +70,7 @@
|
|
70
70
|
position: fixed;
|
71
71
|
top: 0;
|
72
72
|
left: 0;
|
73
|
-
width:
|
73
|
+
width: 60px;
|
74
74
|
height: 100vh;
|
75
75
|
background: rgba(255, 255, 255, 0.97) !important;
|
76
76
|
color: rgba(0, 0, 0, 0.8);
|
@@ -163,18 +163,19 @@
|
|
163
163
|
#divSidebarSource
|
164
164
|
*/
|
165
165
|
#divSidebarSnippets {
|
166
|
-
max-width:
|
166
|
+
max-width: 290px !important;
|
167
|
+
border-left: 60px solid transparent !important;
|
167
168
|
}
|
168
169
|
|
169
170
|
#divSidebarTypography {
|
170
|
-
max-width:
|
171
|
+
max-width: 320px;
|
171
172
|
}
|
172
173
|
|
173
174
|
#divSidebarSnippets > div:first-child {
|
174
175
|
width: 100%;
|
175
176
|
height: 40px;
|
176
177
|
position: absolute;
|
177
|
-
padding: 0 0 0
|
178
|
+
padding: 0 0 0 60px;
|
178
179
|
box-sizing: border-box;
|
179
180
|
}
|
180
181
|
|
@@ -187,17 +188,17 @@
|
|
187
188
|
|
188
189
|
#divSidebarSections > div,
|
189
190
|
.sidebar-sections > div {
|
190
|
-
padding: 0 0 0
|
191
|
+
padding: 0 0 0 60px;
|
191
192
|
box-sizing: border-box;
|
192
193
|
}
|
193
194
|
|
194
195
|
#divSidebarSource > div {
|
195
|
-
padding: 0 0 0
|
196
|
+
padding: 0 0 0 60px;
|
196
197
|
box-sizing: border-box;
|
197
198
|
}
|
198
199
|
|
199
200
|
#divSidebarTypography > div {
|
200
|
-
padding: 0 0 0
|
201
|
+
padding: 0 0 0 60px;
|
201
202
|
box-sizing: border-box;
|
202
203
|
}
|
203
204
|
|
@@ -277,7 +278,7 @@
|
|
277
278
|
right: 0;
|
278
279
|
width: 100%;
|
279
280
|
z-index: 2;
|
280
|
-
padding: 0 0 0
|
281
|
+
padding: 0 0 0 60px;
|
281
282
|
box-sizing: border-box;
|
282
283
|
}
|
283
284
|
|
@@ -288,8 +289,8 @@
|
|
288
289
|
overflow-y: auto;
|
289
290
|
overflow-x: hidden;
|
290
291
|
top: 110px;
|
291
|
-
left:
|
292
|
-
width: calc(100% -
|
292
|
+
left: 60px;
|
293
|
+
width: calc(100% - 60px);
|
293
294
|
height: calc(100% - 110px);
|
294
295
|
position: absolute;
|
295
296
|
}
|
@@ -474,7 +475,7 @@
|
|
474
475
|
opacity: 0.01;
|
475
476
|
/* setting display=none makes initial script may not work properly */
|
476
477
|
transform-origin: top;
|
477
|
-
padding-left:
|
478
|
+
padding-left: 60px;
|
478
479
|
}
|
479
480
|
|
480
481
|
#_cbhtml {
|
@@ -638,10 +639,7 @@
|
|
638
639
|
outline: none !important;
|
639
640
|
}
|
640
641
|
|
641
|
-
.is-section.is-section-navbar
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
.is-section.is-section-navbar .is-box-tool {
|
646
|
-
left: calc(50% - 70px) !important;
|
642
|
+
.is-section.is-section-navbar,
|
643
|
+
.is-section.is-section-navbar .is-topbar {
|
644
|
+
width: calc(100% - 60px);
|
647
645
|
}
|
@@ -3647,7 +3647,8 @@ class EditSection {
|
|
3647
3647
|
activeSection.parentNode.removeChild(activeSection); //Trigger Render event
|
3648
3648
|
|
3649
3649
|
this.builder.settings.onRender();
|
3650
|
-
this.builder.editor.util.hideModal(modalDelConfirm);
|
3650
|
+
this.builder.editor.util.hideModal(modalDelConfirm);
|
3651
|
+
this.builder.editor.util.clearControls(); //Trigger Change event
|
3651
3652
|
|
3652
3653
|
this.builder.settings.onChange(); // //Hide box tool
|
3653
3654
|
// let boxTool = document.querySelector('#divBoxTool');
|
@@ -3827,6 +3828,9 @@ class EditSection {
|
|
3827
3828
|
section.style.backgroundImage = ''; //remove gradient
|
3828
3829
|
|
3829
3830
|
btnSectionBgColor.style.backgroundColor = s; // preview
|
3831
|
+
//Trigger Change event
|
3832
|
+
|
3833
|
+
this.builder.onChange();
|
3830
3834
|
}, bgcolor);
|
3831
3835
|
}); // Section Background Gradient
|
3832
3836
|
|
@@ -3836,7 +3840,10 @@ class EditSection {
|
|
3836
3840
|
|
3837
3841
|
const section = this.builder.activeSection;
|
3838
3842
|
let gradientPicker = this.builder.editor.gradientpicker();
|
3839
|
-
gradientPicker.open(section)
|
3843
|
+
gradientPicker.open(section, () => {
|
3844
|
+
//Trigger Change event
|
3845
|
+
this.builder.onChange();
|
3846
|
+
});
|
3840
3847
|
});
|
3841
3848
|
}
|
3842
3849
|
|
@@ -11071,7 +11078,10 @@ class EditBox {
|
|
11071
11078
|
if (overlay.style.filter) {
|
11072
11079
|
overlay.style.filter = overlay.style.filter.replace('grayscale(1)', '');
|
11073
11080
|
}
|
11074
|
-
}
|
11081
|
+
} //Trigger Change event
|
11082
|
+
|
11083
|
+
|
11084
|
+
this.builder.onChange();
|
11075
11085
|
});
|
11076
11086
|
const chkBoxAddText = modalEditBox.querySelector('.cmd-box-addtext');
|
11077
11087
|
chkBoxAddText.addEventListener('click', () => {
|
@@ -11127,6 +11137,9 @@ class EditBox {
|
|
11127
11137
|
overlay.style.backgroundImage = ''; //remove gradient
|
11128
11138
|
|
11129
11139
|
btnBoxBgColor.style.backgroundColor = s; // preview
|
11140
|
+
//Trigger Change event
|
11141
|
+
|
11142
|
+
this.builder.onChange();
|
11130
11143
|
}, bgcolor);
|
11131
11144
|
}); // Box Background Gradient
|
11132
11145
|
|
@@ -11141,6 +11154,9 @@ class EditBox {
|
|
11141
11154
|
activeBox.style.backgroundColor = ''; // clean old
|
11142
11155
|
|
11143
11156
|
activeBox.style.backgroundImage = ''; // clean old
|
11157
|
+
//Trigger Change event
|
11158
|
+
|
11159
|
+
this.builder.onChange();
|
11144
11160
|
});
|
11145
11161
|
}); // Box Overlay Color
|
11146
11162
|
|
@@ -11194,7 +11210,9 @@ class EditBox {
|
|
11194
11210
|
}
|
11195
11211
|
|
11196
11212
|
btnBoxOverlayColor.style.backgroundColor = s; // preview
|
11213
|
+
//Trigger Change event
|
11197
11214
|
|
11215
|
+
this.builder.onChange();
|
11198
11216
|
return false;
|
11199
11217
|
}, color); //Note: if color empty, colorpicker will stay with its previous color
|
11200
11218
|
}); // Click to Open Media Select Dialog
|
@@ -89904,11 +89922,13 @@ var pace = {exports: {}};
|
|
89904
89922
|
checkInterval: 100,
|
89905
89923
|
selectors: ['body']
|
89906
89924
|
},
|
89907
|
-
eventLag:
|
89908
|
-
|
89909
|
-
|
89910
|
-
|
89911
|
-
|
89925
|
+
eventLag: false,
|
89926
|
+
// https://github.com/CodeByZach/pace/issues/510
|
89927
|
+
// eventLag: {
|
89928
|
+
// minSamples: 10,
|
89929
|
+
// sampleCount: 3,
|
89930
|
+
// lagThreshold: 50,//3
|
89931
|
+
// },
|
89912
89932
|
ajax: {
|
89913
89933
|
trackMethods: ['GET'],
|
89914
89934
|
trackWebSockets: true,
|
@@ -91129,11 +91149,12 @@ class ContentStuff {
|
|
91129
91149
|
left: 1px;
|
91130
91150
|
right: 1px;
|
91131
91151
|
}
|
91132
|
-
|
91152
|
+
/*
|
91133
91153
|
.content-edit .is-section-tool,
|
91134
91154
|
.content-edit .is-box-tool {
|
91135
91155
|
display: none !important;
|
91136
91156
|
}
|
91157
|
+
*/
|
91137
91158
|
.content-edit .box-hover {
|
91138
91159
|
outline: none !important;
|
91139
91160
|
}
|
@@ -91241,7 +91262,8 @@ class ContentBox {
|
|
91241
91262
|
}
|
91242
91263
|
]
|
91243
91264
|
*/
|
91244
|
-
featuredCategories: [
|
91265
|
+
featuredCategories: [// to configure your own, please see the template's JSON file (eg. templates.js)
|
91266
|
+
{
|
91245
91267
|
id: 1,
|
91246
91268
|
designId: 1,
|
91247
91269
|
name: 'Basic'
|
@@ -94090,7 +94112,7 @@ class ContentBox {
|
|
94090
94112
|
const EXPIRE_DATE = JSON.parse(localStorage.getItem(NAMESPACE)).expiresOn;
|
94091
94113
|
|
94092
94114
|
if (Date.now() > EXPIRE_DATE) {
|
94093
|
-
console.log('session expired');
|
94115
|
+
// console.log('session expired');
|
94094
94116
|
showProgress = true; // reset
|
94095
94117
|
|
94096
94118
|
localStorage.setItem(NAMESPACE, JSON.stringify({
|
@@ -94314,8 +94336,8 @@ class ContentBox {
|
|
94314
94336
|
let url = link.getAttribute('href');
|
94315
94337
|
|
94316
94338
|
if (url) {
|
94317
|
-
// Will go to the link
|
94318
94339
|
if (url.indexOf('#') === 0) {
|
94340
|
+
// Will go to bookmark
|
94319
94341
|
if (url.indexOf('#section') === 0) {
|
94320
94342
|
let num = url.replace('#section', '');
|
94321
94343
|
|
@@ -94350,12 +94372,17 @@ class ContentBox {
|
|
94350
94372
|
} catch (e) {// Do Nothing
|
94351
94373
|
}
|
94352
94374
|
}
|
94375
|
+
} else {
|
94376
|
+
// Prevent to go to the link
|
94377
|
+
e.preventDefault();
|
94378
|
+
e.stopImmediatePropagation();
|
94353
94379
|
}
|
94354
|
-
}
|
94355
|
-
|
94356
|
-
|
94357
|
-
|
94358
|
-
|
94380
|
+
} else {
|
94381
|
+
if (link.closest('.is-menu-search')) ; else {
|
94382
|
+
e.preventDefault();
|
94383
|
+
e.stopImmediatePropagation();
|
94384
|
+
}
|
94385
|
+
}
|
94359
94386
|
});
|
94360
94387
|
});
|
94361
94388
|
}
|