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.
- package/dist/comand-component-library.css +1 -1
- package/dist/comand-component-library.js +1613 -1491
- package/package.json +6 -11
- package/src/ComponentLibrary.vue +21 -21
- package/src/assets/data/accordion-data.json +40 -7
- package/src/assets/data/footnote.json +18 -8
- package/src/assets/data/listOfComponents.json +1 -0
- package/src/componentSettingsDataAndControls.vue +37 -2
- package/src/components/CmdAccordion.vue +43 -40
- package/src/components/CmdAccordionsWrapper.vue +45 -45
- package/src/components/CmdAddressData.vue +8 -1
- package/src/components/CmdBankAccountData.vue +8 -1
- package/src/components/CmdContainer.vue +8 -1
- package/src/components/CmdSection.vue +1 -1
- package/src/index.js +1 -0
- package/src/main.js +0 -3
- package/src/utils/dom.js +28 -1
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
|
-
|
|
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}
|