@cloudron/pankow 4.1.0 → 4.1.1

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.
@@ -6,12 +6,16 @@ const props = defineProps({
6
6
  type: Boolean,
7
7
  default: false
8
8
  },
9
+ dateOnly: {
10
+ type: Boolean,
11
+ default: false
12
+ },
9
13
  });
10
14
 
11
15
  </script>
12
16
 
13
17
  <template>
14
- <input class="pankow-text-input" type="datetime-local" :readonly="readonly" v-model="model"/>
18
+ <input class="pankow-text-input" :type="dateOnly ? 'date' : 'datetime-local'" :readonly="readonly" v-model="model"/>
15
19
  </template>
16
20
 
17
21
  <style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "4.1.0",
4
+ "version": "4.1.1",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "types": "types/index.d.ts",
package/utils.js CHANGED
@@ -4,19 +4,19 @@ import { customRef } from 'vue';
4
4
 
5
5
  // https://vuejs.org/api/reactivity-advanced.html#customref
6
6
  function useDebouncedRef(value, delay = 300) {
7
- let timeout
7
+ let timeout;
8
8
  return customRef((track, trigger) => {
9
9
  return {
10
10
  get() {
11
- track()
12
- return value
11
+ track();
12
+ return value;
13
13
  },
14
14
  set(newValue) {
15
- clearTimeout(timeout)
15
+ clearTimeout(timeout);
16
16
  timeout = setTimeout(() => {
17
- value = newValue
18
- trigger()
19
- }, delay)
17
+ value = newValue;
18
+ trigger();
19
+ }, delay);
20
20
  }
21
21
  }
22
22
  })