comand-component-library 3.3.10 → 3.3.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/dist/style.css +1 -0
  2. package/package.json +20 -22
  3. package/src/App.vue +11 -106
  4. package/src/assets/data/box-user.json +20 -4
  5. package/src/assets/data/image-gallery.json +8 -8
  6. package/src/components/CmdAddressData.vue +99 -27
  7. package/src/components/CmdBackToTopButton.vue +0 -5
  8. package/src/components/CmdBankAccountData.vue +0 -8
  9. package/src/components/CmdBox.vue +77 -18
  10. package/src/components/CmdBoxWrapper.vue +28 -22
  11. package/src/components/CmdBreadcrumbs.vue +0 -6
  12. package/src/components/CmdCompanyLogo.vue +0 -6
  13. package/src/components/CmdCookieDisclaimer.vue +0 -10
  14. package/src/components/CmdFakeSelect.vue +1 -9
  15. package/src/components/CmdFancyBox.vue +102 -32
  16. package/src/components/CmdFormElement.vue +0 -8
  17. package/src/components/CmdFormFilters.vue +0 -6
  18. package/src/components/CmdHeadline.vue +0 -6
  19. package/src/components/CmdImageGallery.vue +1 -7
  20. package/src/components/CmdImageZoom.vue +4 -8
  21. package/src/components/CmdInputGroup.vue +0 -8
  22. package/src/components/CmdListOfLinks.vue +0 -8
  23. package/src/components/CmdListOfRequirements.vue +0 -8
  24. package/src/components/CmdLoginForm.vue +0 -10
  25. package/src/components/CmdMainNavigation.vue +0 -6
  26. package/src/components/CmdMultistepFormProgressBar.vue +0 -6
  27. package/src/components/CmdNewsletterSubscription.vue +0 -8
  28. package/src/components/CmdOpeningHours.vue +0 -6
  29. package/src/components/CmdPager.vue +0 -7
  30. package/src/components/CmdShareButtons.vue +0 -8
  31. package/src/components/CmdSiteHeader.vue +4 -26
  32. package/src/components/CmdSiteSearch.vue +0 -14
  33. package/src/components/CmdSlideButton.vue +0 -8
  34. package/src/components/CmdSlideshow.vue +0 -8
  35. package/src/components/CmdSwitchLanguage.vue +31 -5
  36. package/src/components/CmdSystemMessage.vue +0 -8
  37. package/src/components/CmdTable.vue +0 -6
  38. package/src/components/CmdTabs.vue +0 -8
  39. package/src/components/CmdToggleDarkMode.vue +0 -5
  40. package/src/components/CmdTooltip.vue +0 -8
  41. package/src/components/CmdTooltipForInputElements.vue +0 -8
  42. package/src/components/CmdUploadForm.vue +0 -12
  43. package/src/components/CmdWidthLimitationWrapper.vue +1 -1
  44. package/src/documentation/generated/CmdBoxPropertyDescriptions.json +24 -0
  45. package/src/documentation/generated/CmdFakeSelectPropertyDescriptions.json +7 -4
  46. package/src/documentation/generated/CmdFancyBoxPropertyDescriptions.json +10 -0
  47. package/src/index.js +43 -43
  48. package/src/main.js +1 -1
  49. package/src/rest.vue +18 -0
  50. package/src/router/index.js +1 -1
  51. package/dist/comand-component-library.css +0 -1
  52. package/dist/comand-component-library.umd.min.js +0 -2
@@ -8,7 +8,7 @@
8
8
  <address class="adr">
9
9
  <!-- begin list with labels -->
10
10
  <dl v-if="showLabels">
11
- <!-- begin company -->
11
+ <!-- begin company (name) -->
12
12
  <dt v-if="addressData.company?.value">
13
13
  <!-- begin CmdIcon -->
14
14
  <CmdIcon
@@ -21,8 +21,8 @@
21
21
 
22
22
  <span v-if="showLabelTexts">{{ getMessage('cmdaddressdata.labeltext.company')}}</span>
23
23
  </dt>
