comand-component-library 3.3.4 → 3.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) 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/components/CmdAddressData.vue +36 -6
  5. package/src/components/CmdBackToTopButton.vue +4 -2
  6. package/src/components/CmdBankAccountData.vue +3 -2
  7. package/src/components/CmdBox.vue +6 -4
  8. package/src/components/CmdBoxWrapper.vue +6 -2
  9. package/src/components/CmdBreadcrumbs.vue +15 -3
  10. package/src/components/CmdCompanyLogo.vue +0 -2
  11. package/src/components/CmdFakeSelect.vue +41 -12
  12. package/src/components/CmdFancyBox.vue +11 -3
  13. package/src/components/CmdFormElement.vue +30 -6
  14. package/src/components/CmdFormFilters.vue +17 -8
  15. package/src/components/CmdHeadline.vue +3 -3
  16. package/src/components/CmdInputGroup.vue +8 -1
  17. package/src/components/CmdListOfLinks.vue +9 -3
  18. package/src/components/CmdListOfRequirements.vue +18 -11
  19. package/src/components/CmdLoginForm.vue +46 -27
  20. package/src/components/CmdMainNavigation.vue +30 -10
  21. package/src/components/CmdMultistepFormProgressBar.vue +15 -3
  22. package/src/components/CmdPager.vue +10 -2
  23. package/src/components/CmdShareButtons.vue +9 -3
  24. package/src/components/CmdSiteHeader.vue +3 -1
  25. package/src/components/CmdSiteSearch.vue +30 -5
  26. package/src/components/CmdSystemMessage.vue +10 -5
  27. package/src/components/CmdTable.vue +12 -2
  28. package/src/components/CmdTabs.vue +9 -1
  29. package/src/components/CmdTooltip.vue +6 -2
  30. package/src/components/CmdUploadForm.vue +116 -47
  31. package/src/documentation/generated/CmdFakeSelectPropertyDescriptions.json +6 -1
  32. package/src/documentation/generated/CmdFormFiltersPropertyDescriptions.json +1 -1
  33. package/src/documentation/generated/CmdHeadlinePropertyDescriptions.json +1 -1
  34. package/src/documentation/generated/CmdSiteSearchPropertyDescriptions.json +6 -1
  35. package/src/documentation/generated/CmdUploadFormPropertyDescriptions.json +16 -16
  36. package/src/mixins/FieldValidation.js +33 -8
@@ -3,7 +3,9 @@
3
3
  <ul :class="{'stretch-tabs' : stretchTabs}" role="tablist">
4
4
  <li v-for="(tab, index) in tabs" :key="index" role="tab">
5
5
  <a :class="{active : showTab === index}" @click.prevent="setActiveTab(index)" :title="!tab.name ? tab.tooltip : undefined" href="#">
6
- <CmdIcon v-if="tab.iconClass" :iconClass="tab.iconClass"></CmdIcon>
6
+ <!-- begin CmdIcon -->
7
+ <CmdIcon v-if="tab.iconClass" :iconClass="tab.iconClass" :type="tab.iconType" />
8
+ <!-- end CmdIcon -->
7
9
  <span v-if="tab.name">{{ tab.name }}</span>
8
10
  </a>
9
11
  </li>
@@ -32,12 +34,18 @@
32
34
  </template>
33
35
 
34
36
  <script>
37
+ // import functions
35
38
  import {addCollection} from "@iconify/vue"
39
+
40
+ // import data
36
41
  import IconData from '@/assets/data/icon.json'
42
+
37
43
  // import components
38
44
  import CmdHeadline from "./CmdHeadline"
39
45
  import CmdIcon from "./CmdIcon"
46
+
40
47
  addCollection(IconData)
