@bildvitta/quasar-ui-asteroid 3.13.0-beta.6 → 3.13.0-beta.8

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.6",
4
+ "version": "3.13.0-beta.8",
5
5
  "author": "Bild & Vitta <systemteam@bild.com.br>",
6
6
  "license": "MIT",
7
7
  "main": "dist/asteroid.cjs.min.js",
@@ -47,6 +47,7 @@
47
47
  "autonumeric": "^4.9.0",
48
48
  "axios": "^1.4.0",
49
49
  "date-fns": "^2.30.0",
50
+ "debug": "^4.3.4",
50
51
  "fuse.js": "^6.6.2",
51
52
  "humps": "^2.0.1",
52
53
  "lodash-es": "^4.17.21",
@@ -17,7 +17,7 @@
17
17
  <div class="ellipsis qas-app-user__menu-name">{{ userName }}</div>
18
18
  <div class="ellipsis">{{ user.email }}</div>
19
19
 
20
- <qas-select v-if="hasCompaniesSelect" v-model="companiesModel" class="q-my-md" v-bind="defaultCompanyProps" @update:model-value="setCompanies" />
20
+ <qas-select v-if="hasCompaniesSelect" v-model="companiesModel" class="q-my-md" v-bind="defaultCompanyProps" data-cy="app-user-companies-select" @update:model-value="setCompanies" />
21
21
 
22
22
  <q-list class="q-mt-md">
23
23
  <q-item v-close-popup :active="false" class="qas-app-user__menu-item" clickable :to="user.to">
