comand-component-library 3.1.90 → 3.1.92

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 (38) 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 +2 -2
  4. package/src/App.vue +119 -45
  5. package/src/assets/data/main-navigation.json +1 -0
  6. package/src/assets/data/tabs.json +1 -0
  7. package/src/assets/styles/global-styles.scss +0 -1
  8. package/src/components/CmdBox.vue +15 -9
  9. package/src/components/CmdCookieDisclaimer.vue +38 -9
  10. package/src/components/CmdFakeSelect.vue +11 -19
  11. package/src/components/CmdFancyBox.vue +46 -13
  12. package/src/components/CmdFormElement.vue +29 -32
  13. package/src/components/CmdImageGallery.vue +2 -2
  14. package/src/components/CmdInputGroup.vue +9 -16
  15. package/src/components/CmdLoginForm.vue +80 -103
  16. package/src/components/CmdMainNavigation.vue +6 -6
  17. package/src/components/CmdMultipleSwitch.vue +4 -12
  18. package/src/components/CmdNewsletterSubscription.vue +205 -0
  19. package/src/components/CmdShareButtons.vue +100 -27
  20. package/src/components/{CmdBoxSiteSearch.vue → CmdSiteSearch.vue} +34 -13
  21. package/src/components/CmdSystemMessage.vue +6 -0
  22. package/src/components/CmdTabs.vue +5 -5
  23. package/src/components/CmdThumbnailScroller.vue +9 -1
  24. package/src/components/CmdTooltip.vue +1 -1
  25. package/src/components/CmdTooltipForInputElements.vue +1 -19
  26. package/src/documentation/generated/CmdFancyBoxPropertyDescriptions.json +10 -0
  27. package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +0 -5
  28. package/src/documentation/generated/CmdLoginFormPropertyDescriptions.json +3 -3
  29. package/src/documentation/generated/CmdNewsletterSubscriptionPropertyDescriptions.json +42 -0
  30. package/src/documentation/generated/CmdShareButtonsPropertyDescriptions.json +24 -0
  31. package/src/documentation/generated/CmdSiteSearchPropertyDescriptions.json +79 -0
  32. package/src/documentation/generated/CmdTooltipForInputElementsPropertyDescriptions.json +1 -6
  33. package/src/index.js +1 -1
  34. package/src/mixins/CmdFormElement/DefaultMessageProperties.js +2 -1
  35. package/src/mixins/CmdThumbnailScroller/DefaultMessageProperties.js +9 -0
  36. package/src/mixins/FieldValidation.js +19 -7
  37. package/src/mixins/Identifier.js +28 -0
  38. package/src/utils/common.js +5 -1
@@ -6,12 +6,7 @@
6
6
  },
7
7
  "validationStatus": {
8
8
  "comments": [
9
- "validation-status for CmdSystemMessage-component and CmdTooltip-component"
10
- ]
11
- },
12
- "validationMessage": {
13
- "comments": [
14
- "validation-message for CmdSystemMessage-component"
9
+ "validation-status for CmdTooltip-component"
15
10
  ]
16
11
  },
17
12
  "cmdListOfRequirements": {
package/src/index.js CHANGED
@@ -5,7 +5,6 @@ export { default as CmdAddressData } from '@/components/CmdAddressData'
5
5
  export { default as CmdBackToTopButton } from '@/components/CmdBackToTopButton'
6
6
  export { default as CmdBankAccountData } from '@/components/CmdBankAccountData'
7
7
  export { default as CmdBox } from '@/components/CmdBox'
8
- export { default as CmdBoxSiteSearch } from '@/components/CmdBoxSiteSearch'
9
8
  export { default as CmdBoxWrapper } from '@/components/CmdBoxWrapper'
10
9
  export { default as CmdBreadcrumbs } from '@/components/CmdBreadcrumbs'
11
10
  export { default as CmdCompanyLogo } from '@/components/CmdCompanyLogo'
@@ -31,6 +30,7 @@ export { default as CmdProgressBar } from '@/components/CmdProgressBar'
31
30
  export { default as CmdShareButtons } from '@/components/CmdShareButtons'
32
31
  export { default as CmdSiteFooter } from '@/components/CmdSiteFooter'
33
32
  export { default as CmdSiteHeader } from '@/components/CmdSiteHeader'
33
+ export { default as CmdSiteSearch } from '@/components/CmdSiteSearch'
34
34
  export { default as CmdSlideButton } from '@/components/CmdSlideButton'
35
35
  export { default as CmdSlideshow } from '@/components/CmdSlideshow'
36
36
  export { default as CmdSwitchLanguage } from '@/components/CmdSwitchLanguage'
@@ -6,7 +6,8 @@ export default {
6
6
  "cmdformelement.validationTooltip.an_error_occurred": "An error occurred!",
7
7
  "cmdformelement.validationTooltip.information_is_filled_correctly": "This information is filled correctly!",
8
8
  "cmdformelement.validationTooltip.caps_lock_is_activated": "Attention: Caps lock is activated!",
9
- "cmdformelement.validationTooltip.open_field_requirements": "Open field requirements!"
9
+ "cmdformelement.validationTooltip.open_field_requirements": "Open field requirements!",
10
+ "cmdformelement.validationTooltip.is_valid_email": "Is valid e-mail-address"
10
11
  }
11
12
  }
