comand-component-library 3.1.24 → 3.1.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/comand-component-library.css +1 -1
  2. package/dist/comand-component-library.umd.min.js +1 -1
  3. package/package.json +1 -1
  4. package/src/App.vue +29 -7
  5. package/src/assets/data/accordion.json +13 -4
  6. package/src/assets/data/top-header-navigation.json +15 -9
  7. package/src/components/CmdAccordion.vue +68 -21
  8. package/src/components/CmdCookieDisclaimer.vue +3 -4
  9. package/src/components/CmdFakeSelect.vue +8 -1
  10. package/src/components/CmdFancyBox.vue +31 -1
  11. package/src/components/CmdFooterNavigation.vue +6 -0
  12. package/src/components/CmdFormElement.vue +72 -17
  13. package/src/components/CmdGoogleMaps.vue +3 -0
  14. package/src/components/CmdImageGallery.vue +3 -2
  15. package/src/components/CmdImageZoom.vue +6 -0
  16. package/src/components/CmdMainHeadline.vue +9 -0
  17. package/src/components/CmdMainNavigation.vue +24 -0
  18. package/src/components/CmdMultipleSwitch.vue +1 -5
  19. package/src/components/CmdMultistepFormProgressBar.vue +6 -0
  20. package/src/components/CmdOpeningHours.vue +23 -2
  21. package/src/components/CmdPager.vue +24 -2
  22. package/src/components/CmdProgressBar.vue +10 -4
  23. package/src/components/CmdShareButtons.vue +6 -0
  24. package/src/components/CmdSiteHeader.vue +12 -16
  25. package/src/components/CmdSlideButton.vue +3 -0
  26. package/src/components/CmdSlideshow.vue +25 -4
  27. package/src/components/CmdSwitchButton.vue +44 -1
  28. package/src/components/CmdSystemMessage.vue +32 -11
  29. package/src/components/CmdTable.vue +38 -20
  30. package/src/components/CmdTabs.vue +12 -3
  31. package/src/components/CmdThumbnailScroller.vue +28 -10
  32. package/src/components/CmdTooltip.vue +3 -0
  33. package/src/components/CmdTopHeaderNavigation.vue +10 -3
  34. package/src/components/CmdUploadForm.vue +26 -1
  35. package/src/components/CmdWidthLimitationWrapper.vue +26 -3
@@ -1,18 +1,19 @@
1
1
  <template>
2
2
  <label v-if="(element === 'input' || element === 'select' || element === 'textarea')"
3
3
  :for="id"
4
- :class="['cmd-form-element', status, {'inline' : displayinline, 'checked': isChecked}]"
4
+ :class="['cmd-form-element', status, {'inline' : displayLabelInline, 'checked': isChecked}]"
5
5
  ref="label">
6
6
  <!-- begin label (+ required) -->
7
7
  <span v-if="labelText && $attrs.type !== 'checkbox' && $attrs.type !== 'radio'"
8
- :class="{'hidden': hideLabelText}">
9
- <span>{{ labelText }}</span><sup v-if="$attrs.required && !hideLabel">*</sup>
10
- </span>
8
+ :class="{'hidden': hideLabel}">
9
+ <span>{{ labelText }}</span>
10
+ <sup v-if="$attrs.required">*</sup>
11
+ </span>
11
12
  <!-- end label (+ required) -->
12
13
 
13
14
  <!-- begin icon -->
14
- <span v-if="$attrs.type !== 'checkbox' && $attrs.type !== 'radio' && iconClass" class="place-inside"
15
- :class="[status, iconClass]"></span>
15
+ <span v-if="$attrs.type !== 'checkbox' && $attrs.type !== 'radio' && innerIconClass" class="place-inside"
16
+ :class="[status, innerIconClass]"></span>
16
17
  <!-- end icon -->
17
18
 
18
19
  <!-- begin inputfield -->
@@ -69,7 +70,7 @@
69
70
  @change="$emit('input', $event.target.value)"
70
71
  >
71
72
  <option v-for="(option, index) in selectOptions" :key="index" :value="option.value"
72
- :selected="option.selected">{{ option.text }}
73
+ :selected="option.value === value">{{ option.text }}
73
74
  </option>
74
75
  </select>
75
76
  <!-- end selectbox -->
