comand-component-library 4.1.47 → 4.1.48
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<dt :class="['cmd-address-data-item', {'address': addressEntry.
|
2
|
+
<dt :class="['cmd-address-data-item', {'address': addressEntry.name === 'address'}]" :id="addressEntry.id">
|
3
3
|
<!-- begin CmdIcon -->
|
4
4
|
<CmdIcon
|
5
5
|
v-if="addressEntry.iconClass && showLabelIcons"
|
@@ -16,15 +16,14 @@
|
|
16
16
|
<!-- end labels -->
|
17
17
|
|
18
18
|
<!-- begin data (except for address) -->
|
19
|
-
<dd v-if="addressEntry.
|
19
|
+
<dd v-if="addressEntry.name !== 'address' && (addressEntry.data || addressEntry.href)" :class="vCardClass(addressEntry)">
|
20
20
|
<!-- begin default-view -->
|
21
21
|
<template v-if="!editing">
|
22
22
|
<a v-if="addressEntry.href"
|
23
23
|
:href="getHref(addressEntry)"
|
24
|
-
:target="addressEntry.
|
24
|
+
:target="addressEntry.name === 'url' ? '_blank' : null"
|
25
25
|
:title="addressEntry.tooltip"
|
26
|
-
:data-type="addressEntry.
|
27
|
-
v-telephone="addressEntry.href">
|
26
|
+
:data-type="addressEntry.name">
|
28
27
|
{{ addressEntry.data || addressEntry.href }}
|
29
28
|
</a>
|
30
29
|
<span v-else v-html="addressEntry.data"></span>
|
@@ -220,10 +219,10 @@ export default {
|
|
220
219
|
},
|
221
220
|
methods: {
|
222
221
|
vCardClass(entry) {
|
223
|
-
if (entry.
|
222
|
+
if (entry.name === 'company') {
|
224
223
|
return "org"
|
225
224
|
}
|
226
|
-
if (entry.
|
225
|
+
if (entry.name === "address") {
|
227
226
|
if (entry.streetNo) {
|
228
227
|
return "street-address"
|
229
228
|
}
|
@@ -240,11 +239,11 @@ export default {
|
|
240
239
|
return null
|
241
240
|
},
|
242
241
|
inputType(entry) {
|
243
|
-
if (entry.
|
242
|
+
if (entry.name === "phone") {
|
244
243
|
return "tel"
|
245
|
-
} else if (entry.
|
244
|
+
} else if (entry.name === "email") {
|
246
245
|
return "email"
|
247
|
-
} else if (entry.
|
246
|
+
} else if (entry.name === "url") {
|
248
247
|
return "url"
|
249
248
|
}
|
250
249
|
return "text"
|
@@ -253,20 +252,20 @@ export default {
|
|
253
252
|
return "https://www.google.com/maps/place/" + entry.streetNo + ", " + entry.zip + " " + entry.city
|
254
253
|
},
|
255
254
|
getHref(entry) {
|
256
|
-
if (entry.
|
255
|
+
if (entry.name === "phone") {
|
257
256
|
return "tel:" + entry.href
|
258
257
|
}
|
259
|
-
if (entry.
|
258
|
+
if (entry.name === "email") {
|
260
259
|
return "mailto:" + entry.href
|
261
260
|
}
|
262
|
-
if (entry.
|
261
|
+
if (entry.name === "url") {
|
263
262
|
return entry.href
|
264
263
|
}
|
265
264
|
return null
|
266
265
|
},
|
267
266
|
addHandlerProvider() {
|
268
267
|
const itemStructure = {
|
269
|
-
"
|
268
|
+
"name": "default",
|
270
269
|
"iconClass": "icon-mail",
|
271
270
|
"data": "Your data",
|
272
271
|
"labelText": "Labeltext",
|
@@ -300,7 +299,7 @@ export default {
|
|
300
299
|
addressEntry: {
|
301
300
|
handler() {
|
302
301
|
// check if entry 'address' to create object
|
303
|
-
if (this.addressEntry.
|
302
|
+
if (this.addressEntry.name === "address") {
|
304
303
|
this.editableAddressEntry = {
|
305
304
|
streetNo: this.addressEntry.streetNo,
|
306
305
|
zip: this.addressEntry.zip,
|