comand-component-library 4.1.80 → 4.1.82

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": "4.1.80",
3
+ "version": "4.1.82",
4
4
  "license": "GPL-3.0-only",
5
5
  "author": "CoManD-UI",
6
6
  "private": false,
@@ -9,10 +9,10 @@
9
9
  "name": "address",
10
10
  "iconClass": "icon-home",
11
11
  "labelText": "Address",
12
- "streetNo": "Your Street/No",
13
- "zip": "Your zip",
14
- "city": "Your city",
15
- "state": "Your 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 v-else :src="locateAddress"></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
- const url = new URL("https://maps.google.de/maps?ie=UTF8&t=&z=17&iwloc=B&output=embed")
62
- url.searchParams.set("hl", "de")
63
- url.searchParams.set("q", [this.address.streetNo, this.address.zip, this.address.city, this.address.latitude, this.address.longitude, this.address.location].join(" ").trim())
64
- return url.href
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}