comand-component-library 3.1.74 → 3.1.77

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/comand-component-library.css +1 -1
  2. package/dist/comand-component-library.umd.min.js +1 -1
  3. package/package.json +3 -3
  4. package/src/App.vue +65 -71
  5. package/src/assets/data/input-group-radiobuttons.json +23 -0
  6. package/src/assets/data/input-group-replaced-radiobuttons.json +23 -0
  7. package/src/assets/data/input-group-toggle-switch-radiobuttons.json +23 -0
  8. package/src/assets/styles/global-styles.scss +10 -19
  9. package/src/components/CmdAddressData.vue +7 -7
  10. package/src/components/CmdBankAccountData.vue +7 -7
  11. package/src/components/CmdBox.vue +24 -30
  12. package/src/components/CmdBoxSiteSearch.vue +9 -9
  13. package/src/components/CmdCookieDisclaimer.vue +17 -17
  14. package/src/components/CmdFakeSelect.vue +32 -29
  15. package/src/components/CmdFormElement.vue +34 -35
  16. package/src/components/{CmdCustomHeadline.vue → CmdHeadline.vue} +1 -1
  17. package/src/components/CmdInputGroup.vue +51 -53
  18. package/src/components/CmdListOfLinks.vue +8 -8
  19. package/src/components/CmdListOfRequirements.vue +37 -15
  20. package/src/components/CmdLoginForm.vue +17 -17
  21. package/src/components/CmdOpeningHours.vue +5 -5
  22. package/src/components/CmdSiteFooter.vue +76 -0
  23. package/src/components/CmdSiteHeader.vue +2 -1
  24. package/src/components/CmdSlideshow.vue +6 -6
  25. package/src/components/CmdSystemMessage.vue +28 -11
  26. package/src/components/CmdTabs.vue +8 -8
  27. package/src/components/CmdToggleDarkMode.vue +42 -2
  28. package/src/components/CmdTooltip.vue +13 -13
  29. package/src/components/CmdTooltipForInputElements.vue +122 -0
  30. package/src/components/CmdUploadForm.vue +32 -32
  31. package/src/components/CmdWidthLimitationWrapper.vue +0 -17
  32. package/src/documentation/generated/CmdAddressDataPropertyDescriptions.json +2 -2
  33. package/src/documentation/generated/CmdBankAccountDataPropertyDescriptions.json +2 -2
  34. package/src/documentation/generated/CmdBoxPropertyDescriptions.json +2 -2
  35. package/src/documentation/generated/CmdBoxSiteSearchPropertyDescriptions.json +2 -2
  36. package/src/documentation/generated/CmdCookieDisclaimerPropertyDescriptions.json +2 -2
  37. package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +6 -1
  38. package/src/documentation/generated/CmdHeadlinePropertyDescriptions.json +22 -0
  39. package/src/documentation/generated/CmdInputGroupPropertyDescriptions.json +0 -5
  40. package/src/documentation/generated/CmdListOfLinksPropertyDescriptions.json +2 -2
  41. package/src/documentation/generated/CmdListOfRequirementsPropertyDescriptions.json +14 -4
  42. package/src/documentation/generated/CmdLoginFormPropertyDescriptions.json +4 -4
  43. package/src/documentation/generated/CmdOpeningHoursPropertyDescriptions.json +2 -2
  44. package/src/documentation/generated/CmdSiteFooterPropertyDescriptions.json +12 -0
  45. package/src/documentation/generated/CmdSystemMessagePropertyDescriptions.json +5 -0
  46. package/src/documentation/generated/CmdTabsPropertyDescriptions.json +2 -2
  47. package/src/documentation/generated/CmdTooltipForInputElementsPropertyDescriptions.json +42 -0
  48. package/src/documentation/generated/CmdTooltipPropertyDescriptions.json +1 -1
  49. package/src/documentation/generated/CmdUploadFormPropertyDescriptions.json +14 -14
  50. package/src/index.js +2 -1
  51. package/src/mixins/FieldValidation.js +15 -5
  52. package/src/mixins/Tooltip.js +1 -1
@@ -146,8 +146,16 @@ export default {
146
146
  },
147
147
  computed: {
148
148
  getValidationMessage() {
149
+ // check if all requirements are valid
150
+ // const allRequirementsValid = !this.inputRequirements.some((item) => {
151
+ // return !item.valid(this.modelValue, this.$attrs)
152
+ // })
153
+
149
154
  if (this.validationStatus !== "") {
150
- if (this.validationStatus === "error" && !this.validationMessage) {
155
+ if (this.validationStatus === "error") {
156
+ if(this.validationMessage) {
157
+ return this.validationMessage
158
+ }
151
159
  return this.getMessage("cmdfieldvalidation.information_not_filled_correctly")
152
160
  }
153
161
  if (this.validationStatus === "warning" && this.capsLockActivated) {
@@ -157,6 +165,7 @@ export default {
157
165
  return this.getMessage("cmdfieldvalidation.information_filled_correctly")
158
166
  }
159
167
  }
168
+
160
169
  return null
161
170
  },
162
171
  getStatusIconClass() {
@@ -179,11 +188,12 @@ export default {
179
188
  inputRequirements() {
180
189
  const standardRequirements = []
181
190
  // check if field is required
182
- if(this.$attrs.required) {
191
+ if(this.$attrs.required || this.required) {
192
+ const inputRequired = this.required
183
193
  standardRequirements.push({
184
194
  message: this.getRequirementMessage(),
185
195
  valid(value, attributes) {
186
- return !attributes.required || value.length > 0
196
+ return (!attributes.required && !inputRequired) || value.length > 0
187
197
  }
188
198
  })
189
199
  }
@@ -209,7 +219,7 @@ export default {
209
219
  if ((["password", "number", "url", "email"].includes(this.$attrs.type)) && event.getModifierState("CapsLock")) {
210
220
  this.capsLockActivated = true
211
221
  this.validationStatus = "warning"
212
- } else {
222
+ } else if(this.capsLockActivated && this.validationStatus === "warning") {
213
223
  this.capsLockActivated = false
214
224
  this.validationStatus = ""
215
225
  }
@@ -220,7 +230,7 @@ export default {
220
230
  }
221
231
  }
222
232
 
223
- function validateSpecialCharacters(message = "Field contains Special character") {
233
+ function validateSpecialCharacters(message = "Field contains special character") {
224
234
  return {
225
235
  message,
226
236
  valid(value) {
@@ -1,4 +1,4 @@
1
- import {nextSequenceValue} from "../utils/globalSequence";
1
+ import {nextSequenceValue} from "../utils/globalSequence"
2
2
 
3
3
  export default {
4
4
  data() {