@@ -127,11 +128,18 @@ export default {
127
128
  }
128
129
  },
129
130
  props: {
131
+ /**
132
+ * set value for v-model
133
+ */
130
134
  value: {
131
135
  type: [String, Boolean, Array, Number],
132
- required: false,
133
136
  default: ""
134
137
  },
138
+ /**
139
+ * set type of native form-element
140
+ *
141
+ * values: input, select, textarea, button
142
+ */
135
143
  element: {
136
144
  type: String,
137
145
  validator(value) {
@@ -142,67 +150,114 @@ export default {
142
150
  },
143
151
  required: true
144
152
  },
153
+ /**
154
+ * hide label (and asterisk if mandatory)
155
+ *
156
+ * label may not be removed, because it is required for accessibility
157
+ */
145
158
  hideLabel: {
146
159
  type: Boolean,
147
160
  default: false
148
161
  },
162
+ /**
163
+ * text for label
164
+ */
149
165
  labelText: {
150
166
  type: String,
151
167
  required: false
152
168
  },
153
- hideLabelText: {
154
- type: Boolean,
155
- default: false
156
- },
169
+ /**
170
+ * allow checkbox/radio-buttons to get value from outside
171
+ */
157
172
  inputValue: {
158
- /* allow checkbox/radiobuttons to get value from outside */
159
173
  type: String,
160
174
  required: false
161
175
  },
162
- /* for replacing native checkboxes/radiobuttons by custom ones */
176
+ /**
177
+ * for replacing native checkboxes/radio-buttons by custom ones (based on frontend-framework)
178
+ */
163
179
  replaceInputType: {
164
180
  type: Boolean,
165
181
  default: false
166
182
  },
183
+ /**
184
+ * set an optional class on native form-element (use native class="" on component ot set class on outer-component-element)
185
+ *
186
+ * may not be named as 'class' because it is a reserved keyword in JavaScript
187
+ */
167
188
  htmlClass: {
168
- /* may not be named as 'class' because it is a reserved keyword in JavaScript */
169
189
  type: String,
170
190
  required: false
171
191
  },
192
+ /**
193
+ * if for native form-element
194
+ */
172
195
  id: {
173
196
  type: String,
174
197
  required: false
175
198
  },
199
+ /**
200
+ * set if a native datalist should be used
201
+ */
176
202
  datalist: {
177
203
  type: Object,
178
204
  required: false
179
205
  },
206
+ /**
207
+ * list of options for selectbox
208
+ *
209
+ * element-property must be 'select'
210
+ */
180
211
  selectOptions: {
181
212
  type: Array,
182
213
  required: false
183
214
  },
215
+ /**
216
+ * text for native button
217
+ */
184
218
  buttonText: {
185
219
  type: String,
186
220
  required: false
187
221
  },
222
+ /**
223
+ * set icon for native button
224
+ */
188
225
  buttonIcon: {
189
226
  type: Object,
190
227
  default() {
191
228
  return {}
192
229
  }
193
230
  },
231
+ /**
232
+ * set text for tooltip
233
+ */
194
234
  tooltipText: {
195
235
  type: String,
196
236
  required: false
197
237
  },
198
- iconClass: {
238
+ /**
239
+ * set class for inner icon (icon placed 'inside' input/ left of input-text)
240
+ *
241
+ * element-property must be 'input' and type-property may not be checkbox or radio
242
+ */
243
+ innerIconClass: {
199
244
  type: String,
200
245
  required: false
201
246
  },
202
- displayinline: {
247
+ /**
248
+ * activate if label-text should be place inline/left of form-element (and not above)
249
+ *
250
+ * type-property may not be checkbox or radio
251
+ */
252
+ displayLabelInline: {
203
253
  type: Boolean,
204
254
  required: false
205
255
  },
256
+ /**
257
+ * set status for label and form-element
258
+ *
259
+ * values: error (red-styling), success (green-styling)
260
+ */
206
261
  status: {
207
262
  type: String,
208
263
  required: false
@@ -8,6 +8,9 @@
8
8
  export default {
9
9
  name: "CmdGoogleMaps",
10
10
  props: {
11
+ /**
12
+ * address to show show on Google Maps&trade;
13
+ */
11
14
  addressData: {
12
15
  type: Object,
13
16
  required: true
@@ -15,11 +15,12 @@ import {openFancyBox} from "./CmdFancyBox"
15
15
 
16
16
  export default {
17
17
  name: "CmdImageGallery",
18
-
19
18
  props: {
19
+ /**
20
+ * list of images (incl. captions)
21
+ */
20
22
  images: Array
21
23
  },
22
-
23
24
  methods: {
24
25
  showFancyBox(index) {
25
26
  openFancyBox({fancyBoxGallery: this.images, defaultGalleryIndex: index})
@@ -17,10 +17,16 @@
17
17
  export default {
18
18
  name: "CmdImageZoom",
19
19
  props: {
20
+ /**
21
+ * url for small images
22
+ */
20
23
  smallImageUrl: {
21
24
  type: String,
22
25
  required: true
23
26
  },
27
+ /**
28
+ * url for large image
29
+ */
24
30
  largeImageUrl: {
25
31
  type: String,
26
32
  required: true
@@ -13,14 +13,23 @@
13
13
  export default {
14
14
  name: "CmdMainHeadline",
15
15
  props: {
16
+ /**
17
+ * main/h1-headline
18
+ */
16
19
  mainHeadline: {
17
20
  type: String,
18
21
  required: true
19
22
  },
23
+ /**
24
+ * small pre-headline above main-headline
25
+ */
20
26
  preHeadline: {
21
27
  type: String,
22
28
  required: false
23
29
  },
30
+ /**
31
+ * icon-class for icon shown left/before headline
32
+ */
24
33
  iconClass: {
25
34
  type: String,
26
35
  required: false
@@ -58,18 +58,30 @@ export default {
58
58
  }
59
59
  },
60
60
  props: {
61
+ /**
62
+ * toggle if main-entries (on firt-level) should be (horizontally) stretched equally
63
+ */
61
64
  stretchMainItems: {
62
65
  type: Boolean,
63
66
  default: false
64
67
  },
68
+ /**
69
+ * set if navigation should persist on mobile and not be collapsed to off-canvas
70
+ */
65
71
  persistOnMobile: {
66
72
  type: Boolean,
67
73
  default: false
68
74
  },
75
+ /**
76
+ * list of all navigation-entries (incl. sub-entries)
77
+ */
69
78
  navigationEntries: {
70
79
  type: Array,
71
80
  required: true
72
81
  },
82
+ /**
83
+ * link shown inside off-canvas-navigation to close itself
84
+ */
73
85
  closeOffcanvas: {
74
86
  type: Object,
75
87
  default: function () {
@@ -80,6 +92,9 @@ export default {
80
92
  }
81
93
  }
82
94
  },
95
+ /**
96
+ * button to open off-canvas-navigation
97
+ */
83
98
  buttonOffcanvas: {
84
99
  type: Object,
85
100
  default: function () {
@@ -90,14 +105,23 @@ export default {
90
105
  }
91
106
  }
92
107
  },
108
+ /**
109
+ * icon to show if an navigation-entry has sub-entries
110
+ */
93
111
  subentriesIconClass: {
94
112
  type: String,
95
113
  default: "icon-single-arrow-down"
96
114
  },
115
+ /**
116
+ * icon to show if a sub-entry has further sub-entries
117
+ */
97
118
  subSubentriesIconClass: {
98
119
  type: String,
99
120
  default: "icon-single-arrow-right"
100
121
  },
122
+ /**
123
+ * toggle if overlay over content should be shown if off-canvas is open
124
+ */
101
125
  showContentOverlay: {
102
126
  type: Boolean,
103
127
  default: true
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="['label', 'multiple-switch', htmlClass, {disabled: status === 'disabled', error: status === 'error'}]">
2
+ <div :class="['label', 'multiple-switch', {disabled: status === 'disabled', error: status === 'error'}]">
3
3
  <span v-if="labelText">{{ labelText }}</span>
4
4
  <span class="flex-container no-gap no-flex">
5
5
  <label :class="{disabled: status === 'disabled'}" :for="multipleswitch.id"
@@ -28,10 +28,6 @@ export default {
28
28
  required: false,
29
29
  default: ""
30
30
  },
31
- htmlClass: {
32
- type: String,
33
- required: false
34
- },
35
31
  labelText: {
36
32
  type: String,
37
33
  required: false
@@ -21,10 +21,16 @@ export default {
21
21
  }
22
22
  },
23
23
  props: {
24
+ /**
25
+ * list of multisteps
26
+ */
24
27
  multisteps: {
25
28
  type: Array,
26
29
  required: true
27
30
  },
31
+ /**
32
+ * icon-class for separator shown inbetween multisteps
33
+ */
28
34
  separatorIconClass: {
29
35
  type: String,
30
36
  required: true
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="cmd-opening-hours">
3
3
  <h4 v-if="headline">{{ headline }}</h4>
4
- <a v-if="path" :href="path" :class="{'closed': closed}">{{ textOpenClosed }}</a>
4
+ <a v-if="pathToDetails" :href="pathToDetails" :class="{'closed': closed}">{{ textOpenClosed }}</a>
5
5
  <span v-else :class="{'closed': closed}">{{ textOpenClosed }}</span>
6
6
  <dl>
7
7
  <template v-for="day in openingHours" :key="day.day">
@@ -20,30 +20,51 @@
20
20
  export default {
21
21
  name: "CmdOpeningHours",
22
22
  props: {
23
+ /**
24
+ * headline above displayed opening hours
25
+ */
23
26
  headline: {
24
27
  type: String,
25
28
  required: false
26
29
  },
27
- path: {
30
+ /**
31
+ * set a path to a detail page
32
+ */
33
+ pathToDetails: {
28
34
  type: String,
29
35
  required: false
30
36
  },
37
+ /**
38
+ * toggles if "closed"-text will be shown
39
+ */
31
40
  closed: {
32
41
  type: Boolean,
33
42
  default: false
34
43
  },
44
+ /**
45
+ * text for open/closed-information
46
+ */
35
47
  textOpenClosed: {
36
48
  type: String,
37
49
  required: true
38
50
  },
51
+ /**
52
+ * list of opening-hours
53
+ */
39
54
  openingHours: {
40
55
  type: Array,
41
56
  required: true
42
57
  },
58
+ /**
59
+ * text to show if holidays closed (shown below opening-hours)
60
+ */
43
61
  textHolidaysClosed: {
44
62
  type: String,
45
63
  required: false
46
64
  },
65
+ /**
66
+ * additional/miscellaneous text (shown below holiday-closed-text/opening hours)
67
+ */
47
68
  textMiscInfo: {
48
69
  type: String,
49
70
  required: false
@@ -47,25 +47,47 @@ export default {
47
47
  }
48
48
  },
49
49
  props: {
50
+ /**
51
+ * number of items displayed
52
+ */
50
53
  items: {
51
54
  type: Number,
52
55
  required: true
53
56
  },
57
+ /**
58
+ * number of items shown per page
59
+ */
54
60
  itemsPerPage: {
55
61
  type: Number,
56
62
  required: true
57
63
  },
64
+ /**
65
+ * show links as buttons
66
+ */
58
67
  showLinksAsButtons: {
59
68
  type: Boolean,
60
69
  default: true
61
70
  },
71
+ /**
72
+ *
73
+ */
62
74
  prevButton: {
63
75
  type: Object,
64
- required: false
76
+ default: function() {
77
+ return {
78
+ iconClass: "icon-single-arrow-left",
79
+ buttonText: "prev"
80
+ }
81
+ }
65
82
  },
66
83
  nextButton: {
67
84
  type: Object,
68
- required: false
85
+ default: function() {
86
+ return {
87
+ iconClass: "icon-single-arrow-right",
88
+ buttonText: "next"
89
+ }
90
+ }
69
91
  }
70
92
  },
71
93
  computed: {
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <label class="cmd-progressbar" :for="id">
3
- <span>{{ labelText }}</span>
3
+ <span v-if="labelText">{{ labelText }}</span>
4
4
  <span class="progressbar">
5
- <span>{{ loadingStatus }}%</span><!-- do not place inside progress-tag (will not be displayed then) -->
6
- <progress v-bind="$attrs" :id="id" :value="loadingStatus"></progress>
7
- </span>
5
+ <span>{{ loadingStatus }}%</span><!-- do not place inside progress-tag (will not be displayed then) -->
6
+ <progress v-bind="$attrs" :id="id" :value="loadingStatus"></progress>
7
+ </span>
8
8
  </label>
9
9
  </template>
10
10
 
@@ -17,10 +17,16 @@ export default {
17
17
  }
18
18
  },
19
19
  props: {
20
+ /**
21
+ * label-text for progress-bar
22
+ */
20
23
  labelText: {
21
24
  type: String,
22
25
  required: false
23
26
  },
27
+ /**
28
+ * id for progress-bar
29
+ */
24
30
  id: {
25
31
  type: String,
26
32
  required: true
@@ -12,10 +12,16 @@
12
12
  export default {
13
13
  name: "CmdContentFooter",
14
14
  props: {
15
+ /**
16
+ * stretch-buttons to share horizontal space vertically
17
+ */
15
18
  stretchButtons: {
16
19
  type: Boolean,
17
20
  default: true
18
21
  },
22
+ /**
23
+ * list of share-buttons (i.e. facebook, twitter etc.)
24
+ */
19
25
  shareButtons: {
20
26
  type: Array,
21
27
  required: true
@@ -19,34 +19,30 @@ export default {
19
19
  CmdMainNavigation
20
20
  },
21
21
  props: {
22
- showHeaderNavBar: {
23
- type: Boolean,
24
- default: true
25
- },
22
+ /**
23
+ * list of main-navigation-entries (incl. sub-entries) given to inner navigationcomponent
24
+ */
26
25
  mainNavigationEntries: {
27
26
  type: Array,
28
27
  required: true
29
28
  },
30
- headerWidthLimitation: {
31
- type: Boolean,
32
- default: false
33
- },
34
- linkLogo: {
35
- type: Object,
36
- required: false
37
- },
38
- logo: {
39
- type: Object,
40
- required: false
41
- },
29
+ /**
30
+ * activated sticky-header (stays on top if page is scrolled
31
+ */
42
32
  sticky: {
43
33
  type: Boolean,
44
34
  default: true
45
35
  },
36
+ /**
37
+ * use a grid for positioning of inner-elements (else a flex-container will be used)
38
+ */
46
39
  useGrid: {
47
40
  type: Boolean,
48
41
  default: true
49
42
  },
43
+ /**
44
+ * use only if default-button of inner navigation-component should not be used
45
+ */
50
46
  closeOffcanvas: {
51
47
  type: Object,
52
48
  required: false
@@ -12,6 +12,9 @@
12
12
  export default {
13
13
  name: "CmdSlideButton",
14
14
  props: {
15
+ /**
16
+ * set slide-button to "next" (= right), else it will be displayed as previous (=left) button
17
+ */
15
18
  slideButtonType: {
16
19
  type: Object,
17
20
  required: true
@@ -55,30 +55,51 @@ export default {
55
55
  CmdSlideButton
56
56
  },
57
57
  props: {
58
+ /**
59
+ * use slot for images
60
+ */
58
61
  useSlot: {
59
62
  type: Boolean,
60
63
  default: false
61
64
  },
65
+ /**
66
+ * activate if images should switch automatically
67
+ */
62
68
  autoplay: {
63
69
  type: Boolean,
64
70
  default: false
65
71
  },
72
+ /**
73
+ * set milliseconds to switch images (if autoplay is activated only)
74
+ */
75
+ autoplayInterval: {
76
+ type: Number,
77
+ default: 5000
78
+ },
79
+ /**
80
+ * shows buttons/icons to let user quick jump to each image
81
+ */
66
82
  showQuickLinkIcons: {
67
83
  type: Boolean,
68
84
  default: true
69
85
  },
86
+ /**
87
+ * activate if current number of each image should be displayed
88
+ */
70
89
  showCounter: {
71
90
  type: Boolean,
72
91
  default: false
73
92
  },
74
- autoplayInterval: {
75
- type: Number,
76
- default: 5000
77
- },
93
+ /**
94
+ * list of images to display (use slot smust be set to false)
95
+ */
78
96
  slideshowItems: {
79
97
  type: Array,
80
98
  required: true
81
99
  },
100
+ /**
101
+ * slide-buttons (next/previous) to switch images
102
+ */
82
103
  slideButtons: {
83
104
  type: Object,
84
105
  default() {