comand-component-library 4.1.42 → 4.1.45

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.
@@ -61,7 +61,6 @@
61
61
  {{ cookie.linkDataPrivacy.linkText }}
62
62
  </a>
63
63
  </p>
64
- <div v-if="dataPrivacyContent" v-html="dataPrivacyContent"></div>
65
64
  </div>
66
65
  </div>
67
66
  <!-- end CmdBox -->
@@ -113,7 +112,6 @@
113
112
  {{ cookie.linkDataPrivacy.linkText }}
114
113
  </a>
115
114
  </p>
116
- <div v-if="dataPrivacyContent" v-html="dataPrivacyContent"></div>
117
115
  </div>
118
116
  </div>
119
117
  </div>
@@ -122,16 +120,16 @@
122
120
  <!-- end slot for cookie-options -->
123
121
 
124
122
  <!-- begin privacy-text -->
125
- <div v-if="privacyText" class="privacy-text" v-html="privacyText"></div>
123
+ <div v-if="showPrivacyText" class="privacy-text" v-html="getMessage('cookie_disclaimer.text.data_privacy')"></div>
126
124
  <!-- end privacy-text-->
127
125
 
128
126
  <!-- begin button-wrapper for 'accept'-buttons -->
129
127
  <div class="button-wrapper align-center">
130
- <button v-if="buttonLabelAcceptCurrentSettings" type="button" @click="acceptCurrentCookies">
131
- <span>{{ buttonLabelAcceptCurrentSettings }}</span>
128
+ <button type="button" @click="acceptCurrentCookies">
129
+ <span>{{ getMessage('cookie_disclaimer.button.accept_current_settings') }}</span>
132
130
  </button>
133
- <button v-if="buttonLabelAcceptAllCookies" type="button" class="primary" @click="acceptAllCookies">
134
- <span>{{ buttonLabelAcceptAllCookies }}</span>
131
+ <button type="button" class="primary" @click="acceptAllCookies">
132
+ <span>{{ getMessage('cookie_disclaimer.button.accept_all_cookies') }}</span>
135
133
  </button>
136
134
  </div>
137
135
  <!-- end button-wrapper for 'accept'-buttons -->
