@bildvitta/quasar-ui-asteroid 2.17.1 → 2.18.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@bildvitta/quasar-ui-asteroid",
3
- "version": "2.17.1",
3
+ "version": "2.18.0",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -52,6 +52,10 @@ export default {
52
52
  description: 'Ignore entity and specify another endpoint.'
53
53
  },
54
54
 
55
+ forceRefetch: {
56
+ description: 'Force refetching of filters data.'
57
+ },
58
+
55
59
  // Events
56
60
  'fetch-error': {
57
61
  description: 'Fires when occur an error fetching value.',
@@ -16,7 +16,7 @@
16
16
 
17
17
  <slot v-if="showFilterButton" :filter="filter" name="filter-button">
18
18
  <q-btn v-if="!noFilterButton" :color="filterButtonColor" flat icon="o_filter_list" :label="filterButtonLabel">
19
- <q-menu @before-show="fetchFilters">
19
+ <q-menu>
20
20
  <div v-if="isFetching" class="q-pa-xl text-center">
21
21
  <q-spinner color="grey" size="2em" />
22
22
  </div>
@@ -61,6 +61,7 @@ export default {
61
61
  },
62
62
 
63
63
  mixins: [contextMixin],
64
+
64
65
  props: {
65
66
  badges: {
66
67
  default: true,
@@ -95,6 +96,10 @@ export default {
95
96
  url: {
96
97
  default: '',
97
98
  type: String
99
+ },
100
+
101
+ forceRefetch: {
102
+ type: Boolean
98
103
  }
99
104
  },
100
105
 
@@ -220,7 +225,7 @@ export default {
220
225
  },
221
226
 
222
227
  async fetchFilters () {
223
- if (this.hasFields || this.noFilterButton) {
228
+ if (!this.forceRefetch && (this.hasFields || this.noFilterButton)) {
224
229
  return null
225
230
  }
226
231
 
@@ -12,19 +12,19 @@ import { isEqual } from 'lodash'
12
12
 
13
13
  export default {
14
14
  props: {
15
- options: {
16
- default: () => ({}),
17
- type: Object
15
+ height: {
16
+ type: String,
17
+ default: '250'
18
18
  },
19
19
 
20
- type: {
21
- default: 'image/png',
22
- type: String
20
+ options: {
21
+ type: Object,
22
+ default: () => ({})
23
23
  },
24
24
 
25
- height: {
26
- default: '250',
27
- type: String
25
+ type: {
26
+ type: String,
27
+ default: 'image/png'
28
28
  },
29
29
 
30
30
  isEmpty: {
@@ -26,6 +26,13 @@ export default {
26
26
  description: 'Generated signature label.'
27
27
  },
28
28
 
29
+ dialogProps: {
30
+ description: 'Set props in dialog',
31
+ table: {
32
+ defaultValue: { summary: JSON.stringify({}) }
33
+ }
34
+ },
35
+
29
36
  value: {
30
37
  description: 'Model value.'
31
38
  },
@@ -15,13 +15,15 @@
15
15
  </template>
16
16
  </qas-uploader>
17
17
 
18
- <qas-dialog v-model="isOpenedDialog">
18
+ <qas-dialog v-model="isOpenedDialog" v-bind="defaultDialogProps" >
19
19
  <template #header>
20
20
  <div class="text-bold text-center">Insira sua assinatura digital no campo abaixo</div>
21
21
  </template>
22
22
 
23
23
  <template #description>
24
- <qas-signature-pad ref="signaturePadModal" height="250" :is-empty.sync="isEmpty" />
24
+ <div :style="signaturePadWidth">
25
+ <qas-signature-pad ref="signaturePadModal" :is-empty.sync="isEmpty" :height="signaturePadHeight" />
26
+ </div>
25
27
  </template>
26
28
 
27
29
  <template #actions>
@@ -36,10 +38,13 @@
36
38
  import QasDialog from '../dialog/QasDialog.vue'
37
39
  import QasUploader from '../uploader/QasUploader.vue'
38
40
  import QasSignaturePad from '../signature-pad/QasSignaturePad.vue'
41
+ import { screenMixin } from '../../mixins'
39
42
  import { base64ToBlob } from '../../helpers'
40
43
  import { NotifyError } from '../../plugins'
41
44
 
42
45
  export default {
46
+ mixins: [screenMixin],
47
+
43
48
  components: {
44
49
  QasDialog,
45
50
  QasUploader,
@@ -47,6 +52,11 @@ export default {
47
52
  },
48
53
 
49
54
  props: {
55
+ dialogProps: {
56
+ type: Object,
57
+ default: () => ({})
58
+ },
59
+
50
60
  uploadLabel: {
51
61
  default: 'Assinatura digital',
52
62
  type: String
@@ -93,6 +103,33 @@ export default {
93
103
 
94
104
  headerClasses () {
95
105
  return `q-pa-${this.readonly ? 'md' : 'sm'}`
106
+ },
107
+
108
+ defaultDialogProps () {
109
+ return {
110
+ maxWidth: '620px',
111
+ ...this.dialogProps
112
+ }
113
+ },
114
+
115
+ signaturePadWidth () {
116
+ const sizes = {
117
+ [this.$_isSmall]: { width: '100%' },
118
+ [this.$_isMedium]: { width: '570px' },
119
+ [this.$_isLarge]: { width: '350px' }
120
+ }
121
+
122
+ return sizes.true
123
+ },
124
+
125
+ signaturePadHeight () {
126
+ const sizes = {
127
+ [this.$_isSmall]: '250',
128
+ [this.$_isMedium]: '400',
129
+ [this.$_isLarge]: '250'
130
+ }
131
+
132
+ return sizes.true
96
133
  }
97
134
  },
98
135