comand-component-library 4.0.6 → 4.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/comand-component-library.js +644 -633
- package/dist/comand-component-library.umd.cjs +3 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/ComponentLibrary.vue +11 -15
- package/src/componentSettingsDataAndControls.vue +12 -4
- package/src/components/CmdFakeSelect.vue +6 -2
- package/src/components/CmdFancyBox.vue +1 -0
- package/src/components/CmdForm.vue +7 -2
- package/src/components/CmdFormElement.vue +7 -1
- package/src/components/CmdInputGroup.vue +5 -3
- package/src/components/CmdSidebar.vue +0 -1
- package/src/components/CmdSocialNetworks.vue +6 -2
- package/src/components/CmdSocialNetworksItem.vue +1 -1
- package/src/components/CmdThumbnailScroller.vue +3 -2
- package/src/components/CmdUploadForm.vue +78 -64
- package/src/components/EditComponentWrapper.vue +74 -18
@@ -421,7 +421,7 @@ export default {
|
|
421
421
|
text-align: center;
|
422
422
|
|
423
423
|
&.active {
|
424
|
-
color: var(--
|
424
|
+
color: var(--hyperlink-color-highlighted);
|
425
425
|
background: none; /* overwrite default behaviour from frontend-framework */
|
426
426
|
|
427
427
|
span, span[class*="icon"] {
|
@@ -438,6 +438,7 @@ export default {
|
|
438
438
|
figcaption {
|
439
439
|
background: var(--primary-color);
|
440
440
|
opacity: 1;
|
441
|
+
color: var(--pure-white);
|
441
442
|
}
|
442
443
|
}
|
443
444
|
|
@@ -545,7 +546,7 @@ export default {
|
|
545
546
|
}
|
546
547
|
|
547
548
|
&.large-icons {
|
548
|
-
li a {
|
549
|
+
ul li a {
|
549
550
|
display: flex;
|
550
551
|
flex-direction: column;
|
551
552
|
gap: calc(var(--default-gap) / 4);
|
@@ -24,7 +24,8 @@
|
|
24
24
|
</CmdSystemMessage>
|
25
25
|
<!-- end CmdSystemMessage -->
|
26
26
|
|
27
|
-
<div :class="['box flex-container vertical', { 'drop-area': enableDragAndDrop, 'allow-drop': allowDrop }]"
|
27
|
+
<div :class="['box flex-container vertical', { 'drop-area': enableDragAndDrop, 'allow-drop': allowDrop }]"
|
28
|
+
v-on="dragAndDropHandler">
|
28
29
|
<template v-if="!listOfFiles.length">
|
29
30
|
<!-- begin CmdHeadline -->
|
30
31
|
<CmdHeadline v-if="allowMultipleFileUploads" v-bind="cmdHeadlineNoFilesToUpload" headlineLevel="4">
|
@@ -35,7 +36,8 @@
|
|
35
36
|
|
36
37
|
<!-- begin total-upload information -->
|
37
38
|
<div v-else class="flex-container vertical">
|
38
|
-
<div v-if="showTotalUpload && listOfFiles.length !== 1"
|
39
|
+
<div v-if="showTotalUpload && listOfFiles.length !== 1"
|
40
|
+
class="flex-container vertical list-files-wrapper">
|
39
41
|
<!-- begin CmdHeadline -->
|
40
42
|
<CmdHeadline v-bind="cmdHeadlineSummaryOfAllFiles" headlineLevel="4">
|
41
43
|
{{ getMessage("cmduploadform.headline.summary_of_all_files") }}
|
@@ -50,7 +52,7 @@
|
|
50
52
|
@click.prevent="cancelUpload"
|
51
53
|
>
|
52
54
|
<!-- begin CmdIcon -->
|
53
|
-
<CmdIcon :iconClass="deleteIcon.iconClass" :type="deleteIcon.iconClass"
|
55
|
+
<CmdIcon :iconClass="deleteIcon.iconClass" :type="deleteIcon.iconClass"/>
|
54
56
|
<!-- end CmdIcon -->
|
55
57
|
</a>
|
56
58
|
<span>
|
@@ -103,7 +105,7 @@
|
|
103
105
|
@click.prevent="removeFile(index)"
|
104
106
|
>
|
105
107
|
<!-- begin CmdIcon -->
|
106
|
-
<CmdIcon :iconClass="iconDelete.iconClass" :type="iconDelete.iconType"
|
108
|
+
<CmdIcon :iconClass="iconDelete.iconClass" :type="iconDelete.iconType"/>
|
107
109
|
<!-- end CmdIcon -->
|
108
110
|
</a>
|
109
111
|
<span
|
@@ -143,61 +145,65 @@
|
|
143
145
|
<!-- end list of selected files -->
|
144
146
|
|
145
147
|
<!-- begin upload conditions -->
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
148
|
+
<div class="upload-conditions">
|
149
|
+
<!-- begin CmdHeadline -->
|
150
|
+
<CmdHeadline v-if="allowMultipleFileUploads && listOfFiles.length"
|
151
|
+
v-bind="cmdHeadlineSelectAdditionalFiles" headlineLevel="4">
|
152
|
+
{{ getMessage("cmduploadform.headline.select_additional_files") }}
|
153
|
+
</CmdHeadline>
|
154
|
+
<!-- end CmdHeadline -->
|
155
|
+
|
156
|
+
<!-- begin CmdHeadline -->
|
157
|
+
<CmdHeadline v-if="!allowMultipleFileUploads && listOfFiles.length" v-bind="cmdHeadlineSelectNewFile"
|
158
|
+
headlineLevel="4">
|
159
|
+
{{ getMessage("cmduploadform.headline.select_new_file") }}
|
160
|
+
</CmdHeadline>
|
161
|
+
<!-- end CmdHeadline -->
|
162
|
+
|
163
|
+
<dl class="small">
|
164
|
+
<template v-if="maxTotalUploadSize > 0">
|
165
|
+
<dt :class="{ error: totalSize > maxTotalUploadSize }">
|
166
|
+
{{ getMessage("cmduploadform.max_total_upload_size") }}
|
167
|
+
</dt>
|
168
|
+
<dd :class="['text-align-right', { error: totalSize > maxTotalUploadSize }]">
|
169
|
+
{{ formatSize(maxTotalUploadSize) }}
|
170
|
+
</dd>
|
171
|
+
</template>
|
172
|
+
<dt :class="{ error: errors.fileSize }">
|
173
|
+
{{ getMessage("cmduploadform.max_file_upload_size") }}
|
162
174
|
</dt>
|
163
|
-
<dd :class="['text-align-right', { error:
|
164
|
-
{{ formatSize(
|
175
|
+
<dd :class="['text-align-right', { error: errors.fileSize }]">
|
176
|
+
{{ formatSize(maxFileUploadSize) }}
|
165
177
|
</dd>
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
{{ fileExtension }}
|
196
|
-
</li>
|
197
|
-
</ul>
|
198
|
-
</transition>
|
199
|
-
</dd>
|
200
|
-
</dl>
|
178
|
+
<dt :class="{ error: errors.fileType }">
|
179
|
+
{{ getMessage("cmduploadform.allowed_file_types") }}
|
180
|
+
</dt>
|
181
|
+
<dd>
|
182
|
+
<a
|
183
|
+
href="#"
|
184
|
+
@click.prevent="showListOfFileExtensions = !showListOfFileExtensions"
|
185
|
+
:title="getMessage('cmduploadform.tooltip.toggle_list_of_allowed_file_types')">
|
186
|
+
<!-- begin CmdIcon -->
|
187
|
+
<CmdIcon
|
188
|
+
:iconClass="showListOfFileExtensions ? iconInvisible.iconClass : iconVisible.iconClass"
|
189
|
+
:type="showListOfFileExtensions ? iconInvisible.iconType : iconVisible.iconType"
|
190
|
+
/>
|
191
|
+
<!-- end CmdIcon -->
|
192
|
+
</a>
|
193
|
+
<transition name="fade">
|
194
|
+
<ul v-if="showListOfFileExtensions" class="list-of-file-extensions">
|
195
|
+
<li
|
196
|
+
v-for="(fileExtension, index) in allowedFileExtensions"
|
197
|
+
:key="index"
|
198
|
+
:class="{ error: errors.fileType }"
|
199
|
+
>
|
200
|
+
{{ fileExtension }}
|
201
|
+
</li>
|
202
|
+
</ul>
|
203
|
+
</transition>
|
204
|
+
</dd>
|
205
|
+
</dl>
|
206
|
+
</div>
|
201
207
|
<!-- end upload conditions -->
|
202
208
|
|
203
209
|
<!-- begin upload-button and drag-and-drop-text -->
|
@@ -209,7 +215,7 @@
|
|
209
215
|
@click="selectFiles()"
|
210
216
|
>
|
211
217
|
<!-- begin CmdIcon -->
|
212
|
-
<CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType"
|
218
|
+
<CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType"/>
|
213
219
|
<!-- end CmdIcon -->
|
214
220
|
<span v-if="allowMultipleFileUploads">{{
|
215
221
|
getMessage("cmduploadform.labeltext.select_files")
|
@@ -265,7 +271,7 @@
|
|
265
271
|
@click="uploadFiles"
|
266
272
|
>
|
267
273
|
<!-- begin CmdIcon -->
|
268
|
-
<CmdIcon :iconClass="iconUpload.iconClass" :type="iconUpload.iconType"
|
274
|
+
<CmdIcon :iconClass="iconUpload.iconClass" :type="iconUpload.iconType"/>
|
269
275
|
<!-- end CmdIcon -->
|
270
276
|
<span v-if="listOfFiles.length === 1 || !allowMultipleFileUploads">
|
271
277
|
{{ getMessage("cmduploadform.buttontext.upload_file") }}
|
@@ -274,7 +280,7 @@
|
|
274
280
|
</button>
|
275
281
|
<button :class="['button', { disabled: listOfFiles.length === 0 }]" @click="cancel">
|
276
282
|
<!-- begin CmdIcon -->
|
277
|
-
<CmdIcon :iconClass="iconCancel.iconClass" :type="iconCancel.iconType"
|
283
|
+
<CmdIcon :iconClass="iconCancel.iconClass" :type="iconCancel.iconType"/>
|
278
284
|
<!-- end CmdIcon -->
|
279
285
|
<span>{{ getMessage("cmduploadform.buttontext.cancel") }}</span>
|
280
286
|
</button>
|
@@ -283,7 +289,9 @@
|
|
283
289
|
<!-- end advanced mode -->
|
284
290
|
|
285
291
|
<!-- begin simple mode -->
|
286
|
-
<a v-else href="#" @click.prevent="selectFiles"
|
292
|
+
<a v-else href="#" @click.prevent="selectFiles"
|
293
|
+
:class="['cmd-upload-form box', { 'drop-area': enableDragAndDrop, 'allow-drop': allowDrop }]"
|
294
|
+
v-on="dragAndDropHandler">
|
287
295
|
<!-- begin progressbar -->
|
288
296
|
<span class="progressbar" v-if="uploadInitiated">
|
289
297
|
<span>{{ getPercentage(totalUploadProgress) }}</span>
|
@@ -301,20 +309,20 @@
|
|
301
309
|
<template v-if="fileTypeImage">
|
302
310
|
<span>{{ getMessage("cmduploadform.select_image") }}</span>
|
303
311
|
<!-- begin CmdIcon -->
|
304
|
-
<CmdIcon :iconClass="iconImage.iconClass" :type="iconImage.iconType"
|
312
|
+
<CmdIcon :iconClass="iconImage.iconClass" :type="iconImage.iconType"/>
|
305
313
|
<!-- end CmdIcon -->
|
306
314
|
</template>
|
307
315
|
<template v-else>
|
308
316
|
<span>{{ getMessage("cmduploadform.select_file") }}</span>
|
309
317
|
<!-- begin CmdIcon -->
|
310
|
-
<CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType"
|
318
|
+
<CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType"/>
|
311
319
|
<!-- end CmdIcon -->
|
312
320
|
</template>
|
313
321
|
</template>
|
314
322
|
<template v-else>
|
315
323
|
<span>{{ getMessage("cmduploadform.drag_and_drop_file_here") }}</span>
|
316
324
|
<!-- begin CmdIcon -->
|
317
|
-
<CmdIcon :iconClass="iconDragAndDrop.iconClass" :type="iconDragAndDrop.iconType"
|
325
|
+
<CmdIcon :iconClass="iconDragAndDrop.iconClass" :type="iconDragAndDrop.iconType"/>
|
318
326
|
<!-- end CmdIcon -->
|
319
327
|
</template>
|
320
328
|
<small>{{ getMessage("cmduploadform.max_upload_size") }} {{ formatSize(maxFileUploadSize) }}</small>
|
@@ -1187,6 +1195,12 @@ export default {
|
|
1187
1195
|
}
|
1188
1196
|
}
|
1189
1197
|
|
1198
|
+
.upload-conditions {
|
1199
|
+
.cmd-headline > * {
|
1200
|
+
text-align: center;
|
1201
|
+
}
|
1202
|
+
}
|
1203
|
+
|
1190
1204
|
p {
|
1191
1205
|
&.text-drag-and-drop {
|
1192
1206
|
&.disabled {
|
@@ -376,21 +376,34 @@ function buildComponentPath(component) {
|
|
376
376
|
|
377
377
|
display: block;
|
378
378
|
|
379
|
+
label {
|
380
|
+
&.text-center input {
|
381
|
+
text-align: center;
|
382
|
+
}
|
383
|
+
|
384
|
+
&.edit-mode input, select, .cmd-fake-select {
|
385
|
+
padding: 0;
|
386
|
+
height: auto;
|
387
|
+
min-height: calc(var(--input-height) / 2);
|
388
|
+
}
|
389
|
+
}
|
390
|
+
|
391
|
+
[data-component="CmdSlideshow"] {
|
392
|
+
top: 1.8rem;
|
393
|
+
right: 5.3rem;
|
394
|
+
}
|
395
|
+
|
379
396
|
&.highlight {
|
380
397
|
border-color: var(--hyperlink-color-highlighted);
|
381
398
|
border-style: dotted;
|
382
399
|
}
|
383
400
|
|
384
|
-
.cmd-headline {
|
385
|
-
margin: 0;
|
386
|
-
}
|
387
|
-
|
388
401
|
.component-name {
|
389
402
|
display: none;
|
390
403
|
position: absolute;
|
391
404
|
left: auto;
|
392
405
|
right: 8rem;
|
393
|
-
font-size: 1rem;
|
406
|
+
font-size: 1.1rem;
|
394
407
|
font-style: italic;
|
395
408
|
z-index: 1;
|
396
409
|
padding: .2rem 2rem .2rem .5rem;
|
@@ -398,15 +411,6 @@ function buildComponentPath(component) {
|
|
398
411
|
margin: 0;
|
399
412
|
}
|
400
413
|
|
401
|
-
&.active {
|
402
|
-
border-color: var(--pure-white);
|
403
|
-
min-height: 2.5rem;
|
404
|
-
|
405
|
-
.component-name {
|
406
|
-
display: block;
|
407
|
-
}
|
408
|
-
}
|
409
|
-
|
410
414
|
.action-buttons {
|
411
415
|
--action-buttons-size: 3.6rem;
|
412
416
|
|
@@ -456,8 +460,10 @@ function buildComponentPath(component) {
|
|
456
460
|
left: 0;
|
457
461
|
right: auto; /* avoids container to be stretched */
|
458
462
|
flex-wrap: nowrap;
|
463
|
+
border: var(--default-border);
|
464
|
+
border-color: var(--pure-white);
|
459
465
|
border-bottom: 0;
|
460
|
-
|
466
|
+
background: var(--pure-white);
|
461
467
|
border-radius: var(--default-border-radius);
|
462
468
|
|
463
469
|
li {
|
@@ -504,20 +510,70 @@ function buildComponentPath(component) {
|
|
504
510
|
top: 0;
|
505
511
|
left: 0;
|
506
512
|
transform: none;
|
513
|
+
|
514
|
+
&::before {
|
515
|
+
color: var(--hyperlink-color)
|
516
|
+
}
|
507
517
|
}
|
508
518
|
|
509
519
|
&.primary {
|
510
520
|
background: var(--primary-color);
|
511
521
|
}
|
522
|
+
|
523
|
+
&:hover, &:active, &:focus {
|
524
|
+
span[class*="icon-"] {
|
525
|
+
&::before {
|
526
|
+
color: var(--hyperlink-color-highlighted)
|
527
|
+
}
|
528
|
+
}
|
529
|
+
}
|
512
530
|
}
|
513
531
|
}
|
514
532
|
}
|
533
|
+
}
|
515
534
|
|
516
|
-
|
517
|
-
|
518
|
-
|
535
|
+
&.active {
|
536
|
+
//width: 100%; /* stretch inside flex-container */
|
537
|
+
background: var(--pure-white);
|
538
|
+
border-color: var(--pure-white);
|
539
|
+
min-height: 2.5rem;
|
540
|
+
|
541
|
+
.component-name {
|
542
|
+
display: block;
|
543
|
+
}
|
544
|
+
|
545
|
+
label {
|
546
|
+
&.cmd-form-element {
|
547
|
+
:is(input[type="checkbox"], input[type="radio"]):checked {
|
548
|
+
& ~ .label-text span {
|
549
|
+
color: var(--pure-white);
|
550
|
+
}
|
551
|
+
}
|
552
|
+
}
|
553
|
+
}
|
554
|
+
}
|
555
|
+
|
556
|
+
/* begin edit-mode-styles for specific components */
|
557
|
+
.cmd-headline {
|
558
|
+
margin: 0;
|
559
|
+
}
|
560
|
+
|
561
|
+
.cmd-thumbnail-scroller {
|
562
|
+
.inner-thumbnail-wrapper > ul > li {
|
563
|
+
align-self: flex-start;
|
564
|
+
}
|
565
|
+
|
566
|
+
.cmd-image .drop-area span[class*="icon"] {
|
567
|
+
font-size: 5rem;
|
568
|
+
}
|
569
|
+
}
|
570
|
+
|
571
|
+
.cmd-image {
|
572
|
+
input {
|
573
|
+
width: 5rem;
|
519
574
|
}
|
520
575
|
}
|
576
|
+
/* end edit-mode-styles for specific components */
|
521
577
|
|
522
578
|
// begin component-level only
|
523
579
|
&:not(.edit-items) {
|