@@ -151,7 +149,6 @@ export default {
151
149
  data() {
152
150
  return {
153
151
  showCookieDisclaimer: true,
154
- dataPrivacyContent: "",
155
152
  openBoxes: []
156
153
  }
157
154
  },
@@ -205,25 +202,11 @@ export default {
205
202
  required: false
206
203
  },
207
204
  /**
208
- * optional privacy-text shown at bottom of cookie-disclaimer
205
+ * toggle visibility of privacy-text
209
206
  */
210
- privacyText: {
211
- type: String,
212
- required: false
213
- },
214
- /**
215
- * label for button to accepting all cookies
216
- */
217
- buttonLabelAcceptAllCookies: {
218
- type: String,
219
- default: "Accept all cookies!"
220
- },
221
- /**
222
- * label for button for accepting current settings
223
- */
224
- buttonLabelAcceptCurrentSettings: {
225
- type: String,
226
- default: "Proceed with current settings!"
207
+ showPrivacyText: {
208
+ type: Boolean,
209
+ default: true
227
210
  }
228
211
  },
229
212
  computed: {
@@ -251,8 +234,8 @@ export default {
251
234
  return {
252
235
  collapsible: true,
253
236
  showHeadline: true,
254
- headlineText: "Required cookies",
255
237
  headlineLevel: 3,
238
+ headlineText: this.getMessage("cookie_disclaimer.headline.required_cookies"),
256
239
  ...this.cookieOptions?.required.cmdHeadline
257
240
  }
258
241
  },
@@ -260,7 +243,7 @@ export default {
260
243
  return {
261
244
  collapsible: true,
262
245
  showHeadline: true,
263
- headlineText: "Optional cookies",
246
+ headlineText: this.getMessage("cookie_disclaimer.headline.optional_cookies"),
264
247
  headlineLevel: 3,
265
248
  ...this.cookieOptions?.optional.cmdHeadline
266
249
  }
@@ -328,7 +311,7 @@ export default {
328
311
  top: auto;
329
312
 
330
313
  .collapsible-box {
331
- border-radius: 1rem;
314
+ border-radius: var(--default-border-radius);
332
315
 
333
316
  header {
334
317
  display: flex;
@@ -545,14 +545,16 @@ export default FancyBox
545
545
  display: flex;
546
546
  }
547
547
 
548
- .cmd-cookie-disclaimer {
549
- padding: 0;
550
- }
551
548
 
552
549
  > .grayscale {
553
550
  filter: grayscale(1);
554
551
  }
555
552
 
553
+ .cmd-cookie-disclaimer {
554
+ max-width: 60rem;
555
+ padding: 0;
556
+ }
557
+
556
558
  .cmd-slide-button {
557
559
  top: 50% !important;
558
560
  height: auto;
@@ -48,6 +48,7 @@
48
48
  v-if="navigationEntry.type === 'router'"
49
49
  :to="getRoute(navigationEntry)"
50
50
  :title="navigationEntry.tooltip"
51
+ @click="closeOffcanvasNavigation"
51
52
  >
52
53
  <!-- begin CmdIcon -->
53
54
  <CmdIcon v-if="navigationEntry.iconClass" :iconClass="navigationEntry.iconClass" :type="navigationEntry.iconType" />
@@ -278,11 +279,11 @@ export default {
278
279
  if(navigationEntry?.subentries?.length) {
279
280
  event.preventDefault()
280
281
  if(!sublevel) {
281
- // assign index for first sub-level (or close if already open)
282
+ // assign index for first sublevel (or close if already open)
282
283
  this.openEntry = this.openEntry === index ? -1 : index
283
284
  this.openSubentry = -1 // close all sub-entries
284
285
  } else {
285
- // assign index for second sub-level (or close if already open)
286
+ // assign index for second sublevel (or close if already open)
286
287
  this.openSubentry = this.openSubentry === index ? -1 : index
287
288
  }
288
289
  return
@@ -291,7 +292,7 @@ export default {
291
292
  // emit event to handle navigation from outside
292
293
  if (navigationEntry.path === '#' || navigationEntry.path === '') {
293
294
  event.preventDefault()
294
- this.$emit('click', navigationEntry.path)
295
+ this.$emit("click", navigationEntry.path)
295
296
  }
296
297
 
297
298
  this.showOffcanvas = false
@@ -494,7 +495,6 @@ export default {
494
495
  &:hover, &:active, &:focus {
495
496
  > ul {
496
497
  display: block;
497
- border: 1px solid red;
498
498
  }
499
499
  }
500
500
  }
@@ -3,19 +3,22 @@
3
3
  <ul>
4
4
  <li v-for="(language, index) in languages" :key="index">
5
5
  <!-- begin link-type 'href' -->
6
- <a v-if="language.link.type === 'href'" :href="language.link.path"
7
- :class="['flag', language.iso2, {'active': activeLanguage(language)}]"
6
+ <a v-if="language.link.type === 'href'"
7
+ :href="language.link.path"
8
+ :class="['flag', language.iso2, {'active': activeLanguage(language.iso2)}]"
8
9
  :title="language.tooltip"
9
- @click="$emit('click', { originalEvent: $event, language} )">
10
+ @click.prevent="changeLanguage(language.iso2, $event)">
10
11
  <img :src="imageSources[index]" :alt="language.name" />
11
12
  </a>
13
+
12
14
  <!-- end link-type 'href' -->
13
15
 
14
16
  <!-- begin link-type 'router' -->
15
17
  <router-link v-else
18
+ :to="getRoute(language)"
16
19
  :class="['flag', language.iso2]"
17
- :to="getRoute(language)" :title="language.tooltip"
18
- @click="$emit('click', { originalEvent: $event, language})">
20
+ :title="language.tooltip"
21
+ @click.prevent="changeLanguage(language.iso2, $event)">
19
22
  <img :src="imageSources[index]" :alt="language.name" />
20
23
  </router-link>
21
24
  <!-- end link-type 'router' -->
@@ -27,12 +30,15 @@
27
30
  <script>
28
31
  import {getRoute} from '../utilities.js'
29
32
  import * as flags from "../assets/images/flags"
33
+ import {switchLanguage} from "@/assets/data/export-data.js";
34
+
30
35
  export default {
31
36
  name: "CmdSwitchLanguage",
32
37
  emits: ["click"],
33
38
  data() {
34
39
  return {
35
- imageSources: []
40
+ imageSources: [],
41
+ currentLanguage: ""
36
42
  }
37
43
  },
38
44
  props: {
@@ -44,12 +50,30 @@ export default {
44
50
  required: true
45
51
  }
46
52
  },
53
+ mounted() {
54
+ this.getInitialLanguage()
55
+ },
47
56
  methods: {
57
+ switchLanguage,
58
+ getInitialLanguage() {
59
+ // assign initially set value for lang in html-tag to data-property
60
+ this.currentLanguage = document.documentElement.lang
61
+ },
48
62
  getRoute(language) {
49
63
  return getRoute(language)
50
64
  },
51
- activeLanguage(language) {
52
- return language.active
65
+ activeLanguage(iso2) {
66
+ return this.currentLanguage === iso2
67
+ },
68
+ changeLanguage(iso2, event) {
69
+ // set selected language as current language (in data-property)
70
+ this.currentLanguage = iso2
71
+
72
+ // set selected language as value for lang in html-tag
73
+ document.documentElement.lang = iso2
74
+
75
+ // emit original event
76
+ this.$emit("click", { originalEvent: event, iso2} )
53
77
  }
54
78
  },
55
79
  watch: {
@@ -62,13 +86,13 @@ export default {
62
86
  const isoCode = item.iso2
63
87
 
64
88
  // get path of current flag
65
- // const path = "../assets/images/flags/flag-" + isoCode + ".svg"
89
+ // const path = "../assets/images/flags/flag-" + isoCode + ".svg"
66
90
 
67
91
  // assign value of imported file (returns object with default-key)
68
- //const { default: dynamicImage } = await import(/* @vite-ignore */ path)
92
+ // const { default: dynamicImage } = await import(/* @vite-ignore */ path)
69
93
 
70
94
  // push image to data-property-array
71
- // this.imageSources.push(dynamicImage)
95
+ // this.imageSources.push(dynamicImage)
72
96
  this.imageSources.push(flags[isoCode].default)
73
97
  }
74
98
  )
@@ -92,13 +116,13 @@ export default {
92
116
  list-style-type: none;
93
117
  margin: 0;
94
118
 
95
- a:not([class*="active"]) {
119
+ a {
96
120
  filter: contrast(.6);
121
+ padding: 0; /* overwrite default settings from frontend-framework for .active */
122
+ background: none; /* overwrite default settings from frontend-framework for .active */
97
123
 
98
124
  &:hover, &:focus-visible, &:active, &.active, &.router-link-active {
99
125
  filter: none;
100
- padding: 0; /* overwrite default settings from frontend-framework for .active */
101
- background: none; /* overwrite default settings from frontend-framework for .active */
102
126
  }
103
127
  }
104
128
  }
@@ -2,9 +2,14 @@ export default {
2
2
  data() {
3
3
  return {
4
4
  defaultMessageProperties: {
5
+ "cookie_disclaimer.headline.required_cookies": "Required cookies",
6
+ "cookie_disclaimer.headline.optional_cookies": "Optional cookies",
5
7
  "cookie_disclaimer.tooltip.cookie_cannot_be_disabled": "This cookie cannot be disabled, because it is required for functionality!",
6
8
  "cookie_disclaimer.tooltip.toggle_to_accept_cookie": "Toggle to accept or reject this cookie!",
7
- "cookie_disclaimer.tooltip.toggle_box_content": "Toggle description visibility"
9
+ "cookie_disclaimer.tooltip.toggle_box_content": "Toggle description visibility",
10
+ "cookie_disclaimer.text.data_privacy": "By browsing this website you accept the usage and saving of anonymous data!",
11
+ "cookie_disclaimer.button.accept_current_settings": "Accept current settings",
12
+ "cookie_disclaimer.button.accept_all_cookies": "Accept all cookies"
8
13
  }
9
14
  }
10
15
  }