48
+
41
49
  export default {
42
50
  name: "CmdTabs",
43
51
  components: {
@@ -13,7 +13,9 @@
13
13
 
14
14
  <!-- begin icon to close tooltip -->
15
15
  <a v-if="iconClose.show && toggleVisibilityByClick" href="#" @click.prevent="hideTooltip" :title="iconClose.tooltip">
16
- <span :class="iconClose.iconClass"></span>
16
+ <!-- begin CmdIcon -->
17
+ <CmdIcon :iconClass="iconClose.iconClass" :type="iconClose.iconType" />
18
+ <!-- end CmdIcon -->
17
19
  </a>
18
20
  <!-- end icon to close tooltip -->
19
21
  </div>
@@ -28,11 +30,13 @@
28
30
  <script>
29
31
  // import components
30
32
  import CmdHeadline from "./CmdHeadline"
33
+ import CmdIcon from "./CmdIcon"
31
34
 
32
35
  export default {
33
36
  name: "CmdTooltip",
34
37
  components: {
35
- CmdHeadline
38
+ CmdHeadline,
39
+ CmdIcon
36
40
  },
37
41
  data() {
38
42
  return {
@@ -47,7 +47,9 @@
47
47
  :title="getMessage('cmduploadform.labeltext.remove_all_files_from_list')"
48
48
  @click.prevent="cancelUpload"
49
49
  >
50
- <span :class="deleteIconClass"></span>
50
+ <!-- begin CmdIcon -->
51
+ <CmdIcon :iconClass="deleteIcon.iconClass" :type="deleteIcon.iconClass" />
52
+ <!-- end CmdIcon -->
51
53
  </a>
52
54
  <span>
53
55
  {{ listOfFiles.length }}
@@ -94,7 +96,10 @@
94
96
  href="#"
95
97
  :title="getMessage('cmduploadform.labeltext.remove_file_from_list', uploadFile.file.name)"
96
98
  @click.prevent="removeFile(index)"
97
- ><span :class="deleteIconClass"></span>
99
+ >
100
+ <!-- begin CmdIcon -->
101
+ <CmdIcon :iconClass="iconDelete.iconClass" :type="iconDelete.iconType" />
102
+ <!-- end CmdIcon -->
98
103
  </a>
99
104
  <span
100
105
  :class="[
@@ -158,11 +163,16 @@
158
163
  </dt>
159
164
  <dd>
160
165
  <a
161
- :class="showListOfFileExtensions ? invisibleIconClass : visibleIconClass"
162
166
  href="#"
163
167
  @click.prevent="showListOfFileExtensions = !showListOfFileExtensions"
164
- :title="getMessage('cmduploadform.tooltip.toggle_list_of_allowed_file_types')"
165
- ></a>
168
+ :title="getMessage('cmduploadform.tooltip.toggle_list_of_allowed_file_types')">
169
+ <!-- begin CmdIcon -->
170
+ <CmdIcon
171
+ :iconClass="showListOfFileExtensions ? iconInvisible.iconClass : iconVisible.iconClass"
172
+ :type="showListOfFileExtensions ? iconInvisible.iconType : iconVisible.iconType"
173
+ />
174
+ <!-- end CmdIcon -->
175
+ </a>
166
176
  <transition name="fade">
167
177
  <ul v-if="showListOfFileExtensions" class="list-of-file-extensions">
168
178
  <li
@@ -185,7 +195,9 @@
185
195
  :disabled="uploadInitiated"
186
196
  @click="selectFiles()"
187
197
  >
188
- <span :class="fileUploadIconClass"></span>
198
+ <!-- begin CmdIcon -->
199
+ <CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType" />
200
+ <!-- end CmdIcon -->
189
201
  <span v-if="allowMultipleFileUploads">{{
190
202
  getMessage("cmduploadform.labeltext.select_files")
191
203
  }}</span>
@@ -237,14 +249,18 @@
237
249
  "
238
250
  @click="uploadFiles"
239
251
  >
240
- <span :class="uploadIconClass"></span>
252
+ <!-- begin CmdIcon -->
253
+ <CmdIcon :iconClass="iconUpload.iconClass" :type="iconUpload.iconType" />
254
+ <!-- end CmdIcon -->
241
255
  <span v-if="listOfFiles.length === 1 || !allowMultipleFileUploads">
242
256
  {{ getMessage("cmduploadform.buttontext.upload_file") }}
243
257
  </span>
244
258
  <span v-else>{{ getMessage("cmduploadform.buttontext.upload_files") }}</span>
245
259
  </button>
246
260
  <button :class="['button', { disabled: listOfFiles.length === 0 }]" @click="cancel">
247
- <span :class="cancelIconClass"></span>
261
+ <!-- begin CmdIcon -->
262
+ <CmdIcon :iconClass="iconCancel.iconClass" :type="iconCancel.iconType" />
263
+ <!-- end CmdIcon -->
248
264
  <span>{{ getMessage("cmduploadform.buttontext.cancel") }}</span>
249
265
  </button>
250
266
  </div>
@@ -267,16 +283,22 @@
267
283
  <template v-if="enableDragAndDrop">
268
284
  <template v-if="fileTypeImage">
269
285
  <span>{{ getMessage("cmduploadform.select_image") }}</span>
270
- <span :class="imageIconClass"></span>
286
+ <!-- begin CmdIcon -->
287
+ <CmdIcon :iconClass="iconImage.iconClass" :type="iconImage.iconType" />
288
+ <!-- end CmdIcon -->
271
289
  </template>
272
290
  <template v-else>
273
291
  <span>{{ getMessage("cmduploadform.select_file") }}</span>
274
- <span :class="fileUploadIconClass"></span>
292
+ <!-- begin CmdIcon -->
293
+ <CmdIcon :iconClass="iconFileUpload.iconClass" :type="iconFileUpload.iconType" />
294
+ <!-- end CmdIcon -->
275
295
  </template>
276
296
  </template>
277
297
  <template v-else>
278
298
  <span>{{ getMessage("cmduploadform.drag_and_drop_file_here") }}</span>
279
- <span :class="dragAndDropIconClass"></span>
299
+ <!-- begin CmdIcon -->
300
+ <CmdIcon :iconClass="iconDragAndDrop.iconClass" :type="iconDragAndDrop.iconType" />
301
+ <!-- end CmdIcon -->
280
302
  </template>
281
303
  <small>{{ getMessage("cmduploadform.max_upload_size") }} {{ formatSize(maxFileUploadSize) }}</small>
282
304
  <small>{{ getMessage("cmduploadform.allowed_file_types") }} {{ allowedFileExtensions }}</small>
@@ -307,8 +329,9 @@ import {getFileExtension} from "../utils/getFileExtension.js"
307
329
  import axios from "axios"
308
330
 
309
331
  // import components
310
- import CmdHeadline from "./CmdHeadline"
311
332
  import CmdFormElement from "./CmdFormElement"
333
+ import CmdHeadline from "./CmdHeadline"
334
+ import CmdIcon from "./CmdIcon"
312
335
  import CmdSystemMessage from "./CmdSystemMessage"
313
336
 
314
337
  export default {
@@ -316,8 +339,9 @@ export default {
316
339
  emits: ["click", "error", "upload-complete", "upload-file-success"],
317
340
  mixins: [I18n, DefaultMessageProperties],
318
341
  components: {
319
- CmdHeadline,
320
342
  CmdFormElement,
343
+ CmdHeadline,
344
+ CmdIcon,
321
345
  CmdSystemMessage,
322
346
  },
323
347
  data() {
@@ -444,67 +468,112 @@ export default {
444
468
  default: true
445
469
  },
446
470
  /**
447
- * set icon class for delete-icons
471
+ * set icon for delete-icons
448
472
  */
449
- deleteIconClass: {
450
- type: String,
451
- default: "icon-delete"
473
+ deleteIcon: {
474
+ type: Object,
475
+ default() {
476
+ return {
477
+ iconClass: "icon-delete",
478
+ iconType: "auto"
479
+ }
480
+ }
452
481
  },
453
482
  /**
454
- * set icon class for file-upload-icon
483
+ * set icon for file-upload-icon
455
484
  */
456
- fileUploadIconClass: {
457
- type: String,
458
- default: "icon-file-upload"
485
+ iconFileUpload: {
486
+ type: Object,
487
+ default() {
488
+ return {
489
+ iconClass: "icon-file-upload",
490
+ iconType: "auto"
491
+ }
492
+ }
459
493
  },
460
494
  /**
461
- * set icon class for file-icon
495
+ * set icon for file-icon
462
496
  */
463
- fileIconClass: {
464
- type: String,
465
- default: "icon-file"
497
+ iconFile: {
498
+ type: Object,
499
+ default() {
500
+ return {
501
+ iconClass: "icon-file",
502
+ iconType: "auto"
503
+ }
504
+ }
466
505
  },
467
506
  /**
468
- * set icon class for invisible-icon
507
+ * set icon for invisible-icon
469
508
  */
470
- invisibleIconClass: {
471
- type: String,
472
- default: "icon-not-visible"
509
+ iconInvisible: {
510
+ type: Object,
511
+ default() {
512
+ return {
513
+ iconClass: "icon-not-visible",
514
+ iconType: "auto"
515
+ }
516
+ }
473
517
  },
474
518
  /**
475
519
  * set icon class for visible-icon
476
520
  */
477
- visibleIconClass: {
478
- type: String,
479
- default: "icon-visible"
521
+ iconVisible: {
522
+ type: Object,
523
+ default() {
524
+ return {
525
+ iconClass: "icon-visible",
526
+ iconType: "auto"
527
+ }
528
+ }
480
529
  },
481
530
  /**
482
- * set icon class for image-icon
531
+ * set icon for image-icon
483
532
  */
484
- imageIconClass: {
485
- type: String,
486
- default: "icon-image"
533
+ iconImage: {
534
+ type: Object,
535
+ default() {
536
+ return {
537
+ iconClass: "icon-image",
538
+ iconType: "auto"
539
+ }
540
+ }
487
541
  },
488
542
  /**
489
- * set icon class for upload-icon
543
+ * set icon for upload-icon
490
544
  */
491
- uploadIconClass: {
492
- type: String,
493
- default: "icon-upload"
545
+ iconUpload: {
546
+ type: Object,
547
+ default() {
548
+ return {
549
+ iconClass: "icon-upload",
550
+ iconType: "auto"
551
+ }
552
+ }
494
553
  },
495
554
  /**
496
- * set icon class for drag-and-drop-icon
555
+ * set icon for drag-and-drop-icon
497
556
  */
498
- dragAndDropIconClass: {
499
- type: String,
500
- default: "icon-drag-and-drop"
557
+ iconDragAndDrop: {
558
+ type: Object,
559
+ default() {
560
+ return {
561
+ iconClass: "icon-drag-and-drop",
562
+ iconType: "auto"
563
+ }
564
+ }
501
565
  },
502
566
  /**
503
567
  * set icon class for cancel-icon
504
568
  */
505
- cancelIconClass: {
506
- type: String,
507
- default: "icon-cancel"
569
+ iconCancel: {
570
+ type: Object,
571
+ default() {
572
+ return {
573
+ iconClass: "icon-cancel",
574
+ iconType: "auto"
575
+ }
576
+ }
508
577
  },
509
578
  /**
510
579
  * properties for CmdHeadline-component at of the fieldset
@@ -51,7 +51,7 @@
51
51
  ]
52
52
  }
53
53
  },
54
- "dropdownIcon": {
54
+ "iconDropdown": {
55
55
  "comments": [
56
56
  "icon for dropdown-icon (i.e. an angle/arrow)"
57
57
  ],
@@ -85,5 +85,10 @@
85
85
  "comments": [
86
86
  "default text if no option is selected (and first option is not used)"
87
87
  ]
88
+ },
89
+ "iconSelectAllOptions": {
90
+ "comments": [
91
+ "set icon for \"select all\"-option"
92
+ ]
88
93
  }
89
94
  }
@@ -14,7 +14,7 @@
14
14
  ]
15
15
  }
16
16
  },
17
- "deleteFilter": {
17
+ "deleteFilterIcon": {
18
18
  "comments": [
19
19
  "icon for deleting (a single) filter"
20
20
  ],
@@ -14,7 +14,7 @@
14
14
  "small pre-headline-text above main-headline"
15
15
  ]
16
16
  },
17
- "iconClass": {
17
+ "headlineIcon": {
18
18
  "comments": [
19
19
  "icon-class for icon shown left/before headline"
20
20
  ]
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "useFilters": {
23
23
  "comments": [
24
- "toggle use of filters (must configured)"
24
+ "toggle use of filters (must be configured)"
25
25
  ]
26
26
  },
27
27
  "textLegend": {
@@ -75,5 +75,10 @@
75
75
  "comments": [
76
76
  "properties for CmdFakeSelect-component for filters"
77
77
  ]
78
+ },
79
+ "cmdIcon": {
80
+ "comments": [
81
+ "properties for CmdIcon-component for filters"
82
+ ]
78
83
  }
79
84
  }
@@ -77,47 +77,47 @@
77
77
  ]
78
78
  }
79
79
  },
80
- "deleteIconClass": {
80
+ "deleteIcon": {
81
81
  "comments": [
82
- "set icon class for delete-icons"
82
+ "set icon for delete-icons"
83
83
  ]
84
84
  },
85
- "fileUploadIconClass": {
85
+ "iconFileUpload": {
86
86
  "comments": [
87
- "set icon class for file-upload-icon"
87
+ "set icon for file-upload-icon"
88
88
  ]
89
89
  },
90
- "fileIconClass": {
90
+ "iconFile": {
91
91
  "comments": [
92
- "set icon class for file-icon"
92
+ "set icon for file-icon"
93
93
  ]
94
94
  },
95
- "invisibleIconClass": {
95
+ "iconInvisible": {
96
96
  "comments": [
97
- "set icon class for invisible-icon"
97
+ "set icon for invisible-icon"
98
98
  ]
99
99
  },
100
- "visibleIconClass": {
100
+ "iconVisible": {
101
101
  "comments": [
102
102
  "set icon class for visible-icon"
103
103
  ]
104
104
  },
105
- "imageIconClass": {
105
+ "iconImage": {
106
106
  "comments": [
107
- "set icon class for image-icon"
107
+ "set icon for image-icon"
108
108
  ]
109
109
  },
110
- "uploadIconClass": {
110
+ "iconUpload": {
111
111
  "comments": [
112
- "set icon class for upload-icon"
112
+ "set icon for upload-icon"
113
113
  ]
114
114
  },
115
- "dragAndDropIconClass": {
115
+ "iconDragAndDrop": {
116
116
  "comments": [
117
- "set icon class for drag-and-drop-icon"
117
+ "set icon for drag-and-drop-icon"
118
118
  ]
119
119
  },
120
- "cancelIconClass": {
120
+ "iconCancel": {
121
121
  "comments": [
122
122
  "set icon class for cancel-icon"
123
123
  ]
@@ -34,7 +34,8 @@ export default {
34
34
  text: "Open help",
35
35
  icon: {
36
36
  iconClass: "icon-questionmark-circle",
37
- tooltip: "Open help in new tab"
37
+ tooltip: "Open help in new tab",
38
+ iconType: "auto"
38
39
  }
39
40
  }
40
41
  }
@@ -65,7 +66,8 @@ export default {
65
66
  default() {
66
67
  return {
67
68
  iconClass: "icon-error-circle",
68
- tooltip: "Error"
69
+ tooltip: "Error",
70
+ iconType: "auto"
69
71
  }
70
72
  }
71
73
  } ,
@@ -78,7 +80,8 @@ export default {
78
80
  default() {
79
81
  return {
80
82
  iconClass: "icon-exclamation-circle",
81
- tooltip: "Warning"
83
+ tooltip: "Warning",
84
+ iconType: "auto"
82
85
  }
83
86
  }
84
87
  },
@@ -92,7 +95,8 @@ export default {
92
95
  default() {
93
96
  return {
94
97
  iconClass: "icon-check-circle",
95
- tooltip: "Success"
98
+ tooltip: "Success",
99
+ iconType: "auto"
96
100
  }
97
101
  }
98
102
  },
@@ -105,7 +109,8 @@ export default {
105
109
  default() {
106
110
  return {
107
111
  iconClass: "icon-info-circle",
108
- tooltip: "Info"
112
+ tooltip: "Info",
113
+ iconType: "auto"
109
114
  }
110
115
  }
111
116
  },
@@ -116,7 +121,8 @@ export default {
116
121
  type: Object,
117
122
  default() {
118
123
  return {
119
- iconClass: "icon-caps-lock-circle"
124
+ iconClass: "icon-caps-lock-circle",
125
+ iconType: "auto"
120
126
  }
121
127
  }
122
128
  },
@@ -128,7 +134,8 @@ export default {
128
134
  default() {
129
135
  return {
130
136
  iconClass: "icon-visible",
131
- tooltip: "Show password"
137
+ tooltip: "Show password",
138
+ iconType: "auto"
132
139
  }
133
140
  }
134
141
  },
@@ -139,7 +146,8 @@ export default {
139
146
  type: Object,
140
147
  default() {
141
148
  return {
142
- iconClass: "icon-not-visible"
149
+ iconClass: "icon-not-visible",
150
+ iconType: "auto"
143
151
  }
144
152
  }
145
153
  },
@@ -207,6 +215,23 @@ export default {
207
215
  }
208
216
  return this.helplink.icon.iconClass
209
217
  },
218
+ getStatusIconType() {
219
+ if (this.validationStatus !== "") {
220
+ if (!this.capsLockActivated) {
221
+ if (this.validationStatus === "error") {
222
+ return this.iconHasStateError.iconType
223
+ } else if (this.validationStatus === "warning") {
224
+ return this.iconHasStateWarning.iconType
225
+ } else if (this.validationStatus === "success") {
226
+ return this.iconHasStateSuccess.iconType
227
+ }
228
+ return this.iconHasStateInfo.iconType
229
+ } else {
230
+ return this.iconCapsLock.iconType
231
+ }
232
+ }
233
+ return this.helplink.icon.iconType
234
+ },
210
235
  inputRequirements() {
211
236
  const standardRequirements = []
212
237
  // check if field is required