comand-component-library 4.2.50 → 4.2.52

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.
Files changed (57) hide show
  1. package/dist/comand-component-library.js +2663 -2332
  2. package/dist/style.css +1 -1
  3. package/package.json +2 -2
  4. package/src/ComponentLibrary.vue +639 -1267
  5. package/src/assets/data/box-product.json +15 -10
  6. package/src/assets/data/box-user.json +8 -8
  7. package/src/assets/data/list-of-tags.json +1 -1
  8. package/src/assets/data/pages/boxes-team-overview.json +8 -8
  9. package/src/componentSettingsDataAndControls.vue +82 -10
  10. package/src/components/CmdAddressData.vue +2 -0
  11. package/src/components/CmdAddressDataItem.vue +2 -1
  12. package/src/components/CmdBackToTopButton.vue +12 -3
  13. package/src/components/CmdBankAccountData.vue +2 -0
  14. package/src/components/CmdBasicForm.vue +6 -2
  15. package/src/components/CmdBox.vue +62 -35
  16. package/src/components/CmdBoxWrapper.vue +6 -0
  17. package/src/components/CmdBreadcrumbs.vue +2 -0
  18. package/src/components/CmdCodeOutput.vue +2 -0
  19. package/src/components/CmdCompanyLogo.vue +2 -0
  20. package/src/components/CmdContainer.vue +100 -87
  21. package/src/components/CmdCookieDisclaimer.vue +12 -1
  22. package/src/components/CmdCopyrightInformation.vue +2 -0
  23. package/src/components/CmdFakeSelect.vue +10 -6
  24. package/src/components/CmdFancyBox.vue +2 -0
  25. package/src/components/CmdFlexibleScrollContainer.vue +2 -0
  26. package/src/components/CmdForm.vue +2 -0
  27. package/src/components/CmdFormElement.vue +11 -1
  28. package/src/components/CmdFormFilters.vue +2 -0
  29. package/src/components/CmdGoogleMaps.vue +2 -0
  30. package/src/components/CmdHeadline.vue +23 -1
  31. package/src/components/CmdIcon.vue +2 -0
  32. package/src/components/CmdImage.vue +3 -0
  33. package/src/components/CmdImageGallery.vue +3 -1
  34. package/src/components/CmdImageZoom.vue +2 -0
  35. package/src/components/CmdInnerLink.vue +2 -0
  36. package/src/components/CmdInputGroup.vue +2 -0
  37. package/src/components/CmdLink.vue +16 -10
  38. package/src/components/CmdList.vue +168 -86
  39. package/src/components/CmdListOfLinksItem.vue +2 -0
  40. package/src/components/CmdListOfRequirements.vue +2 -0
  41. package/src/components/CmdLoginForm.vue +2 -2
  42. package/src/components/CmdMailTool.vue +2 -0
  43. package/src/components/CmdMailToolEntry.vue +2 -1
  44. package/src/components/CmdMailToolFilter.vue +2 -0
  45. package/src/components/CmdMainNavigation.vue +2 -0
  46. package/src/components/CmdMultistepFormProgressBar.vue +16 -10
  47. package/src/components/CmdProgressBar.vue +1 -1
  48. package/src/components/CmdSiteSearch.vue +10 -1
  49. package/src/components/CmdSlideButton.vue +3 -4
  50. package/src/components/CmdSlideshow.vue +10 -1
  51. package/src/components/CmdSmartSearch.vue +42 -11
  52. package/src/components/CmdSystemMessage.vue +8 -5
  53. package/src/components/CmdTable.vue +8 -6
  54. package/src/components/CmdTabs.vue +37 -3
  55. package/src/components/CmdThumbnailScroller.vue +12 -3
  56. package/src/components/CmdUploadForm.vue +12 -1
  57. package/src/components/CmdFlexContainer.vue +0 -109
@@ -76,6 +76,13 @@ export default {
76
76
  openListToTop: {
77
77
  type: Boolean,
78
78
  default: false
79
+ },
80
+ /**
81
+ * allows user to enter a new term, that is not included in the listOfRecommendations-property
82
+ */
83
+ allowUserToEnterNewTerm: {
84
+ type: Boolean,
85
+ default: true
79
86
  }
80
87
  },