24
- <dd v-if="addressData.company?.value" class="org">{{ addressData.company.value }}</dd>
25
- <!-- end company -->
24
+ <dd v-if="addressData.company?.value" class="org">{{ addressData.company.value }}</dd>
25
+ <!-- end company (name) -->
26
26
 
27
27
  <!-- begin address -->
28
28
  <template v-if="addressData.address && addressData.address !== undefined">
@@ -39,20 +39,59 @@
39
39
  <span v-if="showLabelTexts">{{ getMessage('cmdaddressdata.labeltext.address')}}</span>
40
40
  </dt>
41
41
  <dd v-if="addressData.address">
42
+ <!-- begin linked address -->
42
43
  <a v-if="linkGoogleMaps" :href="locateAddress" target="google-maps" :title="getMessage('cmdaddressdata.title.open_address_on_google_maps')">
43
- <span v-if="addressData.address.streetNo" class="street-address">{{ addressData.address.streetNo }}</span><br/>
44
- <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}&nbsp;</span>
45
- <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
46
- <span v-if="addressData.address.miscInfo">{{ addressData.address.miscInfo }}</span><br/>
44
+ <!-- begin street/number -->
45
+ <template v-if="addressData.address.streetNo">
46
+ <span class="street-address">{{ addressData.address.streetNo }}</span><br/>
47
+ </template>
48
+ <!-- end street/number -->
49
+
50
+ <!-- begin zip/city -->
51
+ <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}</span>
52
+ <template v-if="addressData.address.city">
53
+ <span class="locality">{{ addressData.address.city }}</span><br/>
54
+ </template>
55
+ <!-- end zip/city -->
56
+
57
+ <!-- begin miscInfo -->
58
+ <template v-if="addressData.address.miscInfo">
59
+ <span>{{ addressData.address.miscInfo }}</span><br/>
60
+ </template>
61
+ <!-- end miscInfo -->
62
+
63
+ <!-- begin country -->
47
64
  <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
65
+ <!-- end country -->
48
66
  </a>
67
+ <!-- end linked address -->
68
+
69
+ <!-- begin unlinked address -->
49
70
  <template v-else>
50
- <span v-if="addressData.address.streetNo" class="street-address">{{addressData.address.streetNo }}</span><br/>
51
- <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}&nbsp;</span>
52
- <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
53
- <span v-if="addressData.address.miscInfo">{{ addressData.address.miscInfo }}</span><br/>
71
+ <!-- begin street/number -->
72
+ <template v-if="addressData.address.streetNo">
73
+ <span class="street-address">{{addressData.address.streetNo }}</span><br/>
74
+ </template>
75
+ <!-- end street/number -->
76
+
77
+ <!-- begin zip/city -->
78
+ <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}</span>
79
+ <template v-if="addressData.address.city">
80
+ <span class="locality">{{ addressData.address.city }}</span><br/>
81
+ </template>
82
+ <!-- end zip/city -->
83
+
84
+ <!-- begin miscInfo -->
85
+ <template v-if="addressData.address.miscInfo">
86
+ <span>{{ addressData.address.miscInfo }}</span><br/>
87
+ </template>
88
+ <!-- end miscInfo -->
89
+
90
+ <!-- begin country -->
54
91
  <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
92
+ <!-- end country -->
55
93
  </template>
94
+ <!-- end unlinked address -->
56
95
  </dd>
57
96
  </template>
58
97
  <!-- end address -->
@@ -165,24 +204,65 @@
165
204
 
166
205
  <!-- begin list without labels -->
167
206
  <ul v-else class="flex-container">
207
+ <!-- begin company (name) -->
168
208
  <li v-if="addressData.company">
169
209
  <span class="org">{{ addressData.company.value }}</span>
170
210
  </li>
211
+ <!-- end company (name) -->
171
212
  <li>
213
+ <!-- begin linked address -->
172
214
  <a v-if="linkGoogleMaps" :href="locateAddress" target="google-maps" :title="getMessage('cmdaddressdata.title.open_address_on_google_maps')">
