comand-component-library 4.3.28 → 5.0.0
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 +9587 -9482
- package/dist/styles/demopage-only.css +12 -2
- package/package.json +47 -46
- package/src/ComponentLibrary.vue +2697 -2688
- package/src/assets/data/component-structure.json +1 -1
- package/src/assets/data/form-elements.json +224 -224
- package/src/assets/data/social-networks-page-by-json.json +43 -43
- package/src/assets/styles/component-library-global-styles.scss +296 -295
- package/src/componentSettingsDataAndControls.vue +1 -18
- package/src/components/CmdAccordion.vue +1 -1
- package/src/components/CmdAddressData.vue +6 -1
- package/src/components/CmdAddressDataItem.vue +6 -1
- package/src/components/CmdBasicForm.vue +2 -2
- package/src/components/CmdBox.vue +1103 -1092
- package/src/components/CmdBoxWrapper.vue +7 -1
- package/src/components/CmdBreadcrumbs.vue +2 -2
- package/src/components/CmdCodeOutput.vue +1 -1
- package/src/components/CmdCookieDisclaimer.vue +480 -480
- package/src/components/CmdFakeSelect.vue +930 -916
- package/src/components/CmdFlexibleScrollContainer.vue +42 -42
- package/src/components/CmdForm.vue +481 -481
- package/src/components/CmdFormElement.vue +1110 -1091
- package/src/components/CmdFormFilters.vue +146 -146
- package/src/components/CmdGoogleMaps.vue +1 -1
- package/src/components/CmdHeadline.vue +21 -4
- package/src/components/CmdIcon.vue +8 -2
- package/src/components/CmdImage.vue +14 -16
- package/src/components/CmdImageZoom.vue +9 -8
- package/src/components/CmdInputGroup.vue +436 -435
- package/src/components/CmdLink.vue +1 -1
- package/src/components/CmdList.vue +1 -1
- package/src/components/CmdListOfRequirements.vue +192 -192
- package/src/components/CmdLoginForm.vue +618 -618
- package/src/components/CmdMailToolFilter.vue +217 -217
- package/src/components/CmdMainNavigation.vue +581 -572
- package/src/components/CmdMultistepFormProgressBar.vue +9 -9
- package/src/components/CmdNewsletterSubscription.vue +199 -199
- package/src/components/CmdPagination.vue +4 -2
- package/src/components/CmdParagraph.vue +10 -4
- package/src/components/CmdProgressBar.vue +72 -72
- package/src/components/CmdSiteHeader.vue +382 -389
- package/src/components/CmdSiteSearch.vue +420 -420
- package/src/components/CmdSiteWrapper.vue +12 -5
- package/src/components/CmdSlideshow.vue +519 -519
- package/src/components/CmdSmartSearch.vue +291 -291
- package/src/components/CmdSystemMessage.vue +3 -2
- package/src/components/CmdTable.vue +401 -401
- package/src/components/CmdTabs.vue +262 -262
- package/src/components/CmdTag.vue +1 -1
- package/src/components/CmdTextImageBlock.vue +8 -2
- package/src/components/CmdThumbnailScroller.vue +0 -7
- package/src/components/CmdToggleDarkMode.vue +13 -11
- package/src/components/CmdTooltip.vue +305 -301
- package/src/components/CmdUploadForm.vue +1299 -1305
- package/src/components/CmdWidthLimitationWrapper.vue +1 -1
- package/src/components/EditComponentWrapper.vue +5 -5
- package/src/index.js +5 -0
- package/src/main.js +4 -3
- package/src/utils/template.js +57 -0
- package/src/assets/styles/template.css +0 -1
|
@@ -1,618 +1,618 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- begin CmdLoginForm ---------------------------------------------------------------------------------------- -->
|
|
3
|
-
<fieldset v-if="!sendLogin" class="cmd-login-form flex-container">
|
|
4
|
-
<legend :class="{ hidden: !legendLoginForm.show, 'align-left': legendLoginForm.align === 'left' }">
|
|
5
|
-
{{ legendLoginForm.text }}
|
|
6
|
-
</legend>
|
|
7
|
-
|
|
8
|
-
<CmdHeadline v-if="cmdHeadlineLoginFormProperties.show && cmdHeadlineLoginFormProperties.headlineText" v-bind="cmdHeadlineLoginFormProperties" />
|
|
9
|
-
|
|
10
|
-
<!-- begin Google-Login-Button -->
|
|
11
|
-
<button v-if="enableLoginWithGoogle" class="gsi-material-button stretch-on-small-devices"
|
|
12
|
-
@click="loginWithGoogle">
|
|
13
|
-
<div class="gsi-material-button-state"></div>
|
|
14
|
-
<div class="gsi-material-button-content-wrapper">
|
|
15
|
-
<div class="gsi-material-button-icon">
|
|
16
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"
|
|
17
|
-
xmlns:xlink="http://www.w3.org/1999/xlink" style="display: block;">
|
|
18
|
-
<path fill="#EA4335"
|
|
19
|
-
d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z">
|
|
20
|
-
</path>
|
|
21
|
-
<path fill="#4285F4"
|
|
22
|
-
d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z">
|
|
23
|
-
</path>
|
|
24
|
-
<path fill="#FBBC05"
|
|
25
|
-
d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z">
|
|
26
|
-
</path>
|
|
27
|
-
<path fill="#34A853"
|
|
28
|
-
d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z">
|
|
29
|
-
</path>
|
|
30
|
-
<path fill="none" d="M0 0h48v48H0z"></path>
|
|
31
|
-
</svg>
|
|
32
|
-
</div>
|
|
33
|
-
<span class="gsi-material-button-contents">Sign in with Google</span>
|
|
34
|
-
<span style="display: none;">Sign in with Google</span>
|
|
35
|
-
</div>
|
|
36
|
-
</button>
|
|
37
|
-
<!-- end Google-Login-Button -->
|
|
38
|
-
|
|
39
|
-
<!-- begin Facebook-Login-Button -->
|
|
40
|
-
<div v-if="enableLoginWithFacebook" class="fb-login-button stretch-on-small-devices" data-width="200"
|
|
41
|
-
data-size="" data-button-type="" data-layout="" data-auto-logout-link="false" data-use-continue-as="false">
|
|
42
|
-
</div>
|
|
43
|
-
<!-- end Facebook-Login-Button -->
|
|
44
|
-
|
|
45
|
-
<!-- send "login with your data"-button -->
|
|
46
|
-
<CmdLink v-if="!showLogin" v-bind="cmdLinkLoginWithYourDataProperties" @click="showLogin = true" />
|
|
47
|
-
<!-- end "login with your data"-button -->
|
|
48
|
-
|
|
49
|
-
<!-- begin form elements -->
|
|
50
|
-
<div v-if="showLogin" :class="['login-fields flex-container', { 'vertical': orientation === 'vertical' }]">
|
|
51
|
-
<CmdFormElement element="input" type="text" ref="username" v-model="username"
|
|
52
|
-
v-bind="cmdFormElementUsernameProperties"
|
|
53
|
-
@validationStatusChange="checkValidationStatus($event, 'username')" />
|
|
54
|
-
<CmdFormElement element="input" type="password" v-model="password" v-bind="cmdFormElementPasswordProperties"
|
|
55
|
-
@validationStatusChange="checkValidationStatus($event, 'password')" />
|
|
56
|
-
</div>
|
|
57
|
-
<!-- end form elements -->
|
|
58
|
-
|
|
59
|
-
<!-- begin named slot for login-form -->
|
|
60
|
-
<slot name="login"></slot>
|
|
61
|
-
<!-- end named slot for login-form -->
|
|
62
|
-
|
|
63
|
-
<div class="option-wrapper flex-container">
|
|
64
|
-
<div v-if="cmdLinkForgotPasswordProperties.show || cmdLinkCreateAccountProperties.show"
|
|
65
|
-
class="flex-container reset-flex no-wrap-on-small-devices justify-content-space-around">
|
|
66
|
-
<!-- begin link for 'forgot password' -->
|
|
67
|
-
<CmdLink @click="toggleSendLoginView"
|
|
68
|
-
v-bind="cmdLinkForgotPasswordProperties"
|
|
69
|
-
/>
|
|
70
|
-
<!-- end link for 'forgot password' -->
|
|
71
|
-
|
|
72
|
-
<!-- begin link for 'create account' -->
|
|
73
|
-
<template v-if="cmdLinkCreateAccountProperties.show">
|
|
74
|
-
<CmdLink v-bind="cmdLinkCreateAccountProperties" />
|
|
75
|
-
</template>
|
|
76
|
-
<!-- end link for 'create account' -->
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<CmdLink
|
|
80
|
-
v-bind="cmdLinkLoginProperties"
|
|
81
|
-
:disabled="buttonLoginDisabled"
|
|
82
|
-
/>
|
|
83
|
-
</div>
|
|
84
|
-
</fieldset>
|
|
85
|
-
<!-- end login-form -->
|
|
86
|
-
|
|
87
|
-
<!-- begin send-login-form -->
|
|
88
|
-
<fieldset v-if="sendLogin" class="cmd-login-form flex-container">
|
|
89
|
-
<legend :class="{ hidden: !legendForgotLoginForm.show, 'align-left': legendForgotLoginForm.align === 'left' }">
|
|
90
|
-
{{ legendForgotLoginForm.text }}
|
|
91
|
-
</legend>
|
|
92
|
-
|
|
93
|
-
<CmdHeadline v-if="cmdHeadlineSendLoginFormProperties.show && cmdHeadlineSendLoginFormProperties.headlineText" v-bind="cmdHeadlineSendLoginFormProperties" />
|
|
94
|
-
|
|
95
|
-
<CmdFormElement
|
|
96
|
-
ref="sendPassword"
|
|
97
|
-
element="input"
|
|
98
|
-
type="email"
|
|
99
|
-
@validationStatusChange="checkValidationStatus($event, 'email')"
|
|
100
|
-
v-model="sendLoginMail"
|
|
101
|
-
v-bind="cmdFormElementSendLoginProperties"
|
|
102
|
-
/>
|
|
103
|
-
|
|
104
|
-
<!-- begin slot for send-login-form -->
|
|
105
|
-
<slot name="send-login"></slot>
|
|
106
|
-
<!-- end slot for send-login-form -->
|
|
107
|
-
|
|
108
|
-
<div class="option-wrapper flex-container">
|
|
109
|
-
<CmdLink v-bind="cmdLinkBackToLoginProperties" @click="toggleSendLoginView" />
|
|
110
|
-
|
|
111
|
-
<CmdLink
|
|
112
|
-
v-bind="cmdLinkSendLoginProperties"
|
|
113
|
-
:disabled="buttonSendLoginDisabled"
|
|
114
|
-
/>
|
|
115
|
-
</div>
|
|
116
|
-
</fieldset>
|
|
117
|
-
<!-- end CmdLoginForm ---------------------------------------------------------------------------------------- -->
|
|
118
|
-
</template>
|
|
119
|
-
|
|
120
|
-
<script>
|
|
121
|
-
// import utilities
|
|
122
|
-
import { getRoute } from "../utilities.js"
|
|
123
|
-
|
|
124
|
-
export default {
|
|
125
|
-
name: "CmdLoginForm",
|
|
126
|
-
data() {
|
|
127
|
-
return {
|
|
128
|
-
usernameValidationStatus: false,
|
|
129
|
-
passwordValidationStatus: false,
|
|
130
|
-
emailValidationStatus: false,
|
|
131
|
-
sendLoginMail: "",
|
|
132
|
-
sendLogin: false,
|
|
133
|
-
showLogin: true
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
props: {
|
|
137
|
-
/**
|
|
138
|
-
* activate if login with google should be enabled
|
|
139
|
-
*/
|
|
140
|
-
enableLoginWithGoogle: {
|
|
141
|
-
type: Boolean,
|
|
142
|
-
default: false
|
|
143
|
-
},
|
|
144
|
-
/**
|
|
145
|
-
* activate if login with facebook should be enabled
|
|
146
|
-
*/
|
|
147
|
-
enableLoginWithFacebook: {
|
|
148
|
-
type: Boolean,
|
|
149
|
-
default: false
|
|
150
|
-
},
|
|
151
|
-
/**
|
|
152
|
-
* value for v-model (modelValue is default name in vue 3)
|
|
153
|
-
*/
|
|
154
|
-
modelValue: {
|
|
155
|
-
type: Object,
|
|
156
|
-
default
|
|
157
|
-
() {
|
|
158
|
-
return {
|
|
159
|
-
username: "",
|
|
160
|
-
password: ""
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
,
|
|
165
|
-
/**
|
|
166
|
-
* orientation for inputfields
|
|
167
|
-
*
|
|
168
|
-
* @allowedValues 'vertical', 'horizontal'
|
|
169
|
-
*/
|
|
170
|
-
orientation: {
|
|
171
|
-
type: String,
|
|
172
|
-
default:
|
|
173
|
-
null,
|
|
174
|
-
validator(event) {
|
|
175
|
-
return event === "vertical" || event === "horizontal"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
,
|
|
179
|
-
/**
|
|
180
|
-
* options for legend for login-fieldset
|
|
181
|
-
*
|
|
182
|
-
* @requiredForAccessibility: true
|
|
183
|
-
*/
|
|
184
|
-
legendLoginForm: {
|
|
185
|
-
type: Object,
|
|
186
|
-
default() {
|
|
187
|
-
return {
|
|
188
|
-
show: true,
|
|
189
|
-
align: "right",
|
|
190
|
-
text: "Login form"
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
,
|
|
195
|
-
/**
|
|
196
|
-
* legend for forgot-login-fieldset
|
|
197
|
-
*
|
|
198
|
-
* @requiredForAccessibility: true
|
|
199
|
-
*/
|
|
200
|
-
legendForgotLoginForm: {
|
|
201
|
-
type: Object,
|
|
202
|
-
default() {
|
|
203
|
-
return {
|
|
204
|
-
show: true,
|
|
205
|
-
align: "right",
|
|
206
|
-
text: "Forgot login form"
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
/**
|
|
211
|
-
* properties for CmdLink-component for "forgot password"-link
|
|
212
|
-
*/
|
|
213
|
-
cmdLinkForgotPassword: {
|
|
214
|
-
type: Object,
|
|
215
|
-
required: false
|
|
216
|
-
},
|
|
217
|
-
/**
|
|
218
|
-
* define link to create an account (that is linked to a register-form i.e.)
|
|
219
|
-
*/
|
|
220
|
-
cmdLinkCreateAccount: {
|
|
221
|
-
type: Object,
|
|
222
|
-
required: false
|
|
223
|
-
},
|
|
224
|
-
/**
|
|
225
|
-
* properties for CmdLink-component that lead back to the "login"-view (from "send login"-view)
|
|
226
|
-
*/
|
|
227
|
-
cmdLinkBackToLogin: {
|
|
228
|
-
type: Object,
|
|
229
|
-
required: false
|
|
230
|
-
},
|
|
231
|
-
/**
|
|
232
|
-
* properties for CmdLink-component for "login with your data"-button
|
|
233
|
-
*/
|
|
234
|
-
cmdLinkLoginWithYourData: {
|
|
235
|
-
type: Object,
|
|
236
|
-
required: false
|
|
237
|
-
},
|
|
238
|
-
/**
|
|
239
|
-
* properties for CmdLink-component for "login"-button
|
|
240
|
-
*/
|
|
241
|
-
cmdLinkLogin: {
|
|
242
|
-
type: Object,
|
|
243
|
-
required: false
|
|
244
|
-
},
|
|
245
|
-
/**
|
|
246
|
-
* properties for CmdLink-component for "send login"-button
|
|
247
|
-
*/
|
|
248
|
-
cmdLinkSendLogin: {
|
|
249
|
-
type: Object,
|
|
250
|
-
required: false
|
|
251
|
-
},
|
|
252
|
-
/**
|
|
253
|
-
* properties for CmdHeadline-component for login-form
|
|
254
|
-
*/
|
|
255
|
-
cmdHeadlineLoginForm: {
|
|
256
|
-
type: Object,
|
|
257
|
-
required: false
|
|
258
|
-
},
|
|
259
|
-
/**
|
|
260
|
-
* properties for CmdHeadline-component for send-login-form
|
|
261
|
-
*/
|
|
262
|
-
cmdHeadlineSendLoginForm: {
|
|
263
|
-
type: Object,
|
|
264
|
-
required: false
|
|
265
|
-
},
|
|
266
|
-
/**
|
|
267
|
-
* properties for CmdFormElement-component for username-field
|
|
268
|
-
*
|
|
269
|
-
* @requiredForAccessibility: partial
|
|
270
|
-
*/
|
|
271
|
-
cmdFormElementUsername: {
|
|
272
|
-
type: Object,
|
|
273
|
-
required: false
|
|
274
|
-
},
|
|
275
|
-
/**
|
|
276
|
-
* properties for CmdFormElement-component for password-field
|
|
277
|
-
*
|
|
278
|
-
* @requiredForAccessibility: partial
|
|
279
|
-
*/
|
|
280
|
-
cmdFormElementPassword: {
|
|
281
|
-
type: Object,
|
|
282
|
-
required: false
|
|
283
|
-
},
|
|
284
|
-
/**
|
|
285
|
-
* properties for CmdFormElement-component for email-address-field (to send login-data)
|
|
286
|
-
*
|
|
287
|
-
* @requiredForAccessibility: partial
|
|
288
|
-
*/
|
|
289
|
-
cmdFormElementSendLogin: {
|
|
290
|
-
type: Object,
|
|
291
|
-
required: false
|
|
292
|
-
}
|
|
293
|
-
},
|
|
294
|
-
computed: {
|
|
295
|
-
cmdHeadlineLoginFormProperties() {
|
|
296
|
-
return {
|
|
297
|
-
show: true,
|
|
298
|
-
headlineLevel: 3,
|
|
299
|
-
...this.cmdHeadlineLoginForm
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
cmdFormElementUsernameProperties() {
|
|
303
|
-
return {
|
|
304
|
-
labelText: "Username:",
|
|
305
|
-
placeholder: "Type in username",
|
|
306
|
-
fieldIconClass: "icon-user-profile",
|
|
307
|
-
name: "login-username",
|
|
308
|
-
id: "login-username",
|
|
309
|
-
required: true,
|
|
310
|
-
...this.cmdFormElementUsername
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
cmdFormElementPasswordProperties() {
|
|
314
|
-
return {
|
|
315
|
-
labelText: "Password:",
|
|
316
|
-
placeholder: "Type in password",
|
|
317
|
-
fieldIconClass: "icon-security-settings",
|
|
318
|
-
name: "login-password",
|
|
319
|
-
id: "login-password",
|
|
320
|
-
required: true,
|
|
321
|
-
...this.cmdFormElementPassword
|
|
322
|
-
}
|
|
323
|
-
},
|
|
324
|
-
cmdHeadlineSendLoginFormProperties() {
|
|
325
|
-
return {
|
|
326
|
-
show: true,
|
|
327
|
-
headlineLevel: 3,
|
|
328
|
-
...this.cmdHeadlineSendLoginForm
|
|
329
|
-
}
|
|
330
|
-
},
|
|
331
|
-
cmdFormElementSendLoginProperties() {
|
|
332
|
-
return {
|
|
333
|
-
labelText: "Email-address:",
|
|
334
|
-
placeholder: "Type in email-address you are registered with",
|
|
335
|
-
fieldIconClass: "icon-mail",
|
|
336
|
-
name: "login-send-login",
|
|
337
|
-
id: "login-send-login",
|
|
338
|
-
required: true,
|
|
339
|
-
...this.cmdFormElementSendLogin
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
cmdLinkForgotPasswordProperties() {
|
|
343
|
-
return {
|
|
344
|
-
show: true,
|
|
345
|
-
text: "Forgot password",
|
|
346
|
-
highlightLevel: "primary",
|
|
347
|
-
icon: {
|
|
348
|
-
show: true,
|
|
349
|
-
iconClass: "icon-questionmark-circle"
|
|
350
|
-
},
|
|
351
|
-
...this.cmdLinkForgotPassword
|
|
352
|
-
}
|
|
353
|
-
},
|
|
354
|
-
cmdLinkLoginWithYourDataProperties() {
|
|
355
|
-
return {
|
|
356
|
-
linkType: "button", /* href, router, button */
|
|
357
|
-
type: "button", /* submit, button */
|
|
358
|
-
path: "",
|
|
359
|
-
text: "Login with your data",
|
|
360
|
-
...this.cmdLinkLoginWithYourData
|
|
361
|
-
}
|
|
362
|
-
},
|
|
363
|
-
cmdLinkLoginProperties() {
|
|
364
|
-
return {
|
|
365
|
-
linkType: "button", /* href, router, button */
|
|
366
|
-
type: "submit", /* submit, button */
|
|
367
|
-
path: "",
|
|
368
|
-
text: "Login",
|
|
369
|
-
highlightLevel: "primary",
|
|
370
|
-
icon: {
|
|
371
|
-
show: true,
|
|
372
|
-
iconClass: "icon-logon",
|
|
373
|
-
tooltip: ""
|
|
374
|
-
},
|
|
375
|
-
...this.cmdLinkLogin
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
cmdLinkSendLoginProperties() {
|
|
379
|
-
return {
|
|
380
|
-
linkType: "button", /* href, router, button */
|
|
381
|
-
type: "submit", /* submit, button */
|
|
382
|
-
path: "",
|
|
383
|
-
text: "Send login",
|
|
384
|
-
primary: true,
|
|
385
|
-
icon: {
|
|
386
|
-
show: true,
|
|
387
|
-
iconClass: "icon-mail",
|
|
388
|
-
tooltip: ""
|
|
389
|
-
},
|
|
390
|
-
highlightLevel: "primary",
|
|
391
|
-
...this.cmdLinkSendLogin
|
|
392
|
-
}
|
|
393
|
-
},
|
|
394
|
-
cmdLinkCreateAccountProperties() {
|
|
395
|
-
return {
|
|
396
|
-
show: true,
|
|
397
|
-
linkType: "href",
|
|
398
|
-
path: "#",
|
|
399
|
-
icon: {
|
|
400
|
-
show: true,
|
|
401
|
-
iconClass: "icon-register",
|
|
402
|
-
tooltip: ""
|
|
403
|
-
},
|
|
404
|
-
text: "Create account",
|
|
405
|
-
...this.cmdLinkCreateAccount
|
|
406
|
-
}
|
|
407
|
-
},
|
|
408
|
-
cmdLinkBackToLoginProperties() {
|
|
409
|
-
return {
|
|
410
|
-
icon: {
|
|
411
|
-
show: true,
|
|
412
|
-
iconClass: "icon-chevron-one-stripe-left",
|
|
413
|
-
tooltip: ""
|
|
414
|
-
},
|
|
415
|
-
text: "Back to login",
|
|
416
|
-
...this.cmdLinkBackToLogin
|
|
417
|
-
}
|
|
418
|
-
},
|
|
419
|
-
buttonLoginDisabled() {
|
|
420
|
-
return !(this.usernameValidationStatus && this.passwordValidationStatus)
|
|
421
|
-
},
|
|
422
|
-
buttonSendLoginDisabled() {
|
|
423
|
-
return !this.emailValidationStatus
|
|
424
|
-
},
|
|
425
|
-
username: {
|
|
426
|
-
get() {
|
|
427
|
-
return this.modelValue.username
|
|
428
|
-
},
|
|
429
|
-
set(value) {
|
|
430
|
-
this.$emit("update:modelValue", { username: value, password: this.password })
|
|
431
|
-
}
|
|
432
|
-
},
|
|
433
|
-
password: {
|
|
434
|
-
get() {
|
|
435
|
-
return this.modelValue.password
|
|
436
|
-
},
|
|
437
|
-
set(value) {
|
|
438
|
-
this.$emit("update:modelValue", { username: this.username, password: value })
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
},
|
|
442
|
-
methods: {
|
|
443
|
-
loginWithGoogle() {
|
|
444
|
-
this.$emit("login-with-google")
|
|
445
|
-
},
|
|
446
|
-
toggleSendLoginView() {
|
|
447
|
-
this.sendLogin = !this.sendLogin
|
|
448
|
-
/*
|
|
449
|
-
this.$nextTick(() => {
|
|
450
|
-
if (this.sendLogin) {
|
|
451
|
-
this.$refs.sendPassword.setFocus()
|
|
452
|
-
} else {
|
|
453
|
-
this.$refs.username.setFocus()
|
|
454
|
-
}
|
|
455
|
-
})*/
|
|
456
|
-
},
|
|
457
|
-
modelChange() {
|
|
458
|
-
this.$emit("update:modelValue", { "username": this.username, "password": this.password })
|
|
459
|
-
},
|
|
460
|
-
onClick(event) {
|
|
461
|
-
this.$emit("click", event)
|
|
462
|
-
},
|
|
463
|
-
getRoute(language) {
|
|
464
|
-
return getRoute(language)
|
|
465
|
-
},
|
|
466
|
-
checkValidationStatus(event, fieldType) {
|
|
467
|
-
if (event == null) {
|
|
468
|
-
return
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
if (fieldType === "username") {
|
|
472
|
-
this.usernameValidationStatus = event === "success";
|
|
473
|
-
} else if (fieldType === "password") {
|
|
474
|
-
this.passwordValidationStatus = event === "success";
|
|
475
|
-
} else {
|
|
476
|
-
this.emailValidationStatus = event === "success";
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
},
|
|
480
|
-
watch: {
|
|
481
|
-
username() {
|
|
482
|
-
this.modelChange()
|
|
483
|
-
},
|
|
484
|
-
password() {
|
|
485
|
-
this.modelChange()
|
|
486
|
-
},
|
|
487
|
-
enableLoginWithGoogle: {
|
|
488
|
-
handler() {
|
|
489
|
-
this.showLogin = false
|
|
490
|
-
},
|
|
491
|
-
immediate: true
|
|
492
|
-
},
|
|
493
|
-
enableLoginWithFacebook: {
|
|
494
|
-
handler() {
|
|
495
|
-
this.showLogin = false
|
|
496
|
-
},
|
|
497
|
-
immediate: true
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
}
|
|
501
|
-
</script>
|
|
502
|
-
|
|
503
|
-
<style>
|
|
504
|
-
/* begin cmd-login-form ---------------------------------------------------------------------------------------- */
|
|
505
|
-
.cmd-login-form {
|
|
506
|
-
.cmd-headline {
|
|
507
|
-
flex: none;
|
|
508
|
-
margin: 0;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
legend.align-left {
|
|
512
|
-
left: 0;
|
|
513
|
-
right: auto;
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.login-fields {
|
|
517
|
-
&.vertical {
|
|
518
|
-
.cmd-form-element {
|
|
519
|
-
width: 100%;
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
.option-wrapper {
|
|
525
|
-
flex: none;
|
|
526
|
-
align-items: center;
|
|
527
|
-
|
|
528
|
-
>a:not(.button) {
|
|
529
|
-
display: flex;
|
|
530
|
-
text-decoration: none;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
>.button {
|
|
534
|
-
margin-left: auto;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
/* begin google-login-button */
|
|
539
|
-
.gsi-material-button {
|
|
540
|
-
border: var(--button-border);
|
|
541
|
-
border-color: #747775;
|
|
542
|
-
color: #1f1f1f;
|
|
543
|
-
font-family: 'Roboto', arial, sans-serif;
|
|
544
|
-
letter-spacing: 0.25px;
|
|
545
|
-
transition: background-color .218s, border-color .218s, box-shadow .218s;
|
|
546
|
-
white-space: nowrap;
|
|
547
|
-
|
|
548
|
-
border-radius: var(--button-border-radius);
|
|
549
|
-
;
|
|
550
|
-
background-color: var(--color-white);
|
|
551
|
-
height: var(--input-height);
|
|
552
|
-
padding: var(--button-padding);
|
|
553
|
-
|
|
554
|
-
.gsi-material-button-icon {
|
|
555
|
-
height: 2rem;
|
|
556
|
-
aspect-ratio: 1/1;
|
|
557
|
-
margin-right: calc(var(--default-margin) / 2);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
.gsi-material-button-content-wrapper {
|
|
561
|
-
align-items: center;
|
|
562
|
-
display: flex;
|
|
563
|
-
flex-direction: row;
|
|
564
|
-
flex-wrap: nowrap;
|
|
565
|
-
height: 100%;
|
|
566
|
-
justify-content: space-between;
|
|
567
|
-
position: relative;
|
|
568
|
-
width: 100%;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
.gsi-material-button-contents {
|
|
572
|
-
flex-grow: 1;
|
|
573
|
-
font-family: 'Roboto', arial, sans-serif;
|
|
574
|
-
font-weight: 500;
|
|
575
|
-
text-overflow: ellipsis;
|
|
576
|
-
vertical-align: top;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
.gsi-material-button-state {
|
|
580
|
-
transition: opacity .218s;
|
|
581
|
-
bottom: 0;
|
|
582
|
-
left: 0;
|
|
583
|
-
opacity: 0;
|
|
584
|
-
position: absolute;
|
|
585
|
-
right: 0;
|
|
586
|
-
top: 0;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
.gsi-material-button:disabled {
|
|
590
|
-
background-color: #ffffff61;
|
|
591
|
-
border-color: #1f1f1f1f;
|
|
592
|
-
|
|
593
|
-
.gsi-material-button-contents,
|
|
594
|
-
.gsi-material-button-icon {
|
|
595
|
-
opacity: 38%;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
&:not(:disabled):is(:active, :focus) .gsi-material-button-state {
|
|
599
|
-
background-color: #303030;
|
|
600
|
-
opacity: 12%;
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
&:not(:disabled):hover {
|
|
604
|
-
box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
|
|
605
|
-
|
|
606
|
-
.gsi-material-button-state {
|
|
607
|
-
background-color: #303030;
|
|
608
|
-
opacity: 8%;
|
|
609
|
-
}
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
/* end google-login-button */
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
/* end cmd-login-form ---------------------------------------------------------------------------------------- */
|
|
618
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<!-- begin CmdLoginForm ---------------------------------------------------------------------------------------- -->
|
|
3
|
+
<fieldset v-if="!sendLogin" class="cmd-login-form flex-container">
|
|
4
|
+
<legend :class="{ 'visually-hidden': !legendLoginForm.show, 'align-left': legendLoginForm.align === 'left' }">
|
|
5
|
+
{{ legendLoginForm.text }}
|
|
6
|
+
</legend>
|
|
7
|
+
|
|
8
|
+
<CmdHeadline v-if="cmdHeadlineLoginFormProperties.show && cmdHeadlineLoginFormProperties.headlineText" v-bind="cmdHeadlineLoginFormProperties" />
|
|
9
|
+
|
|
10
|
+
<!-- begin Google-Login-Button -->
|
|
11
|
+
<button v-if="enableLoginWithGoogle" class="gsi-material-button stretch-on-small-devices"
|
|
12
|
+
@click="loginWithGoogle">
|
|
13
|
+
<div class="gsi-material-button-state"></div>
|
|
14
|
+
<div class="gsi-material-button-content-wrapper">
|
|
15
|
+
<div class="gsi-material-button-icon">
|
|
16
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"
|
|
17
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" style="display: block;">
|
|
18
|
+
<path fill="#EA4335"
|
|
19
|
+
d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z">
|
|
20
|
+
</path>
|
|
21
|
+
<path fill="#4285F4"
|
|
22
|
+
d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z">
|
|
23
|
+
</path>
|
|
24
|
+
<path fill="#FBBC05"
|
|
25
|
+
d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z">
|
|
26
|
+
</path>
|
|
27
|
+
<path fill="#34A853"
|
|
28
|
+
d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z">
|
|
29
|
+
</path>
|
|
30
|
+
<path fill="none" d="M0 0h48v48H0z"></path>
|
|
31
|
+
</svg>
|
|
32
|
+
</div>
|
|
33
|
+
<span class="gsi-material-button-contents">Sign in with Google</span>
|
|
34
|
+
<span style="display: none;">Sign in with Google</span>
|
|
35
|
+
</div>
|
|
36
|
+
</button>
|
|
37
|
+
<!-- end Google-Login-Button -->
|
|
38
|
+
|
|
39
|
+
<!-- begin Facebook-Login-Button -->
|
|
40
|
+
<div v-if="enableLoginWithFacebook" class="fb-login-button stretch-on-small-devices" data-width="200"
|
|
41
|
+
data-size="" data-button-type="" data-layout="" data-auto-logout-link="false" data-use-continue-as="false">
|
|
42
|
+
</div>
|
|
43
|
+
<!-- end Facebook-Login-Button -->
|
|
44
|
+
|
|
45
|
+
<!-- send "login with your data"-button -->
|
|
46
|
+
<CmdLink v-if="!showLogin" v-bind="cmdLinkLoginWithYourDataProperties" @click="showLogin = true" />
|
|
47
|
+
<!-- end "login with your data"-button -->
|
|
48
|
+
|
|
49
|
+
<!-- begin form elements -->
|
|
50
|
+
<div v-if="showLogin" :class="['login-fields flex-container', { 'vertical': orientation === 'vertical' }]">
|
|
51
|
+
<CmdFormElement element="input" type="text" ref="username" v-model="username"
|
|
52
|
+
v-bind="cmdFormElementUsernameProperties"
|
|
53
|
+
@validationStatusChange="checkValidationStatus($event, 'username')" />
|
|
54
|
+
<CmdFormElement element="input" type="password" v-model="password" v-bind="cmdFormElementPasswordProperties"
|
|
55
|
+
@validationStatusChange="checkValidationStatus($event, 'password')" />
|
|
56
|
+
</div>
|
|
57
|
+
<!-- end form elements -->
|
|
58
|
+
|
|
59
|
+
<!-- begin named slot for login-form -->
|
|
60
|
+
<slot name="login"></slot>
|
|
61
|
+
<!-- end named slot for login-form -->
|
|
62
|
+
|
|
63
|
+
<div class="option-wrapper flex-container">
|
|
64
|
+
<div v-if="cmdLinkForgotPasswordProperties.show || cmdLinkCreateAccountProperties.show"
|
|
65
|
+
class="flex-container reset-flex no-wrap-on-small-devices justify-content-space-around">
|
|
66
|
+
<!-- begin link for 'forgot password' -->
|
|
67
|
+
<CmdLink @click="toggleSendLoginView"
|
|
68
|
+
v-bind="cmdLinkForgotPasswordProperties"
|
|
69
|
+
/>
|
|
70
|
+
<!-- end link for 'forgot password' -->
|
|
71
|
+
|
|
72
|
+
<!-- begin link for 'create account' -->
|
|
73
|
+
<template v-if="cmdLinkCreateAccountProperties.show">
|
|
74
|
+
<CmdLink v-bind="cmdLinkCreateAccountProperties" />
|
|
75
|
+
</template>
|
|
76
|
+
<!-- end link for 'create account' -->
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<CmdLink
|
|
80
|
+
v-bind="cmdLinkLoginProperties"
|
|
81
|
+
:disabled="buttonLoginDisabled"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
</fieldset>
|
|
85
|
+
<!-- end login-form -->
|
|
86
|
+
|
|
87
|
+
<!-- begin send-login-form -->
|
|
88
|
+
<fieldset v-if="sendLogin" class="cmd-login-form flex-container">
|
|
89
|
+
<legend :class="{ 'visually-hidden': !legendForgotLoginForm.show, 'align-left': legendForgotLoginForm.align === 'left' }">
|
|
90
|
+
{{ legendForgotLoginForm.text }}
|
|
91
|
+
</legend>
|
|
92
|
+
|
|
93
|
+
<CmdHeadline v-if="cmdHeadlineSendLoginFormProperties.show && cmdHeadlineSendLoginFormProperties.headlineText" v-bind="cmdHeadlineSendLoginFormProperties" />
|
|
94
|
+
|
|
95
|
+
<CmdFormElement
|
|
96
|
+
ref="sendPassword"
|
|
97
|
+
element="input"
|
|
98
|
+
type="email"
|
|
99
|
+
@validationStatusChange="checkValidationStatus($event, 'email')"
|
|
100
|
+
v-model="sendLoginMail"
|
|
101
|
+
v-bind="cmdFormElementSendLoginProperties"
|
|
102
|
+
/>
|
|
103
|
+
|
|
104
|
+
<!-- begin slot for send-login-form -->
|
|
105
|
+
<slot name="send-login"></slot>
|
|
106
|
+
<!-- end slot for send-login-form -->
|
|
107
|
+
|
|
108
|
+
<div class="option-wrapper flex-container">
|
|
109
|
+
<CmdLink v-bind="cmdLinkBackToLoginProperties" @click="toggleSendLoginView" />
|
|
110
|
+
|
|
111
|
+
<CmdLink
|
|
112
|
+
v-bind="cmdLinkSendLoginProperties"
|
|
113
|
+
:disabled="buttonSendLoginDisabled"
|
|
114
|
+
/>
|
|
115
|
+
</div>
|
|
116
|
+
</fieldset>
|
|
117
|
+
<!-- end CmdLoginForm ---------------------------------------------------------------------------------------- -->
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<script>
|
|
121
|
+
// import utilities
|
|
122
|
+
import { getRoute } from "../utilities.js"
|
|
123
|
+
|
|
124
|
+
export default {
|
|
125
|
+
name: "CmdLoginForm",
|
|
126
|
+
data() {
|
|
127
|
+
return {
|
|
128
|
+
usernameValidationStatus: false,
|
|
129
|
+
passwordValidationStatus: false,
|
|
130
|
+
emailValidationStatus: false,
|
|
131
|
+
sendLoginMail: "",
|
|
132
|
+
sendLogin: false,
|
|
133
|
+
showLogin: true
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
props: {
|
|
137
|
+
/**
|
|
138
|
+
* activate if login with google should be enabled
|
|
139
|
+
*/
|
|
140
|
+
enableLoginWithGoogle: {
|
|
141
|
+
type: Boolean,
|
|
142
|
+
default: false
|
|
143
|
+
},
|
|
144
|
+
/**
|
|
145
|
+
* activate if login with facebook should be enabled
|
|
146
|
+
*/
|
|
147
|
+
enableLoginWithFacebook: {
|
|
148
|
+
type: Boolean,
|
|
149
|
+
default: false
|
|
150
|
+
},
|
|
151
|
+
/**
|
|
152
|
+
* value for v-model (modelValue is default name in vue 3)
|
|
153
|
+
*/
|
|
154
|
+
modelValue: {
|
|
155
|
+
type: Object,
|
|
156
|
+
default
|
|
157
|
+
() {
|
|
158
|
+
return {
|
|
159
|
+
username: "",
|
|
160
|
+
password: ""
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
,
|
|
165
|
+
/**
|
|
166
|
+
* orientation for inputfields
|
|
167
|
+
*
|
|
168
|
+
* @allowedValues 'vertical', 'horizontal'
|
|
169
|
+
*/
|
|
170
|
+
orientation: {
|
|
171
|
+
type: String,
|
|
172
|
+
default:
|
|
173
|
+
null,
|
|
174
|
+
validator(event) {
|
|
175
|
+
return event === "vertical" || event === "horizontal"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
,
|
|
179
|
+
/**
|
|
180
|
+
* options for legend for login-fieldset
|
|
181
|
+
*
|
|
182
|
+
* @requiredForAccessibility: true
|
|
183
|
+
*/
|
|
184
|
+
legendLoginForm: {
|
|
185
|
+
type: Object,
|
|
186
|
+
default() {
|
|
187
|
+
return {
|
|
188
|
+
show: true,
|
|
189
|
+
align: "right",
|
|
190
|
+
text: "Login form"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
,
|
|
195
|
+
/**
|
|
196
|
+
* legend for forgot-login-fieldset
|
|
197
|
+
*
|
|
198
|
+
* @requiredForAccessibility: true
|
|
199
|
+
*/
|
|
200
|
+
legendForgotLoginForm: {
|
|
201
|
+
type: Object,
|
|
202
|
+
default() {
|
|
203
|
+
return {
|
|
204
|
+
show: true,
|
|
205
|
+
align: "right",
|
|
206
|
+
text: "Forgot login form"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
/**
|
|
211
|
+
* properties for CmdLink-component for "forgot password"-link
|
|
212
|
+
*/
|
|
213
|
+
cmdLinkForgotPassword: {
|
|
214
|
+
type: Object,
|
|
215
|
+
required: false
|
|
216
|
+
},
|
|
217
|
+
/**
|
|
218
|
+
* define link to create an account (that is linked to a register-form i.e.)
|
|
219
|
+
*/
|
|
220
|
+
cmdLinkCreateAccount: {
|
|
221
|
+
type: Object,
|
|
222
|
+
required: false
|
|
223
|
+
},
|
|
224
|
+
/**
|
|
225
|
+
* properties for CmdLink-component that lead back to the "login"-view (from "send login"-view)
|
|
226
|
+
*/
|
|
227
|
+
cmdLinkBackToLogin: {
|
|
228
|
+
type: Object,
|
|
229
|
+
required: false
|
|
230
|
+
},
|
|
231
|
+
/**
|
|
232
|
+
* properties for CmdLink-component for "login with your data"-button
|
|
233
|
+
*/
|
|
234
|
+
cmdLinkLoginWithYourData: {
|
|
235
|
+
type: Object,
|
|
236
|
+
required: false
|
|
237
|
+
},
|
|
238
|
+
/**
|
|
239
|
+
* properties for CmdLink-component for "login"-button
|
|
240
|
+
*/
|
|
241
|
+
cmdLinkLogin: {
|
|
242
|
+
type: Object,
|
|
243
|
+
required: false
|
|
244
|
+
},
|
|
245
|
+
/**
|
|
246
|
+
* properties for CmdLink-component for "send login"-button
|
|
247
|
+
*/
|
|
248
|
+
cmdLinkSendLogin: {
|
|
249
|
+
type: Object,
|
|
250
|
+
required: false
|
|
251
|
+
},
|
|
252
|
+
/**
|
|
253
|
+
* properties for CmdHeadline-component for login-form
|
|
254
|
+
*/
|
|
255
|
+
cmdHeadlineLoginForm: {
|
|
256
|
+
type: Object,
|
|
257
|
+
required: false
|
|
258
|
+
},
|
|
259
|
+
/**
|
|
260
|
+
* properties for CmdHeadline-component for send-login-form
|
|
261
|
+
*/
|
|
262
|
+
cmdHeadlineSendLoginForm: {
|
|
263
|
+
type: Object,
|
|
264
|
+
required: false
|
|
265
|
+
},
|
|
266
|
+
/**
|
|
267
|
+
* properties for CmdFormElement-component for username-field
|
|
268
|
+
*
|
|
269
|
+
* @requiredForAccessibility: partial
|
|
270
|
+
*/
|
|
271
|
+
cmdFormElementUsername: {
|
|
272
|
+
type: Object,
|
|
273
|
+
required: false
|
|
274
|
+
},
|
|
275
|
+
/**
|
|
276
|
+
* properties for CmdFormElement-component for password-field
|
|
277
|
+
*
|
|
278
|
+
* @requiredForAccessibility: partial
|
|
279
|
+
*/
|
|
280
|
+
cmdFormElementPassword: {
|
|
281
|
+
type: Object,
|
|
282
|
+
required: false
|
|
283
|
+
},
|
|
284
|
+
/**
|
|
285
|
+
* properties for CmdFormElement-component for email-address-field (to send login-data)
|
|
286
|
+
*
|
|
287
|
+
* @requiredForAccessibility: partial
|
|
288
|
+
*/
|
|
289
|
+
cmdFormElementSendLogin: {
|
|
290
|
+
type: Object,
|
|
291
|
+
required: false
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
computed: {
|
|
295
|
+
cmdHeadlineLoginFormProperties() {
|
|
296
|
+
return {
|
|
297
|
+
show: true,
|
|
298
|
+
headlineLevel: 3,
|
|
299
|
+
...this.cmdHeadlineLoginForm
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
cmdFormElementUsernameProperties() {
|
|
303
|
+
return {
|
|
304
|
+
labelText: "Username:",
|
|
305
|
+
placeholder: "Type in username",
|
|
306
|
+
fieldIconClass: "icon-user-profile",
|
|
307
|
+
name: "login-username",
|
|
308
|
+
id: "login-username",
|
|
309
|
+
required: true,
|
|
310
|
+
...this.cmdFormElementUsername
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
cmdFormElementPasswordProperties() {
|
|
314
|
+
return {
|
|
315
|
+
labelText: "Password:",
|
|
316
|
+
placeholder: "Type in password",
|
|
317
|
+
fieldIconClass: "icon-security-settings",
|
|
318
|
+
name: "login-password",
|
|
319
|
+
id: "login-password",
|
|
320
|
+
required: true,
|
|
321
|
+
...this.cmdFormElementPassword
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
cmdHeadlineSendLoginFormProperties() {
|
|
325
|
+
return {
|
|
326
|
+
show: true,
|
|
327
|
+
headlineLevel: 3,
|
|
328
|
+
...this.cmdHeadlineSendLoginForm
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
cmdFormElementSendLoginProperties() {
|
|
332
|
+
return {
|
|
333
|
+
labelText: "Email-address:",
|
|
334
|
+
placeholder: "Type in email-address you are registered with",
|
|
335
|
+
fieldIconClass: "icon-mail",
|
|
336
|
+
name: "login-send-login",
|
|
337
|
+
id: "login-send-login",
|
|
338
|
+
required: true,
|
|
339
|
+
...this.cmdFormElementSendLogin
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
cmdLinkForgotPasswordProperties() {
|
|
343
|
+
return {
|
|
344
|
+
show: true,
|
|
345
|
+
text: "Forgot password",
|
|
346
|
+
highlightLevel: "primary",
|
|
347
|
+
icon: {
|
|
348
|
+
show: true,
|
|
349
|
+
iconClass: "icon-questionmark-circle"
|
|
350
|
+
},
|
|
351
|
+
...this.cmdLinkForgotPassword
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
cmdLinkLoginWithYourDataProperties() {
|
|
355
|
+
return {
|
|
356
|
+
linkType: "button", /* href, router, button */
|
|
357
|
+
type: "button", /* submit, button */
|
|
358
|
+
path: "",
|
|
359
|
+
text: "Login with your data",
|
|
360
|
+
...this.cmdLinkLoginWithYourData
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
cmdLinkLoginProperties() {
|
|
364
|
+
return {
|
|
365
|
+
linkType: "button", /* href, router, button */
|
|
366
|
+
type: "submit", /* submit, button */
|
|
367
|
+
path: "",
|
|
368
|
+
text: "Login",
|
|
369
|
+
highlightLevel: "primary",
|
|
370
|
+
icon: {
|
|
371
|
+
show: true,
|
|
372
|
+
iconClass: "icon-logon",
|
|
373
|
+
tooltip: ""
|
|
374
|
+
},
|
|
375
|
+
...this.cmdLinkLogin
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
cmdLinkSendLoginProperties() {
|
|
379
|
+
return {
|
|
380
|
+
linkType: "button", /* href, router, button */
|
|
381
|
+
type: "submit", /* submit, button */
|
|
382
|
+
path: "",
|
|
383
|
+
text: "Send login",
|
|
384
|
+
primary: true,
|
|
385
|
+
icon: {
|
|
386
|
+
show: true,
|
|
387
|
+
iconClass: "icon-mail",
|
|
388
|
+
tooltip: ""
|
|
389
|
+
},
|
|
390
|
+
highlightLevel: "primary",
|
|
391
|
+
...this.cmdLinkSendLogin
|
|
392
|
+
}
|
|
393
|
+
},
|
|
394
|
+
cmdLinkCreateAccountProperties() {
|
|
395
|
+
return {
|
|
396
|
+
show: true,
|
|
397
|
+
linkType: "href",
|
|
398
|
+
path: "#",
|
|
399
|
+
icon: {
|
|
400
|
+
show: true,
|
|
401
|
+
iconClass: "icon-register",
|
|
402
|
+
tooltip: ""
|
|
403
|
+
},
|
|
404
|
+
text: "Create account",
|
|
405
|
+
...this.cmdLinkCreateAccount
|
|
406
|
+
}
|
|
407
|
+
},
|
|
408
|
+
cmdLinkBackToLoginProperties() {
|
|
409
|
+
return {
|
|
410
|
+
icon: {
|
|
411
|
+
show: true,
|
|
412
|
+
iconClass: "icon-chevron-one-stripe-left",
|
|
413
|
+
tooltip: ""
|
|
414
|
+
},
|
|
415
|
+
text: "Back to login",
|
|
416
|
+
...this.cmdLinkBackToLogin
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
buttonLoginDisabled() {
|
|
420
|
+
return !(this.usernameValidationStatus && this.passwordValidationStatus)
|
|
421
|
+
},
|
|
422
|
+
buttonSendLoginDisabled() {
|
|
423
|
+
return !this.emailValidationStatus
|
|
424
|
+
},
|
|
425
|
+
username: {
|
|
426
|
+
get() {
|
|
427
|
+
return this.modelValue.username
|
|
428
|
+
},
|
|
429
|
+
set(value) {
|
|
430
|
+
this.$emit("update:modelValue", { username: value, password: this.password })
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
password: {
|
|
434
|
+
get() {
|
|
435
|
+
return this.modelValue.password
|
|
436
|
+
},
|
|
437
|
+
set(value) {
|
|
438
|
+
this.$emit("update:modelValue", { username: this.username, password: value })
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
methods: {
|
|
443
|
+
loginWithGoogle() {
|
|
444
|
+
this.$emit("login-with-google")
|
|
445
|
+
},
|
|
446
|
+
toggleSendLoginView() {
|
|
447
|
+
this.sendLogin = !this.sendLogin
|
|
448
|
+
/*
|
|
449
|
+
this.$nextTick(() => {
|
|
450
|
+
if (this.sendLogin) {
|
|
451
|
+
this.$refs.sendPassword.setFocus()
|
|
452
|
+
} else {
|
|
453
|
+
this.$refs.username.setFocus()
|
|
454
|
+
}
|
|
455
|
+
})*/
|
|
456
|
+
},
|
|
457
|
+
modelChange() {
|
|
458
|
+
this.$emit("update:modelValue", { "username": this.username, "password": this.password })
|
|
459
|
+
},
|
|
460
|
+
onClick(event) {
|
|
461
|
+
this.$emit("click", event)
|
|
462
|
+
},
|
|
463
|
+
getRoute(language) {
|
|
464
|
+
return getRoute(language)
|
|
465
|
+
},
|
|
466
|
+
checkValidationStatus(event, fieldType) {
|
|
467
|
+
if (event == null) {
|
|
468
|
+
return
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
if (fieldType === "username") {
|
|
472
|
+
this.usernameValidationStatus = event === "success";
|
|
473
|
+
} else if (fieldType === "password") {
|
|
474
|
+
this.passwordValidationStatus = event === "success";
|
|
475
|
+
} else {
|
|
476
|
+
this.emailValidationStatus = event === "success";
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
watch: {
|
|
481
|
+
username() {
|
|
482
|
+
this.modelChange()
|
|
483
|
+
},
|
|
484
|
+
password() {
|
|
485
|
+
this.modelChange()
|
|
486
|
+
},
|
|
487
|
+
enableLoginWithGoogle: {
|
|
488
|
+
handler() {
|
|
489
|
+
this.showLogin = false
|
|
490
|
+
},
|
|
491
|
+
immediate: true
|
|
492
|
+
},
|
|
493
|
+
enableLoginWithFacebook: {
|
|
494
|
+
handler() {
|
|
495
|
+
this.showLogin = false
|
|
496
|
+
},
|
|
497
|
+
immediate: true
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
</script>
|
|
502
|
+
|
|
503
|
+
<style>
|
|
504
|
+
/* begin cmd-login-form ---------------------------------------------------------------------------------------- */
|
|
505
|
+
.cmd-login-form {
|
|
506
|
+
.cmd-headline {
|
|
507
|
+
flex: none;
|
|
508
|
+
margin: 0;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
legend.align-left {
|
|
512
|
+
left: 0;
|
|
513
|
+
right: auto;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.login-fields {
|
|
517
|
+
&.vertical {
|
|
518
|
+
.cmd-form-element {
|
|
519
|
+
width: 100%;
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.option-wrapper {
|
|
525
|
+
flex: none;
|
|
526
|
+
align-items: center;
|
|
527
|
+
|
|
528
|
+
>a:not(.button) {
|
|
529
|
+
display: flex;
|
|
530
|
+
text-decoration: none;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
>.button {
|
|
534
|
+
margin-left: auto;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
/* begin google-login-button */
|
|
539
|
+
.gsi-material-button {
|
|
540
|
+
border: var(--button-border);
|
|
541
|
+
border-color: #747775;
|
|
542
|
+
color: #1f1f1f;
|
|
543
|
+
font-family: 'Roboto', arial, sans-serif;
|
|
544
|
+
letter-spacing: 0.25px;
|
|
545
|
+
transition: background-color .218s, border-color .218s, box-shadow .218s;
|
|
546
|
+
white-space: nowrap;
|
|
547
|
+
|
|
548
|
+
border-radius: var(--button-border-radius);
|
|
549
|
+
;
|
|
550
|
+
background-color: var(--color-white);
|
|
551
|
+
height: var(--input-height);
|
|
552
|
+
padding: var(--button-padding);
|
|
553
|
+
|
|
554
|
+
.gsi-material-button-icon {
|
|
555
|
+
height: 2rem;
|
|
556
|
+
aspect-ratio: 1/1;
|
|
557
|
+
margin-right: calc(var(--default-margin) / 2);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.gsi-material-button-content-wrapper {
|
|
561
|
+
align-items: center;
|
|
562
|
+
display: flex;
|
|
563
|
+
flex-direction: row;
|
|
564
|
+
flex-wrap: nowrap;
|
|
565
|
+
height: 100%;
|
|
566
|
+
justify-content: space-between;
|
|
567
|
+
position: relative;
|
|
568
|
+
width: 100%;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.gsi-material-button-contents {
|
|
572
|
+
flex-grow: 1;
|
|
573
|
+
font-family: 'Roboto', arial, sans-serif;
|
|
574
|
+
font-weight: 500;
|
|
575
|
+
text-overflow: ellipsis;
|
|
576
|
+
vertical-align: top;
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
.gsi-material-button-state {
|
|
580
|
+
transition: opacity .218s;
|
|
581
|
+
bottom: 0;
|
|
582
|
+
left: 0;
|
|
583
|
+
opacity: 0;
|
|
584
|
+
position: absolute;
|
|
585
|
+
right: 0;
|
|
586
|
+
top: 0;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
.gsi-material-button:disabled {
|
|
590
|
+
background-color: #ffffff61;
|
|
591
|
+
border-color: #1f1f1f1f;
|
|
592
|
+
|
|
593
|
+
.gsi-material-button-contents,
|
|
594
|
+
.gsi-material-button-icon {
|
|
595
|
+
opacity: 38%;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
&:not(:disabled):is(:active, :focus) .gsi-material-button-state {
|
|
599
|
+
background-color: #303030;
|
|
600
|
+
opacity: 12%;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
&:not(:disabled):hover {
|
|
604
|
+
box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
|
|
605
|
+
|
|
606
|
+
.gsi-material-button-state {
|
|
607
|
+
background-color: #303030;
|
|
608
|
+
opacity: 8%;
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/* end google-login-button */
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
/* end cmd-login-form ---------------------------------------------------------------------------------------- */
|
|
618
|
+
</style>
|