comand-component-library 3.1.45 → 3.1.46
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/comand-component-library.css +1 -1
- package/dist/comand-component-library.umd.min.js +1 -1
- package/package.json +47 -41
- package/src/App.vue +373 -135
- package/src/ComponentDocumentation.vue +156 -0
- package/src/ComponentLibraryHelp.vue +20 -0
- package/src/assets/data/accordion.json +21 -24
- package/src/assets/data/address-data.json +34 -0
- package/src/assets/data/bank-account-data.json +22 -0
- package/src/assets/data/box-product.json +14 -4
- package/src/assets/data/box-user.json +48 -22
- package/src/assets/data/breadcrumbs.json +11 -3
- package/src/assets/data/cookie-disclaimer.json +4 -4
- package/src/assets/data/fake-select-colors.json +4 -0
- package/src/assets/data/fake-select-filter-options.json +14 -0
- package/src/assets/data/fake-select-options-with-icons.json +6 -12
- package/src/assets/data/fake-select-options.json +3 -3
- package/src/assets/data/list-of-links-section-anchors.json +23 -0
- package/src/assets/data/list-of-links-top-header-navigation.json +20 -0
- package/src/assets/data/list-of-links.json +42 -0
- package/src/assets/data/main-navigation.json +48 -0
- package/src/assets/data/multistep-form-progress-bar.json +33 -0
- package/src/assets/data/select-options.json +4 -0
- package/src/assets/data/{share-buttons.json → share-buttons-page-by-json.json} +8 -8
- package/src/assets/data/share-buttons-page-by-property.json +30 -0
- package/src/assets/data/switch-language.json +20 -0
- package/src/assets/data/table-large.json +1 -1
- package/src/assets/data/table-small.json +1 -1
- package/src/assets/styles/global-styles.scss +43 -13
- package/src/assets/styles/transitions.scss +21 -1
- package/src/components/CmdAccordion.vue +43 -42
- package/src/components/CmdAddressData.vue +124 -56
- package/src/components/CmdBackToTopButton.vue +3 -3
- package/src/components/CmdBankAccountData.vue +104 -0
- package/src/components/CmdBox.vue +253 -56
- package/src/components/CmdBoxSiteSearch.vue +138 -39
- package/src/components/CmdBoxWrapper.vue +206 -0
- package/src/components/CmdBreadcrumbs.vue +29 -13
- package/src/components/CmdCompanyLogo.vue +6 -4
- package/src/components/CmdCookieDisclaimer.vue +99 -75
- package/src/components/CmdCopyrightInformation.vue +1 -1
- package/src/components/CmdCustomHeadline.vue +93 -0
- package/src/components/CmdFakeSelect.vue +285 -60
- package/src/components/CmdFancyBox.vue +47 -33
- package/src/components/CmdForm.vue +107 -0
- package/src/components/CmdFormElement.vue +515 -81
- package/src/components/CmdFormFilters.vue +25 -11
- package/src/components/CmdGoogleMaps.vue +9 -3
- package/src/components/CmdImageGallery.vue +28 -5
- package/src/components/CmdImageZoom.vue +9 -1
- package/src/components/CmdListOfLinks.vue +169 -0
- package/src/components/CmdLoginForm.vue +143 -63
- package/src/components/CmdMainNavigation.vue +140 -42
- package/src/components/CmdMultipleSwitch.vue +33 -2
- package/src/components/CmdMultistepFormProgressBar.vue +60 -10
- package/src/components/CmdOpeningHours.vue +36 -10
- package/src/components/CmdPager.vue +7 -5
- package/src/components/CmdProgressBar.vue +20 -3
- package/src/components/CmdShareButtons.vue +64 -9
- package/src/components/CmdSiteHeader.vue +25 -12
- package/src/components/CmdSlideButton.vue +5 -2
- package/src/components/CmdSlideshow.vue +23 -7
- package/src/components/CmdSwitchButton.vue +10 -3
- package/src/components/CmdSwitchLanguage.vue +18 -10
- package/src/components/CmdSystemMessage.vue +30 -17
- package/src/components/CmdTable.vue +15 -7
- package/src/components/CmdTabs.vue +43 -3
- package/src/components/CmdThumbnailScroller.vue +22 -6
- package/src/components/CmdTooltip.vue +184 -11
- package/src/components/CmdUploadForm.vue +198 -92
- package/src/components/CmdWidthLimitationWrapper.vue +9 -6
- package/src/composables/event.js +8 -0
- package/src/composables/scrollspy.js +52 -0
- package/src/directives/focus.js +19 -0
- package/src/directives/telephone.js +1 -1
- package/src/documentation/commonProps.js +6 -0
- package/src/documentation/components/ComponentCode.vue +50 -0
- package/src/documentation/components/ComponentProperties.vue +237 -0
- package/src/documentation/components/ExampleSectionWrapper.vue +46 -0
- package/src/documentation/components/ViewCodeData.vue +113 -0
- package/src/documentation/data/CmdAccordionHelp.js +22 -0
- package/src/documentation/data/CmdAddressDataHelp.js +17 -0
- package/src/documentation/data/CmdBackToTopButtonHelp.js +3 -0
- package/src/documentation/data/CmdBankAccountDataHelp.js +8 -0
- package/src/documentation/data/CmdBoxHelp.js +45 -0
- package/src/documentation/data/CmdBoxSiteSearchHelp.js +11 -0
- package/src/documentation/data/CmdBreadcrumbsHelp.js +6 -0
- package/src/documentation/data/CmdCompanyLogoHelp.js +8 -0
- package/src/documentation/data/CmdCookieDisclaimerHelp.js +9 -0
- package/src/documentation/data/CmdCopyrightInformation.js +2 -0
- package/src/documentation/data/CmdCustomHeadlineHelp.js +8 -0
- package/src/documentation/data/CmdFakeSelectHelp.js +60 -0
- package/src/documentation/data/CmdFancyBoxHelp.js +7 -0
- package/src/documentation/data/CmdFooterNavigationHelp.js +5 -0
- package/src/documentation/data/CmdFormElementHelp.js +189 -0
- package/src/documentation/data/CmdFormFiltersHelp.js +6 -0
- package/src/documentation/data/CmdFormHelp.js +10 -0
- package/src/documentation/data/CmdGoogleMapsHelp.js +5 -0
- package/src/documentation/data/CmdImageGalleryHelp.js +5 -0
- package/src/documentation/data/CmdImageZoomHelp.js +6 -0
- package/src/documentation/data/CmdListOfLinksHelp.js +24 -0
- package/src/documentation/data/CmdLoginFormHelp.js +6 -0
- package/src/documentation/data/CmdMainNavigationHelp.js +7 -0
- package/src/documentation/data/CmdMultistepFormProgressBarHelp.js +6 -0
- package/src/documentation/data/CmdOpeningHoursHelp.js +10 -0
- package/src/documentation/data/CmdPagerHelp.js +7 -0
- package/src/documentation/data/CmdProgressBarHelp.js +13 -0
- package/src/documentation/data/CmdShareButtonsHelp.js +13 -0
- package/src/documentation/data/CmdSiteHeaderHelp.js +21 -0
- package/src/documentation/data/CmdSlideButtonHelp.js +10 -0
- package/src/documentation/data/CmdSlideshowHelp.js +7 -0
- package/src/documentation/data/CmdSwitchLanguageHelp.js +6 -0
- package/src/documentation/data/CmdSystemMessageHelp.js +32 -0
- package/src/documentation/data/CmdTableHelp.js +14 -0
- package/src/documentation/data/CmdTabsHelp.js +10 -0
- package/src/documentation/data/CmdThumbnailScrollerHelp.js +5 -0
- package/src/documentation/data/CmdTooltipHelp.js +13 -0
- package/src/documentation/data/CmdUploadFormHelp.js +17 -0
- package/src/documentation/data/CmdWidthLimitationWrapperHelp.js +7 -0
- package/src/documentation/data/componentsDescription.json +158 -0
- package/src/documentation/generated/CmdAccordionPropertyDescriptions.json +57 -0
- package/src/documentation/generated/CmdAddressDataPropertyDescriptions.json +32 -0
- package/src/documentation/generated/CmdBackToTopButtonPropertyDescriptions.json +12 -0
- package/src/documentation/generated/CmdBankAccountDataPropertyDescriptions.json +34 -0
- package/src/documentation/generated/CmdBoxPropertyDescriptions.json +91 -0
- package/src/documentation/generated/CmdBoxSiteSearchPropertyDescriptions.json +41 -0
- package/src/documentation/generated/CmdBoxWrapperPropertyDescriptions.json +47 -0
- package/src/documentation/generated/CmdBreadcrumbsPropertyDescriptions.json +17 -0
- package/src/documentation/generated/CmdCompanyLogoPropertyDescriptions.json +27 -0
- package/src/documentation/generated/CmdCookieDisclaimerPropertyDescriptions.json +22 -0
- package/src/documentation/generated/CmdCustomHeadlinePropertyDescriptions.json +22 -0
- package/src/documentation/generated/CmdFakeSelectPropertyDescriptions.json +79 -0
- package/src/documentation/generated/CmdFancyBoxPropertyDescriptions.json +62 -0
- package/src/documentation/generated/CmdFooterNavigationPropertyDescriptions.json +17 -0
- package/src/documentation/generated/CmdFormElementPropertyDescriptions.json +178 -0
- package/src/documentation/generated/CmdFormFiltersPropertyDescriptions.json +32 -0
- package/src/documentation/generated/CmdFormPropertyDescriptions.json +40 -0
- package/src/documentation/generated/CmdGoogleMapsPropertyDescriptions.json +7 -0
- package/src/documentation/generated/CmdImageGalleryPropertyDescriptions.json +22 -0
- package/src/documentation/generated/CmdImageZoomPropertyDescriptions.json +12 -0
- package/src/documentation/generated/CmdListOfLinksPropertyDescriptions.json +60 -0
- package/src/documentation/generated/CmdLoginFormPropertyDescriptions.json +90 -0
- package/src/documentation/generated/CmdMainNavigationPropertyDescriptions.json +62 -0
- package/src/documentation/generated/CmdMultipleSwitchPropertyDescriptions.json +52 -0
- package/src/documentation/generated/CmdMultistepFormProgressBarPropertyDescriptions.json +17 -0
- package/src/documentation/generated/CmdOpeningHoursPropertyDescriptions.json +42 -0
- package/src/documentation/generated/CmdPagerPropertyDescriptions.json +37 -0
- package/src/documentation/generated/CmdProgressBarPropertyDescriptions.json +32 -0
- package/src/documentation/generated/CmdShareButtonsPropertyDescriptions.json +34 -0
- package/src/documentation/generated/CmdSiteHeaderPropertyDescriptions.json +27 -0
- package/src/documentation/generated/CmdSlideButtonPropertyDescriptions.json +25 -0
- package/src/documentation/generated/CmdSlideshowPropertyDescriptions.json +42 -0
- package/src/documentation/generated/CmdSwitchButtonPropertyDescriptions.json +79 -0
- package/src/documentation/generated/CmdSwitchLanguagePropertyDescriptions.json +7 -0
- package/src/documentation/generated/CmdSystemMessagePropertyDescriptions.json +40 -0
- package/src/documentation/generated/CmdTablePropertyDescriptions.json +62 -0
- package/src/documentation/generated/CmdTabsPropertyDescriptions.json +27 -0
- package/src/documentation/generated/CmdThumbnailScrollerPropertyDescriptions.json +32 -0
- package/src/documentation/generated/CmdTooltipPropertyDescriptions.json +17 -0
- package/src/documentation/generated/CmdUploadFormPropertyDescriptions.json +90 -0
- package/src/documentation/generated/CmdWidthLimitationWrapperPropertyDescriptions.json +41 -0
- package/src/documentation/generated/frameworkIcons.json +730 -0
- package/src/documentation/generated/logosIcons.json +110 -0
- package/src/documentation/tabs.js +46 -0
- package/src/documentation/views/ContainerPage.vue +237 -0
- package/src/documentation/views/HelpHome.vue +13 -0
- package/src/documentation/views/IconFont.vue +80 -0
- package/src/documentation/views/components/CmdAccordionHelp.vue +78 -0
- package/src/documentation/views/components/CmdAddressDataHelp.vue +65 -0
- package/src/documentation/views/components/CmdBackToTopButtonHelp.vue +62 -0
- package/src/documentation/views/components/CmdBankAccountDataHelp.vue +88 -0
- package/src/documentation/views/components/CmdBoxHelp.vue +137 -0
- package/src/documentation/views/components/CmdBoxSiteSearchHelp.vue +60 -0
- package/src/documentation/views/components/CmdBoxWrapperHelp.vue +111 -0
- package/src/documentation/views/components/CmdBreadcrumbsHelp.vue +51 -0
- package/src/documentation/views/components/CmdCompanyLogoHelp.vue +48 -0
- package/src/documentation/views/components/CmdCookieDisclaimerHelp.vue +105 -0
- package/src/documentation/views/components/CmdCustomHeadlineHelp.vue +53 -0
- package/src/documentation/views/components/CmdFakeSelectHelp.vue +175 -0
- package/src/documentation/views/components/CmdFancyBoxHelp.vue +79 -0
- package/src/documentation/views/components/CmdFormElementHelp.vue +412 -0
- package/src/documentation/views/components/CmdFormFiltersHelp.vue +69 -0
- package/src/documentation/views/components/CmdFormHelp.vue +41 -0
- package/src/documentation/views/components/CmdGoogleMapsHelp.vue +55 -0
- package/src/documentation/views/components/CmdImageGalleryHelp.vue +46 -0
- package/src/documentation/views/components/CmdImageZoomHelp.vue +34 -0
- package/src/documentation/views/components/CmdListOfLinksHelp.vue +64 -0
- package/src/documentation/views/components/CmdLoginFormHelp.vue +117 -0
- package/src/documentation/views/components/CmdMainNavigationHelp.vue +94 -0
- package/src/documentation/views/components/CmdMultistepFormProgressBarHelp.vue +49 -0
- package/src/documentation/views/components/CmdOpeningHoursHelp.vue +49 -0
- package/src/documentation/views/components/CmdPagerHelp.vue +57 -0
- package/src/documentation/views/components/CmdProgressBarHelp.vue +47 -0
- package/src/documentation/views/components/CmdShareButtonsHelp.vue +65 -0
- package/src/documentation/views/components/CmdSiteHeaderHelp.vue +72 -0
- package/src/documentation/views/components/CmdSlideButtonHelp.vue +90 -0
- package/src/documentation/views/components/CmdSlideshowHelp.vue +60 -0
- package/src/documentation/views/components/CmdSwitchLanguageHelp.vue +64 -0
- package/src/documentation/views/components/CmdSystemMessageHelp.vue +86 -0
- package/src/documentation/views/components/CmdTableHelp.vue +84 -0
- package/src/documentation/views/components/CmdTabsHelp.vue +52 -0
- package/src/documentation/views/components/CmdThumbnailScrollerHelp.vue +50 -0
- package/src/documentation/views/components/CmdTooltipHelp.vue +59 -0
- package/src/documentation/views/components/CmdUploadFormHelp.vue +59 -0
- package/src/documentation/views/components/CmdWidthLimitationWrapperHelp.vue +46 -0
- package/src/index.js +6 -3
- package/src/main.js +25 -15
- package/src/mixins/CmdAddressData/DefaultMessageProperties.js +17 -0
- package/src/mixins/CmdBox/DefaultMessageProperties.js +10 -0
- package/src/mixins/CmdFakeSelect/DefaultMessageProperties.js +9 -0
- package/src/mixins/CmdFormElement/DefaultMessageProperties.js +9 -0
- package/src/mixins/CmdImageGallery/DefaultMessageProperties.js +9 -0
- package/src/mixins/CmdSiteSearch/DefaultMessageProperties.js +14 -0
- package/src/mixins/CmdUploadForm/DefaultMessageProperties.js +5 -1
- package/src/mixins/FieldValidation.js +220 -0
- package/src/mixins/GlobalDefaultMessageProperties.js +15 -0
- package/src/mixins/Tooltip.js +26 -0
- package/src/router/index.js +67 -0
- package/src/utilities.js +3 -6
- package/src/utils/common.js +6 -0
- package/src/utils/dom.js +8 -0
- package/src/utils/globalSequence.js +13 -0
- package/src/utils/string.js +8 -0
- package/src/assets/data/address.json +0 -13
- package/src/assets/data/footer-navigation.json +0 -38
- package/src/assets/data/languages.json +0 -31
- package/src/assets/data/multisteps.json +0 -27
- package/src/assets/data/navigation.json +0 -47
- package/src/assets/data/pager.json +0 -11
- package/src/assets/data/top-header-navigation.json +0 -27
- package/src/components/CmdFooterNavigation.vue +0 -71
- package/src/components/CmdMainHeadline.vue +0 -75
- package/src/components/CmdTopHeaderNavigation.vue +0 -88
@@ -1,24 +1,28 @@
|
|
1
1
|
<template>
|
2
2
|
<transition name="fade">
|
3
|
-
<div
|
3
|
+
<div v-if="showFancyBox"
|
4
|
+
:class="['cmd-fancybox', {'show-overlay': showOverlay}]"
|
5
|
+
role="dialog"
|
4
6
|
aria-labelledby="fancybox">
|
5
7
|
<div class="popup" :class="{'image' : fancyBoxImageUrl || fancyBoxGallery }">
|
8
|
+
<!-- begin print button -->
|
6
9
|
<div class="button-wrapper no-flex"
|
7
10
|
v-if="(fancyboxOptions.printButtons && (fancyboxOptions.printButtons.color || fancyboxOptions.printButtons.grayscale)) || fancyboxOptions.closeIcon">
|
8
11
|
<a href="#"
|
9
|
-
v-if="fancyboxOptions.printButtons && fancyboxOptions.printButtons.color"
|
12
|
+
v-if="fancyboxOptions.printButtons && fancyboxOptions.printButtons.color && fancyboxOptions.printButtons.color.show"
|
10
13
|
:class="['button', fancyboxOptions.printButtons.color.iconClass]"
|
11
14
|
:title="fancyboxOptions.printButtons.color.tooltip"
|
12
15
|
id="print-color"
|
13
16
|
@click.prevent="printInGrayscale = false">
|
14
17
|
</a>
|
15
18
|
<a href="#"
|
16
|
-
v-if="fancyboxOptions.printButtons && fancyboxOptions.printButtons.grayscale"
|
19
|
+
v-if="fancyboxOptions.printButtons && fancyboxOptions.printButtons.grayscale && fancyboxOptions.printButtons.grayscale.show"
|
17
20
|
:class="['button', fancyboxOptions.printButtons.grayscale.iconClass]"
|
18
21
|
:title="fancyboxOptions.printButtons.grayscale.tooltip"
|
19
22
|
id="print-grayscale"
|
20
23
|
@click.prevent="printInGrayscale = true">
|
21
24
|
</a>
|
25
|
+
<!-- end print button -->
|
22
26
|
<a href="#"
|
23
27
|
v-if="fancyboxOptions.closeIcon"
|
24
28
|
:class="fancyboxOptions.closeIcon.iconClass"
|
@@ -28,31 +32,50 @@
|
|
28
32
|
</div>
|
29
33
|
<div :class="{'grayscale' : printInGrayscale}">
|
30
34
|
<div v-if="fancyBoxImageUrl" class="content">
|
31
|
-
<img :src="fancyBoxImageUrl" alt=""/>
|
35
|
+
<img :src="fancyBoxImageUrl" :alt="altText" />
|
32
36
|
</div>
|
33
37
|
<div v-else-if="fancyBoxContent" class="content" v-html="fancyBoxContent"></div>
|
34
38
|
<div v-else-if="fancyBoxElements" class="content"></div>
|
35
39
|
<div v-else-if="fancyBoxGallery" class="content">
|
40
|
+
<!-- begin CmdSlideButton -->
|
36
41
|
<CmdSlideButton @click.prevent="showPrevItem" slideButtonType="prev" />
|
42
|
+
<!-- end CmdSlideButton -->
|
43
|
+
|
44
|
+
<!-- begin enlarged image -->
|
37
45
|
<figure>
|
38
|
-
|
39
|
-
|
46
|
+
<img :src="fancyBoxGallery[index].srcImageLarge" :alt="fancyBoxGallery[index].alt"/>
|
47
|
+
<figcaption>{{ fancyBoxGallery[index].figcaption }}</figcaption>
|
40
48
|
</figure>
|
41
|
-
|
49
|
+
<!-- end enlarged image -->
|
50
|
+
|
51
|
+
<!-- begin CmdSlideButton -->
|
52
|
+
<CmdSlideButton @click.prevent="showNextItem"/>
|
53
|
+
<!-- end CmdSlideButton -->
|
42
54
|
</div>
|
43
55
|
<div v-else class="content">
|
56
|
+
<!-- begin slot-content -->
|
44
57
|
<slot></slot>
|
58
|
+
<!-- end slot-content -->
|
45
59
|
</div>
|
46
60
|
</div>
|
47
61
|
</div>
|
48
|
-
|
49
|
-
|
62
|
+
<!-- begin CmdThumbnailScroller -->
|
63
|
+
<CmdThumbnailScroller
|
64
|
+
v-if="fancyBoxGallery"
|
65
|
+
:thumbnailScrollerItems="[...fancyBoxGallery]"
|
66
|
+
:allowOpenFancyBox="false"
|
67
|
+
@click="showItem"
|
68
|
+
:imgIndex="index"
|
69
|
+
/>
|
70
|
+
<!-- end CmdThumbnailScroller -->
|
50
71
|
</div>
|
51
72
|
</transition>
|
52
73
|
</template>
|
53
74
|
|
54
75
|
<script>
|
55
76
|
import {defineComponent, createApp} from "vue"
|
77
|
+
|
78
|
+
// import components
|
56
79
|
import CmdSlideButton from "./CmdSlideButton.vue"
|
57
80
|
import CmdThumbnailScroller from './CmdThumbnailScroller.vue'
|
58
81
|
|
@@ -68,6 +91,10 @@
|
|
68
91
|
|
69
92
|
const FancyBox = defineComponent({
|
70
93
|
name: "CmdFancyBox",
|
94
|
+
components: {
|
95
|
+
CmdSlideButton,
|
96
|
+
CmdThumbnailScroller
|
97
|
+
},
|
71
98
|
props: {
|
72
99
|
/**
|
73
100
|
* set if content should be loaded by url
|
@@ -89,10 +116,12 @@
|
|
89
116
|
},
|
90
117
|
printButtons: {
|
91
118
|
"color": {
|
119
|
+
show: true,
|
92
120
|
"iconClass": "icon-print",
|
93
121
|
"tooltip": "print in color"
|
94
122
|
},
|
95
123
|
"grayscale": {
|
124
|
+
show: true,
|
96
125
|
"iconClass": "icon-print",
|
97
126
|
"tooltip": "print in grayscale"
|
98
127
|
}
|
@@ -115,7 +144,7 @@
|
|
115
144
|
required: false
|
116
145
|
},
|
117
146
|
/**
|
118
|
-
*
|
147
|
+
* list of show elements (not images)
|
119
148
|
*/
|
120
149
|
elements: {
|
121
150
|
type: Array,
|
@@ -144,36 +173,23 @@
|
|
144
173
|
},
|
145
174
|
/**
|
146
175
|
* show/hide overlay (around fancybox, above website)
|
176
|
+
*
|
177
|
+
* @affectsStyling: true
|
147
178
|
*/
|
148
179
|
showOverlay: {
|
149
180
|
type: Boolean,
|
150
181
|
default: true
|
151
182
|
},
|
152
183
|
/**
|
153
|
-
*
|
184
|
+
* alternative text for large image (required for images)
|
185
|
+
*
|
186
|
+
* @requiredForAccessibility: true
|
154
187
|
*/
|
155
|
-
|
156
|
-
type:
|
157
|
-
|
158
|
-
return {
|
159
|
-
"next": {
|
160
|
-
"buttonType": "next",
|
161
|
-
"iconClass": "icon-single-arrow-right",
|
162
|
-
"tooltip": "Next"
|
163
|
-
},
|
164
|
-
"previous": {
|
165
|
-
"buttonType": "previous",
|
166
|
-
"iconClass": "icon-single-arrow-left",
|
167
|
-
"tooltip": "Previous"
|
168
|
-
}
|
169
|
-
}
|
170
|
-
}
|
188
|
+
altText: {
|
189
|
+
type: String,
|
190
|
+
required: false
|
171
191
|
}
|
172
192
|
},
|
173
|
-
components: {
|
174
|
-
CmdSlideButton,
|
175
|
-
CmdThumbnailScroller
|
176
|
-
},
|
177
193
|
data() {
|
178
194
|
return {
|
179
195
|
fancyBoxImageUrl: null,
|
@@ -202,7 +218,6 @@
|
|
202
218
|
this.$_FancyBox_scrollHandler = () => {
|
203
219
|
window.scrollTo(0, this.$_FancyBox_verticalScrollPosition)
|
204
220
|
}
|
205
|
-
|
206
221
|
/* -- end avoid scrolling if fancybox is shown */
|
207
222
|
|
208
223
|
this.$watch(
|
@@ -263,7 +278,6 @@
|
|
263
278
|
},
|
264
279
|
|
265
280
|
showNextItem() {
|
266
|
-
console.log(this.index);
|
267
281
|
if (this.index < this.fancyBoxGallery.length - 1) {
|
268
282
|
this.index++;
|
269
283
|
} else {
|
@@ -0,0 +1,107 @@
|
|
1
|
+
<template>
|
2
|
+
<form class="cmd-form" :data-use-validation="useValidation" @submit="onSubmit" :class="{error: errorOccurred}">
|
3
|
+
<template v-if="useFieldset">
|
4
|
+
<fieldset>
|
5
|
+
<legend :class="{hidden : !showLegend}">{{ textLegend }}</legend>
|
6
|
+
<!-- begin default-slot-content -->
|
7
|
+
<slot></slot>
|
8
|
+
<!-- end default-slot-content -->
|
9
|
+
</fieldset>
|
10
|
+
|
11
|
+
<!-- begin button-row-slot-content -->
|
12
|
+
<slot name="button-row"></slot>
|
13
|
+
<!-- end button-row-slot-content -->
|
14
|
+
</template>
|
15
|
+
|
16
|
+
<!-- begin default-slot-content -->
|
17
|
+
<slot v-else></slot>
|
18
|
+
<!-- end default-slot-content -->
|
19
|
+
</form>
|
20
|
+
</template>
|
21
|
+
|
22
|
+
<script>
|
23
|
+
export default {
|
24
|
+
name: "CmdForm",
|
25
|
+
emits: ["submit"],
|
26
|
+
data(){
|
27
|
+
return {
|
28
|
+
errorOccurred: false
|
29
|
+
}
|
30
|
+
},
|
31
|
+
props: {
|
32
|
+
/**
|
33
|
+
* if activated the entire form will be validated by pre-coded validation
|
34
|
+
*
|
35
|
+
* @affectsStyling: true
|
36
|
+
*/
|
37
|
+
useValidation: {
|
38
|
+
type: Boolean,
|
39
|
+
default: true
|
40
|
+
},
|
41
|
+
/**
|
42
|
+
* activate if you want to use a fieldset
|
43
|
+
*
|
44
|
+
* @requiredForAccessibility: true
|
45
|
+
*/
|
46
|
+
useFieldset: {
|
47
|
+
type: Boolean,
|
48
|
+
default: true
|
49
|
+
},
|
50
|
+
/**
|
51
|
+
* toggle visibility for legend-text
|
52
|
+
*
|
53
|
+
* useFieldset must be activated
|
54
|
+
*/
|
55
|
+
showLegend: {
|
56
|
+
type: Boolean,
|
57
|
+
default: true
|
58
|
+
},
|
59
|
+
/**
|
60
|
+
* text for legend
|
61
|
+
*
|
62
|
+
* useFieldset must be activated
|
63
|
+
*
|
64
|
+
* @requiredForAccessibility: true
|
65
|
+
*/
|
66
|
+
textLegend: {
|
67
|
+
type: String,
|
68
|
+
required: false
|
69
|
+
}
|
70
|
+
},
|
71
|
+
methods: {
|
72
|
+
onSubmit(event) {
|
73
|
+
if(this.useValidation) {
|
74
|
+
event.preventDefault()
|
75
|
+
if(event.target.checkValidity()) {
|
76
|
+
this.errorOccurred = false
|
77
|
+
this.$emit("submit", event)
|
78
|
+
} else {
|
79
|
+
this.errorOccurred = true
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
</script>
|
86
|
+
|
87
|
+
<style lang="scss">
|
88
|
+
.cmd-form {
|
89
|
+
&:not([data-use-validation="true"]) {
|
90
|
+
label.error :where(::placeholder, select option:first-child),
|
91
|
+
:where(input, select, textarea):invalid:focus {
|
92
|
+
color: var(--error-color);
|
93
|
+
}
|
94
|
+
|
95
|
+
:where(input, select, textarea):valid:focus[required],
|
96
|
+
select:invalid:focus[required] option:not(:first-child) {
|
97
|
+
color: var(--success-color);
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
&.error {
|
102
|
+
fieldset, *:invalid {
|
103
|
+
border-color: var(--error-color);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
</style>
|