173
- <span v-if="addressData.address.streetNo" class="street-address">{{ addressData.address.streetNo }}</span><br/>
174
- <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}&nbsp;</span>
175
- <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
176
- <span v-if="addressData.address.miscInfo">{{ addressData.address.miscInfo }}</span><br/>
215
+ <!-- begin street/number -->
216
+ <template v-if="addressData.address.streetNo">
217
+ <span class="street-address">{{ addressData.address.streetNo }}</span><br/>
218
+ </template>
219
+ <!-- end street/number -->
220
+
221
+ <!-- begin zip/city -->
222
+ <template v-if="addressData.address.zip || addressData.address.city">
223
+ <span class="postal-code">{{ addressData.address.zip }}</span>
224
+ <span class="locality">{{ addressData.address.city }}</span><br/>
225
+ </template>
226
+ <!-- end zip/city -->
227
+
228
+ <!-- begin miscInfo -->
229
+ <template v-if="addressData.address.miscInfo">
230
+ <span>{{ addressData.address.miscInfo }}</span><br/>
231
+ </template>
232
+ <!-- end miscInfo -->
233
+
234
+ <!-- begin country -->
177
235
  <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
236
+ <!-- end country -->
178
237
  </a>
238
+ <!-- end linked address -->
239
+
240
+ <!-- begin unlinked address -->
179
241
  <template v-else>
180
- <span v-if="addressData.address.streetNo" class="street-address">{{ addressData.address.streetNo }}</span><br/>
181
- <span v-if="addressData.address.zip" class="postal-code">{{ addressData.address.zip }}&nbsp;</span>
182
- <span v-if="addressData.address.city" class="locality">{{ addressData.address.city }}</span><br/>
183
- <span v-if="addressData.address.miscInfo">{{ addressData.address.miscInfo }}</span><br/>
242
+ <!-- begin street/number -->
243
+ <template v-if="addressData.address.streetNo">
244
+ <span class="street-address">{{ addressData.address.streetNo }}</span><br/>
245
+ </template>
246
+ <!-- end street/number -->
247
+
248
+ <!-- begin zip/city -->
249
+ <template v-if="addressData.address.zip || addressData.address.city">
250
+ <span class="postal-code">{{ addressData.address.zip }}</span>
251
+ <span class="locality">{{ addressData.address.city }}</span><br/>
252
+ </template>
253
+ <!-- end zip/ctiy -->
254
+
255
+ <!-- begin miscInfo -->
256
+ <template v-if="addressData.address.miscInfo">
257
+ <span>{{ addressData.address.miscInfo }}</span><br/>
258
+ </template>
259
+ <!-- end miscInfo -->
260
+
261
+ <!-- begin country -->
184
262
  <span v-if="addressData.address.country" class="country-name">{{ addressData.address.country }}</span>
263
+ <!-- end country -->
185
264
  </template>
265
+ <!-- end unlinked address -->
186
266
  </li>
187
267
  <li v-if="addressData.telephone?.value">
188
268
  <a :href="'tel:' + addressData.telephone.value" :title="getMessage('cmdaddressdata.title.call_number')" class="tel">{{ addressData.telephone.value }}</a>
@@ -211,17 +291,9 @@
211
291
  import I18n from "../mixins/I18n"
212
292
  import DefaultMessageProperties from "../mixins/CmdAddressData/DefaultMessageProperties"
213
293
 
