comand-component-library 4.2.9 → 4.2.11
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.js +1478 -1424
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/src/ComponentLibrary.vue +24 -5
- package/src/assets/data/form-elements.json +3 -7
- package/src/assets/lists-of-data/.htaccess +1 -0
- package/src/assets/lists-of-data/casual-01.json +113 -0
- package/src/assets/lists-of-data/founder-01.json +111 -0
- package/src/assets/lists-of-data/investor-01.json +114 -0
- package/src/componentSettingsDataAndControls.vue +1 -1
- package/src/components/CmdBox.vue +7 -4
- package/src/components/CmdFakeSelect.vue +18 -5
- package/src/components/CmdForm.vue +11 -9
- package/src/components/CmdFormElement.vue +6 -0
- package/src/components/CmdInputGroup.vue +3 -4
- package/src/components/CmdListOfRequirements.vue +6 -6
- package/src/components/CmdLoginForm.vue +96 -86
- package/src/components/CmdTooltip.vue +42 -26
- package/src/index.js +1 -0
- package/src/main.js +5 -1
- package/dist/media/images/flags/flag-cn.svg +0 -2524
- package/dist/media/images/flags/flag-de.svg +0 -76
- package/dist/media/images/flags/flag-dk.svg +0 -5
- package/dist/media/images/flags/flag-en.svg +0 -76
- package/dist/media/images/flags/flag-es.svg +0 -2530
- package/dist/media/images/flags/flag-fi.svg +0 -5
- package/dist/media/images/flags/flag-fr.svg +0 -76
- package/dist/media/images/flags/flag-it.svg +0 -76
- package/dist/media/images/flags/flag-no.svg +0 -7
- package/dist/media/images/flags/flag-ru.svg +0 -76
- package/dist/media/images/flags/flag-se.svg +0 -5
- package/src/components/CmdTooltipForInputElements.vue +0 -64
@@ -1,7 +1,9 @@
|
|
1
1
|
<template>
|
2
2
|
<!-- begin login-form -->
|
3
3
|
<fieldset v-show="!sendLogin" class="cmd-login-form flex-container">
|
4
|
-
<legend :class="{hidden : !legendLoginForm.show, 'align-left': legendLoginForm.align === 'left'}">
|
4
|
+
<legend :class="{hidden : !legendLoginForm.show, 'align-left': legendLoginForm.align === 'left'}">
|
5
|
+
{{ legendLoginForm.text }}
|
6
|
+
</legend>
|
5
7
|
<!-- begin CmdHeadline -->
|
6
8
|
<CmdHeadline
|
7
9
|
v-if="cmdHeadlineLoginForm"
|
@@ -14,11 +16,16 @@
|
|
14
16
|
<div class="gsi-material-button-state"></div>
|
15
17
|
<div class="gsi-material-button-content-wrapper">
|
16
18
|
<div class="gsi-material-button-icon">
|
17
|
-
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"
|
18
|
-
|
19
|
-
<path fill="#
|
20
|
-
|
21
|
-
<path fill="#
|
19
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"
|
20
|
+
xmlns:xlink="http://www.w3.org/1999/xlink" style="display: block;">
|
21
|
+
<path fill="#EA4335"
|
22
|
+
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"></path>
|
23
|
+
<path fill="#4285F4"
|
24
|
+
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"></path>
|
25
|
+
<path fill="#FBBC05"
|
26
|
+
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"></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"></path>
|
22
29
|
<path fill="none" d="M0 0h48v48H0z"></path>
|
23
30
|
</svg>
|
24
31
|
</div>
|
@@ -31,7 +38,7 @@
|
|
31
38
|
<!-- begin Facebook-Login-Button -->
|
32
39
|
<div v-if="enableLoginWithFacebook"
|
33
40
|
class="fb-login-button"
|
34
|
-
data-width=""
|
41
|
+
data-width="200"
|
35
42
|
data-size=""
|
36
43
|
data-button-type=""
|
37
44
|
data-layout=""
|
@@ -40,8 +47,12 @@
|
|
40
47
|
</div>
|
41
48
|
<!-- end Facebook-Login-Button -->
|
42
49
|
|
50
|
+
<button v-if="enableLoginWithGoogle || enableLoginWithFacebook" @click.prevent="showLogin = true">
|
51
|
+
<span>Login with your data</span>
|
52
|
+
</button>
|
53
|
+
|
43
54
|
<!-- begin form elements -->
|
44
|
-
<div :class="['login-fields flex-container', {'vertical': orientation === 'vertical'}]">
|
55
|
+
<div v-show="showLogin" :class="['login-fields flex-container', {'vertical': orientation === 'vertical'}]">
|
45
56
|
<!-- begin CmdFormElement -->
|
46
57
|
<CmdFormElement
|
47
58
|
element="input"
|
@@ -75,9 +86,9 @@
|
|
75
86
|
<a v-if="linkForgotPassword" href="#" @click.prevent="toggleSendLoginView">
|
76
87
|
<!-- begin CmdIcon -->
|
77
88
|
<CmdIcon v-if="linkForgotPassword.icon?.show && linkForgotPassword.icon?.iconClass"
|
78
|
-
|
79
|
-
|
80
|
-
|
89
|
+
:iconClass="linkForgotPassword.icon.iconClass"
|
90
|
+
:type="linkForgotPassword.icon.iconType"
|
91
|
+
:title="linkForgotPassword.icon.tooltip"
|
81
92
|
/>
|
82
93
|
<!-- end CmdIcon -->
|
83
94
|
<span v-if="linkForgotPassword.text">{{ linkForgotPassword.text }}</span>
|
@@ -128,7 +139,9 @@
|
|
128
139
|
|
129
140
|
<!-- begin send-login-form -->
|
130
141
|
<fieldset v-show="sendLogin" class="cmd-login-form flex-container">
|
131
|
-
<legend :class="{hidden : !legendForgotLoginForm.show, 'align-left': legendForgotLoginForm.align === 'left'}">
|
142
|
+
<legend :class="{hidden : !legendForgotLoginForm.show, 'align-left': legendForgotLoginForm.align === 'left'}">
|
143
|
+
{{ legendForgotLoginForm.text }}
|
144
|
+
</legend>
|
132
145
|
<!-- begin CmdHeadline -->
|
133
146
|
<CmdHeadline
|
134
147
|
v-if="cmdHeadlineSendLoginForm"
|
@@ -163,7 +176,7 @@
|
|
163
176
|
<!-- end CmdIcon -->
|
164
177
|
|
165
178
|
<span>
|
166
|
-
{{linkBackToLogin.text}}
|
179
|
+
{{ linkBackToLogin.text }}
|
167
180
|
</span>
|
168
181
|
</a>
|
169
182
|
|
@@ -202,36 +215,40 @@ export default {
|
|
202
215
|
passwordValidationStatus: false,
|
203
216
|
emailValidationStatus: false,
|
204
217
|
sendLoginMail: "",
|
205
|
-
sendLogin: false
|
218
|
+
sendLogin: false,
|
219
|
+
showLogin: true
|
206
220
|
}
|
207
221
|
},
|
208
222
|
props: {
|
209
223
|
/**
|
210
224
|
* activate if login with google should be enabled
|
211
225
|
*/
|
212
|
-
enableLoginWithGoogle:
|
213
|
-
|
214
|
-
|
215
|
-
|
226
|
+
enableLoginWithGoogle:
|
227
|
+
{
|
228
|
+
type: Boolean,
|
229
|
+
default: true
|
230
|
+
},
|
216
231
|
/**
|
217
232
|
* activate if login with facebook should be enabled
|
218
233
|
*/
|
219
234
|
enableLoginWithFacebook: {
|
220
235
|
type: Boolean,
|
221
|
-
default:
|
236
|
+
default: false
|
222
237
|
},
|
223
238
|
/**
|
224
239
|
* value for v-model (modelValue is default name in vue 3)
|
225
240
|
*/
|
226
241
|
modelValue: {
|
227
242
|
type: Object,
|
228
|
-
default
|
243
|
+
default
|
244
|
+
() {
|
229
245
|
return {
|
230
246
|
username: "",
|
231
247
|
password: ""
|
232
248
|
}
|
233
249
|
}
|
234
|
-
}
|
250
|
+
}
|
251
|
+
,
|
235
252
|
/**
|
236
253
|
* orientation for inputfields
|
237
254
|
*
|
@@ -239,11 +256,13 @@ export default {
|
|
239
256
|
*/
|
240
257
|
orientation: {
|
241
258
|
type: String,
|
242
|
-
default:
|
259
|
+
default:
|
260
|
+
null,
|
243
261
|
validator(event) {
|
244
262
|
return event === "vertical" || event === "horizontal"
|
245
263
|
}
|
246
|
-
}
|
264
|
+
}
|
265
|
+
,
|
247
266
|
/**
|
248
267
|
* options for legend for login-fieldset
|
249
268
|
*
|
@@ -251,29 +270,33 @@ export default {
|
|
251
270
|
*/
|
252
271
|
legendLoginForm: {
|
253
272
|
type: Object,
|
254
|
-
default
|
273
|
+
default
|
274
|
+
() {
|
255
275
|
return {
|
256
276
|
show: true,
|
257
277
|
align: "right",
|
258
278
|
text: "Login form"
|
259
279
|
}
|
260
280
|
}
|
261
|
-
}
|
281
|
+
}
|
282
|
+
,
|
262
283
|
/**
|
263
284
|
* legend for forgot-login-fieldset
|
264
285
|
*
|
265
286
|
* @requiredForAccessibility: true
|
266
|
-
|
287
|
+
*/
|
267
288
|
legendForgotLoginForm: {
|
268
289
|
type: Object,
|
269
|
-
default
|
290
|
+
default
|
291
|
+
() {
|
270
292
|
return {
|
271
293
|
show: true,
|
272
294
|
align: "right",
|
273
295
|
text: "Forgot login form"
|
274
296
|
}
|
275
297
|
}
|
276
|
-
}
|
298
|
+
}
|
299
|
+
,
|
277
300
|
/**
|
278
301
|
* properties for CmdHeadline-component for login-form
|
279
302
|
*/
|
@@ -317,13 +340,14 @@ export default {
|
|
317
340
|
},
|
318
341
|
/**
|
319
342
|
* options to display
|
320
|
-
*
|
343
|
+
*
|
321
344
|
* forgotPassword: toggles form to send password by email
|
322
345
|
* createAccount: creates a link (href/router) which could lead to a register-form
|
323
346
|
*/
|
324
347
|
linkForgotPassword: {
|
325
348
|
type: Object,
|
326
|
-
default
|
349
|
+
default
|
350
|
+
() {
|
327
351
|
return {
|
328
352
|
icon: {
|
329
353
|
show: true,
|
@@ -357,7 +381,8 @@ export default {
|
|
357
381
|
*/
|
358
382
|
linkBackToLogin: {
|
359
383
|
type: Object,
|
360
|
-
default
|
384
|
+
default
|
385
|
+
() {
|
361
386
|
return {
|
362
387
|
icon: {
|
363
388
|
show: true,
|
@@ -485,7 +510,7 @@ export default {
|
|
485
510
|
this.sendLogin = !this.sendLogin
|
486
511
|
|
487
512
|
this.$nextTick(() => {
|
488
|
-
if(this.sendLogin) {
|
513
|
+
if (this.sendLogin) {
|
489
514
|
this.$refs.sendPassword.setFocus()
|
490
515
|
} else {
|
491
516
|
this.$refs.username.setFocus()
|
@@ -493,7 +518,7 @@ export default {
|
|
493
518
|
})
|
494
519
|
},
|
495
520
|
modelChange() {
|
496
|
-
this.$emit("update:modelValue", {
|
521
|
+
this.$emit("update:modelValue", {"username": this.username, "password": this.password})
|
497
522
|
},
|
498
523
|
onClick(event) {
|
499
524
|
this.$emit("click", event)
|
@@ -517,10 +542,22 @@ export default {
|
|
517
542
|
},
|
518
543
|
watch: {
|
519
544
|
username() {
|
520
|
-
|
545
|
+
this.modelChange()
|
521
546
|
},
|
522
547
|
password() {
|
523
|
-
|
548
|
+
this.modelChange()
|
549
|
+
},
|
550
|
+
enableLoginWithGoogle: {
|
551
|
+
handler() {
|
552
|
+
this.showLogin = false
|
553
|
+
},
|
554
|
+
immediate: true
|
555
|
+
},
|
556
|
+
enableLoginWithFacebook: {
|
557
|
+
handler() {
|
558
|
+
this.showLogin = false
|
559
|
+
},
|
560
|
+
immediate: true
|
524
561
|
}
|
525
562
|
}
|
526
563
|
}
|
@@ -541,9 +578,9 @@ export default {
|
|
541
578
|
|
542
579
|
.login-fields {
|
543
580
|
&.vertical {
|
544
|
-
|
545
|
-
|
546
|
-
|
581
|
+
.cmd-form-element {
|
582
|
+
width: 100%;
|
583
|
+
}
|
547
584
|
}
|
548
585
|
}
|
549
586
|
|
@@ -552,7 +589,7 @@ export default {
|
|
552
589
|
align-items: center;
|
553
590
|
|
554
591
|
> a:not(.button) {
|
555
|
-
display:
|
592
|
+
display: flex;
|
556
593
|
text-decoration: none;
|
557
594
|
}
|
558
595
|
|
@@ -563,51 +600,30 @@ export default {
|
|
563
600
|
|
564
601
|
/* begin google-login-button */
|
565
602
|
.gsi-material-button {
|
566
|
-
|
567
|
-
-
|
568
|
-
-ms-user-select: none;
|
569
|
-
-webkit-appearance: none;
|
570
|
-
background-color: WHITE;
|
571
|
-
background-image: none;
|
572
|
-
border: 1px solid #747775;
|
573
|
-
-webkit-border-radius: 4px;
|
574
|
-
border-radius: 4px;
|
575
|
-
-webkit-box-sizing: border-box;
|
576
|
-
box-sizing: border-box;
|
603
|
+
border: var(--button-border);
|
604
|
+
border-color: #747775;
|
577
605
|
color: #1f1f1f;
|
578
|
-
cursor: pointer;
|
579
606
|
font-family: 'Roboto', arial, sans-serif;
|
580
|
-
font-size: 14px;
|
581
|
-
height: 40px;
|
582
607
|
letter-spacing: 0.25px;
|
583
|
-
outline: none;
|
584
|
-
overflow: hidden;
|
585
|
-
padding: 0 12px;
|
586
|
-
position: relative;
|
587
|
-
text-align: center;
|
588
|
-
-webkit-transition: background-color .218s, border-color .218s, box-shadow .218s;
|
589
608
|
transition: background-color .218s, border-color .218s, box-shadow .218s;
|
590
|
-
vertical-align: middle;
|
591
609
|
white-space: nowrap;
|
592
|
-
|
593
|
-
|
594
|
-
|
610
|
+
|
611
|
+
border-radius: var(--button-border-radius);;
|
612
|
+
background-color: var(--color-white);
|
613
|
+
height: var(--input-height);
|
614
|
+
padding: var(--button-padding);
|
595
615
|
}
|
596
616
|
|
597
617
|
.gsi-material-button .gsi-material-button-icon {
|
598
|
-
height:
|
599
|
-
|
600
|
-
|
601
|
-
width: 20px;
|
618
|
+
height: 2rem;
|
619
|
+
aspect-ratio: 1/1;
|
620
|
+
margin-right: calc(var(--default-margin) / 2);
|
602
621
|
}
|
603
622
|
|
604
623
|
.gsi-material-button .gsi-material-button-content-wrapper {
|
605
|
-
-webkit-align-items: center;
|
606
624
|
align-items: center;
|
607
625
|
display: flex;
|
608
|
-
-webkit-flex-direction: row;
|
609
626
|
flex-direction: row;
|
610
|
-
-webkit-flex-wrap: nowrap;
|
611
627
|
flex-wrap: nowrap;
|
612
628
|
height: 100%;
|
613
629
|
justify-content: space-between;
|
@@ -616,7 +632,6 @@ export default {
|
|
616
632
|
}
|
617
633
|
|
618
634
|
.gsi-material-button .gsi-material-button-contents {
|
619
|
-
-webkit-flex-grow: 1;
|
620
635
|
flex-grow: 1;
|
621
636
|
font-family: 'Roboto', arial, sans-serif;
|
622
637
|
font-weight: 500;
|
@@ -626,7 +641,6 @@ export default {
|
|
626
641
|
}
|
627
642
|
|
628
643
|
.gsi-material-button .gsi-material-button-state {
|
629
|
-
-webkit-transition: opacity .218s;
|
630
644
|
transition: opacity .218s;
|
631
645
|
bottom: 0;
|
632
646
|
left: 0;
|
@@ -637,35 +651,31 @@ export default {
|
|
637
651
|
}
|
638
652
|
|
639
653
|
.gsi-material-button:disabled {
|
640
|
-
cursor: default;
|
641
654
|
background-color: #ffffff61;
|
642
655
|
border-color: #1f1f1f1f;
|
643
656
|
}
|
644
657
|
|
645
|
-
.gsi-material-button:disabled
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
.gsi-material-button:disabled .gsi-material-button-icon {
|
650
|
-
opacity: 38%;
|
658
|
+
.gsi-material-button:disabled {
|
659
|
+
.gsi-material-button-contents, .gsi-material-button-icon {
|
660
|
+
opacity: 38%;
|
661
|
+
}
|
651
662
|
}
|
652
663
|
|
653
|
-
.gsi-material-button:not(:disabled):active .gsi-material-button-state
|
654
|
-
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
|
664
|
+
.gsi-material-button:not(:disabled):is(:active, :focus) .gsi-material-button-state {
|
655
665
|
background-color: #303030;
|
656
666
|
opacity: 12%;
|
657
667
|
}
|
658
668
|
|
659
669
|
.gsi-material-button:not(:disabled):hover {
|
660
|
-
-webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
|
661
670
|
box-shadow: 0 1px 2px 0 rgba(60, 64, 67, .30), 0 1px 3px 1px rgba(60, 64, 67, .15);
|
662
|
-
}
|
663
671
|
|
664
|
-
|
665
|
-
|
666
|
-
|
672
|
+
.gsi-material-button-state {
|
673
|
+
background-color: #303030;
|
674
|
+
opacity: 8%;
|
675
|
+
}
|
667
676
|
}
|
668
677
|
/* end google-login-button */
|
669
678
|
}
|
679
|
+
|
670
680
|
/* end cmd-login-form ---------------------------------------------------------------------------------------- */
|
671
681
|
</style>
|
@@ -4,14 +4,15 @@
|
|
4
4
|
<!-- begin CmdHeadline -->
|
5
5
|
<CmdHeadline
|
6
6
|
v-if="cmdHeadline"
|
7
|
-
|
7
|
+
v-bind="cmdHeadline"
|
8
8
|
/>
|
9
9
|
<!-- end CmdHeadline -->
|
10
10
|
|
11
11
|
<!-- begin icon to close tooltip -->
|
12
|
-
<a v-if="iconClose.show && toggleVisibilityByClick" href="#" @click.prevent="hideTooltip"
|
12
|
+
<a v-if="iconClose.show && toggleVisibilityByClick" href="#" @click.prevent="hideTooltip"
|
13
|
+
:title="iconClose.tooltip">
|
13
14
|
<!-- begin CmdIcon -->
|
14
|
-
<CmdIcon :iconClass="iconClose.iconClass" :type="iconClose.iconType"
|
15
|
+
<CmdIcon :iconClass="iconClose.iconClass" :type="iconClose.iconType"/>
|
15
16
|
<!-- end CmdIcon -->
|
16
17
|
</a>
|
17
18
|
<!-- end icon to close tooltip -->
|
@@ -35,13 +36,19 @@ export default {
|
|
35
36
|
pointerY: 0
|
36
37
|
}
|
37
38
|
},
|
39
|
+
inject: {
|
40
|
+
injectScrollContainer: {
|
41
|
+
default: ""
|
42
|
+
}
|
43
|
+
},
|
38
44
|
props: {
|
39
45
|
/**
|
40
46
|
* properties for CmdHeadline-component
|
41
47
|
*/
|
42
48
|
cmdHeadline: {
|
43
49
|
type: Object,
|
44
|
-
default() {
|
50
|
+
default() {
|
51
|
+
}
|
45
52
|
},
|
46
53
|
/**
|
47
54
|
* text shown as tooltip
|
@@ -95,14 +102,14 @@ export default {
|
|
95
102
|
* @requiredForAccessibility: partial
|
96
103
|
*/
|
97
104
|
iconClose: {
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
105
|
+
type: Object,
|
106
|
+
default() {
|
107
|
+
return {
|
108
|
+
show: true,
|
109
|
+
iconClass: "icon-cancel",
|
110
|
+
tooltip: "Close this tooltip!"
|
111
|
+
}
|
112
|
+
}
|
106
113
|
},
|
107
114
|
/**
|
108
115
|
* enable toggling tooltip-visibility by click
|
@@ -113,12 +120,21 @@ export default {
|
|
113
120
|
}
|
114
121
|
},
|
115
122
|
mounted() {
|
116
|
-
if(this.relatedId) {
|
123
|
+
if (this.relatedId) {
|
117
124
|
const relatedElement = document.getElementById(this.relatedId)
|
118
125
|
|
119
|
-
if(relatedElement) {
|
120
|
-
|
121
|
-
|
126
|
+
if (relatedElement) {
|
127
|
+
const scrollContainerSelector = this.injectScrollContainer || this.scrollContainer
|
128
|
+
|
129
|
+
if (scrollContainerSelector) {
|
130
|
+
const scrollContainerElement = document.querySelector(scrollContainerSelector)
|
131
|
+
|
132
|
+
if(scrollContainerElement) {
|
133
|
+
scrollContainerElement.addEventListener("scroll", this.hideTooltip) // avoid fixed tooltip on scroll
|
134
|
+
} else {
|
135
|
+
console.warn( "'CmdTooltip-Component': Element accessed by " + scrollContainerSelector + " does not exist! Please provide selector for an existing element!")
|
136
|
+
}
|
137
|
+
|
122
138
|
document.addEventListener("keyup", this.hideTooltipOnEsc) // close tooltip by using "escape"-key
|
123
139
|
}
|
124
140
|
|
@@ -140,20 +156,20 @@ export default {
|
|
140
156
|
// if delay is set
|
141
157
|
if (this.delayToShowTooltip > 0) {
|
142
158
|
setTimeout(() => {
|
143
|
-
|
159
|
+
this.toggleVisibility(event)
|
144
160
|
}, this.delayToShowTooltip)
|
145
161
|
} else {
|
146
162
|
this.toggleVisibility(event)
|
147
163
|
}
|
148
164
|
},
|
149
165
|
toggleVisibility(event) {
|
150
|
-
if(!this.toggleVisibilityByClick) {
|
166
|
+
if (!this.toggleVisibilityByClick) {
|
151
167
|
this.tooltipVisibility = true
|
152
168
|
}
|
153
169
|
this.getPointerPosition(event)
|
154
170
|
},
|
155
171
|
hideTooltipOnEsc(event) {
|
156
|
-
if(this.allowEscapeKey) {
|
172
|
+
if (this.allowEscapeKey) {
|
157
173
|
if (event.key === 'Escape' || event.key === 'Esc') {
|
158
174
|
this.hideTooltip()
|
159
175
|
}
|
@@ -168,10 +184,10 @@ export default {
|
|
168
184
|
}
|
169
185
|
},
|
170
186
|
unmounted() {
|
171
|
-
if(this.relatedId) {
|
187
|
+
if (this.relatedId) {
|
172
188
|
const relatedElement = document.getElementById(this.relatedId)
|
173
189
|
|
174
|
-
if(relatedElement) {
|
190
|
+
if (relatedElement) {
|
175
191
|
document.removeEventListener("scroll", this.hideTooltip)
|
176
192
|
document.removeEventListener("keyup", this.hideTooltipOnEsc)
|
177
193
|
|
@@ -186,11 +202,11 @@ export default {
|
|
186
202
|
},
|
187
203
|
watch: {
|
188
204
|
tooltipVisibility() {
|
189
|
-
if(this.tooltipVisibility) {
|
190
|
-
this.$nextTick(
|
205
|
+
if (this.tooltipVisibility) {
|
206
|
+
this.$nextTick(() => {
|
191
207
|
const verticalOffset = 25
|
192
208
|
// this.$refs.tooltip.addEventListener("keyup", this.hideTooltip)
|
193
|
-
this.$refs.tooltip.style.left = (this.pointerX
|
209
|
+
this.$refs.tooltip.style.left = (this.pointerX / 10) + "rem"
|
194
210
|
this.$refs.tooltip.style.top = ((this.pointerY + verticalOffset) / 10) + "rem"
|
195
211
|
})
|
196
212
|
}
|
@@ -238,8 +254,8 @@ export default {
|
|
238
254
|
.headline-wrapper {
|
239
255
|
display: flex;
|
240
256
|
|
241
|
-
a {
|
242
|
-
margin-left: auto;
|
257
|
+
> a {
|
258
|
+
margin-left: auto !important;
|
243
259
|
|
244
260
|
[class*="icon-"] {
|
245
261
|
padding-left: 1rem;
|
package/src/index.js
CHANGED
@@ -50,6 +50,7 @@ export { default as CmdTextImageBlock } from '@/components/CmdTextImageBlock.vue
|
|
50
50
|
export { default as CmdThumbnailScroller } from '@/components/CmdThumbnailScroller.vue'
|
51
51
|
export { default as CmdToggleDarkMode } from '@/components/CmdToggleDarkMode.vue'
|
52
52
|
export { default as CmdTooltip } from '@/components/CmdTooltip.vue'
|
53
|
+
export { default as CmdTooltipForFormElements } from '@/components/CmdTooltipForFormElements.vue'
|
53
54
|
export { default as CmdUploadForm } from '@/components/CmdUploadForm.vue'
|
54
55
|
export { default as CmdWidthLimitationWrapper } from '@/components/CmdWidthLimitationWrapper.vue'
|
55
56
|
export { default as EditComponentWrapper } from '@/components/EditComponentWrapper.vue'
|
package/src/main.js
CHANGED
@@ -43,4 +43,8 @@ import router from "./router"
|
|
43
43
|
// })
|
44
44
|
|
45
45
|
// createApp(App).use(router).directive('telephone', directiveTelephone).directive('focus', directiveFocus).mount('#app')
|
46
|
-
createApp(ComponentLibrary)
|
46
|
+
createApp(ComponentLibrary)
|
47
|
+
.use(router).directive('telephone', directiveTelephone)
|
48
|
+
.directive('focus', directiveFocus)
|
49
|
+
.directive('fancybox', directiveFancybox)
|
50
|
+
.mount('#app')
|