comand-component-library 4.1.80 → 4.1.82
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -9,10 +9,10 @@
|
|
9
9
|
"name": "address",
|
10
10
|
"iconClass": "icon-home",
|
11
11
|
"labelText": "Address",
|
12
|
-
"streetNo": "
|
13
|
-
"zip": "
|
14
|
-
"city": "
|
15
|
-
"state": "
|
12
|
+
"streetNo": "1355 Market Street",
|
13
|
+
"zip": "94103",
|
14
|
+
"city": "San Francisco",
|
15
|
+
"state": "CA",
|
16
16
|
"pobox": "Your PO Box",
|
17
17
|
"miscInfo": "Misc. info",
|
18
18
|
"country": "Your country",
|
@@ -10,7 +10,12 @@
|
|
10
10
|
<!-- end CmdSystemMessage -->
|
11
11
|
|
12
12
|
<!-- begin iframe with google-map -->
|
13
|
-
<iframe
|
13
|
+
<iframe
|
14
|
+
v-else
|
15
|
+
:src="locateAddress"
|
16
|
+
loading="lazy"
|
17
|
+
referrerpolicy="no-referrer-when-downgrade">
|
18
|
+
</iframe>
|
14
19
|
<!-- end iframe with google-map -->
|
15
20
|
</div>
|
16
21
|
</template>
|
@@ -58,10 +63,12 @@ export default {
|
|
58
63
|
computed: {
|
59
64
|
locateAddress() {
|
60
65
|
if(this.address) {
|
61
|
-
|
62
|
-
url.
|
63
|
-
url
|
64
|
-
|
66
|
+
// const url = new URL("https://maps.google.de/maps?ie=UTF8&t=&z=17&iwloc=B&output=embed")
|
67
|
+
let url = new URL("https://www.google.de/maps/place/")
|
68
|
+
url += this.address.streetNo + this.address.zip + "," + this.address.city + this.address.country
|
69
|
+
/* url.searchParams.set("hl", "de")
|
70
|
+
url.searchParams.set("q", [this.address.streetNo, this.address.zip, this.address.city, this.address.country, this.address.latitude, this.address.longitude, this.address.location].join(" ").trim())*/
|
71
|
+
return url
|
65
72
|
}
|
66
73
|
return "https://maps.google.de/maps?ie=UTF8&t=&z=17&iwloc=B&output=embed"
|
67
74
|
}
|
package/src/index.js
CHANGED
@@ -69,7 +69,7 @@ export { getFileExtension } from '@/utils/getFileExtension'
|
|
69
69
|
export { capitalize } from '@/utils/string'
|
70
70
|
export { useScrollspy } from '@/composables/scrollspy'
|
71
71
|
export { setCookieDisclaimerCookie, getCookieDisclaimerCookie } from '@/utils/cookie'
|
72
|
-
export { formatDate } from "@/utils/date"
|
72
|
+
export { currentDate, formatDate } from "@/utils/date"
|
73
73
|
|
74
74
|
// export composables
|
75
75
|
export { useSequence } from '@/composables/sequence'
|
package/src/utils/date.js
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
function currentDate(returnTime = false) {
|
2
|
+
return returnTime ? new Date().toISOString() : new Date().toISOString().split('T')[0];
|
3
|
+
}
|
4
|
+
|
1
5
|
function formatDate(inputDate, format = "dmy", separator=".") {
|
2
6
|
// Ensure the input is a valid date object or string
|
3
7
|
const date = new Date(inputDate);
|
@@ -20,10 +24,9 @@ function formatDate(inputDate, format = "dmy", separator=".") {
|
|
20
24
|
break
|
21
25
|
default:
|
22
26
|
dateFormated = `${year}${separator}${month}${separator}${day}` // YYYY-MM-DD
|
23
|
-
|
24
27
|
}
|
25
28
|
|
26
29
|
return dateFormated
|
27
30
|
}
|
28
31
|
|
29
|
-
export {formatDate}
|
32
|
+
export {currentDate, formatDate}
|