comand-component-library 3.1.88 → 3.1.91
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.
- package/dist/comand-component-library.css +1 -1
- package/dist/comand-component-library.umd.min.js +1 -1
- package/package.json +2 -2
- package/src/App.vue +88 -17
- package/src/assets/data/main-navigation.json +1 -0
- package/src/assets/data/opening-hours.json +1 -1
- package/src/assets/data/tabs.json +1 -0
- package/src/assets/styles/global-styles.scss +6 -0
- package/src/components/CmdBankAccountData.vue +3 -2
- package/src/components/CmdBox.vue +12 -7
- package/src/components/CmdBoxSiteSearch.vue +2 -1
- package/src/components/CmdCookieDisclaimer.vue +19 -6
- package/src/components/CmdFakeSelect.vue +11 -19
- package/src/components/CmdFancyBox.vue +46 -13
- package/src/components/CmdFormElement.vue +17 -29
- package/src/components/CmdImageGallery.vue +2 -2
- package/src/components/CmdInputGroup.vue +9 -16
- package/src/components/CmdLoginForm.vue +1 -1
- package/src/components/CmdMainNavigation.vue +30 -48
- package/src/components/CmdMultipleSwitch.vue +4 -12
- package/src/components/CmdNewsletterSubscription.vue +199 -0
- package/src/components/CmdOpeningHours.vue +31 -7
- package/src/components/CmdShareButtons.vue +100 -27
- package/src/components/CmdSiteHeader.vue +2 -1
- package/src/components/CmdSystemMessage.vue +6 -0
- package/src/components/CmdTabs.vue +9 -6
- package/src/components/CmdThumbnailScroller.vue +9 -1
- package/src/components/CmdTooltip.vue +1 -1
- package/src/components/CmdWidthLimitationWrapper.vue +2 -2
- package/src/directives/scrollPadding.js +6 -0
- package/src/documentation/generated/CmdFancyBoxPropertyDescriptions.json +10 -0
- package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +0 -5
- package/src/documentation/generated/CmdNewsletterSubscriptionPropertyDescriptions.json +42 -0
- package/src/documentation/generated/CmdOpeningHoursPropertyDescriptions.json +5 -0
- package/src/documentation/generated/CmdShareButtonsPropertyDescriptions.json +24 -0
- package/src/main.js +3 -1
- package/src/mixins/CmdThumbnailScroller/DefaultMessageProperties.js +9 -0
- package/src/mixins/FieldValidation.js +10 -3
- package/src/mixins/I18n.js +3 -2
- package/src/mixins/Identifier.js +28 -0
- package/src/utils/common.js +5 -1
@@ -1,4 +1,9 @@
|
|
1
1
|
{
|
2
|
+
"modelValue": {
|
3
|
+
"comments": [
|
4
|
+
"set default v-model (must be named modelValue in Vue3)"
|
5
|
+
]
|
6
|
+
},
|
2
7
|
"align": {
|
3
8
|
"comments": [
|
4
9
|
"set horizontal alignment"
|
@@ -30,5 +35,24 @@
|
|
30
35
|
"comments": [
|
31
36
|
"activate if page to share is not given by json-data"
|
32
37
|
]
|
38
|
+
},
|
39
|
+
"userMustAcceptDataPrivacy": {
|
40
|
+
"comments": [
|
41
|
+
"toggle if user has to accept that anonymous data will be send while sharing"
|
42
|
+
]
|
43
|
+
},
|
44
|
+
"tooltipAcceptDataPrivacy": {
|
45
|
+
"comments": [
|
46
|
+
"tooltip shown on hovering disabled buttons",
|
47
|
+
"",
|
48
|
+
"userMustAcceptDataPrivacy-property must be activated"
|
49
|
+
]
|
50
|
+
},
|
51
|
+
"cmdFormElement": {
|
52
|
+
"comments": [
|
53
|
+
"properties for cmdFormElement",
|
54
|
+
"",
|
55
|
+
"userMustAcceptDataPrivacy-property must be activated"
|
56
|
+
]
|
33
57
|
}
|
34
58
|
}
|
package/src/main.js
CHANGED
@@ -23,6 +23,8 @@ import "clickout-event"
|
|
23
23
|
import directiveTelephone from "./directives/telephone"
|
24
24
|
// directive to set focus on specific form-elements
|
25
25
|
import directiveFocus from "./directives/focus"
|
26
|
+
// directive to set scroll-padding to place anchors correctly below sticky header
|
27
|
+
import directiveScrollPadding from "./directives/scrollPadding"
|
26
28
|
|
27
29
|
/* begin imports css from comand-component-library ---------------------------------------------------------------------------------------- */
|
28
30
|
/* import additional iconfont containing company-logos */
|
@@ -58,4 +60,4 @@ import router from "./router"
|
|
58
60
|
// })
|
59
61
|
|
60
62
|
// createApp(App).use(router).directive('telephone', directiveTelephone).directive('focus', directiveFocus).mount('#app')
|
61
|
-
createApp(App).use(router).directive('telephone', directiveTelephone).directive('focus', directiveFocus).mount('#app')
|
63
|
+
createApp(App).use(router).directive('telephone', directiveTelephone).directive('focus', directiveFocus).directive('scrollPadding', directiveScrollPadding).mount('#app')
|
@@ -210,12 +210,12 @@ export default {
|
|
210
210
|
inputRequirements() {
|
211
211
|
const standardRequirements = []
|
212
212
|
// check if field is required
|
213
|
-
if(this.$attrs.required || this.required) {
|
214
|
-
const inputRequired = this.required
|
213
|
+
if(this.$attrs.required || (Object.hasOwn(this, "required") && this.required)) {
|
214
|
+
const inputRequired = Object.hasOwn(this, "required") ? this.required : this.$attrs.required
|
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
|
}
|
@@ -249,6 +249,13 @@ export default {
|
|
249
249
|
getRequirementMessage() {
|
250
250
|
return this.getMessage("cmdfieldvalidation.required_field_is_filled")
|
251
251
|
}
|
252
|
+
},
|
253
|
+
watch: {
|
254
|
+
validationStatus: {
|
255
|
+
handler() {
|
256
|
+
this.$emit("validation-status-change", this.validationStatus)
|
257
|
+
}
|
258
|
+
}
|
252
259
|
}
|
253
260
|
}
|
254
261
|
|
package/src/mixins/I18n.js
CHANGED
@@ -53,10 +53,11 @@ export default {
|
|
53
53
|
return message
|
54
54
|
},
|
55
55
|
getDefaultMessageProperty(key) {
|
56
|
-
if (this.defaultMessageProperties && this.defaultMessageProperties[key]) {
|
56
|
+
if (Object.hasOwn(this, "defaultMessageProperties") && this.defaultMessageProperties && this.defaultMessageProperties[key]) {
|
57
57
|
return this.defaultMessageProperties[key]
|
58
58
|
}
|
59
|
-
const propertyKey = Object.keys(this).find(p => p.slice(-24) === "DefaultMessageProperties")
|
59
|
+
//const propertyKey = Object.keys(this).find(p => p.slice(-24) === "DefaultMessageProperties")
|
60
|
+
const propertyKey = Object.hasOwn(this, "fieldValidationDefaultMessageProperties") ? "fieldValidationDefaultMessageProperties" : null
|
60
61
|
if (propertyKey && this[propertyKey]?.[key]) {
|
61
62
|
return this[propertyKey][key]
|
62
63
|
}
|
@@ -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
|
+
}
|