comand-component-library 4.0.38 → 4.0.40
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/dist/comand-component-library.js +1920 -1922
- package/dist/comand-component-library.umd.cjs +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/ComponentLibrary.vue +16 -9
- package/src/componentSettingsDataAndControls.vue +9 -1
- package/src/components/CmdBox.vue +62 -17
- package/src/components/CmdForm.vue +2 -2
- package/src/components/CmdHeadline.vue +24 -15
- package/src/components/CmdSystemMessage.vue +1 -1
- package/src/components/CmdThumbnailScroller.vue +5 -1
- package/src/components/CmdWidthLimitationWrapper.vue +1 -3
- package/src/components/ComponentSettings.vue +1 -1
- package/src/documentation/generated/CmdHeadlinePropertyDescriptions.json +1 -1
@@ -25,7 +25,7 @@
|
|
25
25
|
|
26
26
|
<!-- begin CmdHeadline -->
|
27
27
|
<CmdHeadline
|
28
|
-
v-else-if="cmdHeadline?.headlineText"
|
28
|
+
v-else-if="cmdHeadline?.headlineText && headlinePosition === 'header'"
|
29
29
|
v-bind="cmdHeadline"
|
30
30
|
/>
|
31
31
|
<!-- end CmdHeadline -->
|
@@ -41,14 +41,14 @@
|
|
41
41
|
|
42
42
|
<!-- begin default header with slot -->
|
43
43
|
<template v-else>
|
44
|
-
<div v-if="useSlots?.includes('header') || cmdHeadline?.headlineText" class="box-header">
|
44
|
+
<div v-if="useSlots?.includes('header') || (cmdHeadline?.headlineText && headlinePosition === 'header')" class="box-header">
|
45
45
|
<!-- begin slot 'header' -->
|
46
46
|
<slot v-if="useSlots?.includes('header')" name="header"></slot>
|
47
47
|
<!-- end slot 'header' -->
|
48
48
|
|
49
49
|
<!-- begin CmdHeadline -->
|
50
50
|
<CmdHeadline
|
51
|
-
v-if="cmdHeadline?.headlineText"
|
51
|
+
v-if="cmdHeadline?.headlineText && headlinePosition === 'header'"
|
52
52
|
v-bind="cmdHeadline"
|
53
53
|
/>
|
54
54
|
<!-- end CmdHeadline -->
|
@@ -67,6 +67,19 @@
|
|
67
67
|
>
|
68
68
|
<!-- begin slot 'body' -->
|
69
69
|
<slot name="body">
|
70
|
+
<!-- begin CmdHeadline -->
|
71
|
+
<CmdHeadline
|
72
|
+
v-if="cmdHeadline?.headlineText && headlinePosition === 'body'"
|
73
|
+
v-bind="cmdHeadline"
|
74
|
+
/>
|
75
|
+
<!-- end CmdHeadline -->
|
76
|
+
|
77
|
+
<div v-if="cmdIcon !== undefined" class="body-icon-wrapper">
|
78
|
+
<!-- begin CmdIcon -->
|
79
|
+
<CmdIcon :iconClass="cmdIcon.iconClass" :type="cmdIcon.type" />
|
80
|
+
<!-- end CmdIcon -->
|
81
|
+
</div>
|
82
|
+
|
70
83
|
<transition-group :name="toggleTransition">
|
71
84
|
<p
|
72
85
|
:class="{
|
@@ -97,9 +110,15 @@
|
|
97
110
|
|
98
111
|
<div v-if="textBody"
|
99
112
|
:class="{'default-padding': useDefaultPadding, 'allow-scroll': allowContentToScroll}">
|
113
|
+
<div v-if="cmdIcon !== undefined" class="body-icon-wrapper">
|
114
|
+
<!-- begin CmdIcon -->
|
115
|
+
<CmdIcon v-bind="cmdIcon" />
|
116
|
+
<!-- end CmdIcon -->
|
117
|
+
</div>
|
118
|
+
|
100
119
|
<!-- begin CmdHeadline -->
|
101
120
|
<CmdHeadline
|
102
|
-
v-if="cmdHeadline?.headlineText &&
|
121
|
+
v-if="cmdHeadline?.headlineText && headlinePosition === 'body'"
|
103
122
|
v-bind="cmdHeadline"
|
104
123
|
/>
|
105
124
|
<!-- end CmdHeadline -->
|
@@ -108,17 +127,17 @@
|
|
108
127
|
<p v-if="textBody" v-html="textBody"></p>
|
109
128
|
<!-- end textBody -->
|
110
129
|
</div>
|
111
|
-
|
112
|
-
<!-- begin additionalLink in box-footer -->
|
113
|
-
<div v-if="cmdLink?.linkType" class="box-footer">
|
114
|
-
<CmdLink v-bind="cmdLink" />
|
115
|
-
</div>
|
116
|
-
<!-- end additionalLink in box-footer -->
|
117
130
|
</div>
|
118
131
|
<!-- end content given by properties -->
|
119
132
|
</div>
|
120
133
|
<!-- end box-body -->
|
121
134
|
|
135
|
+
<!-- begin additionalLink in box-footer -->
|
136
|
+
<div v-if="cmdLink?.linkType" class="box-footer">
|
137
|
+
<CmdLink v-bind="cmdLink" />
|
138
|
+
</div>
|
139
|
+
<!-- end additionalLink in box-footer -->
|
140
|
+
|
122
141
|
<div v-if="useSlots?.includes('footer')" class="box-footer">
|
123
142
|
<!-- begin slot 'footer' -->
|
124
143
|
<slot name="footer"></slot>
|
@@ -307,13 +326,6 @@ export default {
|
|
307
326
|
type: Boolean,
|
308
327
|
default: true
|
309
328
|
},
|
310
|
-
/**
|
311
|
-
* repeats headline (used in box-header) given by cmdHeadline-property in box-body
|
312
|
-
*/
|
313
|
-
repeatHeadlineInBoxBody: {
|
314
|
-
type: Boolean,
|
315
|
-
default: false
|
316
|
-
},
|
317
329
|
/**
|
318
330
|
* show fade-effect on last line
|
319
331
|
*
|
@@ -451,6 +463,18 @@ export default {
|
|
451
463
|
type: Boolean,
|
452
464
|
default: true
|
453
465
|
},
|
466
|
+
/**
|
467
|
+
* position of headline
|
468
|
+
*
|
469
|
+
* cmdHeadline-property must be set
|
470
|
+
*/
|
471
|
+
headlinePosition: {
|
472
|
+
type: String,
|
473
|
+
default: "header",
|
474
|
+
validator(value) {
|
475
|
+
return value === "header" || value === "body"
|
476
|
+
}
|
477
|
+
},
|
454
478
|
/**
|
455
479
|
* properties for CmdHeadline-component
|
456
480
|
*/
|
@@ -464,6 +488,13 @@ export default {
|
|
464
488
|
cmdLink: {
|
465
489
|
type: Object,
|
466
490
|
default: {}
|
491
|
+
},
|
492
|
+
/**
|
493
|
+
* properties for CmdIcon-component to set large icon in box-body
|
494
|
+
*/
|
495
|
+
cmdIcon: {
|
496
|
+
type: Object,
|
497
|
+
required: false
|
467
498
|
}
|
468
499
|
},
|
469
500
|
/*
|
@@ -564,6 +595,10 @@ export default {
|
|
564
595
|
}
|
565
596
|
}
|
566
597
|
|
598
|
+
> .box-body:first-child {
|
599
|
+
border-top: 0 !important;
|
600
|
+
}
|
601
|
+
|
567
602
|
.box-body {
|
568
603
|
.allow-scroll {
|
569
604
|
overflow-y: auto;
|
@@ -624,6 +659,16 @@ export default {
|
|
624
659
|
flex-grow: 1;
|
625
660
|
}
|
626
661
|
|
662
|
+
.body-icon-wrapper {
|
663
|
+
display: flex;
|
664
|
+
justify-content: center;
|
665
|
+
margin-bottom: var(--default-margin);
|
666
|
+
|
667
|
+
span[class*="icon"] {
|
668
|
+
font-size: 8rem;
|
669
|
+
}
|
670
|
+
}
|
671
|
+
|
627
672
|
p.cutoff-text {
|
628
673
|
padding: var(--default-padding);
|
629
674
|
margin: 0;
|
@@ -33,7 +33,7 @@
|
|
33
33
|
<!-- end loop for formElements -->
|
34
34
|
|
35
35
|
<!-- begin submit-button -->
|
36
|
-
<button v-if="submitButton && submitButton.position === 'insideFieldset'" :class="['button', {primary: submitButton.primary}]" :type="submitButton.type">
|
36
|
+
<button v-if="submitButton && (submitButton.position === 'insideFieldset' || submitButton.position === null) " :class="['button', {primary: submitButton.primary}]" :type="submitButton.type">
|
37
37
|
<span v-if="submitButton.iconClass" :class="submitButton.iconClass"></span>
|
38
38
|
<span v-if="submitButton.text">{{ submitButton.text }}</span>
|
39
39
|
</button>
|
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
<div v-if="submitButton && submitButton.position === 'belowFieldset'" class="button-wrapper">
|
44
44
|
<!-- begin submit-button -->
|
45
|
-
<button :class="['button', {primary: submitButton.primary}]" :type="submitButton.type">
|
45
|
+
<button :class="['button', {primary: submitButton.primary}]" :type="submitButton.type || 'submit'">
|
46
46
|
<span v-if="submitButton.iconClass" :class="submitButton.iconClass"></span>
|
47
47
|
<span v-if="submitButton.text">{{ submitButton.text }}</span>
|
48
48
|
</button>
|
@@ -1,11 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<!-- begin default-view -->
|
3
3
|
<div v-if="!editModeContext || settingsContext || mainSidebarContext || headlineText"
|
4
|
-
:class="['cmd-headline', {'has-pre-headline-text': preHeadlineText, 'has-icon':
|
4
|
+
:class="['cmd-headline', {'has-pre-headline-text': preHeadlineText, 'has-icon': cmdIcon?.iconClass}, headlineTextAlign]">
|
5
|
+
<!-- begin headline with pre-headline-text -->
|
5
6
|
<template v-if="preHeadlineText">
|
6
7
|
<component v-if="headlineText" :is="headlineTag">
|
7
8
|
<!-- begin CmdIcon -->
|
8
|
-
<CmdIcon v-if="
|
9
|
+
<CmdIcon v-if="cmdIcon" v-bind="cmdIcon" />
|
9
10
|
<!-- end CmdIcon -->
|
10
11
|
|
11
12
|
<span class="pre-headline-text-wrapper">
|
@@ -21,9 +22,12 @@
|
|
21
22
|
</span>
|
22
23
|
</component>
|
23
24
|
</template>
|
25
|
+
<!-- end headline with pre-headline-text -->
|
26
|
+
|
27
|
+
<!-- begin headline without pre-headline-text -->
|
24
28
|
<component v-else :is="headlineTag">
|
25
29
|
<!-- begin CmdIcon -->
|
26
|
-
<CmdIcon v-if="
|
30
|
+
<CmdIcon v-if="cmdIcon" v-bind="cmdIcon" />
|
27
31
|
<!-- end CmdIcon -->
|
28
32
|
|
29
33
|
<span>
|
@@ -32,6 +36,7 @@
|
|
32
36
|
<!-- end slot -->
|
33
37
|
</span>
|
34
38
|
</component>
|
39
|
+
<!-- end headline without pre-headline-text -->
|
35
40
|
</div>
|
36
41
|
<!-- end default-view -->
|
37
42
|
|
@@ -48,26 +53,29 @@
|
|
48
53
|
:allowDeleteComponent="!!headlineText"
|
49
54
|
>
|
50
55
|
<template v-slot="slotProps">
|
56
|
+
<!-- begin CmdFormElement -->
|
51
57
|
<CmdFormElement
|
52
58
|
v-if="slotProps.editing"
|
53
59
|
element="input"
|
54
60
|
type="text"
|
55
|
-
:class="['edit-mode', 'headline', 'h'+ headlineLevel,
|
61
|
+
:class="['edit-mode', 'headline', 'h'+ headlineLevel, headlineTextAlign]"
|
56
62
|
labelText="Headline"
|
57
63
|
:showLabel="false"
|
58
64
|
placeholder="Headline"
|
59
65
|
v-model="editableHeadlineText"
|
60
66
|
/>
|
67
|
+
<!-- end CmdFormElement -->
|
68
|
+
|
61
69
|
<template v-else-if="headlineText"
|
62
|
-
:class="['cmd-headline', {'has-pre-headline-text': preHeadlineText, 'has-icon':
|
70
|
+
:class="['cmd-headline', {'has-pre-headline-text': preHeadlineText, 'has-icon': cmdIcon?.iconClass}, headlineTextAlign]">
|
63
71
|
<!-- begin CmdIcon -->
|
64
|
-
<CmdIcon v-if="
|
72
|
+
<CmdIcon v-if="cmdIcon" v-bind="cmdIcon" />
|
65
73
|
<!-- end CmdIcon -->
|
66
74
|
|
67
75
|
<template v-if="preHeadlineText">
|
68
76
|
<component v-if="headlineText" :is="headlineTag">
|
69
77
|
<!-- begin CmdIcon -->
|
70
|
-
<CmdIcon v-if="
|
78
|
+
<CmdIcon v-if="cmdIcon" v-bind="cmdIcon" />
|
71
79
|
<!-- end CmdIcon -->
|
72
80
|
|
73
81
|
<!-- begin pre-headline-text -->
|
@@ -85,6 +93,7 @@
|
|
85
93
|
<!-- end slot -->
|
86
94
|
</component>
|
87
95
|
</template>
|
96
|
+
|
88
97
|
<!-- begin show placeholder if no image exists (and component is not edited) -->
|
89
98
|
<button v-else-if="componentActive" type="button" class="button confirm" @click="onAddItem">
|
90
99
|
<span class="icon-plus"></span>
|
@@ -131,13 +140,6 @@ export default {
|
|
131
140
|
type: String,
|
132
141
|
required: false
|
133
142
|
},
|
134
|
-
/**
|
135
|
-
* icon-class for icon shown left/before headline
|
136
|
-
*/
|
137
|
-
headlineIcon: {
|
138
|
-
type: Object,
|
139
|
-
required: false
|
140
|
-
},
|
141
143
|
/**
|
142
144
|
* text-alignment (has no effect if icon is used)
|
143
145
|
*
|
@@ -151,6 +153,13 @@ export default {
|
|
151
153
|
value === "center" ||
|
152
154
|
value === "right"
|
153
155
|
}
|
156
|
+
},
|
157
|
+
/**
|
158
|
+
* properties for CmdIcon-component to show icon left/before headline
|
159
|
+
*/
|
160
|
+
cmdIcon: {
|
161
|
+
type: Object,
|
162
|
+
required: false
|
154
163
|
}
|
155
164
|
},
|
156
165
|
computed: {
|
@@ -166,7 +175,7 @@ export default {
|
|
166
175
|
}
|
167
176
|
return ""
|
168
177
|
},
|
169
|
-
|
178
|
+
headlineTextAlign() {
|
170
179
|
if (this.textAlign) {
|
171
180
|
return "text-" + this.textAlign
|
172
181
|
}
|
@@ -376,7 +376,7 @@ export default {
|
|
376
376
|
.cmd-thumbnail-scroller {
|
377
377
|
display: inline-flex; /* do not set to table to avoid overflow is not hidden on small devices */
|
378
378
|
flex-direction: column;
|
379
|
-
gap:
|
379
|
+
gap: 1rem; /* should not depend on default-gap to avoid odd spacing between headline and scroller */
|
380
380
|
width: 100%;
|
381
381
|
|
382
382
|
&.full-width:not(.vertical) {
|
@@ -387,6 +387,10 @@ export default {
|
|
387
387
|
}
|
388
388
|
}
|
389
389
|
|
390
|
+
.cmd-headline {
|
391
|
+
margin: 0;
|
392
|
+
}
|
393
|
+
|
390
394
|
.cmd-slide-button {
|
391
395
|
top: 50% !important;
|
392
396
|
height: auto;
|
@@ -5,9 +5,7 @@
|
|
5
5
|
<!-- begin cmd-headline -->
|
6
6
|
<CmdHeadline
|
7
7
|
v-if="cmdHeadline"
|
8
|
-
|
9
|
-
:headline-text="cmdHeadline.headlineText"
|
10
|
-
:headline-level="cmdHeadline.headlineLevel"
|
8
|
+
v-bind="cmdHeadline"
|
11
9
|
/>
|
12
10
|
<!-- end cmd-headline -->
|
13
11
|
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<CmdBox
|
3
3
|
:use-slots="['body']"
|
4
4
|
:collapsible="true"
|
5
|
-
:cmdHeadline="{headlineText: readableName(componentName), headlineLevel: 4,
|
5
|
+
:cmdHeadline="{headlineText: readableName(componentName), headlineLevel: 4, cmdIcon: {iconClass: 'icon-settings-template'}}"
|
6
6
|
:openCollapsedBox="true"
|
7
7
|
boxBodyClass="settings-body"
|
8
8
|
>
|