comand-component-library 3.1.91 → 3.1.93

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "comand-component-library",
3
- "version": "3.1.91",
3
+ "version": "3.1.93",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "clickout-event": "^1.1.2",
21
- "comand-frontend-framework": "^3.2.65",
21
+ "comand-frontend-framework": "^3.2.77",
22
22
  "core-js": "^3.20.1",
23
23
  "prismjs": "^1.27.0",
24
24
  "sass": "^1.54.9",
package/src/App.vue CHANGED
@@ -30,26 +30,26 @@
30
30
  <CmdWidthLimitationWrapper>
31
31
  <div class="flex-container">
32
32
  <ul>
33
- <li><a href="#section-accordion">Accordion</a></li>
34
33
  <li><a href="#section-advanced-form-elements">Advanced Form Elements</a></li>
35
34
  <li><a href="#section-bank-account-data">Bank Account Data</a></li>
36
35
  <li><a href="#section-boxes">Boxes</a></li>
37
36
  <li><a href="#section-breadcrumbs">Breadcrumbs</a></li>
38
37
  <li><a href="#section-cookie-disclaimer">Cookie-Disclaimer</a></li>
38
+ <li><a href="#section-custom-headline">Custom Headline</a></li>
39
39
  </ul>
40
40
  <ul>
41
- <li><a href="#section-custom-headline">Custom Headline</a></li>
42
41
  <li><a href="#section-fancybox">Fancybox</a></li>
43
42
  <li><a href="#section-google-maps-integration">Google-Maps&trade;-Integration</a></li>
44
43
  <li><a href="#section-image-gallery">Image Gallery</a></li>
45
44
  <li><a href="#section-image-zoom">Image-Zoom</a></li>
46
45
  <li><a href="#section-login-form">Login Form</a></li>
46
+ <li><a href="#section-main-navigation">Main-Navigation</a></li>
47
47
  </ul>
48
48
  <ul>
49
- <li><a href="#section-main-navigation">Main-Navigation</a></li>
50
49
  <li><a href="#section-multistep-form-progress-bar">Multistepform-Progressbar</a></li>
51
50
  <li><a href="#section-pager">Pager</a></li>
52
51
  <li><a href="#section-share-buttons">Share Buttons</a></li>
52
+ <li><a href="#section-site-search">Site Search</a></li>
53
53
  <li><a href="#section-slideshow">Slideshow</a></li>
54
54
  <li><a href="#section-system-message">System-Message</a></li>
55
55
  </ul>
@@ -840,7 +840,7 @@
840
840
  </CmdBox>
841
841
  </div>
842
842
  <div class="grid-small-item">
843
- <CmdBox :cmdHeadline="{headlineText: 'nase', headlineLevel: 4}" :collapsible="true" :stretchVertically="false">
843
+ <CmdBox :cmdHeadline="{headlineText: 'Collapsible box', headlineLevel: 4}" :collapsible="true" :stretchVertically="false">
844
844
  <template v-slot:header>
845
845
  <h3>
846
846
  Collapsible box with image
@@ -885,25 +885,6 @@
885
885
  <CmdBox boxType="user" :user="user" :cmdHeadline="{headlineLevel: 4}"/>
886
886
  </div>
887
887
  </div>
888
- <h3>Box Site Search</h3>
889
- <CmdBoxSiteSearch
890
- v-model:modelValueInput1="siteSearchInput1"
891
- v-model:modelValueInput2="siteSearchInput2"
892
- v-model:modelValueRadius="radius"
893
- v-model:modelValueSearchFilters="filters"
894
- @search="siteSearchOutput"
895
- textLegend="Search"
896
- :cmdFakeSelect="siteSearchFilters"/>
897
- <dl>
898
- <dt>siteSearchInput1:</dt>
899
- <dd>{{ siteSearchInput1 }}</dd>
900
- <dt>siteSearchInput2:</dt>
901
- <dd>{{ siteSearchInput2 }}</dd>
902
- <dt>Radius:</dt>
903
- <dd>{{ radius }}</dd>
904
- <dt>Filters:</dt>
905
- <dd>{{ filters }}</dd>
906
- </dl>
907
888
  </CmdWidthLimitationWrapper>
908
889
  <!-- end boxes ------------------------------------------------------------------------------------------------------------------------------------------------------->
909
890
 
