comand-component-library 4.3.22 → 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 +1082 -1074
- package/package.json +5 -10
- package/src/ComponentLibrary.vue +1 -1
- package/src/components/CmdAccordion.vue +9 -39
- package/src/components/CmdAccordionsWrapper.vue +2 -4
- 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comand-component-library",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.23",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"author": "CoManD-UI",
|
|
6
6
|
"private": false,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"prepublishOnly": "npm run build-lib",
|
|
10
10
|
"dev": "vite",
|
|
11
11
|
"build": "vite build",
|
|
12
|
-
"build-lib": "vite build
|
|
12
|
+
"build-lib": "vite build",
|
|
13
13
|
"preview": "vite preview"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
@@ -28,23 +28,18 @@
|
|
|
28
28
|
"./us-cities.json": "./src/assets/lists-of-data/us-cities.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"clickout-event": "^1.1.2",
|
|
32
31
|
"comand-frontend-framework": "^4.3.43",
|
|
33
|
-
"comand-ui-iconfonts": "^1.0.
|
|
34
|
-
"core-js": "^3.20.1",
|
|
35
|
-
"prismjs": "^1.27.0",
|
|
32
|
+
"comand-ui-iconfonts": "^1.0.21",
|
|
36
33
|
"vue": "^3.5.25",
|
|
37
|
-
"vue-router": "^4.0.12"
|
|
38
|
-
"vuex": "^4.0.2"
|
|
34
|
+
"vue-router": "^4.0.12"
|
|
39
35
|
},
|
|
40
36
|
"devDependencies": {
|
|
41
37
|
"@iconify/vue": "^4.0.0",
|
|
42
38
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
43
39
|
"@vue/test-utils": "^2.0.0-0",
|
|
44
40
|
"axios": "^1.7.2",
|
|
45
|
-
"gulp": "^4.0.2",
|
|
46
41
|
"sass": "^1.54.9",
|
|
47
|
-
"unplugin-vue-components": "^0.
|
|
42
|
+
"unplugin-vue-components": "^31.0.0",
|
|
48
43
|
"vite": "^7.2.4",
|
|
49
44
|
"vue-jest": "^5.0.0-0"
|
|
50
45
|
}
|
package/src/ComponentLibrary.vue
CHANGED
|
@@ -5,17 +5,9 @@
|
|
|
5
5
|
:name="generateAccordionName"
|
|
6
6
|
>
|
|
7
7
|
<summary :class="{'writing-mode-vertical' : summaryWritingMode === 'vertical'}">
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
<span :class="[cmdIconOpen.iconClass, 'open']" :title="cmdIconOpen.tooltip"></span>
|
|
11
|
-
-->
|
|
12
|
-
<CmdIcon :iconClass="toggleIconIconClass" :class="toggleIconStatus" :tooltip="toggleIconTooltip" />
|
|
8
|
+
<CmdIcon :iconClass="toggleIconIconClassClosed" class="closed" :tooltip="cmdIconClosedRowView.tooltip" />
|
|
9
|
+
<CmdIcon :iconClass="toggleIconIconClassOpen" class="open" :tooltip="cmdIconOpenRowView.tooltip" />
|
|
13
10
|
<CmdHeadline v-bind="cmdHeadlineProperties" />
|
|
14
|
-
<!--
|
|
15
|
-
toggleIconStatus: {{ toggleIconStatus }}<br />
|
|
16
|
-
this.$refs.cmdAccordion?.open: {{ $refs.cmdAccordion?.open }}<br />
|
|
17
|
-
isOpen: {{ isOpen() }}
|
|
18
|
-
-->
|
|
19
11
|
</summary>
|
|
20
12
|
<div class="accordion-body">
|
|
21
13
|
<!-- begin slot-content -->
|
|
@@ -33,9 +25,6 @@ import {createUuid} from "../utils/common.js"
|
|
|
33
25
|
|
|
34
26
|
export default {
|
|
35
27
|
name: "CmdAccordion",
|
|
36
|
-
mounted() {
|
|
37
|
-
console.log("this.$refs.cmdAccordion.open:", this.$refs.cmdAccordion?.open)
|
|
38
|
-
},
|
|
39
28
|
props: {
|
|
40
29
|
/**
|
|
41
30
|
* arranges accordion-content in a row
|
|
@@ -57,7 +46,7 @@ export default {
|
|
|
57
46
|
type: String,
|
|
58
47
|
default: "horizontal",
|
|
59
48
|
validator(value) {
|
|
60
|
-
return value === "horizontal"
|
|
49
|
+
return value === "horizontal" ||
|
|
61
50
|
value === "vertical"
|
|
62
51
|
}
|
|
63
52
|
},
|
|
@@ -111,7 +100,7 @@ export default {
|
|
|
111
100
|
type: Object,
|
|
112
101
|
default() {
|
|
113
102
|
return {
|
|
114
|
-
iconClass: "icon-chevron-one-stripe-
|
|
103
|
+
iconClass: "icon-chevron-one-stripe-left",
|
|
115
104
|
tooltip: "Collapse accordion"
|
|
116
105
|
}
|
|
117
106
|
}
|
|
@@ -174,31 +163,12 @@ export default {
|
|
|
174
163
|
...this.cmdHeadline
|
|
175
164
|
}
|
|
176
165
|
},
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return this.isOpen ? this.cmdIconOpenRowView?.iconClass : this.cmdIconClosedRowView?.iconClass
|
|
180
|
-
} else {
|
|
181
|
-
return this.isOpen ? this.cmdIconOpenColumnView?.iconClass : this.cmdIconClosedColumnView?.iconClass
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
toggleIconStatus() {
|
|
185
|
-
return this.isOpen ? 'open' : 'closed'
|
|
166
|
+
toggleIconIconClassOpen() {
|
|
167
|
+
return this.rowView ? this.cmdIconOpenRowView?.iconClass : this.cmdIconOpenColumnView?.iconClass
|
|
186
168
|
},
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
} else {
|
|
191
|
-
return this.isOpen ? this.cmdIconOpenColumnView?.tooltip : this.cmdIconClosedColumnView?.tooltip
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
methods: {
|
|
196
|
-
isOpen() {
|
|
197
|
-
return this.$refs.cmdAccordion?.open + "test"
|
|
198
|
-
}
|
|
199
|
-
},
|
|
200
|
-
mounted() {
|
|
201
|
-
this.isOpen()
|
|
169
|
+
toggleIconIconClassClosed() {
|
|
170
|
+
return this.rowView ? this.cmdIconClosedRowView?.iconClass : this.cmdIconClosedColumnView?.iconClass
|
|
171
|
+
}
|
|
202
172
|
}
|
|
203
173
|
}
|
|
204
174
|
</script>
|
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|
]">
|
|
21
21
|
<slot
|
|
22
22
|
:collapsingBoxesOpen="collapsingBoxesOpen"
|
|
23
|
-
:boxToggled="boxToggled"
|
|
24
|
-
:boxIsOpen="boxIsOpen"
|
|
25
23
|
:rowView="rowView"
|
|
26
24
|
:openAccordionHasFullWidth="fullWidth"
|
|
27
25
|
:summaryWritingMode="summaryWritingMode"
|
|
@@ -88,7 +86,7 @@ export default {
|
|
|
88
86
|
type: String,
|
|
89
87
|
default: "horizontal",
|
|
90
88
|
validator(value) {
|
|
91
|
-
return value === "horizontal"
|
|
89
|
+
return value === "horizontal" ||
|
|
92
90
|
value === "vertical"
|
|
93
91
|
}
|
|
94
92
|
},
|
|
@@ -138,7 +136,7 @@ export default {
|
|
|
138
136
|
default
|
|
139
137
|
() {
|
|
140
138
|
return {
|
|
141
|
-
iconClass: 'icon-
|
|
139
|
+
iconClass: 'icon-columns',
|
|
142
140
|
tooltip: 'Toggle to row view'
|
|
143
141
|
}
|
|
144
142
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- begin CmdContainer ---------------------------------------------------------------------------------------- -->
|
|
3
|
-
<div class="cmd-container">
|
|
3
|
+
<div :class="['cmd-container', {box: styleAsBox}]">
|
|
4
4
|
<!-- begin CmdHeadline -->
|
|
5
5
|
<CmdHeadline v-if="cmdHeadline" v-bind="cmdHeadline" />
|
|
6
6
|
<!-- end CmdHeadline -->
|
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
export default {
|
|
19
19
|
name: "CmdContainer",
|
|
20
20
|
props: {
|
|
21
|
+
/**
|
|
22
|
+
* style component as a box
|
|
23
|
+
*/
|
|
24
|
+
styleAsBox: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
21
28
|
/** define container-type
|
|
22
29
|
*
|
|
23
30
|
* @affectsStyling: true
|
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}
|