comand-component-library 4.0.28 → 4.0.30

Sign up to get free protection for your applications and to get access to all the features.
@@ -339,6 +339,30 @@ data() {
339
339
  }
340
340
  ]
341
341
  },
342
+ cmdLinkSettingsData: {
343
+
344
+ path: "#",
345
+ target: "",
346
+ text: "Linktext",
347
+ styleAsButton: false,
348
+ primaryButton: false
349
+ },
350
+ cmdLinkSettingsControls: {
351
+ linkType: [
352
+ {
353
+ text: "href (default)",
354
+ value: "href"
355
+ },
356
+ {
357
+ text: "router",
358
+ value: "router"
359
+ },
360
+ {
361
+ text: "button",
362
+ value: "button"
363
+ }
364
+ ]
365
+ },
342
366
  cmdListOfLinksSettingsData: {
343
367
  useGap: true,
344
368
  styleAsBox: false,
@@ -361,8 +385,7 @@ data() {
361
385
  {
362
386
  text: "Right",
363
387
  value: "right"
364
- },
365
-
388
+ }
366
389
  ],
367
390
  orientation: [
368
391
  {
@@ -310,6 +310,10 @@ export default {
310
310
  }
311
311
  }
312
312
 
313
+ .postal-code {
314
+ margin-right: calc(var(--default-margin) / 2);
315
+ }
316
+
313
317
  .order-city-zip, .order-zip-city {
314
318
  display: inline-flex;
315
319
  gap: .5rem;
@@ -317,6 +321,11 @@ export default {
317
321
 
318
322
  .order-city-zip {
319
323
  flex-direction: row-reverse;
324
+
325
+ .postal-code {
326
+ margin-right: 0;
327
+ margin-left: calc(var(--default-margin) / 2);
328
+ }
320
329
  }
321
330
  }
322
331
 
@@ -57,7 +57,7 @@
57
57
 
58
58
  <!-- begin zip/city (state) -->
59
59
  <span v-if="addressEntry.zip || addressEntry.city" :class="showCityBeforeZip ? 'city-zip' : 'zip-city'">
60
- <span v-if="addressEntry.zip" class="postal-code">{{ addressEntry.zip }}&nbsp;</span>
60
+ <span v-if="addressEntry.zip" class="postal-code">{{ addressEntry.zip }}</span>
61
61
  <span v-if="addressEntry.city" class="locality">{{ addressEntry.city }}<template v-if="addressEntry.state"> {{addressEntry.state}}</template></span>
62
62
  </span><br/>
63
63
  <!-- end zip/city (state) -->
@@ -305,6 +305,7 @@ export default {
305
305
  streetNo: this.addressEntry.streetNo,
306
306
  zip: this.addressEntry.zip,
307
307
  city: this.addressEntry.city,
308
+ state: this.addressEntry.state,
308
309
  miscInfo: this.addressEntry.miscInfo,
309
310
  country: this.addressEntry.country
310
311
  }
@@ -1,29 +1,37 @@
1
1
  <template>
2
2
  <div class="cmd-bank-account-data">
3
- <!-- begin CmdHeadline -->
4
- <CmdHeadline v-if="cmdHeadline" v-bind="cmdHeadline" />
5
- <!-- end CmdHeadline -->
3
+ <!-- begin slot -->
4
+ <template v-if="useSlot">
5
+ <slot></slot>
6
+ </template>
7
+ <!-- end slot -->
6
8
 
7
- <!-- begin account data -->
8
- <dl>
9
- <template v-for="(entry, index) in accountData" :key="index">
10
- <dt>{{ entry.text }}</dt>
11
- <dd v-if="allowCopyByClick && entry.allowCopy">
12
- <span>{{ entry.value }}</span>
13
- <a href="#" @click.prevent="copyToClipboard(entry.value)" :title="iconCopy.tooltip">
14
- <!-- begin CmdIcon -->
15
- <CmdIcon :iconClass="iconCopy.iconClass" :type="iconCopy.iconType" />
16
- <!-- end CmdIcon -->
17
- </a>
18
- </dd>
19
- <dd v-else :key="index">{{ entry.value }}</dd>
20
- </template>
21
- </dl>
22
- <!-- end account data -->
9
+ <template v-else>
10
+ <!-- begin CmdHeadline -->
11
+ <CmdHeadline v-if="cmdHeadline" v-bind="cmdHeadline"/>
12
+ <!-- end CmdHeadline -->
23
13
 
24
- <!-- begin additional information -->
25
- <p v-if="additionalInformation">{{ additionalInformation }}</p>
26
- <!-- end additional information -->
14
+ <!-- begin account data -->
15
+ <dl>
16
+ <template v-for="(entry, index) in accountData" :key="index">
17
+ <dt>{{ entry.text }}</dt>
18
+ <dd v-if="allowCopyByClick && entry.allowCopy">
19
+ <span>{{ entry.value }}</span>
20
+ <a href="#" @click.prevent="copyToClipboard(entry.value)" :title="iconCopy.tooltip">
21
+ <!-- begin CmdIcon -->
22
+ <CmdIcon :iconClass="iconCopy.iconClass" :type="iconCopy.iconType"/>
23
+ <!-- end CmdIcon -->
24
+ </a>
25
+ </dd>
26
+ <dd v-else :key="index">{{ entry.value }}</dd>
27
+ </template>
28
+ </dl>
29
+ <!-- end account data -->
30
+
31
+ <!-- begin additional information -->
32
+ <p v-if="additionalInformation">{{ additionalInformation }}</p>
33
+ <!-- end additional information -->
34
+ </template>
27
35
  </div>
28
36
  </template>
29
37
 
@@ -31,6 +39,13 @@
31
39
  export default {
32
40
  name: "CmdBankAccountData",
33
41
  props: {
42
+ /**
43
+ * activate if you want to use slot instead for given structure
44
+ */
45
+ useSlot: {
46
+ type: Boolean,
47
+ default: false
48
+ },
34
49
  /**
35
50
  * bank account data
36
51
  *
@@ -102,5 +117,6 @@ export default {
102
117
  }
103
118
  }
104
119
  }
120
+
105
121
  /* end cmd-bank-account-data ---------------------------------------------------------------------------------------- */
106
122
  </style>
@@ -58,6 +58,7 @@
58
58
 
59
59
  <!-- begin box-body -->
60
60
  <div v-show="open" :class="['box-body', boxBodyClass]" aria-expanded="true" role="article">
61
+ <!-- begin content given slot -->
61
62
  <div v-if="useSlots?.includes('body')"
62
63
  class="inner-box-body-wrapper"
63
64
  :class="{'default-padding': useDefaultPadding, 'allow-scroll': allowContentToScroll}"
@@ -67,12 +68,14 @@
67
68
  <!-- begin slot 'body' -->
68
69
  <slot name="body">
69
70
  <transition-group :name="toggleTransition">
70
- <p :class="{
71
- 'cutoff-text': cutoffTextLines > 0,
72
- 'fade-last-line': fadeLastLine && !showCutOffText,
73
- 'show-text' : showCutOffText
74
- }">
75
- {{ textBody }}
71
+ <p
72
+ :class="{
73
+ 'cutoff-text': cutoffTextLines > 0,
74
+ 'fade-last-line': fadeLastLine && !showCutOffText,
75
+ 'show-text' : showCutOffText
76
+ }"
77
+ v-html='textBody'
78
+ >
76
79
  </p>
77
80
  <a v-if="cutoffTextLines > 0" href="#" @click.prevent="toggleCutOffText">
78
81
  {{
@@ -83,11 +86,17 @@
83
86
  </slot>
84
87
  <!-- end slot 'body' -->
85
88
  </div>
89
+ <!-- end content given slot -->
86
90
 
87
- <template v-else>
91
+ <!-- begin content given by properties -->
92
+ <div v-else
93
+ class="inner-box-body-wrapper"
94
+ :class="{'allow-scroll': allowContentToScroll}"
95
+ >
88
96
  <img v-if="image" :src="image.src" :alt="image.altText"/>
89
97
 
90
- <div v-else :class="{'default-padding': useDefaultPadding, 'allow-scroll': allowContentToScroll}">
98
+ <div v-if="textBody"
99
+ :class="{'default-padding': useDefaultPadding, 'allow-scroll': allowContentToScroll}">
91
100
  <!-- begin CmdHeadline -->
92
101
  <CmdHeadline
93
102
  v-if="cmdHeadline?.headlineText && repeatHeadlineInBoxBody"
@@ -95,9 +104,18 @@
95
104
  />
96
105
  <!-- end CmdHeadline -->
97
106
 
98
- <p v-if="textBody">{{ textBody }}</p>
107
+ <!-- begin textBody -->
108
+ <p v-if="textBody" v-html="textBody"></p>
109
+ <!-- end textBody -->
99
110
  </div>
100
- </template>
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
+ </div>
118
+ <!-- end content given by properties -->
101
119
  </div>
102
120
  <!-- end box-body -->
103
121
 
@@ -159,18 +177,20 @@
159
177
  <div class="box-header flex-container vertical">
160
178
  <figure v-if="user.image">
161
179
  <img :src="user.image.src" :alt="user.image.alt"/>
162
- <figcaption>{{ user.name }} <span v-if="user.age">, {{ user.age }}</span></figcaption>
180
+ <figcaption v-if="!rowView" class="user-name">{{ user.name }}<span v-if="user.age" class="user-age"> ({{
181
+ user.age
182
+ }})</span></figcaption>
163
183
  </figure>
164
184
  <div v-else>
165
185
  <span :class="defaultProfileIconClass" :title="user.name"></span>
166
- <p v-if="!rowView">{{ user.name }}</p>
186
+ <p v-if="!rowView" class="user-name">{{ user.name }}</p>
167
187
  </div>
168
188
  </div>
169
189
  <!-- end box-header -->
170
190
 
171
191
  <!-- begin box-body -->
172
192
  <div class="box-body">
173
- <p v-if="rowView">{{ user.name }}</p>
193
+ <p v-if="rowView" class="user-name">{{ user.name }}</p>
174
194
  <p v-if="user.profession">{{ user.profession }}</p>
175
195
  <p v-if="user.position">{{ user.position }}</p>
176
196
  <p v-if="user.description" class="description">{{ user.description }}</p>
@@ -178,7 +198,7 @@
178
198
  <!-- end box-body -->
179
199
 
180
200
  <!-- begin user-tags -->
181
- <ul v-if="user.tags && user.tags.length" class="tags">
201
+ <ul v-if="user.tags && user.tags.length" class="tags">
182
202
  <li v-for="(tag, index) in user.tags" :key="index">
183
203
  {{ tag }}
184
204
  </li>
@@ -437,6 +457,13 @@ export default {
437
457
  cmdHeadline: {
438
458
  type: Object,
439
459
  required: false
460
+ },
461
+ /**
462
+ * properties for CmdLink-component to set additional link at bottom of box
463
+ */
464
+ cmdLink: {
465
+ type: Object,
466
+ default: {}
440
467
  }
441
468
  },
442
469
  /*
@@ -474,11 +501,11 @@ export default {
474
501
  // set focus on first input if box contains form-elements
475
502
  setFocus() {
476
503
  this.$nextTick(() => {
477
- if(this.open) {
478
- const firstFormElement = this.$refs.cmdBox.querySelector(":is(input, select, textarea):first-of-type")
504
+ if (this.open) {
505
+ const firstFormElement = this.$refs.cmdBox.querySelector(":is(input, select, textarea):first-of-type")
479
506
 
480
- if(firstFormElement) {
481
- firstFormElement.focus()
507
+ if (firstFormElement) {
508
+ firstFormElement.focus()
482
509
  }
483
510
  }
484
511
  })
@@ -542,7 +569,7 @@ export default {
542
569
  overflow-y: auto;
543
570
 
544
571
  & * {
545
- flex-shrink: 0;
572
+ flex-shrink: 0;
546
573
  }
547
574
  }
548
575
  }
@@ -767,6 +794,15 @@ export default {
767
794
 
768
795
  /* boxType === 'user' */
769
796
  &.user {
797
+ .user-name {
798
+ color: var(--color-scheme-text-color);
799
+ font-size: 2rem;
800
+ }
801
+
802
+ .user-age {
803
+ font-size: var(--default-font-size);
804
+ }
805
+
770
806
  > .box-header {
771
807
  --default-icon-size: 6rem;
772
808
  --box-header-text-color: var(--primary-color);
@@ -779,7 +815,7 @@ export default {
779
815
 
780
816
  img, > div:first-child > [class*="icon-"] {
781
817
  display: table;
782
- margin: 0 auto var(--default-margin) auto;
818
+ margin: 0 auto var(--default-margin) auto !important;
783
819
  padding: calc(var(--default-padding) * 3);
784
820
  border-radius: var(--full-circle);
785
821
  background: var(--box-header-background);
@@ -885,14 +921,6 @@ export default {
885
921
  }
886
922
 
887
923
  &.row-view {
888
- [class*="icon"] {
889
- --default-icon-size: 3rem;
890
- }
891
-
892
- .box-header > div:first-child > [class*="icon-"] {
893
- padding: calc(var(--default-padding) * 1.5);
894
- }
895
-
896
924
  .box-body p {
897
925
  text-align: left;
898
926
  }
@@ -920,4 +948,6 @@ export default {
920
948
  }
921
949
 
922
950
  /* end cmd-box ------------------------------------------------------------------------------------------ */
923
- </style>
951
+ </style>
952
+ <script setup>
953
+ </script>
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <div class="cmd-container">
3
+ <div v-html="contentAboveSlot"></div>
3
4
  <slot></slot>
5
+ <div v-html="contentBelowSlot"></div>
4
6
  </div>
5
7
  </template>
6
8
 
@@ -9,6 +11,22 @@ import EditMode from "../mixins/EditMode.vue"
9
11
  export default {
10
12
  name: "CmdContainer",
11
13
  mixins: [EditMode],
14
+ props: {
15
+ /**
16
+ * define html-content to display above slot-content
17
+ */
18
+ contentAboveSlot: {
19
+ type: String,
20
+ required: false
21
+ },
22
+ /**
23
+ * define html-content to display below slot-content
24
+ */
25
+ contentBelowSlot: {
26
+ type: String,
27
+ required: false
28
+ }
29
+ },
12
30
  methods: {
13
31
  addHandlerProvider() {
14
32
  return ""