comand-component-library 4.3.21 → 4.3.23

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.
@@ -62,7 +62,7 @@ export default {
62
62
  */
63
63
  cmdHeadline: {
64
64
  type: Object,
65
- default: false
65
+ required: false
66
66
  }
67
67
  },
68
68
  computed: {
package/src/index.js CHANGED
@@ -76,6 +76,7 @@ export { default as DirFancybox } from '@/directives/fancybox'
76
76
  export { createUuid, createHtmlId } from '@/utils/common'
77
77
  export { getFileExtension } from '@/utils/getFileExtension'
78
78
  export { capitalizeFirstLetter, lowercaseFirstLetter, fullName } from '@/utils/string'
79
+ export { responsiveBodyClasses } from '@/utils/dom'
79
80
  export { setCookieDisclaimerCookie, getCookieDisclaimerCookie } from '@/utils/cookie'
80
81
  export { currentDate, currentTime, getDate, getWeekday, formatDate, formatTime } from "@/utils/date"
81
82
 
package/src/main.js CHANGED
@@ -5,9 +5,6 @@ import { createApp } from "vue"
5
5
 
6
6
  import ComponentLibrary from "./ComponentLibrary.vue"
7
7
 
8
- //import { createRouter, createWebHistory } from "vue-router"
9
- import "clickout-event"
10
-
11
8
  /* begin import directives ---------------------------------------------------------------------------------------- */
12
9
  // directive to format telephone- and fax-number
13
10
  import directiveTelephone from "./directives/telephone"
package/src/utils/dom.js CHANGED
@@ -5,4 +5,31 @@ function getOffsetTop(el) {
5
5
  return el.offsetTop
6
6
  }
7
7
 
8
- export {getOffsetTop}
8
+ function responsiveBodyClasses() {
9
+ // function to detect device width and add appropriate class
10
+ function updateBodyClass() {
11
+ const body = document.body
12
+
13
+ // Remove any previous width-based classes
14
+ body.classList.remove('device-width-large', 'device-width-medium', 'device-width-small')
15
+
16
+ // Add class based on width
17
+ if (window.innerWidth <= 600) {
18
+ body.classList.add('device-width-small')
19
+ } else if (window.innerWidth <= 1024) {
20
+ body.classList.add('device-width-medium')
21
+ } else {
22
+ body.classList.add('device-width-large')
23
+ }
24
+ }
25
+
26
+ // initial class assignment
27
+ updateBodyClass()
28
+
29
+ // update the class on window resize
30
+ window.addEventListener('resize', function() {
31
+ updateBodyClass()
32
+ });
33
+ }
34
+
35
+ export {responsiveBodyClasses, getOffsetTop}