@bildvitta/quasar-ui-asteroid 3.13.0-beta.1 → 3.13.0-beta.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-ui-asteroid",
3
3
  "description": "Asteroid",
4
- "version": "3.13.0-beta.1",
4
+ "version": "3.13.0-beta.2",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -4,19 +4,22 @@ import { NotifySuccess, NotifyError } from '../plugins'
4
4
  /** Função para lidar com promises, por exemplo requests.
5
5
  *
6
6
  * @param {Promise} promise
7
- * @param {object} config={successMessage, errorMessage, useLoading}
7
+ * @param {object} config={successMessage, errorMessage, useLoading, loadingConfig, onLoading}
8
8
  * @example promiseHandle(new Promise(), { errorMessage: 'Erro', successMessage: 'Sucesso' })
9
9
  */
10
10
  export default async function (promise, config = {}) {
11
11
  const {
12
- successMessage,
13
12
  errorMessage,
13
+ loadingConfig = {},
14
+ successMessage,
14
15
  useLoading = true,
16
+
17
+ // callback
15
18
  onLoading
16
19
  } = config
17
20
 
18
21
  onLoading && onLoading(true)
19
- useLoading && Loading.show()
22
+ useLoading && Loading.show(loadingConfig)
20
23
 
21
24
  const promiseToBeExec = typeof promise === 'function' ? promise() : promise
22
25