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/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
|
-
"
|
|
32
|
-
"comand-
|
|
33
|
-
"comand-ui-iconfonts": "^1.0.19",
|
|
34
|
-
"core-js": "^3.20.1",
|
|
35
|
-
"prismjs": "^1.27.0",
|
|
31
|
+
"comand-frontend-framework": "^4.3.43",
|
|
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
|
@@ -175,38 +175,41 @@
|
|
|
175
175
|
<a href="#" class="button small icon-cog" title="Open Component Settings"
|
|
176
176
|
@click.prevent="openSettingsSidebar('CmdAccordion')"></a>
|
|
177
177
|
</h2>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
<CmdAccordion ref="CmdAccordion" open :name="accordionData.name"
|
|
179
|
+
:cmdHeadline="{ headlineText: 'Summary (no highlighting)' }"
|
|
180
|
+
:textAccordionBody="accordionData[0].textAccordionBody" v-bind="cmdAccordionSettingsData" />
|
|
181
181
|
<CmdAccordion highlightLevel="primary" :name="accordionData.name"
|
|
182
182
|
:cmdHeadline="{ headlineText: 'Summary (primary highlighting)' }"
|
|
183
|
-
:textAccordionBody="accordionData.textAccordionBody" />
|
|
183
|
+
:textAccordionBody="accordionData[1].textAccordionBody" />
|
|
184
184
|
<CmdAccordion highlightLevel="secondary" :name="accordionData.name"
|
|
185
185
|
:cmdHeadline="{ headlineText: 'Summary (secondary highlighting)' }"
|
|
186
|
-
:textAccordionBody="accordionData.textAccordionBody" />
|
|
186
|
+
:textAccordionBody="accordionData[2].textAccordionBody" />
|
|
187
187
|
<CmdAccordion highlightLevel="tertiary" :name="accordionData.name"
|
|
188
188
|
:cmdHeadline="{ headlineText: 'Summary (tertiary highlighting)' }"
|
|
189
|
-
:textAccordionBody="accordionData.textAccordionBody" />
|
|
189
|
+
:textAccordionBody="accordionData[3].textAccordionBody" />
|
|
190
190
|
</CmdWidthLimitationWrapper>
|
|
191
191
|
<!-- end accordion --------------------------------------------------------------------------------------------------->
|
|
192
192
|
|
|
193
193
|
<!-- begin accordions-wrapper --------------------------------------------------------------------------------------------------->
|
|
194
194
|
<CmdWidthLimitationWrapper>
|
|
195
|
-
<h2 class="headline-demopage" id="section-
|
|
195
|
+
<h2 class="headline-demopage" id="section-accordions-wrapper">
|
|
196
196
|
<span>Accordions-Wrapper</span>
|
|
197
197
|
<a href="#" class="button small icon-cog" title="Open Component Settings"
|
|
198
198
|
@click.prevent="openSettingsSidebar('CmdAccordionsWrapper')"></a>
|
|
199
199
|
</h2>
|
|
200
|
-
<CmdAccordionsWrapper
|
|
200
|
+
<CmdAccordionsWrapper ref="CmdAccordionsWrapper" v-bind="cmdAccordionsWrapperSettingsData">
|
|
201
201
|
<template v-slot="slotProps">
|
|
202
202
|
<CmdAccordion
|
|
203
|
-
v-for="(accordion, index) in
|
|
203
|
+
v-for="(accordion, index) in accordionData"
|
|
204
204
|
:key="index"
|
|
205
205
|
open
|
|
206
|
-
:
|
|
207
|
-
:cmdHeadline="{ headlineText:
|
|
206
|
+
:accordionName="accordion.name"
|
|
207
|
+
:cmdHeadline="{ headlineText: accordion.cmdHeadline.headlineText }"
|
|
208
208
|
:rowView="slotProps.rowView"
|
|
209
|
-
:
|
|
209
|
+
:openAccordionHasFullWidth="slotProps.fullWidth"
|
|
210
|
+
:textAccordionBody="accordion.textAccordionBody"
|
|
211
|
+
:allowMultipleExpandedBoxes="slotProps.allowMultipleExpandedBoxes"
|
|
212
|
+
:summaryWritingMode="slotProps.summaryWritingMode"
|
|
210
213
|
/>
|
|
211
214
|
</template>
|
|
212
215
|
</CmdAccordionsWrapper>
|
|
@@ -1011,7 +1014,7 @@
|
|
|
1011
1014
|
</CmdWidthLimitationWrapper>
|
|
1012
1015
|
<!-- end flexible-scroll-container --------------------------------------------------------------------------------------------------->
|
|
1013
1016
|
|
|
1014
|
-
<!-- begin
|
|
1017
|
+
<!-- begin footnotes --------------------------------------------------------------------------------------------------->
|
|
1015
1018
|
<CmdWidthLimitationWrapper>
|
|
1016
1019
|
<h2 class="headline-demopage" id="section-footnote">
|
|
1017
1020
|
<span>Footnotes</span>
|
|
@@ -1021,18 +1024,15 @@
|
|
|
1021
1024
|
<CmdFootnote
|
|
1022
1025
|
ref="CmdFootnote"
|
|
1023
1026
|
v-bind="cmdFootnoteSettingsData"
|
|
1024
|
-
:
|
|
1025
|
-
descriptionTermType="asterisk"
|
|
1026
|
-
:descriptionData="footnoteData.descriptionData"
|
|
1027
|
+
:descriptionData="footnoteData[0].descriptionData"
|
|
1027
1028
|
/>
|
|
1028
1029
|
<CmdFootnote
|
|
1029
|
-
:
|
|
1030
|
-
descriptionTermType="
|
|
1031
|
-
:descriptionData="footnoteData.descriptionData"
|
|
1030
|
+
:descriptionData="footnoteData[1].descriptionData"
|
|
1031
|
+
:descriptionTermType="footnoteData[1].descriptionTermType"
|
|
1032
1032
|
/>
|
|
1033
1033
|
|
|
1034
1034
|
</CmdWidthLimitationWrapper>
|
|
1035
|
-
<!-- end
|
|
1035
|
+
<!-- end footnotes --------------------------------------------------------------------------------------------------->
|
|
1036
1036
|
|
|
1037
1037
|
<!-- begin forms --------------------------------------------------------------------------------------------------->
|
|
1038
1038
|
<CmdWidthLimitationWrapper>
|
|
@@ -2559,7 +2559,7 @@ export default {
|
|
|
2559
2559
|
|
|
2560
2560
|
.comand-versions {
|
|
2561
2561
|
margin: 0;
|
|
2562
|
-
background: var(--color-scheme-background
|
|
2562
|
+
background: var(--color-scheme-background);
|
|
2563
2563
|
|
|
2564
2564
|
dd {
|
|
2565
2565
|
white-space: nowrap;
|
|
@@ -1,8 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "accordion-name",
|
|
4
|
+
"cmdHeadline": {
|
|
5
|
+
"headlineText": "Summary #1",
|
|
6
|
+
"headlineLevel": 4
|
|
7
|
+
},
|
|
8
|
+
"textAccordionBody": "This is text for accordion body #1!"
|
|
6
9
|
},
|
|
7
|
-
|
|
8
|
-
|
|
10
|
+
{
|
|
11
|
+
"name": "accordion-name",
|
|
12
|
+
"cmdHeadline": {
|
|
13
|
+
"headlineText": "Summary #2",
|
|
14
|
+
"headlineLevel": 4
|
|
15
|
+
},
|
|
16
|
+
"textAccordionBody": "This is text for accordion body #2!"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "accordion-name",
|
|
20
|
+
"cmdHeadline": {
|
|
21
|
+
"headlineText": "Summary #3",
|
|
22
|
+
"headlineLevel": 4
|
|
23
|
+
},
|
|
24
|
+
"textAccordionBody": "This is text for accordion body #3!"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "accordion-name",
|
|
28
|
+
"cmdHeadline": {
|
|
29
|
+
"headlineText": "Summary #4",
|
|
30
|
+
"headlineLevel": 4
|
|
31
|
+
},
|
|
32
|
+
"textAccordionBody": "This is text for accordion body #4!"
|
|
33
|
+
}, {
|
|
34
|
+
"name": "accordion-name",
|
|
35
|
+
"cmdHeadline": {
|
|
36
|
+
"headlineText": "Summary #5",
|
|
37
|
+
"headlineLevel": 4
|
|
38
|
+
},
|
|
39
|
+
"textAccordionBody": "This is text for accordion body #5!"
|
|
40
|
+
}
|
|
41
|
+
]
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"descriptionTermType": "asterisk",
|
|
4
|
+
"descriptionData": [
|
|
5
|
+
"Footnotetext #1",
|
|
6
|
+
"Footnotetext #2",
|
|
7
|
+
"Footnotetext #3"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"descriptionTermType": "number",
|
|
12
|
+
"descriptionData": [
|
|
13
|
+
"Footnotetext #1",
|
|
14
|
+
"Footnotetext #2",
|
|
15
|
+
"Footnotetext #3"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
]
|
|
@@ -11,6 +11,16 @@ export default {
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
cmdAccordionSettingsControls: {
|
|
14
|
+
summaryWritingMode: [
|
|
15
|
+
{
|
|
16
|
+
text: "horizontal (default)",
|
|
17
|
+
value: "horizontal"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
text: "vertical",
|
|
21
|
+
value: "vertical"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
14
24
|
highlightLevel: [
|
|
15
25
|
{
|
|
16
26
|
text: "none (default)",
|
|
@@ -30,6 +40,29 @@ export default {
|
|
|
30
40
|
}
|
|
31
41
|
]
|
|
32
42
|
},
|
|
43
|
+
cmdAccordionsWrapperSettingsData: {
|
|
44
|
+
cmdHeadline: {
|
|
45
|
+
headlineText: "Accordions provided by Slot",
|
|
46
|
+
headlineLevel: 4
|
|
47
|
+
},
|
|
48
|
+
useGap: true,
|
|
49
|
+
useRowViewAsDefault: false,
|
|
50
|
+
fullWidth: true,
|
|
51
|
+
allowUserToToggleOrientation: true,
|
|
52
|
+
allowMultipleExpandedBoxes: false
|
|
53
|
+
},
|
|
54
|
+
cmdAccordionsWrapperSettingsControls: {
|
|
55
|
+
summaryWritingMode: [
|
|
56
|
+
{
|
|
57
|
+
text: "horizontal (default)",
|
|
58
|
+
value: "horizontal"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
text: "vertical",
|
|
62
|
+
value: "vertical"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
33
66
|
cmdAddressDataSettingsData: {
|
|
34
67
|
cmdHeadline: {
|
|
35
68
|
headlineText: "Address Data",
|
|
@@ -40,7 +73,8 @@ export default {
|
|
|
40
73
|
showLabelTexts: false,
|
|
41
74
|
showIconsOnly: false,
|
|
42
75
|
showLabels: true,
|
|
43
|
-
showCityBeforeZip: false
|
|
76
|
+
showCityBeforeZip: false,
|
|
77
|
+
styleAsBox: false
|
|
44
78
|
},
|
|
45
79
|
cmdAddressDataSettingsControls: {
|
|
46
80
|
contentOrientation: [
|
|
@@ -60,7 +94,8 @@ export default {
|
|
|
60
94
|
headlineLevel: 3
|
|
61
95
|
},
|
|
62
96
|
allowCopyByClick: false,
|
|
63
|
-
additionalInformation: ""
|
|
97
|
+
additionalInformation: "",
|
|
98
|
+
styleAsBox: false
|
|
64
99
|
},
|
|
65
100
|
cmdBreadcrumbsSettingsData: {
|
|
66
101
|
breadcrumbLabel: "You are here:",
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- begin CmdAccordion ---------------------------------------------------------------------------------------- -->
|
|
3
|
-
<details ref="cmdAccordion"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<CmdIcon :iconClass="
|
|
3
|
+
<details ref="cmdAccordion"
|
|
4
|
+
:class="['cmd-accordion', highlightLevel, { 'flex-container no-gap' : rowView, 'stretch-to-full-width': openAccordionHasFullWidth }]"
|
|
5
|
+
:name="generateAccordionName"
|
|
6
|
+
>
|
|
7
|
+
<summary :class="{'writing-mode-vertical' : summaryWritingMode === 'vertical'}">
|
|
8
|
+
<CmdIcon :iconClass="toggleIconIconClassClosed" class="closed" :tooltip="cmdIconClosedRowView.tooltip" />
|
|
9
|
+
<CmdIcon :iconClass="toggleIconIconClassOpen" class="open" :tooltip="cmdIconOpenRowView.tooltip" />
|
|
10
10
|
<CmdHeadline v-bind="cmdHeadlineProperties" />
|
|
11
|
-
<!--
|
|
12
|
-
toggleIconStatus: {{ toggleIconStatus }}<br />
|
|
13
|
-
this.$refs.cmdAccordion?.open: {{ $refs.cmdAccordion?.open }}<br />
|
|
14
|
-
isOpen: {{ isOpen() }}
|
|
15
|
-
-->
|
|
16
11
|
</summary>
|
|
17
12
|
<div class="accordion-body">
|
|
18
13
|
<!-- begin slot-content -->
|
|
@@ -26,11 +21,10 @@
|
|
|
26
21
|
</template>
|
|
27
22
|
|
|
28
23
|
<script>
|
|
24
|
+
import {createUuid} from "../utils/common.js"
|
|
25
|
+
|
|
29
26
|
export default {
|
|
30
27
|
name: "CmdAccordion",
|
|
31
|
-
mounted() {
|
|
32
|
-
console.log("this.$refs.cmdAccordion.open:", this.$refs.cmdAccordion?.open)
|
|
33
|
-
},
|
|
34
28
|
props: {
|
|
35
29
|
/**
|
|
36
30
|
* arranges accordion-content in a row
|
|
@@ -52,7 +46,7 @@ export default {
|
|
|
52
46
|
type: String,
|
|
53
47
|
default: "horizontal",
|
|
54
48
|
validator(value) {
|
|
55
|
-
return value === "horizontal"
|
|
49
|
+
return value === "horizontal" ||
|
|
56
50
|
value === "vertical"
|
|
57
51
|
}
|
|
58
52
|
},
|
|
@@ -78,6 +72,15 @@ export default {
|
|
|
78
72
|
type: String,
|
|
79
73
|
required: false
|
|
80
74
|
},
|
|
75
|
+
/**
|
|
76
|
+
* open accordion uses remaining space in accordions-wrapper
|
|
77
|
+
*
|
|
78
|
+
* rowView must be false
|
|
79
|
+
*/
|
|
80
|
+
openAccordionHasFullWidth: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: true
|
|
83
|
+
},
|
|
81
84
|
/**
|
|
82
85
|
* properties for CmdIcon-component if accordion is collapsed/closed
|
|
83
86
|
*/
|
|
@@ -97,7 +100,7 @@ export default {
|
|
|
97
100
|
type: Object,
|
|
98
101
|
default() {
|
|
99
102
|
return {
|
|
100
|
-
iconClass: "icon-chevron-one-stripe-
|
|
103
|
+
iconClass: "icon-chevron-one-stripe-left",
|
|
101
104
|
tooltip: "Collapse accordion"
|
|
102
105
|
}
|
|
103
106
|
}
|
|
@@ -130,9 +133,18 @@ export default {
|
|
|
130
133
|
* accordion-name is required if multiple-accrdion-boxes should be connect (name must be identical)
|
|
131
134
|
*/
|
|
132
135
|
accordionName: {
|
|
133
|
-
type:
|
|
136
|
+
type: String,
|
|
134
137
|
required: false
|
|
135
138
|
},
|
|
139
|
+
/**
|
|
140
|
+
* multiple boxes can be expanded if activated
|
|
141
|
+
*
|
|
142
|
+
* accordionName-property must have different value or kept empty for each accordion-box in wrapper
|
|
143
|
+
*/
|
|
144
|
+
allowMultipleExpandedBoxes: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
default: false
|
|
147
|
+
},
|
|
136
148
|
/**
|
|
137
149
|
* properties for CmdHeadline-component
|
|
138
150
|
*/
|
|
@@ -142,34 +154,21 @@ export default {
|
|
|
142
154
|
}
|
|
143
155
|
},
|
|
144
156
|
computed: {
|
|
157
|
+
generateAccordionName() {
|
|
158
|
+
return this.allowMultipleExpandedBoxes ? this.accordionName + "-" + createUuid() : this.accordionName
|
|
159
|
+
},
|
|
145
160
|
cmdHeadlineProperties() {
|
|
146
161
|
return {
|
|
147
162
|
headlineLevel: 4,
|
|
148
163
|
...this.cmdHeadline
|
|
149
164
|
}
|
|
150
165
|
},
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
return this.isOpen ? this.cmdIconOpenRowView?.iconClass : this.cmdIconClosedRowView?.iconClass
|
|
154
|
-
} else {
|
|
155
|
-
return this.isOpen ? this.cmdIconOpenColumnView?.iconClass : this.cmdIconClosedColumnView?.iconClass
|
|
156
|
-
}
|
|
157
|
-
},
|
|
158
|
-
toggleIconStatus() {
|
|
159
|
-
return this.isOpen ? 'open' : 'closed'
|
|
166
|
+
toggleIconIconClassOpen() {
|
|
167
|
+
return this.rowView ? this.cmdIconOpenRowView?.iconClass : this.cmdIconOpenColumnView?.iconClass
|
|
160
168
|
},
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
} else {
|
|
165
|
-
return this.isOpen ? this.cmdIconOpenColumnView?.tooltip : this.cmdIconClosedColumnView?.tooltip
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
methods: {
|
|
170
|
-
isOpen() {
|
|
171
|
-
return this.$refs.cmdAccordion?.open + "test"
|
|
172
|
-
}
|
|
169
|
+
toggleIconIconClassClosed() {
|
|
170
|
+
return this.rowView ? this.cmdIconClosedRowView?.iconClass : this.cmdIconClosedColumnView?.iconClass
|
|
171
|
+
}
|
|
173
172
|
}
|
|
174
173
|
}
|
|
175
174
|
</script>
|
|
@@ -189,12 +188,16 @@ export default {
|
|
|
189
188
|
summary {
|
|
190
189
|
border: 0;
|
|
191
190
|
}
|
|
191
|
+
|
|
192
|
+
&.stretch-to-full-width {
|
|
193
|
+
flex: 1; /* stretch accordion-body over remaining (horizontal) space in accordion-wrapper */
|
|
194
|
+
}
|
|
192
195
|
}
|
|
193
196
|
|
|
194
197
|
summary.writing-mode-vertical {
|
|
195
198
|
writing-mode: vertical-rl;
|
|
196
199
|
transform: rotate(180deg);
|
|
197
|
-
}
|
|
200
|
+
}
|
|
198
201
|
}
|
|
199
202
|
/* end rowView */
|
|
200
203
|
|
|
@@ -2,31 +2,28 @@
|
|
|
2
2
|
<!-- begin CmdBoxWrapper ---------------------------------------------------------------------------------------- -->
|
|
3
3
|
<div class="cmd-accordions-wrapper">
|
|
4
4
|
<div v-if="cmdHeadline.headlineText || allowUserToToggleOrientation" class="flex-container headline-wrapper">
|
|
5
|
-
<!-- begin CmdHeadline -->
|
|
6
5
|
<CmdHeadline v-if="cmdHeadline.headlineText" v-bind="cmdHeadline" />
|
|
7
|
-
<!-- end CmdHeadline -->
|
|
8
6
|
|
|
7
|
+
<!-- begin toggle orientation TODO: replace by CmdLink -->
|
|
9
8
|
<div v-if="allowUserToToggleOrientation" class="options-wrapper">
|
|
10
|
-
<a href="#" @click.prevent="toggleOrientation" :title="rowView ? iconRowView.tooltip : iconColumnView.tooltip">
|
|
11
|
-
<!-- begin CmdIcon -->
|
|
9
|
+
<a href="#" @click.prevent="toggleOrientation" class="toggle-orientation" :title="rowView ? iconRowView.tooltip : iconColumnView.tooltip">
|
|
12
10
|
<CmdIcon :iconClass="rowView ? iconColumnView.iconClass : iconRowView.iconClass" :type="rowView ? iconColumnView.iconType : iconRowView.iconType" />
|
|
13
|
-
<!-- end CmdIcon -->
|
|
14
11
|
</a>
|
|
15
12
|
</div>
|
|
13
|
+
<!-- begin end orientation -->
|
|
16
14
|
</div>
|
|
17
|
-
<div :class="['inner-accordions-wrapper',
|
|
15
|
+
<div :class="['inner-accordions-wrapper flex-container',
|
|
18
16
|
{
|
|
19
17
|
'no-gap': !useGap,
|
|
20
|
-
'flex-
|
|
18
|
+
'flex-direction-column' : !rowView
|
|
21
19
|
}
|
|
22
20
|
]">
|
|
23
21
|
<slot
|
|
24
22
|
:collapsingBoxesOpen="collapsingBoxesOpen"
|
|
25
|
-
:boxToggled="boxToggled"
|
|
26
|
-
:boxIsOpen="boxIsOpen"
|
|
27
23
|
:rowView="rowView"
|
|
24
|
+
:openAccordionHasFullWidth="fullWidth"
|
|
28
25
|
:summaryWritingMode="summaryWritingMode"
|
|
29
|
-
|
|
26
|
+
:allowMultipleExpandedBoxes="allowMultipleExpandedBoxes"
|
|
30
27
|
>
|
|
31
28
|
</slot>
|
|
32
29
|
</div>
|
|
@@ -55,7 +52,6 @@ export default {
|
|
|
55
52
|
type: Array,
|
|
56
53
|
required: false
|
|
57
54
|
},
|
|
58
|
-
|
|
59
55
|
/**
|
|
60
56
|
* activate if a gap between boxes should be used
|
|
61
57
|
*/
|
|
@@ -70,6 +66,15 @@ export default {
|
|
|
70
66
|
type: Boolean,
|
|
71
67
|
default: false
|
|
72
68
|
},
|
|
69
|
+
/**
|
|
70
|
+
* open accordion uses remaining space in accordions-wrapper
|
|
71
|
+
*
|
|
72
|
+
* rowView must be false
|
|
73
|
+
*/
|
|
74
|
+
fullWidth: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: true
|
|
77
|
+
},
|
|
73
78
|
/**
|
|
74
79
|
* set direction of text for summary
|
|
75
80
|
*
|
|
@@ -81,7 +86,7 @@ export default {
|
|
|
81
86
|
type: String,
|
|
82
87
|
default: "horizontal",
|
|
83
88
|
validator(value) {
|
|
84
|
-
return value === "horizontal"
|
|
89
|
+
return value === "horizontal" ||
|
|
85
90
|
value === "vertical"
|
|
86
91
|
}
|
|
87
92
|
},
|
|
@@ -131,7 +136,7 @@ export default {
|
|
|
131
136
|
default
|
|
132
137
|
() {
|
|
133
138
|
return {
|
|
134
|
-
iconClass: 'icon-
|
|
139
|
+
iconClass: 'icon-columns',
|
|
135
140
|
tooltip: 'Toggle to row view'
|
|
136
141
|
}
|
|
137
142
|
}
|
|
@@ -165,40 +170,9 @@ export default {
|
|
|
165
170
|
methods: {
|
|
166
171
|
toggleOrientation() {
|
|
167
172
|
this.rowView = !this.rowView
|
|
168
|
-
this.oneBoxPerRow = this.rowView
|
|
169
|
-
},
|
|
170
|
-
boxIsOpen(index) {
|
|
171
|
-
return this.currentOpenBox.includes(index)
|
|
172
|
-
},
|
|
173
|
-
toggleCollapsingBoxes() {
|
|
174
|
-
this.collapsingBoxesOpen = !this.collapsingBoxesOpen
|
|
175
|
-
},
|
|
176
|
-
boxToggled(boxIndex, open) {
|
|
177
|
-
if(this.allowMultipleExpandedBoxes) {
|
|
178
|
-
if(open) {
|
|
179
|
-
this.currentOpenBox.push(boxIndex)
|
|
180
|
-
} else {
|
|
181
|
-
// remove boxIndex from array to close specific box
|
|
182
|
-
let position = this.currentOpenBox.indexOf(boxIndex)
|
|
183
|
-
this.currentOpenBox.splice(position, 1)
|
|
184
|
-
}
|
|
185
|
-
} else {
|
|
186
|
-
this.currentOpenBox = []
|
|
187
|
-
|
|
188
|
-
// add current boxIndex to array to open specific box
|
|
189
|
-
if(open) {
|
|
190
|
-
this.currentOpenBox.push(boxIndex)
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
173
|
}
|
|
194
174
|
},
|
|
195
175
|
watch: {
|
|
196
|
-
openBoxesByDefault: {
|
|
197
|
-
handler() {
|
|
198
|
-
this.currentOpenBox = [...this.openBoxesByDefault || []]
|
|
199
|
-
},
|
|
200
|
-
immediate: true
|
|
201
|
-
},
|
|
202
176
|
useRowViewAsDefault: {
|
|
203
177
|
handler() {
|
|
204
178
|
this.oneBoxPerRow = this.useRowViewAsDefault
|
|
@@ -212,11 +186,37 @@ export default {
|
|
|
212
186
|
<style>
|
|
213
187
|
/* begin cmd-accordions-wrapper ---------------------------------------------------------------------------------------- */
|
|
214
188
|
.cmd-accordions-wrapper {
|
|
189
|
+
.headline-wrapper {
|
|
190
|
+
align-items: center;
|
|
191
|
+
|
|
192
|
+
.options-wrapper {
|
|
193
|
+
flex: none;
|
|
194
|
+
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
215
198
|
.inner-accordions-wrapper {
|
|
216
199
|
.cmd-accordion {
|
|
217
200
|
flex: none;
|
|
218
201
|
}
|
|
219
202
|
}
|
|
220
203
|
}
|
|
204
|
+
</style>
|
|
205
|
+
|
|
206
|
+
<style lang="scss">
|
|
207
|
+
@import '../assets/styles/variables';
|
|
208
|
+
|
|
209
|
+
@media only screen and (max-width: $medium-max-width) {
|
|
210
|
+
.cmd-accordions-wrapper {
|
|
211
|
+
.toggle-orientation {
|
|
212
|
+
display: none; /* hide button, because accordions are displayed vertically only at this screen-resolution */
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.inner-accordions-wrapper {
|
|
216
|
+
flex-direction: column; /* force accordions to be displayed vertically */
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
221
220
|
/* end cmd-accordions-wrapper ---------------------------------------------------------------------------------------- */
|
|
222
|
-
</style>
|
|
221
|
+
</style>
|
|
222
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- begin CmdAddressData ---------------------------------------------------------------------------------------- -->
|
|
3
|
-
<div class="cmd-address-data vcard">
|
|
3
|
+
<div :class="['cmd-address-data vcard', {box: styleAsBox}]">
|
|
4
4
|
<!-- begin slot -->
|
|
5
5
|
<template v-if="useSlot">
|
|
6
6
|
<slot></slot>
|
|
@@ -184,6 +184,13 @@ export default {
|
|
|
184
184
|
name: "CmdAddressData",
|
|
185
185
|
mixins: [EditMode],
|
|
186
186
|
props: {
|
|
187
|
+
/**
|
|
188
|
+
* style component as a box
|
|
189
|
+
*/
|
|
190
|
+
styleAsBox: {
|
|
191
|
+
type: Boolean,
|
|
192
|
+
default: false
|
|
193
|
+
},
|
|
187
194
|
/**
|
|
188
195
|
* activate if you want to use slot instead for given structure
|
|
189
196
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- begin CmdBankAccountData ---------------------------------------------------------------------------------------- -->
|
|
3
|
-
<div class="cmd-bank-account-data">
|
|
3
|
+
<div :class="['cmd-bank-account-data', {box: styleAsBox}]">
|
|
4
4
|
<!-- begin slot -->
|
|
5
5
|
<template v-if="useSlot">
|
|
6
6
|
<slot></slot>
|
|
@@ -41,6 +41,13 @@
|
|
|
41
41
|
export default {
|
|
42
42
|
name: "CmdBankAccountData",
|
|
43
43
|
props: {
|
|
44
|
+
/**
|
|
45
|
+
* style component as a box
|
|
46
|
+
*/
|
|
47
|
+
styleAsBox: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false
|
|
50
|
+
},
|
|
44
51
|
/**
|
|
45
52
|
* activate if you want to use slot instead for given structure
|
|
46
53
|
*/
|
|
@@ -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
|