81
88
  computed: {
@@ -107,28 +114,36 @@ export default {
107
114
  methods: {
108
115
  showRecommendations() {
109
116
  this.item = {} // reset item
110
- if(typeof this.modelValue === "string") {
111
- this.$emit("update:modelValue", "")
112
- } else {
113
- this.$emit("update:modelValue", {itemId: "", displayValue: ""})
114
- }
115
-
116
117
  this.showListOfRecommendations = true
117
118
  },
118
119
  optionSelected(item) {
119
120
  this.searchTerm = item.displayValue // set search-field to selected option
120
121
  this.showListOfRecommendations = false
121
- if(typeof this.modelValue === "string") {
122
- this.$emit("update:modelValue", item.displayValue)
123
- } else {
124
- this.$emit("update:modelValue", {itemId: item.id, displayValue: item.displayValue})
125
- }
122
+ this.emitValue(item)
126
123
  },
127
124
  linkItem(item) {
128
125
  return {
129
126
  ...item,
130
127
  text: item.displayValue
131
128
  }
129
+ },
130
+ emitValue(item) {
131
+ let entryOfRecommendations = null
132
+
133
+ if(typeof item === "string") {
134
+ entryOfRecommendations = this.listOfRecommendations.find((entry) => {
135
+ return entry.displayValue === item
136
+ })
137
+ }
138
+
139
+ const displayValue = typeof item === "string" ? item : item.displayValue
140
+
141
+ if(typeof this.modelValue === "string") {
142
+ this.$emit("update:modelValue", displayValue)
143
+ } else {
144
+ // modelValue is object, check if it exist as entry in listOfRecommendations and emit id and displayValue, if just a string is ented, emit id: 0 and the displayValue
145
+ this.$emit("update:modelValue", {id: entryOfRecommendations ? entryOfRecommendations.id : (typeof item === "string" ? 0 : item.id), displayValue})
146
+ }
132
147
  }
133
148
  },
134
149
  watch: {
@@ -136,6 +151,22 @@ export default {
136
151
  if(!this.searchTerm.length) {
137
152
  this.showListOfRecommendations = false
138
153
  }
154
+ if(this.allowUserToEnterNewTerm) {
155
+ this.emitValue(this.searchTerm)
156
+ }
157
+ },
158
+ modelValue: {
159
+ handler() {
160
+ if(typeof this.modelValue === "string") {
161
+ this.searchTerm = this.modelValue
162
+ } else {
163
+ const idExists = this.listOfRecommendations.find((entry) => {
164
+ return entry.id === this.modelValue?.id
165
+ })
166
+ this.searchTerm = idExists?.displayValue || this.modelValue?.displayValue || ""
167
+ }
168
+ },
169
+ immediate: true
139
170
  }
140
171
  }
141
172
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <transition :name="useTransition ? 'fade' : null">
2
+ <transition :name="transition">
3
3
  <div
4
4
  v-if="showSystemMessage"
5
5
  :class="['cmd-system-message', 'system-message', 'flex-container', 'vertical', { 'full-width': fullWidth }, validationStatus]"
@@ -51,11 +51,13 @@ export default {
51
51
  },
52
52
  props: {
53
53
  /**
54
- * activate if transition for hiding message-box should be used
54
+ * define the transition when system message disappears
55
+ *
56
+ * @allowedValues: "none", "fade", "scroll"
55
57
  */
56
- useTransition: {
57
- type: Boolean,
58
- default: true
58
+ transition: {
59
+ type: String,
60
+ default: "fade"
59
61
  },
60
62
  /**
61
63
  * validation-status for the message-box
@@ -156,6 +158,7 @@ export default {
156
158
  display: inline-flex;
157
159
  margin: var(--default-margin) 0;
158
160
  align-items: center;
161
+ align-self: flex-start; /* if used in flex-container component should not be stretched */
159
162
 
160
163
  > :last-child {
161
164
  margin-bottom: 0;
@@ -48,7 +48,7 @@
48
48
  </tr>
49
49
  </thead>
50
50
  </slot>
51
- <transition :name="useTransition ? 'fade' : null">
51
+ <transition :name="transition">
52
52
  <slot name="table-body">
53
53
  <tbody v-show="showTableData" aria-expanded="true">
54
54
  <tr :class="{'active' : tableData.rowIndexHighlighted === indexRows}"
@@ -60,7 +60,7 @@
60
60
  </tbody>
61
61
  </slot>
62
62
  </transition>
63
- <transition :name="useTransition ? 'fade' : null">
63
+ <transition :name="transition">
64
64
  <slot name="table-foot">
65
65
  <tfoot v-if="tableData.tfoot && tableData.tfoot.length && showTableData" aria-expanded="true">
66
66
  <tr>
@@ -98,11 +98,13 @@ export default {
98
98
  },
99
99
  props: {
100
100
  /**
101
- * activate if transition for hiding collapsible table-data should be used
101
+ * define the transition for table-body and -footer when collapsible table-data is used
102
+ *
103
+ * @allowedValues: "none", "fade", "scroll"
102
104
  */
103
- useTransition: {
104
- type: Boolean,
105
- default: true
105
+ transition: {
106
+ type: String,
107
+ default: "fade"
106
108
  },
107
109
  /**
108
110
  * table data (incl. caption, thead, tbody)
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <div class="cmd-tabs">
2
+ <div :class="['cmd-tabs', highlightLevel]">
3
3
  <!-- being tab-list -->
4
4
  <ul :class="{'stretch-tabs' : stretchTabs}" role="tablist">
5
5
  <li v-for="(tab, index) in tabs" :class="{active : showTab === index}" :key="index" role="tab">
6
- <a href="#" @click.prevent="setActiveTab(index)" :title="!tab.text ? tab.tooltip : undefined">
6
+ <a href="#" :class="highlightLevel" @click.prevent="setActiveTab(index)" :title="!tab.text ? tab.tooltip : undefined">
7
7
  <!-- begin CmdIcon -->
8
8
  <CmdIcon v-if="tab.iconClass" :iconClass="tab.iconClass" :type="tab.iconType" />
9
9
  <!-- end CmdIcon -->
@@ -88,6 +88,21 @@ export default {
88
88
  type: Boolean,
89
89
  default: false
90
90
  },
91
+ /**
92
+ * set highlight-level for tabs
93
+ *
94
+ * @allowedValues: "none", "primary", "secondary", "tertiary"
95
+ */
96
+ highlightLevel: {
97
+ type: Boolean,
98
+ default: "primary",
99
+ validator(value) {
100
+ return value === "none" ||
101
+ value === "primary" ||
102
+ value === "secondary" ||
103
+ value === "tertiary"
104
+ }
105
+ },
91
106
  /**
92
107
  * set default active/shown tab
93
108
  */
@@ -202,17 +217,36 @@ export default {
202
217
 
203
218
  > div {
204
219
  padding: var(--default-padding);
205
- border: var(--primary-border);
220
+ border: var(--default-border);
206
221
  border-radius: var(--default-border-radius);
207
222
  background: var(--color-scheme-background);
208
223
  border-top-left-radius: 0;
209
224
 
225
+
210
226
  > div {
211
227
  *:last-child {
212
228
  margin-bottom: 0;
213
229
  }
214
230
  }
215
231
  }
232
+
233
+ &.primary {
234
+ & > div {
235
+ border-color: var(--primary-color);
236
+ }
237
+ }
238
+
239
+ &.secondary {
240
+ & > div {
241
+ border-color: var(--secondary-color);
242
+ }
243
+ }
244
+
245
+ &.tertiary {
246
+ & > div {
247
+ border-color: var(--tertiary-color);
248
+ }
249
+ }
216
250
  }
217
251
 
218
252
  /* end cmd-tabs ------------------------------------------------------------------------------------------ */
@@ -25,8 +25,8 @@
25
25
  />
26
26
  <!-- end CmdSlideButton -->
27
27
 
28
- <!-- begin list of images to slide -->
29
- <transition-group name="slide" tag="ul">
28
+ <!-- begin list of images -->
29
+ <transition-group :name="transition" tag="ul">
30
30
  <li v-for="(item, index) in items" :key="index">
31
31
  <a v-if="!editModeContext" :href="executeOnClick === 'url' ? item.url : '#'"
32
32
  @click="executeLink(index, $event)"
@@ -78,7 +78,7 @@
78
78
  <!-- end show placeholder if no image exists (and component is not edited) -->
79
79
  </li>
80
80
  </transition-group>
81
- <!-- end list of images to slide -->
81
+ <!-- end list of images -->
82
82
 
83
83
  <!-- begin CmdSlideButton -->
84
84
  <CmdSlideButton
@@ -117,6 +117,15 @@ export default {
117
117
  }
118
118
  },
119
119
  props: {
120
+ /**
121
+ * define the transition when thumbnails should change
122
+ *
123
+ * @allowedValues: "none", "fade", "scroll"
124
+ */
125
+ transition: {
126
+ type: String,
127
+ default: "scroll"
128
+ },
120
129
  /**
121
130
  * orientation for scroller
122
131
  *
@@ -190,7 +190,8 @@
190
190
  />
191
191
  <!-- end CmdIcon -->
192
192
  </a>
193
- <transition :name="useTransition ? 'fade' : null">
193
+ <!-- begin list of file extensions -->
194
+ <transition :name="transitionListOfFileExtensions">
194
195
  <ul v-if="showListOfFileExtensions" class="list-of-file-extensions">
195
196
  <li
196
197
  v-for="(fileExtension, index) in allowedFileExtensions"
@@ -201,6 +202,7 @@
201
202
  </li>
202
203
  </ul>
203
204
  </transition>
205
+ <!-- end list of file extensions -->
204
206
  </dd>
205
207
  </dl>
206
208
  </div>
@@ -381,6 +383,15 @@ export default {
381
383
  this.resetForm.systemMessageStatus = this.systemMessageStatus
382
384
  },
383
385
  props: {
386
+ /**
387
+ * define the transition when the list of file extensions is toggled
388
+ *
389
+ * @allowedValues: "none", "fade", "scroll"
390
+ */
391
+ transitionListOfFileExtensions: {
392
+ type: String,
393
+ default: "fade"
394
+ },
384
395
  /**
385
396
  * activate if transition for hiding list of file extensions
386
397
  */
@@ -1,109 +0,0 @@
1
- <template>
2
- <div :class="['cmd-flex-container', 'flex-container', htmlClasses]">
3
- <!-- begin slot-content -->
4
- <slot></slot>
5
- <!-- end slot-content -->
6
- </div>
7
- </template>
8
-
9
- <script>
10
- export default {
11
- name: "CmdFlexContainer",
12
- props: {
13
- /**
14
- * activate if content should be aligned vertically
15
- *
16
- * @affectsStyling: true
17
- */
18
- alignContentVertical: {
19
- type: String,
20
- required: false
21
- },
22
- /**
23
- * activate if no gap between items should be used
24
- *
25
- * @affectsStyling: true
26
- */
27
- noGap: {
28
- type: Boolean,
29
- default: true
30
- },
31
- /**
32
- * activate if items should not behave like flex-items (they are now shrunk to their content)
33
- *
34
- * @affectsStyling: true
35
- */
36
- noFlex: {
37
- type: Boolean,
38
- default: true
39
- },
40
- /**
41
- * define how the items will be aligned vertically
42
- *
43
- * attention: if alignContentVertical is activated, this property defines the horizontal alignment
44
- *
45
- * @allowedValues: top, flex-start, center, flex-end, bottom
46
- * @affectsStyling: true
47
- */
48
- alignItems: {
49
- type: String,
50
- required: false,
51
- validator(value) {
52
- return value === "top" ||
53
- value === "flex-start" ||
54
- value === "center" ||
55
- value === "flex-end" ||
56
- value === "bottom"
57
- }
58
- },
59
- /**
60
- * define how the items will be aligned/justified horizontally.
61
- *
62
- * attention: if alignContentVertical is activated, this property defines the vertical alignment/justification
63
- *
64
- * @allowedValues: top, flex-start, center, flex-end, bottom, space-between, space-around
65
- * @affectsStyling: true
66
- */
67
- justifyContent: {
68
- type: String,
69
- required: false,
70
- validator(value) {
71
- return value === "top" ||
72
- value === "flex-start" ||
73
- value === "center" ||
74
- value === "flex-end" ||
75
- value === "bottom" ||
76
- value === "space-between" ||
77
- value === "space-around"
78
- }
79
- }
80
- },
81
- computed: {
82
- htmlClasses() {
83
- const htmlClasses = []
84
-
85
- if (this.alignContentVertical) {
86
- htmlClasses.push("vertical")
87
- }
88
- if (this.useGap) {
89
- htmlClasses.push("no-gap")
90
- }
91
- if (this.noFlex) {
92
- htmlClasses.push("flex-none")
93
- }
94
- if (this.alignItems) {
95
- htmlClasses.push("align-items-" + this.alignItems)
96
- }
97
- if (this.justifyContent) {
98
- htmlClasses.push("justify-content-" + this.justifyContent)
99
- }
100
-
101
- return htmlClasses.join(" ")
102
- }
103
- }
104
- }
105
- </script>
106
-
107
- <style>
108
-
109
- </style>