214
- // import components
215
- import CmdHeadline from "./CmdHeadline"
216
- import CmdIcon from "./CmdIcon"
217
-
218
294
  export default {
219
295
  name: "CmdAddressData",
220
296
  mixins: [I18n, DefaultMessageProperties],
221
- components: {
222
- CmdHeadline,
223
- CmdIcon
224
- },
225
297
  props: {
226
298
  /**
227
299
  * show a label-icon (if exists)
@@ -11,14 +11,9 @@
11
11
  </template>
12
12
 
13
13
  <script>
14
- // import components
15
- import CmdIcon from "./CmdIcon"
16
14
 
17
15
  export default {
18
16
  name: "CmdBackToTopButton",
19
- components: {
20
- CmdIcon
21
- },
22
17
  data() {
23
18
  return {
24
19
  windowInnerHeight: window.innerHeight,
@@ -28,16 +28,8 @@
28
28
  </template>
29
29
 
30
30
  <script>
31
- // import components
32
- import CmdHeadline from "./CmdHeadline"
33
- import CmdIcon from "./CmdIcon"
34
-
35
31
  export default {
36
32
  name: "CmdBankAccountData",
37
- components: {
38
- CmdHeadline,
39
- CmdIcon
40
- },
41
33
  props: {
42
34
  /**
43
35
  * bank account data
@@ -3,9 +3,13 @@
3
3
  <div v-if="boxType === 'content'"
4
4
  :class="[
5
5
  'cmd-box box content',
6
- {open : open, collapsible: collapsible,
7
- 'stretch-vertically': stretchVertically && !collapsible,
8
- 'stretch-horizontally': stretchHorizontally}]"
6
+ {
7
+ open : open, collapsible: collapsible,
8
+ 'stretch-vertically': stretchVertically && !collapsible,
9
+ 'stretch-horizontally': stretchHorizontally,
10
+ 'row-view': isRowView
11
+ }
12
+ ]"
9
13
  >
10
14
  <!-- begin collapsible header with slot -->
11
15
  <a v-if="collapsible"
@@ -123,22 +127,36 @@
123
127
  <!-- end boxType 'product' -->
124
128
 
125
129
  <!-- begin boxType 'user' -->
126
- <div v-else-if="boxType === 'user' && user" :class="['cmd-box box user', {'stretch-vertically': stretchVertically,'stretch-horizontally': stretchHorizontally}]">
130
+ <div v-else-if="boxType === 'user' && user"
131
+ :class="[
132
+ 'cmd-box box user',
133
+ profileType,
134
+ {
135
+ 'stretch-vertically': stretchVertically,
136
+ 'stretch-horizontally': stretchHorizontally
137
+ }
138
+ ]">
127
139
  <div class="box-header flex-container vertical">
128
140
  <figure v-if="user.image">
129
141
  <img :src="user.image.src" :alt="user.image.alt"/>
130
- <figcaption>{{ user.name }}</figcaption>
142
+ <figcaption>{{ user.name }} <span v-if="user.age">, {{user.age}}</span></figcaption>
131
143
  </figure>
132
144
  <div v-else>
133
145
  <span :class="defaultProfileIconClass" :title="user.name"></span>
134
- <p>{{ user.name }}</p>
146
+ <p v-if="!rowView">{{ user.name }}</p>
135
147
  </div>
136
148
  </div>
137
149
  <div class="box-body">
150
+ <p v-if="rowView">{{ user.name }}</p>
138
151
  <p v-if="user.profession">{{ user.profession }}</p>
139
152
  <p v-if="user.position">{{ user.position }}</p>
140
153
  <p v-if="user.description" class="description">{{ user.description }}</p>
141
154
  </div>
155
+ <ul class="tags">
156
+ <li v-for="(tag, index) in user.tags" :key="index">
157
+ {{tag}}
158
+ </li>
159
+ </ul>
142
160
  <div v-if="user.links" class="box-footer">
143
161
  <CmdListOfLinks :links="user.links" orientation="horizontal" :useGap="false"/>
144
162
  </div>
@@ -152,36 +170,36 @@ import I18n from "../mixins/I18n"
152
170
  import DefaultMessageProperties from "../mixins/CmdBox/DefaultMessageProperties"
153
171
  import GlobalCurrency from "../mixins/GlobalCurrency"
154
172
 
155
- // import components
156
- import CmdHeadline from "./CmdHeadline"
157
- import CmdIcon from "./CmdIcon"
158
- import CmdListOfLinks from "./CmdListOfLinks"
159
-
160
173
  export default {
161
174
  name: "CmdBox",
162
- components: {
163
- CmdHeadline,
164
- CmdIcon,
165
- CmdListOfLinks,
166
- },
167
175
  mixins: [
168
176
  I18n,
169
177
  DefaultMessageProperties,
170
178
  GlobalCurrency
171
179
  ],
180
+ emits: ["click", "toggle-collapse"],
172
181
  data() {
173
182
  return {
174
183
  open: this.collapsible ? this.collapsingBoxesOpen : true,
175
184
  active: true,
176
- showCutOffText: false
185
+ showCutOffText: false,
186
+ isRowView: false
177
187
  }
178
188
  },
179
- emits: ["click", "toggle-collapse"],
180
189
  props: {
181
190
  collapsingBoxesOpen: {
182
191
  type: Boolean,
183
192
  required: false
184
193
  },
194
+ /**
195
+ * arranges box-content in a row
196
+ *
197
+ * @affectsStyling: true
198
+ */
199
+ rowView: {
200
+ type: Boolean,
201
+ default: false
202
+ },
185
203
  /**
186
204
  * set boyType to show different types of boxes/contents
187
205
  *
@@ -249,6 +267,17 @@ export default {
249
267
  type: Object,
250
268
  required: false
251
269
  },
270
+ /**
271
+ * profile types for user-boxes
272
+ *
273
+ * @required: only available for boxtype===user
274
+ *
275
+ * @allowedValues: 'business', 'influencer', 'dating'
276
+ */
277
+ profileType: {
278
+ type: String,
279
+ default: 'business'
280
+ },
252
281
  /**
253
282
  * activated if all content (incl. headline) is given by slot
254
283
  *
@@ -360,6 +389,9 @@ export default {
360
389
  if (this.collapsible) {
361
390
  this.open = this.collapsingBoxesOpen
362
391
  }
392
+ },
393
+ isRowView() {
394
+ this.isRowView = this.rowView
363
395
  }
364
396
  }
365
397
  }
@@ -705,6 +737,33 @@ export default {
705
737
  }
706
738
  }
707
739
  }
740
+
741
+ &.row-view {
742
+ [class*="icon"] {
743
+ --icon-size: 3rem;
744
+ }
745
+
746
+ .box-header > div:first-child > [class*="icon-"] {
747
+ padding: calc(var(--default-padding) * 1.5);
748
+ }
749
+
750
+ .box-body p {
751
+ text-align: left;
752
+ }
753
+
754
+ .box-footer {
755
+ border: 0;
756
+
757
+ .cmd-list-of-links {
758
+ background: none;
759
+
760
+ ul, ul * {
761
+ border: 0;
762
+ background: inherit;
763
+ }
764
+ }
765
+ }
766
+ }
708
767
  }
709
768
  }
710
769
 
@@ -18,26 +18,18 @@
18
18
  </a>
19
19
  </div>
20
20
  </div>
21
- <div :class="[useFlexbox ? 'flex-container' : 'grid-container-create-columns', {'one-box-per-row': oneBoxPerRow, 'stretch-boxes-vertically': stretchBoxesVertically}]">
22
- <slot :collapsingBoxesOpen="collapsingBoxesOpen" :boxToggled="boxToggled" :currentOpenBox="currentOpenBox"></slot>
21
+ <div :class="[useFlexbox ? 'flex-container' : 'grid-container-create-columns', {'row-view': rowView, 'stretch-boxes-vertically': stretchBoxesVertically}]">
22
+ <slot :collapsingBoxesOpen="collapsingBoxesOpen" :boxToggled="boxToggled" :currentOpenBox="currentOpenBox" :rowView="rowView"></slot>
23
23
  </div>
24
24
  </div>
25
25
  </template>
26
26
 
27
27
  <script>
28
- // import components
29
- import CmdHeadline from "./CmdHeadline"
30
- import CmdIcon from "./CmdIcon"
31
-
32
28
  export default {
33
29
  name: "CmdBoxWrapper",
34
- components: {
35
- CmdHeadline,
36
- CmdIcon
37
- },
38
30
  data() {
39
31
  return {
40
- oneBoxPerRow: this.useRowViewAsDefault,
32
+ rowView: this.useRowViewAsDefault,
41
33
  collapsingBoxesOpen: true,
42
34
  currentOpenBox: 0
43
35
  }
@@ -227,28 +219,42 @@ export default {
227
219
  margin: 0;
228
220
  }
229
221
 
230
- &.one-box-per-row {
231
- flex-direction: column;
222
+ &.stretch-boxes-vertically {
223
+ .stretch-vertically {
224
+ align-self: stretch;
225
+ height: auto; /* must be set to auto if inner boxes have als stretchVertically-property activated */
226
+ }
227
+ }
228
+ }
229
+
230
+ .row-view {
231
+ flex-direction: column;
232
232
 
233
- p.cutoff-text {
234
- height: auto;
233
+ p.cutoff-text {
234
+ height: auto;
235
235
 
236
- &.fade-last-line::after {
237
- background: none;
238
- }
236
+ &.fade-last-line::after {
237
+ background: none;
239
238
  }
240
239
  }
241
240
 
242
- &.stretch-boxes-vertically {
243
- .stretch-vertically {
244
- align-self: stretch;
245
- height: auto; /* must be set to auto if inner boxes have als stretchVertically-property activated */
241
+ .cmd-box.user {
242
+ flex-direction: row;
243
+ padding: var(--default-padding);
244
+ align-items: center;
245
+
246
+ .box-footer {
247
+ margin-top: 0;
246
248
  }
247
249
  }
248
250
  }
249
251
 
250
252
  > .grid-container-create-columns {
251
253
  grid-template-columns: repeat(v-bind(boxesPerRowLarge), minmax(0, 1fr));
254
+
255
+ &.row-view {
256
+ grid-template-columns: repeat(1, minmax(0, 1fr));
257
+ }
252
258
  }
253
259
 
254
260
  @media only screen and (max-width: $medium-max-width) {
@@ -35,14 +35,8 @@
35
35
  // import functions
36
36
  import {getRoute} from "../utilities.js"
37
37
 
38
- // import components
39
- import CmdIcon from "./CmdIcon"
40
-
41
38
  export default {
42
39
  name: "CmdBreadcrumbs",
43
- components: {
44
- CmdIcon
45
- },
46
40
  props: {
47
41
  /**
48
42
  * label in front/left of breadcrumbs
@@ -17,14 +17,8 @@
17
17
  // import functions
18
18
  import {getRoute} from "../utilities.js"
19
19
 
20
- // import components
21
- import CmdImage from "./CmdImage"
22
-
23
20
  export default {
24
21
  name: "CmdCompanyLogo",
25
- components: {
26
- CmdImage
27
- },
28
22
  data() {
29
23
  return {
30
24
  prefersColorScheme: ""
@@ -134,19 +134,9 @@
134
134
  import I18n from "../mixins/I18n"
135
135
  import DefaultMessageProperties from "../mixins/CmdCookieDisclaimer/DefaultMessageProperties"
136
136
 
137
- // import components
138
- import CmdBox from "./CmdBox"
139
- import CmdHeadline from "./CmdHeadline"
140
- import CmdFormElement from "./CmdFormElement"
141
-
142
137
  export default {
143
138
  name: "CmdCookieDisclaimer",
144
139
  mixins: [I18n, DefaultMessageProperties],
145
- components: {
146
- CmdBox,
147
- CmdHeadline,
148
- CmdFormElement
149
- },
150
140
  data() {
151
141
  return {
152
142
  showCookieDisclaimer: true,
@@ -168,10 +168,6 @@ import FieldValidation from "../mixins/FieldValidation"
168
168
  import Identifier from "../mixins/Identifier"
169
169
  import Tooltip from "../mixins/Tooltip"
170
170
 
171
- // import components
172
- import CmdIcon from "./CmdIcon"
173
- import CmdTooltipForInputElements from "./CmdTooltipForInputElements"
174
-
175
171
  export default {
176
172
  name: 'CmdFakeSelect',
177
173
  inheritAttrs: false,
@@ -182,10 +178,6 @@ export default {
182
178
  Identifier,
183
179
  Tooltip
184
180
  ],
185
- components: {
186
- CmdIcon,
187
- CmdTooltipForInputElements
188
- },
189
181
  data() {
190
182
  return {
191
183
  showOptions: false,
@@ -266,7 +258,7 @@ export default {
266
258
  /**
267
259
  * label-text for fake-select
268
260
  *
269
- * @requiredForAccessibility: true
261
+ * @requiredForAccessibility: true
270
262
  */
271
263
  labelText: {
272
264
  type: String,