@ramathibodi/nuxt-commons 0.1.65 → 0.1.66

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/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.1.65",
7
+ "version": "0.1.66",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -34,6 +34,7 @@ interface Props {
34
34
  parentTemplates?: string|string[]
35
35
  dirtyClass?: string
36
36
  dirtyOnCreate?: boolean
37
+ sanitizeDelay?: number
37
38
  }
38
39
 
39
40
  const props = withDefaults(defineProps<Props>(), {
@@ -43,7 +44,8 @@ const props = withDefaults(defineProps<Props>(), {
43
44
  decoration: () => { return {} },
44
45
  parentTemplates: (): string[] => [],
45
46
  dirtyClass: "form-data-dirty",
46
- dirtyOnCreate: false
47
+ dirtyOnCreate: false,
48
+ sanitizeDelay: 2000,
47
49
  })
48
50
 
49
51
  const emit = defineEmits(['update:modelValue'])
@@ -87,7 +89,7 @@ function isBlankString(v: unknown): v is string {
87
89
  return isString(v) && v.trim().length === 0
88
90
  }
89
91
 
90
- const sanitizeBlankStrings = debounce(sanitizeBlankStringsRaw, 500)
92
+ const sanitizeBlankStrings = debounce(sanitizeBlankStringsRaw, props.sanitizeDelay)
91
93
 
92
94
  function sanitizeBlankStringsRaw(val: any, original?: any): void {
93
95
  if (!original && props.originalData) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramathibodi/nuxt-commons",
3
- "version": "0.1.65",
3
+ "version": "0.1.66",
4
4
  "description": "Ramathibodi Nuxt modules for common components",
5
5
  "repository": {
6
6
  "type": "git",