@@ -973,7 +954,9 @@
973
954
  <a id="section-login-form"></a>
974
955
  <CmdWidthLimitationWrapper>
975
956
  <h2 class="headline-demopage">Login Form</h2>
976
- <CmdLoginForm v-model="loginData" v-focus/>
957
+ <CmdForm :use-validation="true" :use-fieldset="false">
958
+ <CmdLoginForm v-model="loginData" textLegendLoginForm="Please log in" />
959
+ </CmdForm>
977
960
  <p>LoginData: {{ loginData }}</p>
978
961
  </CmdWidthLimitationWrapper>
979
962
 
@@ -1019,7 +1002,7 @@
1019
1002
  <a id="section-newsletter-subscription"></a>
1020
1003
  <CmdWidthLimitationWrapper>
1021
1004
  <h2 class="headline-demopage">Newsletter Subscription</h2>
1022
- <CmdForm textLegend="Stay-up-to-date">
1005
+ <CmdForm textLegend="Stay-up-to-date" :use-fieldset="false">
1023
1006
  <CmdNewsletterSubscription v-model="newsletter" buttonType="submit" @buttonClick="submitNewsletterRegistration" />
1024
1007
  </CmdForm>
1025
1008
  </CmdWidthLimitationWrapper>
@@ -1048,6 +1031,22 @@
1048
1031
  </CmdWidthLimitationWrapper>
1049
1032
  <!-- end share-buttons ------------------------------------------------------------------------------------------------------------------------------------------------------->
1050
1033
 
1034
+ <!-- begin site-search ------------------------------------------------------------------------------------------------------------------------------------------------------->
1035
+ <a id="section-site-search"></a>
1036
+ <CmdWidthLimitationWrapper>
1037
+ <h2 class="headline-demopage">Site Search</h2>
1038
+ <CmdSiteSearch
1039
+ v-model:modelValueInput1="siteSearchInput1"
1040
+ v-model:modelValueInput2="siteSearchInput2"
1041
+ v-model:modelValueRadius="radius"
1042
+ v-model:modelValueSearchFilters="filters"
1043
+ @search="siteSearchOutput"
1044
+ textLegend="Search"
1045
+ :cmdFakeSelect="siteSearchFilters"
1046
+ />
1047
+ </CmdWidthLimitationWrapper>
1048
+ <!-- end site-search ------------------------------------------------------------------------------------------------------------------------------------------------------->
1049
+
1051
1050
  <!-- begin slideshow ------------------------------------------------------------------------------------------------------------------------------------------------------->
1052
1051
  <a id="section-slideshow"></a>
1053
1052
  <CmdWidthLimitationWrapper>
@@ -1281,7 +1280,6 @@ import CmdAddressData from "@/components/CmdAddressData"
1281
1280
  import CmdBackToTopButton from "@/components/CmdBackToTopButton.vue"
1282
1281
  import CmdBankAccountData from "./components/CmdBankAccountData"
1283
1282
  import CmdBox from "@/components/CmdBox.vue"
1284
- import CmdBoxSiteSearch from "@/components/CmdBoxSiteSearch.vue"
1285
1283
  import CmdBreadcrumbs from "@/components/CmdBreadcrumbs.vue"
1286
1284
  import CmdCompanyLogo from "@/components/CmdCompanyLogo.vue"
1287
1285
  import CmdCopyrightInformation from "@/components/CmdCopyrightInformation.vue"
@@ -1307,6 +1305,7 @@ import CmdProgressBar from "@/components/CmdProgressBar.vue"
1307
1305
  import CmdShareButtons from "@/components/CmdShareButtons.vue"
1308
1306
  import CmdSiteFooter from "./components/CmdSiteFooter"
1309
1307
  import CmdSiteHeader from "./components/CmdSiteHeader"
1308
+ import CmdSiteSearch from "@/components/CmdSiteSearch.vue"
1310
1309
  import CmdSlideshow from "@/components/CmdSlideshow.vue"
1311
1310
  import CmdSwitchLanguage from "@/components/CmdSwitchLanguage.vue"
1312
1311
  import CmdSystemMessage from "@/components/CmdSystemMessage.vue"
@@ -1332,7 +1331,6 @@ export default {
1332
1331
  CmdBackToTopButton,
1333
1332
  CmdBankAccountData,
1334
1333
  CmdBox,
1335
- CmdBoxSiteSearch,
1336
1334
  CmdBreadcrumbs,
1337
1335
  CmdCompanyLogo,
1338
1336
  CmdCopyrightInformation,
@@ -1357,6 +1355,7 @@ export default {
1357
1355
  CmdShareButtons,
1358
1356
  CmdSiteFooter,
1359
1357
  CmdSiteHeader,
1358
+ CmdSiteSearch,
1360
1359
  CmdSlideshow,
1361
1360
  CmdSwitchLanguage,
1362
1361
  CmdSystemMessage,
@@ -1375,6 +1374,10 @@ export default {
1375
1374
  showTooltip: false,
1376
1375
  disabledStatus: undefined,
1377
1376
  validationStatus: "",
1377
+ loginData: {
1378
+ username: "",
1379
+ password: ""
1380
+ },
1378
1381
  newsletter: {
1379
1382
  subscription: "",
1380
1383
  email: ""
@@ -1423,7 +1426,6 @@ export default {
1423
1426
  selectedCountry: "de",
1424
1427
  selectedColor: "",
1425
1428
  rangeValue: 50,
1426
- loginData: {},
1427
1429
  siteSearchFilters: {
1428
1430
  show: true,
1429
1431
  selectData: fakeSelectFilterOptionsData,
@@ -1433,7 +1435,7 @@ export default {
1433
1435
  },
1434
1436
  siteSearchInput1: "Doctor",
1435
1437
  siteSearchInput2: "New York",
1436
- radius: 10,
1438
+ radius: 5,
1437
1439
  filters: ["2"],
1438
1440
  switchButtonRadio: "radio1",
1439
1441
  switchButtonCheckboxToggleSwitch: false,
@@ -1517,10 +1519,9 @@ export default {
1517
1519
  this.disabledStatus = disabledStatus
1518
1520
  },
1519
1521
  siteSearchOutput(event) {
1520
- console.log(event)
1522
+ alert(JSON.stringify(event))
1521
1523
  },
1522
- showError(event) {
1523
- console.log("EventMessages", event.messages)
1524
+ showError() {
1524
1525
  alert("Error")
1525
1526
  },
1526
1527
  showFancyBox(type, content, altText) {
@@ -52,7 +52,6 @@
52
52
  }
53
53
 
54
54
  #component-library {
55
- border: 1px solid red;
56
55
  scroll-padding-top: unset !important;
57
56
  scroll-snap-type: unset !important;
58
57
  }
@@ -26,7 +26,10 @@
26
26
  <!-- begin header for collapsible -->
27
27
  <a v-if="collapsible" class="box-header" href="#" :title="open ? iconOpen.tooltip : iconClosed.tooltip" @click.prevent="toggleContentVisibility">
28
28
  <!-- begin CmdHeadline -->
29
- <CmdHeadline v-if="cmdHeadline?.headlineText" v-bind="cmdHeadline" />
29
+ <CmdHeadline
30
+ v-if="cmdHeadline?.headlineText"
31
+ v-bind="cmdHeadline"
32
+ />
30
33
  <!-- end CmdHeadline -->
31
34
  <span class="toggle-icon" :class="[open ? iconOpen.iconClass : iconClosed.iconClass]"></span>
32
35
  </a>
@@ -343,13 +346,14 @@ export default {
343
346
 
344
347
  > .toggle-icon, .toggle-icon > [class*="icon"] {
345
348
  font-size: 1rem;
346
- margin-left: auto;
347
349
  }
350
+ }
348
351
 
352
+ .box-header {
349
353
  &:hover, &:active, &:focus {
350
354
  background: var(--pure-white);
351
355
 
352
- > * {
356
+ * {
353
357
  color: var(--primary-color);
354
358
  }
355
359
  }
@@ -295,9 +295,25 @@ export default {
295
295
 
296
296
  .cmd-box {
297
297
  .box-header {
298
- label.disabled {
299
- .label-text span {
300
- color: var(--pure-white) !important;
298
+ justify-content: unset; /* overwrite setting for collapsible boxes */
299
+
300
+ label {
301
+ &.disabled {
302
+ .label-text span {
303
+ color: var(--pure-white) !important; /* required to set label-text in header to white */
304
+ }
305
+ }
306
+
307
+ & + .toggle-icon {
308
+ width: 100%;
309
+ justify-content: flex-end;
310
+ text-align: right;
311
+ }
312
+ }
313
+
314
+ &:hover, &:active, &:focus {
315
+ label.disabled .label-text span {
316
+ color: var(--disabled-color) !important; /* required to set label-text on hover back to disabled-color */
301
317
  }
302
318
  }
303
319
  }
@@ -1,23 +1,24 @@
1
1
  <template>
2
- <label v-if="(element === 'input' || element === 'select' || element === 'textarea')"
3
- :class="[
4
- 'cmd-form-element',
5
- validationStatus,
6
- $attrs.class,
7
- {
8
- disabled: $attrs.disabled,
9
- inline : displayLabelInline,
10
- checked: isChecked,
11
- 'toggle-switch': toggleSwitch,
12
- colored: colored,
13
- on: colored && isChecked,
14
- off: colored && !isChecked,
15
- 'has-state': validationStatus
16
- }
17
- ]"
18
- :for="htmlId"
19
- :title="$attrs.title"
20
- ref="label">
2
+ <label
3
+ v-if="(element === 'input' || element === 'select' || element === 'textarea')"
4
+ :class="[
5
+ 'cmd-form-element',
6
+ validationStatus,
7
+ $attrs.class,
8
+ {
9
+ disabled: $attrs.disabled,
10
+ inline : displayLabelInline,
11
+ checked: isChecked,
12
+ 'toggle-switch': toggleSwitch,
13
+ colored: colored,
14
+ on: colored && isChecked,
15
+ off: colored && !isChecked,
16
+ 'has-state': validationStatus
17
+ }
18
+ ]"
19
+ :for="htmlId"
20
+ :title="$attrs.title"
21
+ ref="label">
21
22
 
22
23
  <!-- begin label-text (+ required asterisk) -->
23
24
  <span v-if="(labelText || $slots.labeltext) && $attrs.type !== 'checkbox' && $attrs.type !== 'radio'"
@@ -687,6 +688,17 @@ export default {
687
688
  }
688
689
  },
689
690
  methods: {
691
+ additionalStandardRequirements() {
692
+ const requirements = []
693
+ // check if field is type "email"
694
+ if(this.$attrs.type === "email") {
695
+ requirements.push({
696
+ message: this.getMessage("cmdformelement.validationTooltip.is_valid_email"),
697
+ valid: () => this.$refs.input.checkValidity()
698
+ })
699
+ }
700
+ return requirements
701
+ },
690
702
  getDomElement() {
691
703
  return this.$refs.label
692
704
  },
@@ -706,8 +718,6 @@ export default {
706
718
  const useValidation = event.target.closest("form")?.dataset.useValidation === "true"
707
719
 
708
720
  if (useValidation) {
709
- this.validationStatus = ""
710
-
711
721
  // if input is filled, set status to success (expect for checkboxes and radiobuttons)
712
722
  if (!["checkbox", "radio"].includes(this.$attrs.type) && this.modelValue) {
713
723
  this.validationStatus = "success"
@@ -792,7 +802,7 @@ export default {
792
802
  watch: {
793
803
  status: {
794
804
  handler() {
795
- this.validationStatus = this.status
805
+ this.validationStatus = this.status || ""
796
806
  },
797
807
  immediate: true
798
808
  }
@@ -1,10 +1,12 @@
1
1
  <template>
2
2
  <!-- begin login-form -->
3
- <fieldset v-if="!sendLogin" class="cmd-login-form flex-container">
4
- <legend :class="{hidden : !showLegend}">{{ textLegend }}</legend>
3
+ <fieldset v-show="!sendLogin" class="cmd-login-form flex-container">
4
+ <legend :class="{hidden : !showLegend}">{{ textLegendLoginForm }}</legend>
5
5
  <!-- begin CmdHeadline -->
6
- <CmdHeadline v-if="cmdHeadlineLoginForm"
7
- v-bind="cmdHeadlineLoginForm"/>
6
+ <CmdHeadline
7
+ v-if="cmdHeadlineLoginForm"
8
+ v-bind="cmdHeadlineLoginForm"
9
+ />
8
10
  <!-- end CmdHeadline -->
9
11
 
10
12
  <!-- being form elements -->
@@ -19,6 +21,8 @@
19
21
  :fieldIconClass="cmdFormElementUsername.innerIconClass"
20
22
  :labelText="cmdFormElementUsername.labelText"
21
23
  :placeholder="cmdFormElementUsername.placeholder"
24
+ :required="cmdFormElementUsername.required"
25
+ @validationStatusChange="checkValidationStatus($event, 'username')"
22
26
  />
23
27
  <!-- end CmdFormElement -->
24
28
 
@@ -32,6 +36,8 @@
32
36
  v-model="password"
33
37
  :labelText="cmdFormElementPassword.labelText"
34
38
  :placeholder="cmdFormElementPassword.placeholder"
39
+ :required="cmdFormElementPassword.required"
40
+ @validationStatusChange="checkValidationStatus($event, 'password')"
35
41
  />
36
42
  <!-- end CmdFormElement -->
37
43
  </div>
@@ -39,6 +45,7 @@
39
45
 
40
46
  <div class="option-wrapper flex-container" v-focus>
41
47
  <template v-if="options.forgotPassword || options.createAccount">
48
+ <!-- begin link for 'forgot password' -->
42
49
  <a v-if="options.forgotPassword" href="#" @click.prevent="sendLogin = true">
43
50
  <span v-if="options.forgotPassword.icon && options.forgotPassword.icon.show && options.forgotPassword.icon.iconClass"
44
51
  :class="options.forgotPassword.icon.iconClass"
@@ -46,7 +53,9 @@
46
53
  </span>
47
54
  <span v-if="options.forgotPassword.text">{{ options.forgotPassword.text }}</span>
48
55
  </a>
49
- <!-- begin link-type 'href' -->
56
+ <!-- end link for 'forgot password' -->
57
+
58
+ <!-- begin link-type 'href' for 'create account' -->
50
59
  <a v-if="options.createAccount && options.createAccount.linkType === 'href'" :href="options.createAccount.path">
51
60
  <span v-if="options.createAccount.icon && options.createAccount.icon.show && options.createAccount.icon.iconClass"
52
61
  :class="options.createAccount.icon.iconClass"
@@ -54,9 +63,9 @@
54
63
  </span>
55
64
  <span v-if="options.createAccount.text">{{ options.createAccount.text }}</span>
56
65
  </a>
57
- <!-- end link-type 'href' -->
66
+ <!-- end link-type 'href' for 'create account' -->
58
67
 
59
- <!-- begin link-type 'router' -->
68
+ <!-- begin link-type 'router' for 'create account' -->
60
69
  <router-link v-else-if="options.createAccount && options.createAccount.linkType === 'router'" :to="options.createAccount.path">
61
70
  <span v-if="options.createAccount.icon && options.createAccount.icon.show && options.createAccount.icon.iconClass"
62
71
  :class="options.createAccount.icon.iconClass"
@@ -64,47 +73,16 @@
64
73
  </span>
65
74
  <span v-if="options.createAccount.text">{{ options.createAccount.text }}</span>
66
75
  </router-link>
67
- <!-- end link-type 'router -->
76
+ <!-- end link-type 'router' for 'create account' -->
68
77
  </template>
69
78
 
70
- <!-- begin link-type 'href' -->
71
- <a
72
- v-if="buttons.login.linkType === 'href'"
73
- :class="['button', { primary: buttons.login.primary }]"
74
- :href="buttons.login.path"
75
- @click.prevent="onClick"
76
- >
77
- <span
78
- v-if="buttons.login.icon.iconClass"
79
- :class="buttons.login.icon.iconClass"
80
- :title="buttons.login.icon.tooltip"
81
- ></span>
82
- <span v-if="buttons.login.text">{{ buttons.login.text }}</span>
83
- </a>
84
- <!-- begin link-type 'href' -->
85
-
86
- <!-- begin link-type 'router' -->
87
- <router-link
88
- v-if="buttons.login.linkType === 'router'"
89
- :class="['button', { primary: buttons.login.primary }]"
90
- :to="buttons.login.path"
91
- @click.prevent="onClick"
92
- >
93
- <span
94
- v-if="buttons.login.icon.iconClass"
95
- :class="buttons.login.icon.iconClass"
96
- :title="buttons.login.icon.tooltip"
97
- ></span>
98
- <span v-if="buttons.login.text">{{ buttons.login.text }}</span>
99
- </router-link>
100
- <!-- begin link-type 'router' -->
101
-
102
79
  <!-- begin link-type 'button' -->
103
80
  <button
104
81
  v-if="buttons.login.linkType === 'button'"
105
82
  :type="buttons.login.type === 'submit' ? 'submit' : 'button'"
106
83
  :class="['button', { primary: buttons.login.primary }]"
107
84
  @click="onClick"
85
+ :disabled="buttonLoginDisabled"
108
86
  >
109
87
  <span
110
88
  v-if="buttons.login.icon.iconClass"
@@ -119,14 +97,13 @@
119
97
  <!-- end login-form -->
120
98
 
121
99
  <!-- begin send-login-form -->
122
- <fieldset v-else class="cmd-login-form flex-container">
123
- <legend :class="{'hidden' : !legendSendLoginForm.show}">{{ legendSendLoginForm.text }}</legend>
100
+ <fieldset v-show="sendLogin" class="cmd-login-form flex-container">
101
+ <legend :class="{'hidden' : !showLegend}">{{ textLegendForgotLoginForm }}</legend>
124
102
  <!-- begin CmdHeadline -->
125
- <CmdHeadline v-if="cmdHeadlineSendLoginForm"
126
- :iconClass="cmdHeadlineSendLoginForm.iconClass"
127
- :preHeadline="cmdHeadlineSendLoginForm.preHeadline"
128
- :headlineLevel="cmdHeadlineSendLoginForm.preHeadline"
129
- :headlineText="cmdHeadlineSendLoginForm.headlineText"/>
103
+ <CmdHeadline
104
+ v-if="cmdHeadlineSendLoginForm"
105
+ v-bind="cmdHeadlineSendLoginForm"
106
+ />
130
107
  <!-- end CmdHeadline -->
131
108
 
132
109
  <!-- begin CmdFormElement -->
@@ -137,8 +114,10 @@
137
114
  :labelText="cmdFormElementSendLogin.labelText"
138
115
  :placeholder="cmdFormElementSendLogin.placeholder"
139
116
  :name="cmdFormElementSendLogin.name"
117
+ :required="cmdFormElementSendLogin.required"
140
118
  :id="cmdFormElementSendLogin.id"
141
- v-model:value="sendLoginMail"
119
+ @validationStatusChange="checkValidationStatus($event, 'email')"
120
+ v-model="sendLoginMail"
142
121
  />
143
122
  <!-- end CmdFormElement -->
144
123
 
@@ -153,43 +132,12 @@
153
132
  </span>
154
133
  </a>
155
134
 
156
- <!-- begin link-type 'href' -->
157
- <a
158
- v-if="buttons.sendLogin.linkType === 'href'"
159
- :class="['button', { primary: buttons.sendLogin.primary }]"
160
- :href="buttons.sendLogin.path"
161
- @click.prevent="sendLogin"
162
- >
163
- <span
164
- v-if="buttons.sendLogin.icon.iconClass"
165
- :class="buttons.sendLogin.icon.iconClass"
166
- :title="buttons.sendLogin.icon.tooltip"
167
- ></span>
168
- <span v-if="buttons.sendLogin.text">{{ buttons.sendLogin.text }}</span>
169
- </a>
170
- <!-- end link-type 'href' -->
171
-
172
- <!-- begin link-type 'router' -->
173
- <router-link
174
- v-if="buttons.sendLogin.linkType === 'router'"
175
- :class="['button', { primary: buttons.sendLogin.primary }]"
176
- :to="buttons.sendLogin.path"
177
- @click.prevent="sendLogin"
178
- >
179
- <span
180
- v-if="buttons.sendLogin.icon.iconClass"
181
- :class="buttons.sendLogin.icon.iconClass"
182
- :title="buttons.sendLogin.icon.tooltip"
183
- ></span>
184
- <span v-if="buttons.sendLogin.text">{{ buttons.sendLogin.text }}</span>
185
- </router-link>
186
- <!-- end link-type 'router' -->
187
-
188
135
  <!-- begin link-type 'button' -->
189
136
  <button
190
137
  v-if="buttons.sendLogin.linkType === 'button'"
191
138
  :type="buttons.sendLogin.type === 'submit' ? 'submit' : 'button'"
192
139
  :class="['button', { primary: buttons.sendLogin.primary }]"
140
+ :disabled="buttonSendLoginDisabled"
193
141
  >
194
142
  <span
195
143
  v-if="buttons.sendLogin.icon?.iconClass"
@@ -216,8 +164,9 @@ export default {
216
164
  name: "CmdLoginForm",
217
165
  data() {
218
166
  return {
219
- username: "",
220
- password: "",
167
+ usernameValidationStatus: false,
168
+ passwordValidationStatus: false,
169
+ emailValidationStatus: false,
221
170
  sendLoginMail: "",
222
171
  sendLogin: false
223
172
  }
@@ -244,7 +193,7 @@ export default {
244
193
  *
245
194
  * @requiredForAccessibility: true
246
195
  */
247
- textLegend: {
196
+ textLegendLoginForm: {
248
197
  type: String,
249
198
  default: "Login form"
250
199
  },
@@ -256,18 +205,13 @@ export default {
256
205
  default: true
257
206
  },
258
207
  /**
259
- * legend for send-login-fieldset
208
+ * legend for forgot-login-fieldset
260
209
  *
261
210
  * @requiredForAccessibility: true
262
- */
263
- legendSendLoginForm: {
264
- type: Object,
265
- default() {
266
- return {
267
- show: false,
268
- text: "Forgot login form"
269
- }
270
- }
211
+ */
212
+ textLegendForgotLoginForm: {
213
+ type: String,
214
+ default: "Forgot login form"
271
215
  },
272
216
  /**
273
217
  * properties for CmdHeadline-component for login-form
@@ -281,13 +225,7 @@ export default {
281
225
  */
282
226
  cmdHeadlineSendLoginForm: {
283
227
  type: Object,
284
- default() {
285
- return {
286
- show: true,
287
- headlineText: "Send Login",
288
- headlineLevel: 2
289
- }
290
- }
228
+ required: false
291
229
  },
292
230
  /**
293
231
  * properties for CmdFormElement-component for username-field
@@ -302,7 +240,8 @@ export default {
302
240
  placeholder: "Type in username",
303
241
  innerIconClass: "icon-user-profile",
304
242
  name: "login-username",
305
- id: "login-username"
243
+ id: "login-username",
244
+ required: true
306
245
  }
307
246
  }
308
247
  },
@@ -319,7 +258,8 @@ export default {
319
258
  placeholder: "Type in password",
320
259
  innerIconClass: "icon-security-settings",
321
260
  name: "login-password",
322
- id: "login-password"
261
+ id: "login-password",
262
+ required: true
323
263
  }
324
264
  }
325
265
  },
@@ -336,7 +276,8 @@ export default {
336
276
  placeholder: "Type in email-address you are registered with",
337
277
  innerIconClass: "icon-mail",
338
278
  name: "login-send-login",
339
- id: "login-send-login"
279
+ id: "login-send-login",
280
+ required: true
340
281
  }
341
282
  }
342
283
  },
@@ -416,6 +357,30 @@ export default {
416
357
  }
417
358
  }
418
359
  },
360
+ computed: {
361
+ buttonLoginDisabled() {
362
+ return !(this.usernameValidationStatus && this.passwordValidationStatus)
363
+ },
364
+ buttonSendLoginDisabled() {
365
+ return !this.emailValidationStatus
366
+ },
367
+ username: {
368
+ get() {
369
+ return this.modelValue.username
370
+ },
371
+ set(value) {
372
+ this.$emit("update:modelValue", {username: value, password: this.password})
373
+ }
374
+ },
375
+ password: {
376
+ get() {
377
+ return this.modelValue.password
378
+ },
379
+ set(value) {
380
+ this.$emit("update:modelValue", {username: this.username, password: value})
381
+ }
382
+ }
383
+ },
419
384
  methods: {
420
385
  modelChange() {
421
386
  this.$emit("update:modelValue", { "username": this.username, "password": this.password })
@@ -425,6 +390,18 @@ export default {
425
390
  },
426
391
  getRoute(language) {
427
392
  return getRoute(language)
393
+ },
394
+ checkValidationStatus(event, fieldType) {
395
+ if (event == null) {
396
+ return
397
+ }
398
+ if(fieldType === "username") {
399
+ this.usernameValidationStatus = event === "success";
400
+ } else if(fieldType === "password") {
401
+ this.passwordValidationStatus = event === "success";
402
+ } else {
403
+ this.emailValidationStatus = event === "success";
404
+ }
428
405
  }
429
406
  },
430
407
  watch: {