@@ -103,7 +103,6 @@ export default {
103
103
  computed: {
104
104
  defaultCompanyProps () {
105
105
  return {
106
- dataCy: 'app-user-companies-select',
107
106
  loading: this.loading,
108
107
 
109
108
  ...this.companyProps,
@@ -42,3 +42,12 @@ props:
42
42
  events:
43
43
  '@sign-out -> function()':
44
44
  desc: Dispara quando o botão de "sair" é clicado.
45
+
46
+ selectors:
47
+ app-user:
48
+ desc: Seletor do componente.
49
+ examples: ['data-cy="app-user"']
50
+
51
+ app-user-companies-select:
52
+ desc: Seletor do select de vínculos de empresas.
53
+ examples: ['data-cy="app-user-companies-select"']
@@ -1,12 +1,12 @@
1
1
  <template>
2
- <q-dialog ref="dialog" class="qas-dialog" :persistent="persistent" v-bind="dialogProps" @update:model-value="updateModelValue">
2
+ <q-dialog ref="dialog" class="qas-dialog" data-cy="dialog" :persistent="persistent" v-bind="dialogProps" @update:model-value="updateModelValue">
3
3
  <div class="bg-white q-pa-lg" :style="style">
4
4
  <header v-if="hasHeader" class="q-mb-lg">
5
5
  <slot name="header">
6
6
  <div class="items-center justify-between row">
7
- <h5 class="text-grey-9 text-h5">{{ card.title }}</h5>
7
+ <h5 class="text-grey-9 text-h5" data-cy="dialog-title">{{ card.title }}</h5>
8
8
 
9
- <qas-btn v-if="isInfoDialog" v-close-popup color="grey-9" icon="sym_r_close" variant="tertiary" />
9
+ <qas-btn v-if="isInfoDialog" v-close-popup color="grey-9" data-cy="dialog-close-btn" icon="sym_r_close" variant="tertiary" />
10
10
  </div>
11
11
  </slot>
12
12
  </header>
@@ -14,18 +14,18 @@
14
14
  <section class="text-body1 text-grey-8">
15
15
  <component :is="componentTag" ref="form" v-bind="componentProps">
16
16
  <slot name="description">
17
- <component :is="descriptionComponentTag">{{ card.description }}</component>
17
+ <component :is="descriptionComponentTag" data-cy="dialog-description">{{ card.description }}</component>
18
18
  </slot>
19
19
 
20
20
  <div v-if="!isInfoDialog">
21
21
  <slot name="actions">
22
22
  <qas-actions v-bind="formattedActionsProps">
23
23
  <template v-if="hasOk" #primary>
24
- <qas-btn v-close-popup="!useForm" class="full-width" variant="primary" v-bind="defaultOk" />
24
+ <qas-btn v-close-popup="!useForm" class="full-width" data-cy="dialog-ok-btn" variant="primary" v-bind="defaultOk" />
25
25
  </template>
26
26
 
27
27
  <template v-if="hasCancel" #secondary>
28
- <qas-btn v-close-popup class="full-width" v-bind="defaultCancel" variant="secondary" />
28
+ <qas-btn v-close-popup class="full-width" data-cy="dialog-cancel-btn" v-bind="defaultCancel" variant="secondary" />
29
29
  </template>
30
30
  </qas-actions>
31
31
  </slot>
@@ -90,3 +90,28 @@ events:
90
90
  '@ok: -> function ()':
91
91
  desc: Dispara toda vez que é clicado no botão "ok" ou quando useForm for true e o for clicado "enter" estando com foco em algum input (evento de submit).
92
92
 
93
+ selectors:
94
+ dialog:
95
+ desc: Seletor do componente.
96
+ examples: ['data-cy="dialog"']
97
+
98
+ dialog-cancel-btn:
99
+ desc: Seletor do botão de cancelar do componente.
100
+ examples: ['data-cy="dialog-cancel-btn"']
101
+
102
+ dialog-close-btn:
103
+ desc: Seletor do botão de fechar do componente.
104
+ examples: ['data-cy="dialog-close-btn"']
105
+
106
+ dialog-description:
107
+ desc: Seletor da descrição do componente.
108
+ examples: ['data-cy="dialog-description"']
109
+
110
+ dialog-ok-btn:
111
+ desc: Seletor do botão de confirmar do componente.
112
+ examples: ['data-cy="dialog-ok-btn"']
113
+
114
+ dialog-title:
115
+ desc: Seletor do título do componente.
116
+ examples: ['data-cy="dialog-title"']
117
+
@@ -29,3 +29,8 @@ events:
29
29
  value:
30
30
  desc: Novo valor do model.
31
31
  type: [Object, Array, String, Number, Boolean]
32
+
33
+ selectors:
34
+ '[fieldName]':
35
+ desc: Seletor criado a partir da propriedade "name" do campo.
36
+ examples: ['data-cy="email"', 'data-cy="phone"', 'data-cy="password"']
@@ -39,12 +39,15 @@
39
39
 
40
40
  <script>
41
41
  import PvFiltersButton from './private/PvFiltersButton.vue'
42
+ import debug from 'debug'
42
43
 
43
44
  import { camelize, camelizeKeys, decamelize } from 'humps'
44
45
  import { humanize, parseValue } from '../../helpers/filters.js'
45
46
  import contextMixin from '../../mixins/context.js'
46
47
  import { getState, getAction } from '@bildvitta/store-adapter'
47
48
 
49
+ const log = debug('asteroid-ui:qas-filters')
50
+
48
51
  export default {
49
52
  name: 'QasFilters',
50
53
 
@@ -281,11 +284,6 @@ export default {
281
284
  this.isFetching = true
282
285
 
283
286
  try {
284
- this.$qas.logger.group(
285
- `QasFilters - fetchFilters -> Payload do parâmetro do ${this.entity}/fetchFilters`,
286
- [{ url: this.url }]
287
- )
288
-
289
287
  const response = await getAction.call(this, {
290
288
  entity: this.entity,
291
289
  key: 'fetchFilters',
@@ -294,18 +292,12 @@ export default {
294
292
 
295
293
  this.$emit('fetch-success', response)
296
294
 
297
- this.$qas.logger.group(
298
- `QasFilters - fetchFilters -> resposta da action ${this.entity}/fetchFilters`, [response]
299
- )
295
+ log(`[${this.entity}]:fetchFilters:success`, response)
300
296
  } catch (error) {
301
297
  this.hasFetchError = true
302
298
  this.$emit('fetch-error', error)
303
299
 
304
- this.$qas.logger.group(
305
- `QasFilters - fetchFilters -> exceção da action ${this.entity}/fetchFilters`,
306
- [error],
307
- { error: true }
308
- )
300
+ log(`[${this.entity}]:fetchFilters:error`, error)
309
301
  } finally {
310
302
  this.isFetching = false
311
303
  }
@@ -141,3 +141,24 @@ events:
141
141
  value:
142
142
  desc: Retorna todos os filtros realizados.
143
143
  type: Object
144
+
145
+ selectors:
146
+ filters-btn:
147
+ desc: Seletor do botão de filtro.
148
+ examples: ['data-cy="filters-btn"']
149
+
150
+ filters-clear-btn:
151
+ desc: Seletor do botão de limpar do filtro.
152
+ examples: ['data-cy="filters-clear-btn"']
153
+
154
+ 'filters-[optionText]-chip':
155
+ desc: Seletor do chip de acordo com o texto da opção selecionada.
156
+ examples: ['data-cy="filters-Ativo-chip"']
157
+
158
+ 'filters-[fieldName]-field':
159
+ desc: Seletor criado a partir da propriedade "name" do campo.
160
+ examples: ['data-cy="filters-email-field"', 'data-cy="filters-phone-field"', 'data-cy="filters-password-field"']
161
+
162
+ filters-submit-btn:
163
+ desc: Seletor do botão de submit do filtro.
164
+ examples: ['data-cy="filters-submit-btn"']
@@ -10,11 +10,11 @@
10
10
  <slot v-if="useActions" name="actions">
11
11
  <qas-actions>
12
12
  <template v-if="useSubmitButton" #primary>
13
- <qas-btn class="qas-form-view__btn" :data-cy="`btnSave-${entity}`" :disable="disable" :label="submitButtonLabel" :loading="isSubmitting" type="submit" variant="primary" />
13
+ <qas-btn class="qas-form-view__btn" :data-cy="`form-view-submit-btn-${entity}`" :disable="disable" :label="submitButtonLabel" :loading="isSubmitting" type="submit" variant="primary" />
14
14
  </template>
15
15
 
16
16
  <template v-if="hasCancelButton" #secondary>
17
- <qas-btn v-close-popup class="qas-form-view__btn" :data-cy="`btnCancel-${entity}`" :disable="isSubmitting" :label="cancelButtonLabel" type="button" variant="secondary" @click="cancel" />
17
+ <qas-btn v-close-popup class="qas-form-view__btn" :data-cy="`form-view-cancel-btn-${entity}`" :disable="isSubmitting" :label="cancelButtonLabel" type="button" variant="secondary" @click="cancel" />
18
18
  </template>
19
19
  </qas-actions>
20
20
  </slot>
@@ -33,19 +33,21 @@
33
33
  </template>
34
34
 
35
35
  <script>
36
- import { isEqualWith } from 'lodash-es'
37
- import { getAction } from '@bildvitta/store-adapter'
38
- import { extend } from 'quasar'
39
- import { onBeforeRouteLeave } from 'vue-router'
40
-
41
- import { useHistory } from '../../composables'
42
- import { NotifyError, NotifySuccess } from '../../plugins'
43
-
44
36
  import QasBtn from '../btn/QasBtn.vue'
45
37
  import QasDialog from '../dialog/QasDialog.vue'
46
38
 
39
+ import { NotifyError, NotifySuccess } from '../../plugins'
40
+ import { useHistory } from '../../composables'
47
41
  import { viewMixin } from '../../mixins'
48
42
 
43
+ import debug from 'debug'
44
+ import { extend } from 'quasar'
45
+ import { getAction } from '@bildvitta/store-adapter'
46
+ import { isEqualWith } from 'lodash-es'
47
+ import { onBeforeRouteLeave } from 'vue-router'
48
+
49
+ const log = debug('asteroid-ui:qas-form-view')
50
+
49
51
  export default {
50
52
  name: 'QasFormView',
51
53
 
@@ -57,6 +59,11 @@ export default {
57
59
  mixins: [viewMixin],
58
60
 
59
61
  props: {
62
+ beforeSubmit: {
63
+ default: null,
64
+ type: Function
65
+ },
66
+
60
67
  cancelButtonLabel: {
61
68
  default: 'Voltar',
62
69
  type: String
@@ -125,14 +132,14 @@ export default {
125
132
  type: Boolean
126
133
  },
127
134
 
135
+ useNotifySuccess: {
136
+ type: Boolean,
137
+ default: true
138
+ },
139
+
128
140
  useSubmitButton: {
129
141
  default: true,
130
142
  type: Boolean
131
- },
132
-
133
- beforeSubmit: {
134
- default: null,
135
- type: Function
136
143
  }
137
144
  },
138
145
 
@@ -255,11 +262,6 @@ export default {
255
262
  return next()
256
263
  }
257
264
 
258
- this.$qas.logger.group(
259
- 'QasFormView - beforeRouteLeave -> dialog chamado, modelValue diferente do cachedResult',
260
- [{ modelValue: clonedModelValue, cachedResult: clonedCachedResult }]
261
- )
262
-
263
265
  this.handleDialog(() => {
264
266
  this.ignoreRouterGuard = true
265
267
  next()
@@ -281,10 +283,6 @@ export default {
281
283
  ...externalPayload
282
284
  }
283
285
 
284
- this.$qas.logger.group(
285
- `QasFormView - fetchSingle -> payload do parâmetro do ${this.entity}/fetchSingle`, [payload]
286
- )
287
-
288
286
  const response = await getAction.call(this, {
289
287
  entity: this.entity,
290
288
  key: 'fetchSingle',
@@ -307,28 +305,19 @@ export default {
307
305
 
308
306
  result && Object.assign(modelValue, result)
309
307
 
310
- this.$qas.logger.group(
311
- `QasFormView - fetchSingle -> resposta da action ${this.entity}/fetchSingle`, [response]
312
- )
313
-
314
308
  if (this.useDialogOnUnsavedChanges) {
315
309
  this.cachedResult = extend(true, {}, result || modelValue)
316
- this.$qas.logger.group('QasFormView - fetchSingle -> cachedResult', [this.cachedResult])
317
310
  }
318
311
 
319
312
  this.$emit('update:modelValue', modelValue)
320
313
  this.$emit('fetch-success', response, this.modelValue)
321
314
 
322
- this.$qas.logger.group('QasFormView - fetchSingle -> modelValue', [modelValue])
315
+ log(`[${this.entity}]:fetchSingle:success`, { response, modelValue })
323
316
  } catch (error) {
324
317
  this.mx_fetchError(error)
325
318
  this.$emit('fetch-error', error)
326
319
 
327
- this.$qas.logger.group(
328
- `QasFormView - fetchSingle -> exceção da action ${this.entity}/fetchSingle`,
329
- [error],
330
- { error: true }
331
- )
320
+ log(`[${this.entity}]:fetchSingle:error`, error)
332
321
  } finally {
333
322
  this.mx_isFetching = false
334
323
  }
@@ -419,10 +408,6 @@ export default {
419
408
  ...externalPayload
420
409
  }
421
410
 
422
- this.$qas.logger.group(
423
- `QasFormView - submit -> payload do ${this.entity}/${this.mode}`, [payload]
424
- )
425
-
426
411
  const response = await getAction.call(this, {
427
412
  entity: this.entity,
428
413
  key: this.mode,
@@ -443,11 +428,11 @@ export default {
443
428
 
444
429
  this.createSubmitSuccessEvent({ ...payload, entity: this.entity })
445
430
 
446
- this.$qas.logger.group(
447
- `QasFormView - submit -> resposta da action ${this.entity}/${this.mode}`, [response]
448
- )
431
+ if (this.useNotifySuccess) {
432
+ NotifySuccess(response.data.status.text || this.defaultNotifyMessages.success)
433
+ }
449
434
 
450
- NotifySuccess(response.data.status.text || this.defaultNotifyMessages.success)
435
+ log(`[${this.entity}]:submit:success`, { response, modelValue })
451
436
  } catch (error) {
452
437
  const errors = error?.response?.data?.errors
453
438
  const message = error?.response?.data?.status?.text
@@ -464,11 +449,7 @@ export default {
464
449
 
465
450
  this.$emit('submit-error', error)
466
451
 
467
- this.$qas.logger.group(
468
- `QasFormView - submit -> exceção da action ${this.entity}/${this.mode}`,
469
- [error],
470
- { error: true }
471
- )
452
+ log(`[${this.entity}]:submit:error`, error)
472
453
  } finally {
473
454
  this.isSubmitting = false
474
455
  }
@@ -138,6 +138,11 @@ props:
138
138
  default: true
139
139
  type: Boolean
140
140
 
141
+ use-notify-success:
142
+ desc: Controla se vai ter ou não notificação de sucesso ao finalizar o submit.
143
+ default: true
144
+ type: Boolean
145
+
141
146
  use-submit-button:
142
147
  desc: Controla se vai ter ou não botão de submit.
143
148
  default: true
@@ -235,4 +240,11 @@ events:
235
240
  desc: Retorna todos os dados "cru" respondido na exceção do submit.
236
241
  type: Object
237
242
 
243
+ selectors:
244
+ 'form-view-cancel-btn-[entity]':
245
+ desc: Seletor do botão de cancelar.
246
+ examples: ['data-cy="form-view-cancel-btn-users"']
238
247
 
248
+ 'form-view-submit-btn-[entity]':
249
+ desc: Seletor do botão de salvar.
250
+ examples: ['data-cy="form-view-submit-btn-users"']
@@ -169,3 +169,20 @@ events:
169
169
  desc: Index da imagem que seria deletada.
170
170
  default: []
171
171
  type: Array
172
+
173
+ selectors:
174
+ gallery-btn-show-more:
175
+ desc: Seletor do botão "mostrar mais".
176
+ examples: ['data-cy="gallery-btn-show-more"']
177
+
178
+ gallery-carousel:
179
+ desc: Seletor do carousel.
180
+ examples: ['data-cy="gallery-carousel"']
181
+
182
+ 'gallery-carousel-slide-[index]':
183
+ desc: Seletor pelo index do slide do carousel.
184
+ examples: ['data-cy="gallery-carousel-slide-0"', 'data-cy="gallery-carousel-slide-1"']
185
+
186
+ 'gallery-image-[index]':
187
+ desc: Seletor pelo index da imagem da galeria.
188
+ examples: ['data-cy="gallery-image-0"', 'data-cy="gallery-image-1"']
@@ -73,3 +73,11 @@ slots:
73
73
  default: {}
74
74
  type: Object
75
75
 
76
+ selectors:
77
+ 'grid-generator-[fieldName]-field':
78
+ desc: Seletor do título do campo.
79
+ examples: ['data-cy="grid-generator-email-field"', 'data-cy="grid-generator-name-field"']
80
+
81
+ 'grid-generator-[fieldName]-result':
82
+ desc: Seletor do conteúdo do campo.
83
+ examples: ['data-cy="grid-generator-email-result"', 'data-cy="grid-generator-name-result"']
@@ -39,11 +39,14 @@
39
39
  </template>
40
40
 
41
41
  <script>
42
- import { viewMixin, contextMixin } from '../../mixins'
43
42
  import QasFilters from '../filters/QasFilters.vue'
44
43
  import QasPagination from '../pagination/QasPagination.vue'
44
+ import debug from 'debug'
45
45
  import { extend } from 'quasar'
46
46
  import { getState, getAction } from '@bildvitta/store-adapter'
47
+ import { viewMixin, contextMixin } from '../../mixins'
48
+
49
+ const log = debug('asteroid-ui:qas-list-view')
47
50
 
48
51
  export default {
49
52
  components: {
@@ -191,10 +194,6 @@ export default {
191
194
  ...externalPayload
192
195
  }
193
196
 
194
- this.$qas.logger.group(
195
- `QasListView - fetchList -> Payload do parâmetro do ${this.entity}/fetchList`, [payload]
196
- )
197
-
198
197
  const response = await getAction.call(this, {
199
198
  entity: this.entity,
200
199
  key: 'fetchList',
@@ -216,19 +215,13 @@ export default {
216
215
 
217
216
  this.$emit('fetch-success', response)
218
217
 
219
- this.$qas.logger.group(
220
- `QasListView - fetchList -> resposta da action ${this.entity}/fetchList`, [response]
221
- )
218
+ log(`[${this.entity}]:fetchList:success`, response)
222
219
  } catch (error) {
223
220
  this.mx_fetchError(error)
224
221
  this.$emit('update:errors', error)
225
222
  this.$emit('fetch-error', error)
226
223
 
227
- this.$qas.logger.group(
228
- `QasListView - fetchSingle -> exceção da action ${this.entity}/fetchList`,
229
- [error],
230
- { error: true }
231
- )
224
+ log(`[${this.entity}]:fetchList:error`, error)
232
225
  } finally {
233
226
  this.mx_isFetching = false
234
227
  }
@@ -65,10 +65,14 @@ import QasBtn from '../btn/QasBtn.vue'
65
65
  import QasFormGenerator from '../form-generator/QasFormGenerator.vue'
66
66
  import QasInput from '../input/QasInput.vue'
67
67
  import QasLabel from '../label/QasLabel.vue'
68
+
69
+ import { constructObject } from '../../helpers'
70
+
68
71
  import { TransitionGroup } from 'vue'
72
+ import debug from 'debug'
69
73
  import { extend } from 'quasar'
70
74
 
71
- import { constructObject } from '../../helpers'
75
+ const log = debug('asteroid-ui:qas-nested-fields')
72
76
 
73
77
  export default {
74
78
  name: 'QasNestedFields',
@@ -392,7 +396,7 @@ export default {
392
396
  this.setFocus()
393
397
  })
394
398
 
395
- this.$qas.logger.group('QasNestedFields - add', [payload])
399
+ log('add', payload)
396
400
 
397
401
  this.updateModelValue()
398
402
  },
@@ -410,7 +414,7 @@ export default {
410
414
  ? this.nested.splice(index, 1)
411
415
  : this.nested.splice(index, 1, { [this.destroyKey]: true, ...row })
412
416
 
413
- this.$qas.logger.group('QasNestedFields - destroy', [{ index, row }])
417
+ log('destroy', { index, row })
414
418
 
415
419
  this.updateModelValue()
416
420
  },
@@ -40,4 +40,9 @@ events:
40
40
  params:
41
41
  value:
42
42
  desc: Novo valor do model.
43
- type: String
43
+ type: String
44
+
45
+ selectors:
46
+ search-input:
47
+ desc: Seletor do campo de pesquisa.
48
+ examples: ['data-cy="search-input"']
@@ -22,8 +22,12 @@
22
22
 
23
23
  <script>
24
24
  import viewMixin from '../../mixins/view'
25
+
25
26
  import { markRaw } from 'vue'
26
27
  import { getGetter, getAction } from '@bildvitta/store-adapter'
28
+ import debug from 'debug'
29
+
30
+ const log = debug('asteroid-ui:qas-single-view')
27
31
 
28
32
  export default {
29
33
  name: 'QasSingleView',
@@ -85,11 +89,6 @@ export default {
85
89
  try {
86
90
  const payload = { id: this.id, url: this.url, ...externalPayload }
87
91
 
88
- this.$qas.logger.group(
89
- `QasSingleView - fetchSingle -> payload do parâmetro do ${this.entity}/fetchSingle`,
90
- [payload]
91
- )
92
-
93
92
  const response = await getAction.call(this, {
94
93
  entity: this.entity,
95
94
  key: 'fetchSingle',
@@ -108,20 +107,14 @@ export default {
108
107
  metadata: this.mx_metadata
109
108
  })
110
109
 
111
- this.$qas.logger.group(
112
- `QasSingleView - fetchSingle -> resposta da action ${this.entity}/fetchSingle`, [response]
113
- )
114
-
115
110
  this.$emit('fetch-success', response)
111
+
112
+ log(`[${this.entity}]:fetchSingle:success`, response)
116
113
  } catch (error) {
117
114
  this.mx_fetchError(error)
118
115
  this.$emit('fetch-error', error)
119
116
 
120
- this.$qas.logger.group(
121
- `QasSingleView - fetchSingle -> exceção da action ${this.entity}/fetchSingle`,
122
- [error],
123
- { error: true }
124
- )
117
+ log(`[${this.entity}]:fetchSingle:error`, error)
125
118
  } finally {
126
119
  this.mx_isFetching = false
127
120
  }
@@ -159,8 +159,6 @@ export default {
159
159
  columnByField(this.fields[index])
160
160
  }
161
161
 
162
- this.$qas.logger.group('QasTableGenerator - Automatic columns', [columns])
163
-
164
162
  return columns
165
163
  }
166
164
 
@@ -173,8 +171,6 @@ export default {
173
171
  }
174
172
  })
175
173
 
176
- this.$qas.logger.group('QasTableGenerator - columns', [columns])
177
-
178
174
  return columns
179
175
  },
180
176
 
@@ -199,8 +195,6 @@ export default {
199
195
  return result
200
196
  })
201
197
 
202
- this.$qas.logger.group('QasTableGenerator - resultsByFields', [mappedResults])
203
-
204
198
  return mappedResults
205
199
  },
206
200
 
@@ -1,6 +1,5 @@
1
1
  import Delete from './delete/Delete.js'
2
2
  import Dialog from './dialog/Dialog.js'
3
- import Logger from './logger/Logger.js'
4
3
  import NotifyError from './notify-error/NotifyError.js'
5
4
  import NotifySuccess from './notify-success/NotifySuccess.js'
6
5
  import Screen from './screen/Screen.js'
@@ -8,7 +7,6 @@ import Screen from './screen/Screen.js'
8
7
  export {
9
8
  Delete,
10
9
  Dialog,
11
- Logger,
12
10
  NotifyError,
13
11
  NotifySuccess,
14
12
  Screen
package/src/vue-plugin.js CHANGED
@@ -70,8 +70,7 @@ import {
70
70
  Dialog,
71
71
  NotifyError,
72
72
  NotifySuccess,
73
- Screen,
74
- Logger
73
+ Screen
75
74
  } from './plugins'
76
75
 
77
76
  import packageInfo from '../package.json'
@@ -152,7 +151,6 @@ async function install (app) {
152
151
  delete: params => Delete.call(app.config.globalProperties, params),
153
152
  dialog: Dialog,
154
153
  error: NotifyError,
155
- logger: Logger(),
156
154
  screen: Screen(),
157
155
  success: NotifySuccess
158
156
  }
@@ -230,7 +228,6 @@ export {
230
228
 
231
229
  // plugins
232
230
  Dialog,
233
- Logger,
234
231
  NotifyError,
235
232
  NotifySuccess,
236
233
  Screen,
@@ -1,44 +0,0 @@
1
- export default () => {
2
- const isDebugEnabled = process.env.DEBUGGING
3
-
4
- const normalizeMessage = msg => `%c ${msg}`
5
- const getStyle = isError => (
6
- `
7
- background: ${isError ? '#C10015 ' : '#1976d2'};
8
- font-weight: bold;
9
- color: white;
10
- padding: 6px 20px;
11
- border-radius: 4px;
12
- display: block;
13
- width: 100%;
14
- font-size: 12px;
15
- `
16
- )
17
-
18
- return {
19
- group (message, payload = [], { error } = {}) {
20
- if (!isDebugEnabled) return
21
-
22
- console.groupCollapsed(normalizeMessage(message), getStyle(error))
23
-
24
- for (const item of payload) {
25
- if (typeof item === 'string') {
26
- console.info(normalizeMessage(item), getStyle(error))
27
- continue
28
- }
29
-
30
- console.table(item)
31
- }
32
-
33
- console.groupEnd()
34
- },
35
-
36
- info (message) {
37
- isDebugEnabled && console.info(normalizeMessage(message), getStyle())
38
- },
39
-
40
- error (message) {
41
- isDebugEnabled && console.info(normalizeMessage(message), getStyle(true))
42
- }
43
- }
44
- }
@@ -1,9 +0,0 @@
1
- type: component
2
-
3
- meta:
4
- desc: Plugin para adicionar loggers.
5
-
6
- inject:
7
- 'this.$qas.logger':
8
- default: {}
9
- type: Object