@data-fair/lib-vue 1.13.1 → 1.13.2

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/async-action.d.ts CHANGED
@@ -7,8 +7,8 @@ type AsyncActionOptions = {
7
7
  };
8
8
  export declare function asyncAction<F extends (...args: any[]) => Promise<any>>(fn: F, options?: AsyncActionOptions): {
9
9
  execute: F;
10
- notif: Ref<UiNotif | null>;
10
+ notif: Ref<UiNotif | undefined>;
11
11
  loading: Ref<boolean>;
12
- error: Ref<string | null>;
12
+ error: Ref<string | undefined>;
13
13
  };
14
14
  export {};
package/async-action.js CHANGED
@@ -3,13 +3,13 @@ import { ref } from 'vue'
3
3
  import { useUiNotif, getFullNotif, getErrorMsg } from './ui-notif.js'
4
4
  export function asyncAction (fn, options) {
5
5
  const { sendUiNotif } = useUiNotif()
6
- const notif = ref(null)
6
+ const notif = ref()
7
7
  const loading = ref(false)
8
- const error = ref(null)
8
+ const error = ref()
9
9
  const execute = async function (...args) {
10
10
  loading.value = true
11
- notif.value = null
12
- error.value = null
11
+ notif.value = undefined
12
+ error.value = undefined
13
13
  try {
14
14
  const result = await fn(...args)
15
15
  if (options?.success) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vue",
3
- "version": "1.13.1",
3
+ "version": "1.13.2",
4
4
  "description": "Composables and other utilities for Vue applications in the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [