@bildvitta/quasar-ui-asteroid 3.13.0-beta.12 → 3.13.0-beta.14

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.12",
4
+ "version": "3.13.0-beta.14",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -26,13 +26,14 @@
26
26
  import QasBtn from '../btn/QasBtn.vue'
27
27
  import QasBtnDropdown from '../btn-dropdown/QasBtnDropdown.vue'
28
28
 
29
- import Delete from '../../plugins/delete/Delete'
30
29
  import useScreen from '../../composables/use-screen'
31
30
 
32
- import { computed } from 'vue'
31
+ import { computed, inject } from 'vue'
33
32
 
34
33
  defineOptions({ name: 'QasActionsMenu' })
35
34
 
35
+ const qas = inject('qas')
36
+
36
37
  const props = defineProps({
37
38
  buttonProps: {
38
39
  default: () => ({}),
@@ -198,7 +199,7 @@ function useDelete () {
198
199
  color: 'grey-9',
199
200
  icon: props.deleteIcon,
200
201
  label: props.deleteLabel,
201
- handler: () => Delete(props.deleteProps)
202
+ handler: () => qas.delete(props.deleteProps)
202
203
  }
203
204
  })
204
205
  }
@@ -125,7 +125,7 @@ const screen = useScreen()
125
125
  const slots = useSlots()
126
126
 
127
127
  // usado para o plugin
128
- const { dialogRef } = useDialogPluginComponent()
128
+ const { dialogRef, onDialogHide } = useDialogPluginComponent()
129
129
 
130
130
  // QForm template
131
131
  const form = ref(null)
@@ -139,7 +139,9 @@ const { descriptionComponent, mainComponent } = useDynamicComponents({ ...compos
139
139
  const dialogProps = computed(() => {
140
140
  return {
141
141
  ...(!props.usePlugin && { modelValue: props.modelValue }),
142
- ...attrs
142
+ ...attrs,
143
+
144
+ onHide: onDialogHide
143
145
  }
144
146
  })
145
147
 
@@ -7,7 +7,7 @@ import QasDialog from '../../components/dialog/QasDialog.vue'
7
7
  * @example Dialog({ card: { title: 'Esse é o meu titulo!' } })
8
8
  */
9
9
  export default (componentProps = {}) => {
10
- Dialog.create({
10
+ return Dialog.create({
11
11
  component: QasDialog,
12
12
  componentProps: { ...componentProps, usePlugin: true }
13
13
  })
package/src/vue-plugin.js CHANGED
@@ -155,6 +155,10 @@ async function install (app) {
155
155
  success: NotifySuccess
156
156
  }
157
157
 
158
+ app.provide('qas', {
159
+ delete: params => Delete.call(app.config.globalProperties, params)
160
+ })
161
+
158
162
  app.directive(Test.name, Test)
159
163
  }
160
164