12
13
  }
@@ -0,0 +1,9 @@
1
+ export default {
2
+ data() {
3
+ return {
4
+ defaultMessageProperties: {
5
+ "cmdthumbnailscroller.tooltip.open_large_image": "Open large image"
6
+ }
7
+ }
8
+ }
9
+ }
@@ -215,25 +215,27 @@ export default {
215
215
  standardRequirements.push({
216
216
  message: this.getRequirementMessage(),
217
217
  valid(value, attributes) {
218
- return (!attributes.required && !inputRequired) || value.length > 0
218
+ return (!attributes.required && !inputRequired) || (value != null && String(value).length > 0)
219
219
  }
220
220
  })
221
221
  }
222
+
222
223
  // check if field has a minimum length
223
224
  if(this.$attrs.minlength) {
224
225
  standardRequirements.push({
225
- message: this.getMessage("cmdfieldvalidation.input_has_minimum_length") + "(" + this.modelValue.length + "/" + this.$attrs.minlength + ")",
226
+ message: this.getMessage("cmdfieldvalidation.input_has_minimum_length") + " (" + this.modelValue.length + "/" + this.$attrs.minlength + ")",
226
227
  valid(value, attributes) {
227
228
  return value.length >= attributes.minlength
228
229
  }
229
230
  })
230
231
  }
231
- // check is field has custom requirements defined
232
- if(!this.customRequirements || !this.customRequirements.length) {
233
- return standardRequirements
234
- }
232
+
235
233
  // duplicate existing requirements into new (combined) array
236
- return [...standardRequirements, ...this.customRequirements]
234
+ return [
235
+ ...standardRequirements,
236
+ ...(this.additionalStandardRequirements() || []),
237
+ ...(this.customRequirements || [])
238
+ ]
237
239
  }
238
240
  },
239
241
  methods: {
@@ -246,9 +248,19 @@ export default {
246
248
  this.validationStatus = ""
247
249
  }
248
250
  },
251
+ additionalStandardRequirements() {
252
+ return []
253
+ },
249
254
  getRequirementMessage() {
250
255
  return this.getMessage("cmdfieldvalidation.required_field_is_filled")
251
256
  }
257
+ },
258
+ watch: {
259
+ validationStatus: {
260
+ handler() {
261
+ this.$emit("validation-status-change", this.validationStatus)
262
+ }
263
+ }
252
264
  }
253
265
  }
254
266
 
@@ -0,0 +1,28 @@
1
+ // import utils
2
+ import {createHtmlId} from "@/utils/common";
3
+
4
+ export default {
5
+ props: {
6
+ /**
7
+ * use as unique id if generated it should not be used
8
+ */
9
+ id: {
10
+ type: String,
11
+ required: false
12
+ }
13
+ },
14
+ computed: {
15
+ htmlId() {
16
+ return this.id || createHtmlId()
17
+ }
18
+ },
19
+ methods: {
20
+ buildHtmlId(...params) {
21
+ return params
22
+ .map(param => {
23
+ return param.replace(/\s/g, "")
24
+ })
25
+ .join("")
26
+ }
27
+ }
28
+ }
@@ -12,4 +12,8 @@ function createUuid(){
12
12
  })
13
13
  }
14
14
 
15
- export {isFrameMode, createUuid}
15
+ function createHtmlId() {
16
+ return "cmd-" + createUuid()
17
+ }
18
+
19
+ export {isFrameMode, createUuid, createHtmlId}