@bildvitta/quasar-ui-asteroid 3.0.0-beta.10 → 3.0.0-beta.11
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/dist/api/QasAppBar.json +0 -4
- package/dist/api/QasCard.json +13 -9
- package/dist/asteroid.cjs.css +1 -1
- package/dist/asteroid.cjs.js +241 -37
- package/dist/asteroid.cjs.min.js +2 -2
- package/dist/asteroid.esm.css +1 -1
- package/dist/asteroid.esm.js +242 -38
- package/dist/asteroid.esm.min.js +2 -2
- package/dist/asteroid.umd.css +1 -1
- package/dist/asteroid.umd.js +241 -37
- package/dist/asteroid.umd.min.js +2 -2
- package/dist/vetur/asteroid-attributes.json +12 -12
- package/dist/vetur/asteroid-tags.json +3 -3
- package/package.json +1 -1
- package/src/components/app-bar/QasAppBar.yml +0 -4
- package/src/components/card/QasCard.yml +13 -9
- package/src/components/date-time-input/QasDateTimeInput.vue +1 -1
- package/src/components/delete/QasDelete.vue +15 -1
- package/src/components/filters/QasFilters.vue +17 -2
- package/src/components/form-view/QasFormView.vue +51 -8
- package/src/components/grid-generator/QasGridGenerator.vue +17 -2
- package/src/components/list-view/QasListView.vue +20 -7
- package/src/components/nested-fields/QasNestedFields.vue +7 -1
- package/src/components/search-box/QasSearchBox.vue +2 -2
- package/src/components/single-view/QasSingleView.vue +17 -3
- package/src/components/table-generator/QasTableGenerator.vue +11 -1
- package/src/components/uploader/QasUploader.vue +28 -3
- package/src/plugins/index.js +4 -2
- package/src/plugins/logger/Logger.js +44 -0
- package/src/plugins/logger/Logger.yml +9 -0
- package/src/vue-plugin.js +6 -3
package/dist/api/QasAppBar.json
CHANGED
|
@@ -4,10 +4,6 @@
|
|
|
4
4
|
"desc": "Cria um seção para alertar sobre um conteúdo."
|
|
5
5
|
},
|
|
6
6
|
"props": {
|
|
7
|
-
"is-auth": {
|
|
8
|
-
"desc": "Controla se mostra ou não o menu de usuário.",
|
|
9
|
-
"type": "Boolean"
|
|
10
|
-
},
|
|
11
7
|
"notifications": {
|
|
12
8
|
"desc": "Ícone de notificação que fica ao lado do menu de usuário.",
|
|
13
9
|
"type": "Object",
|
package/dist/api/QasCard.json
CHANGED
|
@@ -4,15 +4,6 @@
|
|
|
4
4
|
"desc": "Componente de card."
|
|
5
5
|
},
|
|
6
6
|
"props": {
|
|
7
|
-
"image-position": {
|
|
8
|
-
"desc": "Posição da imagem \"background-position\".",
|
|
9
|
-
"default": "center",
|
|
10
|
-
"type": "String"
|
|
11
|
-
},
|
|
12
|
-
"form-mode": {
|
|
13
|
-
"desc": "Modo de formulário, altera o estilo quando está em uma pagina de formulário.",
|
|
14
|
-
"type": "Boolean"
|
|
15
|
-
},
|
|
16
7
|
"gutter": {
|
|
17
8
|
"desc": "Espaçamento dentro <q-card-section /> onde fica o slot \"default\".",
|
|
18
9
|
"default": "sm",
|
|
@@ -30,6 +21,19 @@
|
|
|
30
21
|
"default": [],
|
|
31
22
|
"type": "Array"
|
|
32
23
|
},
|
|
24
|
+
"image-position": {
|
|
25
|
+
"desc": "Posição da imagem \"background-position\".",
|
|
26
|
+
"default": "center",
|
|
27
|
+
"type": "String"
|
|
28
|
+
},
|
|
29
|
+
"outlined": {
|
|
30
|
+
"desc": "Insere uma borda sólida em volta do componente.",
|
|
31
|
+
"type": "Boolean"
|
|
32
|
+
},
|
|
33
|
+
"unelevated": {
|
|
34
|
+
"desc": "Remove a sombra do componente.",
|
|
35
|
+
"type": "Boolean"
|
|
36
|
+
},
|
|
33
37
|
"use-header": {
|
|
34
38
|
"desc": "Controla se vai ter ou não o header com carousel.",
|
|
35
39
|
"type": "Boolean"
|
package/dist/asteroid.cjs.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,700;1,400;1,700&display=swap";:root{--qas-background-color: #f5f5f5;--qas-generic-border-radius: 8px}h1{font-size:6rem;font-weight:800;letter-spacing:0;line-height:6rem;margin:0}h2{font-size:3.75rem;font-weight:700;letter-spacing:0;line-height:3.75rem;margin:0}h3{font-size:3rem;font-weight:600;letter-spacing:0;line-height:2.5rem;margin:0}h4{font-size:2.125rem;font-weight:800;letter-spacing:0;line-height:2.5rem;margin:0}h5{font-size:1.5rem;font-weight:700;letter-spacing:0;line-height:2rem;margin:0}h6{font-size:1.25rem;font-weight:600;letter-spacing:0;line-height:2rem;margin:0}body{background-color:var(--qas-background-color)}.q-field--outlined .q-field__inner{background-color:#fff;border-radius:var(--qas-generic-border-radius)}.q-radio__inner::before{color:var(--q-primary)}.q-tabs__arrow{color:var(--q-primary)}.bg-no-repeat{background-repeat:no-repeat !important}.bg-size-contain{background-size:contain !important}.bg-size-cover{background-size:cover !important}.bg-position-bottom{background-position:bottom !important}.bg-position-center{background-position:center !important}.bg-position-left{background-position:left !important}.bg-position-right{background-position:right !important}.bg-position-top{background-position:top !important}.border-secondary-contrast:not(.border-top):not(.border-left):not(.border-bottom):not(.border-right),.border-secondary:not(.border-top):not(.border-left):not(.border-bottom):not(.border-right),.border-primary-contrast:not(.border-top):not(.border-left):not(.border-bottom):not(.border-right),.border-primary:not(.border-top):not(.border-left):not(.border-bottom):not(.border-right){border-width:1px !important}.border-primary{border:0 solid var(--q-primary) !important}.border-primary-contrast{border:0 solid var(--q-primary-contrast) !important}.border-secondary{border:0 solid var(--q-secondary) !important}.border-secondary-contrast{border:0 solid var(--q-secondary-contrast) !important}.border-top{border-top-width:1px !important}.border-left{border-left-width:1px !important}.border-bottom{border-bottom-width:1px !important}.border-right{border-right-width:1px !important}.rounded-borders-sm{border-radius:calc(var(--qas-generic-border-radius) / 2) !important}.rounded-borders-lg{border-radius:calc(var(--qas-generic-border-radius) * 2) !important}.rounded-borders-top{border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}.rounded-borders-right{border-bottom-left-radius:0 !important;border-top-left-radius:0 !important}.rounded-borders-bottom{border-top-left-radius:0 !important;border-top-right-radius:0 !important}.rounded-borders-left{border-bottom-right-radius:0 !important;border-top-right-radius:0 !important}.container,.container-xs,.container-sm,.container-md,.container-lg,.container-xl{margin-left:auto;margin-right:auto;max-width:1280px;width:calc(100% - 80px)}.container.spaced,.container-xs.spaced,.container-sm.spaced,.container-md.spaced,.container-lg.spaced,.container-xl.spaced{padding-bottom:20px;padding-top:20px}@media(max-width: 599px){.container,.container-xs,.container-sm,.container-md,.container-lg,.container-xl{width:calc(100% - 20px)}}.container-xs{max-width:599px !important}.container-sm{max-width:1023px !important}.container-md{max-width:1439px !important}.container-lg{max-width:1919px !important}body{font-family:Inter,system-ui,sans-serif}.qs-lh-xs{line-height:.85 !important}.qs-lh-sm{line-height:1 !important}.qs-lh-md{line-height:1.15 !important}.qs-lh-lg{line-height:1.3 !important}.qs-lh-xl{line-height:1.5 !important}.opacity-10{opacity:0.1 !important}.opacity-20{opacity:0.2 !important}.opacity-30{opacity:0.3 !important}.opacity-40{opacity:0.4 !important}.opacity-50{opacity:0.5 !important}.opacity-60{opacity:0.6 !important}.opacity-70{opacity:0.7 !important}.opacity-80{opacity:0.8 !important}.opacity-90{opacity:0.9 !important}.text-baseline{vertical-align:baseline !important}.text-break{word-break:break-all !important}.text-underline{text-decoration:underline !important}.text-no-decoration{text-decoration:none !important}.unset{all:unset}a.unset,button.unset{cursor:pointer}.qas-
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,700;1,400;1,700&display=swap";:root{--qas-background-color: #f5f5f5;--qas-generic-border-radius: 8px}h1{font-size:6rem;font-weight:800;letter-spacing:0;line-height:6rem;margin:0}h2{font-size:3.75rem;font-weight:700;letter-spacing:0;line-height:3.75rem;margin:0}h3{font-size:3rem;font-weight:600;letter-spacing:0;line-height:2.5rem;margin:0}h4{font-size:2.125rem;font-weight:800;letter-spacing:0;line-height:2.5rem;margin:0}h5{font-size:1.5rem;font-weight:700;letter-spacing:0;line-height:2rem;margin:0}h6{font-size:1.25rem;font-weight:600;letter-spacing:0;line-height:2rem;margin:0}body{background-color:var(--qas-background-color)}.q-field--outlined .q-field__inner{background-color:#fff;border-radius:var(--qas-generic-border-radius)}.q-radio__inner::before{color:var(--q-primary)}.q-tabs__arrow{color:var(--q-primary)}.bg-no-repeat{background-repeat:no-repeat !important}.bg-size-contain{background-size:contain !important}.bg-size-cover{background-size:cover !important}.bg-position-bottom{background-position:bottom !important}.bg-position-center{background-position:center !important}.bg-position-left{background-position:left !important}.bg-position-right{background-position:right !important}.bg-position-top{background-position:top !important}.border-secondary-contrast:not(.border-top):not(.border-left):not(.border-bottom):not(.border-right),.border-secondary:not(.border-top):not(.border-left):not(.border-bottom):not(.border-right),.border-primary-contrast:not(.border-top):not(.border-left):not(.border-bottom):not(.border-right),.border-primary:not(.border-top):not(.border-left):not(.border-bottom):not(.border-right){border-width:1px !important}.border-primary{border:0 solid var(--q-primary) !important}.border-primary-contrast{border:0 solid var(--q-primary-contrast) !important}.border-secondary{border:0 solid var(--q-secondary) !important}.border-secondary-contrast{border:0 solid var(--q-secondary-contrast) !important}.border-top{border-top-width:1px !important}.border-left{border-left-width:1px !important}.border-bottom{border-bottom-width:1px !important}.border-right{border-right-width:1px !important}.rounded-borders-sm{border-radius:calc(var(--qas-generic-border-radius) / 2) !important}.rounded-borders-lg{border-radius:calc(var(--qas-generic-border-radius) * 2) !important}.rounded-borders-top{border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important}.rounded-borders-right{border-bottom-left-radius:0 !important;border-top-left-radius:0 !important}.rounded-borders-bottom{border-top-left-radius:0 !important;border-top-right-radius:0 !important}.rounded-borders-left{border-bottom-right-radius:0 !important;border-top-right-radius:0 !important}.container,.container-xs,.container-sm,.container-md,.container-lg,.container-xl{margin-left:auto;margin-right:auto;max-width:1280px;width:calc(100% - 80px)}.container.spaced,.container-xs.spaced,.container-sm.spaced,.container-md.spaced,.container-lg.spaced,.container-xl.spaced{padding-bottom:20px;padding-top:20px}@media(max-width: 599px){.container,.container-xs,.container-sm,.container-md,.container-lg,.container-xl{width:calc(100% - 20px)}}.container-xs{max-width:599px !important}.container-sm{max-width:1023px !important}.container-md{max-width:1439px !important}.container-lg{max-width:1919px !important}body{font-family:Inter,system-ui,sans-serif}.qs-lh-xs{line-height:.85 !important}.qs-lh-sm{line-height:1 !important}.qs-lh-md{line-height:1.15 !important}.qs-lh-lg{line-height:1.3 !important}.qs-lh-xl{line-height:1.5 !important}.opacity-10{opacity:0.1 !important}.opacity-20{opacity:0.2 !important}.opacity-30{opacity:0.3 !important}.opacity-40{opacity:0.4 !important}.opacity-50{opacity:0.5 !important}.opacity-60{opacity:0.6 !important}.opacity-70{opacity:0.7 !important}.opacity-80{opacity:0.8 !important}.opacity-90{opacity:0.9 !important}.text-baseline{vertical-align:baseline !important}.text-break{word-break:break-all !important}.text-underline{text-decoration:underline !important}.text-no-decoration{text-decoration:none !important}.unset{all:unset}a.unset,button.unset{cursor:pointer}.qas-alert{border-style:solid;border-width:0 10px}.qas-app-bar__toolbar{height:70px}.qas-app-bar__brand{height:24px;margin-right:8px;position:relative;top:4px}.qas-app-bar__user{background-color:var(--qas-background-color);transition:background-color .3s cubic-bezier(0.25, 0.8, 0.5, 1)}.qas-app-bar__user:focus,.qas-app-bar__user:hover{background-color:rgba(255,255,255,.2)}.qas-app-bar__user-data{max-width:180px}.qas-app-bar__user-menu{width:260px}@media(max-width: 599px){.qas-app-bar__user-data{display:none}}.qas-actions-menu__list{width:265px;z-index:1}.q-expansion-item--expanded .q-item:not(.qas-app-menu--active.q-item){background-color:#fafafa}.qas-list-items .q-list>.q-item{padding:24px 16px}.qas-map__draw{height:300px;width:100%}.qas-nested-fields__actions{height:56px}.qas-signature-pad__canvas{border:1px solid rgba(0,0,0,.12)}.qas-table-generator .q-table th{font-weight:bold}.qas-table-generator--mobile{margin:0 -10px}.qas-table-generator--mobile .q-table{margin-left:10px}.qas-transfer__icon{transform:rotate(-90deg)}.qas-uploader__input{display:none}
|
package/dist/asteroid.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @bildvitta/quasar-ui-asteroid v3.0.0-beta.
|
|
2
|
+
* @bildvitta/quasar-ui-asteroid v3.0.0-beta.11
|
|
3
3
|
* (c) 2022 Bild & Vitta <systemteam@bild.com.br>
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -2005,7 +2005,7 @@ var script$z = {
|
|
|
2005
2005
|
},
|
|
2006
2006
|
|
|
2007
2007
|
watch: {
|
|
2008
|
-
|
|
2008
|
+
modelValue (current, original) {
|
|
2009
2009
|
if (!current || this.useTimeOnly) {
|
|
2010
2010
|
this.currentValue = current;
|
|
2011
2011
|
return
|
|
@@ -2433,6 +2433,51 @@ var Dialog = (componentProps = {}) => {
|
|
|
2433
2433
|
});
|
|
2434
2434
|
};
|
|
2435
2435
|
|
|
2436
|
+
var Logger = () => {
|
|
2437
|
+
const isDebugEnabled = process.env.DEBUGGING;
|
|
2438
|
+
|
|
2439
|
+
const normalizeMessage = msg => `%c ${msg}`;
|
|
2440
|
+
const getStyle = isError => (
|
|
2441
|
+
`
|
|
2442
|
+
background: ${isError ? '#C10015 ' : '#1976d2'};
|
|
2443
|
+
font-weight: bold;
|
|
2444
|
+
color: white;
|
|
2445
|
+
padding: 6px 20px;
|
|
2446
|
+
border-radius: 4px;
|
|
2447
|
+
display: block;
|
|
2448
|
+
width: 100%;
|
|
2449
|
+
font-size: 12px;
|
|
2450
|
+
`
|
|
2451
|
+
);
|
|
2452
|
+
|
|
2453
|
+
return {
|
|
2454
|
+
group (message, payload = [], { error } = {}) {
|
|
2455
|
+
if (!isDebugEnabled) return
|
|
2456
|
+
|
|
2457
|
+
console.group(normalizeMessage(message), getStyle(error));
|
|
2458
|
+
|
|
2459
|
+
for (const item of payload) {
|
|
2460
|
+
if (typeof item === 'string') {
|
|
2461
|
+
console.info(normalizeMessage(item), getStyle(error));
|
|
2462
|
+
continue
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
console.table(item);
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
console.groupEnd();
|
|
2469
|
+
},
|
|
2470
|
+
|
|
2471
|
+
info (message) {
|
|
2472
|
+
isDebugEnabled && console.info(normalizeMessage(message), getStyle());
|
|
2473
|
+
},
|
|
2474
|
+
|
|
2475
|
+
error (message) {
|
|
2476
|
+
isDebugEnabled && console.info(normalizeMessage(message), getStyle(true));
|
|
2477
|
+
}
|
|
2478
|
+
}
|
|
2479
|
+
};
|
|
2480
|
+
|
|
2436
2481
|
quasar.Notify.registerType('error', {
|
|
2437
2482
|
color: 'negative',
|
|
2438
2483
|
progress: true
|
|
@@ -2619,7 +2664,13 @@ var script$w = {
|
|
|
2619
2664
|
try {
|
|
2620
2665
|
const { destroyRoutes, history } = useHistory();
|
|
2621
2666
|
|
|
2622
|
-
|
|
2667
|
+
const payload = { id: this.id, url: this.url };
|
|
2668
|
+
|
|
2669
|
+
this.$qas.logger.group(
|
|
2670
|
+
`QasDelete - destroy -> Payload do parâmetro do ${this.entity}/destroy`, [payload]
|
|
2671
|
+
);
|
|
2672
|
+
|
|
2673
|
+
await this.$store.dispatch(`${this.entity}/destroy`, payload);
|
|
2623
2674
|
|
|
2624
2675
|
NotifySuccess('Item deletado com sucesso!');
|
|
2625
2676
|
|
|
@@ -2633,9 +2684,17 @@ var script$w = {
|
|
|
2633
2684
|
this.createDeleteSuccessEvent();
|
|
2634
2685
|
|
|
2635
2686
|
this.$emit('success');
|
|
2687
|
+
|
|
2688
|
+
this.$qas.logger.info('QasDelete - destroy -> item deletado com sucesso!');
|
|
2636
2689
|
} catch (error) {
|
|
2637
2690
|
NotifyError('Ops! Não foi possível deletar o item.');
|
|
2638
2691
|
this.$emit('error', error);
|
|
2692
|
+
|
|
2693
|
+
this.$qas.logger.group(
|
|
2694
|
+
`QasDelete - destroy -> exceção da action ${this.entity}/destroy`,
|
|
2695
|
+
[error],
|
|
2696
|
+
{ error: true }
|
|
2697
|
+
);
|
|
2639
2698
|
} finally {
|
|
2640
2699
|
quasar.Loading.hide();
|
|
2641
2700
|
this.$emit('update:deleting', false);
|
|
@@ -3602,6 +3661,8 @@ var script$q = {
|
|
|
3602
3661
|
);
|
|
3603
3662
|
|
|
3604
3663
|
this.updateUploading(false);
|
|
3664
|
+
|
|
3665
|
+
this.$qas.logger.group('QasUploader - uploaded', [this.modelValue]);
|
|
3605
3666
|
},
|
|
3606
3667
|
|
|
3607
3668
|
async fetchCredentials (filename) {
|
|
@@ -3612,6 +3673,12 @@ var script$q = {
|
|
|
3612
3673
|
entity: this.entity,
|
|
3613
3674
|
filename
|
|
3614
3675
|
});
|
|
3676
|
+
|
|
3677
|
+
this.$qas.logger.group(
|
|
3678
|
+
'QasUploader - fetchCredentials -> resposta de /upload-credentials/',
|
|
3679
|
+
[data]
|
|
3680
|
+
);
|
|
3681
|
+
|
|
3615
3682
|
return data
|
|
3616
3683
|
} finally {
|
|
3617
3684
|
this.isFetching = false;
|
|
@@ -3631,7 +3698,9 @@ var script$q = {
|
|
|
3631
3698
|
|
|
3632
3699
|
const clonedValue = quasar.extend(true, [], this.modelValue);
|
|
3633
3700
|
const numberIndex = this.modelValue.findIndex(file => this.getFileName(file) === index);
|
|
3701
|
+
|
|
3634
3702
|
clonedValue.splice(numberIndex, 1);
|
|
3703
|
+
|
|
3635
3704
|
this.$emit('update:modelValue', clonedValue);
|
|
3636
3705
|
},
|
|
3637
3706
|
|
|
@@ -3640,7 +3709,9 @@ var script$q = {
|
|
|
3640
3709
|
},
|
|
3641
3710
|
|
|
3642
3711
|
getFilesList (uploadedFiles) {
|
|
3643
|
-
const pathsList = Array.isArray(this.modelValue)
|
|
3712
|
+
const pathsList = Array.isArray(this.modelValue)
|
|
3713
|
+
? this.modelValue
|
|
3714
|
+
: (this.modelValue ? [this.modelValue] : []);
|
|
3644
3715
|
|
|
3645
3716
|
uploadedFiles = uploadedFiles.map((file, indexToDelete) => {
|
|
3646
3717
|
return {
|
|
@@ -3676,6 +3747,8 @@ var script$q = {
|
|
|
3676
3747
|
}
|
|
3677
3748
|
});
|
|
3678
3749
|
|
|
3750
|
+
this.$qas.logger.group('QasUploader - getFilesList', [files]);
|
|
3751
|
+
|
|
3679
3752
|
return files
|
|
3680
3753
|
},
|
|
3681
3754
|
|
|
@@ -3714,7 +3787,14 @@ var script$q = {
|
|
|
3714
3787
|
// Retorna largura e altura da original da imagem
|
|
3715
3788
|
const { width, height } = await getImageSize(image);
|
|
3716
3789
|
|
|
3717
|
-
if (width <= this.sizeLimit)
|
|
3790
|
+
if (width <= this.sizeLimit) {
|
|
3791
|
+
this.$qas.logger.info(`
|
|
3792
|
+
QasUploader - resizeImage -> Tamanho da imagem menor que o tamanho limite,
|
|
3793
|
+
sendo assim, não faz o resize
|
|
3794
|
+
`);
|
|
3795
|
+
|
|
3796
|
+
return file
|
|
3797
|
+
}
|
|
3718
3798
|
|
|
3719
3799
|
// Retorna os novos tamanhos redimensionados
|
|
3720
3800
|
const resizedDimensions = getResizeDimensions(this.sizeLimit, width, height);
|
|
@@ -3732,7 +3812,11 @@ var script$q = {
|
|
|
3732
3812
|
const resizedImage = await pica.resize(image, canvas, this.defaultPicaResizeOptions);
|
|
3733
3813
|
const blob = await pica.toBlob(resizedImage, type, 0.90);
|
|
3734
3814
|
|
|
3735
|
-
|
|
3815
|
+
const newFile = new File([blob], file.name, { type });
|
|
3816
|
+
|
|
3817
|
+
this.$qas.logger.group('QasUploader - resizeImage -> nova imagem', [newFile]);
|
|
3818
|
+
|
|
3819
|
+
return newFile
|
|
3736
3820
|
} catch {
|
|
3737
3821
|
// Caso não consiga redimensionar retorna o arquivo original
|
|
3738
3822
|
return file
|
|
@@ -4714,11 +4798,26 @@ var script$m = {
|
|
|
4714
4798
|
this.isFetching = true;
|
|
4715
4799
|
|
|
4716
4800
|
try {
|
|
4801
|
+
this.$qas.logger.group(
|
|
4802
|
+
`QasFilters - fetchFilters -> Payload do parâmetro do ${this.entity}/fetchFilters`,
|
|
4803
|
+
[{ url: this.url }]
|
|
4804
|
+
);
|
|
4805
|
+
|
|
4717
4806
|
const response = await this.$store.dispatch(`${this.entity}/fetchFilters`, { url: this.url });
|
|
4718
4807
|
this.$emit('fetch-success', response);
|
|
4808
|
+
|
|
4809
|
+
this.$qas.logger.group(
|
|
4810
|
+
`QasFilters - fetchFilters -> resposta da action ${this.entity}/fetchFilters`, [response]
|
|
4811
|
+
);
|
|
4719
4812
|
} catch (error) {
|
|
4720
4813
|
this.hasFetchError = true;
|
|
4721
4814
|
this.$emit('fetch-error', error);
|
|
4815
|
+
|
|
4816
|
+
this.$qas.logger.group(
|
|
4817
|
+
`QasFilters - fetchFilters -> exceção da action ${this.entity}/fetchFilters`,
|
|
4818
|
+
[error],
|
|
4819
|
+
{ error: true }
|
|
4820
|
+
);
|
|
4722
4821
|
} finally {
|
|
4723
4822
|
this.isFetching = false;
|
|
4724
4823
|
}
|
|
@@ -4802,7 +4901,7 @@ const _hoisted_7$2 = {
|
|
|
4802
4901
|
|
|
4803
4902
|
function render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4804
4903
|
const _component_qas_btn = vue.resolveComponent("qas-btn");
|
|
4805
|
-
const
|
|
4904
|
+
const _component_qas_input = vue.resolveComponent("qas-input");
|
|
4806
4905
|
const _component_q_form = vue.resolveComponent("q-form");
|
|
4807
4906
|
const _component_q_spinner = vue.resolveComponent("q-spinner");
|
|
4808
4907
|
const _component_q_icon = vue.resolveComponent("q-icon");
|
|
@@ -4822,11 +4921,13 @@ function render$m(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4822
4921
|
onSubmit: _cache[2] || (_cache[2] = vue.withModifiers($event => ($options.filter()), ["prevent"]))
|
|
4823
4922
|
}, {
|
|
4824
4923
|
default: vue.withCtx(() => [
|
|
4825
|
-
vue.createVNode(
|
|
4924
|
+
vue.createVNode(_component_qas_input, {
|
|
4826
4925
|
modelValue: $data.search,
|
|
4827
4926
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (($data.search) = $event)),
|
|
4828
4927
|
debounce: $options.debounce,
|
|
4829
4928
|
dense: "",
|
|
4929
|
+
"hide-bottom-space": "",
|
|
4930
|
+
outlined: false,
|
|
4830
4931
|
placeholder: $props.searchPlaceholder,
|
|
4831
4932
|
type: "search"
|
|
4832
4933
|
}, {
|
|
@@ -5454,8 +5555,10 @@ var script$k = {
|
|
|
5454
5555
|
},
|
|
5455
5556
|
|
|
5456
5557
|
created () {
|
|
5457
|
-
vueRouter.onBeforeRouteLeave(this.beforeRouteLeave);
|
|
5558
|
+
this.useDialogOnUnsavedChanges && vueRouter.onBeforeRouteLeave(this.beforeRouteLeave);
|
|
5559
|
+
|
|
5458
5560
|
window.addEventListener('delete-success', this.setIgnoreRouterGuard);
|
|
5561
|
+
|
|
5459
5562
|
this.fetch();
|
|
5460
5563
|
},
|
|
5461
5564
|
|
|
@@ -5486,6 +5589,11 @@ var script$k = {
|
|
|
5486
5589
|
return next()
|
|
5487
5590
|
}
|
|
5488
5591
|
|
|
5592
|
+
this.$qas.logger.group(
|
|
5593
|
+
'QasFormView - beforeRouteLeave -> dialog chamado, modelValue diferente do cachedResult',
|
|
5594
|
+
[{ modelValue: clonedModelValue, cachedResult: clonedCachedResult }]
|
|
5595
|
+
);
|
|
5596
|
+
|
|
5489
5597
|
this.handleDialog(() => {
|
|
5490
5598
|
this.ignoreRouterGuard = true;
|
|
5491
5599
|
next();
|
|
@@ -5500,10 +5608,14 @@ var script$k = {
|
|
|
5500
5608
|
this.mx_isFetching = true;
|
|
5501
5609
|
|
|
5502
5610
|
try {
|
|
5503
|
-
const
|
|
5504
|
-
|
|
5611
|
+
const payload = { form: true, id: this.id, params, url: this.fetchURL };
|
|
5612
|
+
|
|
5613
|
+
this.$qas.logger.group(
|
|
5614
|
+
`QasFormView - fetch -> payload do parâmetro do ${this.entity}/fetchSingle`, [payload]
|
|
5505
5615
|
);
|
|
5506
5616
|
|
|
5617
|
+
const response = await this.$store.dispatch(`${this.entity}/fetchSingle`, payload);
|
|
5618
|
+
|
|
5507
5619
|
const { errors, fields, metadata, result } = response.data;
|
|
5508
5620
|
|
|
5509
5621
|
this.mx_setErrors(errors);
|
|
@@ -5516,20 +5628,36 @@ var script$k = {
|
|
|
5516
5628
|
metadata
|
|
5517
5629
|
});
|
|
5518
5630
|
|
|
5631
|
+
this.$qas.logger.group(
|
|
5632
|
+
`QasFormView - fetch -> resposta da action ${this.entity}/fetchSingle`, [response]
|
|
5633
|
+
);
|
|
5634
|
+
|
|
5519
5635
|
if (result) {
|
|
5520
5636
|
this.hasResult = true;
|
|
5521
5637
|
|
|
5522
5638
|
this.$nextTick(() => {
|
|
5523
|
-
|
|
5639
|
+
const modelValue = { ...this.modelValue, ...result };
|
|
5640
|
+
|
|
5641
|
+
this.$emit('update:modelValue', modelValue);
|
|
5642
|
+
|
|
5643
|
+
this.$qas.logger.group('QasFormView - fetch -> modelValue', [modelValue]);
|
|
5524
5644
|
});
|
|
5525
5645
|
|
|
5526
5646
|
this.cachedResult = this.useDialogOnUnsavedChanges && quasar.extend(true, {}, result);
|
|
5647
|
+
|
|
5648
|
+
this.$qas.logger.group('QasFormView - fetch -> cachedResult', [this.cachedResult]);
|
|
5527
5649
|
}
|
|
5528
5650
|
|
|
5529
5651
|
this.$emit('fetch-success', response, this.modelValue);
|
|
5530
5652
|
} catch (error) {
|
|
5531
5653
|
this.mx_fetchError(error);
|
|
5532
5654
|
this.$emit('fetch-error', error);
|
|
5655
|
+
|
|
5656
|
+
this.$qas.logger.group(
|
|
5657
|
+
`QasFormView - fetch -> exceção da action ${this.entity}/fetchSingle`,
|
|
5658
|
+
[error],
|
|
5659
|
+
{ error: true }
|
|
5660
|
+
);
|
|
5533
5661
|
} finally {
|
|
5534
5662
|
this.mx_isFetching = false;
|
|
5535
5663
|
}
|
|
@@ -5595,11 +5723,14 @@ var script$k = {
|
|
|
5595
5723
|
this.isSubmitting = true;
|
|
5596
5724
|
|
|
5597
5725
|
try {
|
|
5598
|
-
const
|
|
5599
|
-
|
|
5600
|
-
|
|
5726
|
+
const payload = { id: this.id, payload: this.modelValue, url: this.url };
|
|
5727
|
+
|
|
5728
|
+
this.$qas.logger.group(
|
|
5729
|
+
`QasFormView - submit -> payload do ${this.entity}/${this.mode}`, [payload]
|
|
5601
5730
|
);
|
|
5602
5731
|
|
|
5732
|
+
const response = await this.$store.dispatch(`${this.entity}/${this.mode}`, payload);
|
|
5733
|
+
|
|
5603
5734
|
if (this.useDialogOnUnsavedChanges) {
|
|
5604
5735
|
this.cachedResult = quasar.extend(true, {}, this.modelValue);
|
|
5605
5736
|
}
|
|
@@ -5607,11 +5738,18 @@ var script$k = {
|
|
|
5607
5738
|
this.mx_setErrors();
|
|
5608
5739
|
NotifySuccess(response.data.status.text || 'Item salvo com sucesso!');
|
|
5609
5740
|
this.$emit('submit-success', response, this.modelValue);
|
|
5741
|
+
|
|
5742
|
+
this.$qas.logger.group(
|
|
5743
|
+
`QasFormView - submit -> resposta da action ${this.entity}/${this.mode}`, [response]
|
|
5744
|
+
);
|
|
5610
5745
|
} catch (error) {
|
|
5611
5746
|
const errors = error?.response?.data?.errors;
|
|
5612
5747
|
const message = error?.response?.data?.status?.text;
|
|
5613
5748
|
const exceptionResponse = error?.response?.data?.exception;
|
|
5614
|
-
|
|
5749
|
+
|
|
5750
|
+
const exception = errors
|
|
5751
|
+
? 'Existem erros de validação no formulário.'
|
|
5752
|
+
: exceptionResponse || error.message;
|
|
5615
5753
|
|
|
5616
5754
|
this.mx_setErrors(errors);
|
|
5617
5755
|
this.$emit('update:errors', this.mx_errors);
|
|
@@ -5619,6 +5757,12 @@ var script$k = {
|
|
|
5619
5757
|
NotifyError(message || 'Ops! Erro ao salvar item.', exception);
|
|
5620
5758
|
|
|
5621
5759
|
this.$emit('submit-error', error);
|
|
5760
|
+
|
|
5761
|
+
this.$qas.logger.group(
|
|
5762
|
+
`QasFormView - fetch -> exceção da action ${this.entity}/${this.mode}`,
|
|
5763
|
+
[error],
|
|
5764
|
+
{ error: true }
|
|
5765
|
+
);
|
|
5622
5766
|
} finally {
|
|
5623
5767
|
this.isSubmitting = false;
|
|
5624
5768
|
}
|
|
@@ -6013,6 +6157,11 @@ var script$i = {
|
|
|
6013
6157
|
computed: {
|
|
6014
6158
|
formattedFields () {
|
|
6015
6159
|
if (this.useEmptyResult) {
|
|
6160
|
+
this.$qas.logger.group(
|
|
6161
|
+
'QasGridGenerator - formattedFields -> this.useEmptyResult tem valor "true"',
|
|
6162
|
+
[this.fields]
|
|
6163
|
+
);
|
|
6164
|
+
|
|
6016
6165
|
return this.fields
|
|
6017
6166
|
}
|
|
6018
6167
|
|
|
@@ -6030,6 +6179,8 @@ var script$i = {
|
|
|
6030
6179
|
}
|
|
6031
6180
|
}
|
|
6032
6181
|
|
|
6182
|
+
this.$qas.logger.group('QasGridGenerator - formattedFields', [fields]);
|
|
6183
|
+
|
|
6033
6184
|
return fields
|
|
6034
6185
|
},
|
|
6035
6186
|
|
|
@@ -6045,11 +6196,19 @@ var script$i = {
|
|
|
6045
6196
|
|
|
6046
6197
|
for (const key in result) {
|
|
6047
6198
|
if (this.formattedFields[key]?.type) {
|
|
6048
|
-
formattedResult[key] =
|
|
6049
|
-
|
|
6199
|
+
formattedResult[key] = (
|
|
6200
|
+
humanize(this.formattedFields[key], result[key]) || this.emptyResultText
|
|
6201
|
+
);
|
|
6202
|
+
|
|
6203
|
+
this.slotValue[key] = {
|
|
6204
|
+
...this.formattedFields[key],
|
|
6205
|
+
formattedResult: formattedResult[key]
|
|
6206
|
+
};
|
|
6050
6207
|
}
|
|
6051
6208
|
}
|
|
6052
6209
|
|
|
6210
|
+
this.$qas.logger.group('QasGridGenerator - getResultsByFields', [formattedResult]);
|
|
6211
|
+
|
|
6053
6212
|
return formattedResult
|
|
6054
6213
|
}
|
|
6055
6214
|
}
|
|
@@ -6448,15 +6607,18 @@ var script$e = {
|
|
|
6448
6607
|
const hasFilters = !!Object.keys(filters).length;
|
|
6449
6608
|
|
|
6450
6609
|
try {
|
|
6451
|
-
const
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6610
|
+
const payload = {
|
|
6611
|
+
...this.mx_context,
|
|
6612
|
+
url: this.url,
|
|
6613
|
+
...(hasFilters && { filters })
|
|
6614
|
+
};
|
|
6615
|
+
|
|
6616
|
+
this.$qas.logger.group(
|
|
6617
|
+
`QasListView - fetchList -> Payload do parâmetro do ${this.entity}/fetchList`, [payload]
|
|
6458
6618
|
);
|
|
6459
6619
|
|
|
6620
|
+
const response = await this.$store.dispatch(`${this.entity}/fetchList`, payload);
|
|
6621
|
+
|
|
6460
6622
|
const { errors, fields, metadata } = response.data;
|
|
6461
6623
|
|
|
6462
6624
|
this.mx_setErrors(errors);
|
|
@@ -6470,10 +6632,20 @@ var script$e = {
|
|
|
6470
6632
|
});
|
|
6471
6633
|
|
|
6472
6634
|
this.$emit('fetch-success', response);
|
|
6635
|
+
|
|
6636
|
+
this.$qas.logger.group(
|
|
6637
|
+
`QasListView - fetchSingle -> resposta da action ${this.entity}/fetchList`, [response]
|
|
6638
|
+
);
|
|
6473
6639
|
} catch (error) {
|
|
6474
6640
|
this.mx_fetchError(error);
|
|
6475
6641
|
this.$emit('update:errors', error);
|
|
6476
6642
|
this.$emit('fetch-error', error);
|
|
6643
|
+
|
|
6644
|
+
this.$qas.logger.group(
|
|
6645
|
+
`QasListView - fetchSingle -> exceção da action ${this.entity}/fetchList`,
|
|
6646
|
+
[error],
|
|
6647
|
+
{ error: true }
|
|
6648
|
+
);
|
|
6477
6649
|
} finally {
|
|
6478
6650
|
this.mx_isFetching = false;
|
|
6479
6651
|
}
|
|
@@ -6906,13 +7078,17 @@ var script$c = {
|
|
|
6906
7078
|
|
|
6907
7079
|
methods: {
|
|
6908
7080
|
add (row = {}) {
|
|
6909
|
-
|
|
7081
|
+
const payload = { ...this.rowObject, ...row };
|
|
7082
|
+
|
|
7083
|
+
this.nested.push(payload);
|
|
6910
7084
|
|
|
6911
7085
|
this.$nextTick(() => {
|
|
6912
7086
|
this.useAnimation && this.setScroll();
|
|
6913
7087
|
this.setFocus();
|
|
6914
7088
|
});
|
|
6915
7089
|
|
|
7090
|
+
this.$qas.logger.group('QasNestedFields - add', [payload]);
|
|
7091
|
+
|
|
6916
7092
|
return this.updateModelValue()
|
|
6917
7093
|
},
|
|
6918
7094
|
|
|
@@ -6932,6 +7108,8 @@ var script$c = {
|
|
|
6932
7108
|
? this.nested.splice(index, 1)
|
|
6933
7109
|
: this.nested.splice(index, 1, { [this.destroyKey]: true, ...row });
|
|
6934
7110
|
|
|
7111
|
+
this.$qas.logger.group('QasNestedFields - destroy', [{ index, row }]);
|
|
7112
|
+
|
|
6935
7113
|
return this.updateModelValue()
|
|
6936
7114
|
},
|
|
6937
7115
|
|
|
@@ -7676,17 +7854,17 @@ const _hoisted_2$3 = /*#__PURE__*/vue.createElementVNode("div", null, "Não há
|
|
|
7676
7854
|
|
|
7677
7855
|
function render$8(_ctx, _cache, $props, $setup, $data, $options) {
|
|
7678
7856
|
const _component_q_icon = vue.resolveComponent("q-icon");
|
|
7679
|
-
const
|
|
7857
|
+
const _component_qas_input = vue.resolveComponent("qas-input");
|
|
7680
7858
|
const _component_qas_box = vue.resolveComponent("qas-box");
|
|
7681
7859
|
|
|
7682
7860
|
return (vue.openBlock(), vue.createBlock(_component_qas_box, null, {
|
|
7683
7861
|
default: vue.withCtx(() => [
|
|
7684
|
-
vue.createVNode(
|
|
7862
|
+
vue.createVNode(_component_qas_input, {
|
|
7685
7863
|
modelValue: $data.search,
|
|
7686
7864
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (($data.search) = $event)),
|
|
7687
7865
|
clearable: "",
|
|
7688
7866
|
disable: !$props.list.length,
|
|
7689
|
-
|
|
7867
|
+
"hide-bottom-space": "",
|
|
7690
7868
|
placeholder: $props.placeholder
|
|
7691
7869
|
}, {
|
|
7692
7870
|
append: vue.withCtx(() => [
|
|
@@ -8196,11 +8374,15 @@ var script$5 = {
|
|
|
8196
8374
|
this.mx_isFetching = true;
|
|
8197
8375
|
|
|
8198
8376
|
try {
|
|
8199
|
-
const
|
|
8200
|
-
|
|
8201
|
-
|
|
8377
|
+
const payload = { id: this.id, url: this.url, params };
|
|
8378
|
+
|
|
8379
|
+
this.$qas.logger.group(
|
|
8380
|
+
`QasSingleView - fetchSingle -> payload do parâmetro do ${this.entity}/fetchSingle`,
|
|
8381
|
+
[payload]
|
|
8202
8382
|
);
|
|
8203
8383
|
|
|
8384
|
+
const response = await this.$store.dispatch(`${this.entity}/fetchSingle`, payload);
|
|
8385
|
+
|
|
8204
8386
|
const { errors, fields, metadata } = response.data;
|
|
8205
8387
|
|
|
8206
8388
|
this.mx_setErrors(errors);
|
|
@@ -8213,10 +8395,20 @@ var script$5 = {
|
|
|
8213
8395
|
metadata: this.mx_metadata
|
|
8214
8396
|
});
|
|
8215
8397
|
|
|
8398
|
+
this.$qas.logger.group(
|
|
8399
|
+
`QasSingleView - fetchSingle -> resposta da action ${this.entity}/fetchSingle`, [response]
|
|
8400
|
+
);
|
|
8401
|
+
|
|
8216
8402
|
this.$emit('fetch-success', response);
|
|
8217
8403
|
} catch (error) {
|
|
8218
8404
|
this.mx_fetchError(error);
|
|
8219
8405
|
this.$emit('fetch-error', error);
|
|
8406
|
+
|
|
8407
|
+
this.$qas.logger.group(
|
|
8408
|
+
`QasSingleView - fetchSingle -> exceção da action ${this.entity}/fetchSingle`,
|
|
8409
|
+
[error],
|
|
8410
|
+
{ error: true }
|
|
8411
|
+
);
|
|
8220
8412
|
} finally {
|
|
8221
8413
|
this.mx_isFetching = false;
|
|
8222
8414
|
}
|
|
@@ -8508,6 +8700,8 @@ var script$3 = {
|
|
|
8508
8700
|
columnByField(this.fields[index]);
|
|
8509
8701
|
}
|
|
8510
8702
|
|
|
8703
|
+
this.$qas.logger.group('QasTableGenerator - Automatic columns', [columns]);
|
|
8704
|
+
|
|
8511
8705
|
return columns
|
|
8512
8706
|
}
|
|
8513
8707
|
|
|
@@ -8520,6 +8714,8 @@ var script$3 = {
|
|
|
8520
8714
|
}
|
|
8521
8715
|
});
|
|
8522
8716
|
|
|
8717
|
+
this.$qas.logger.group('QasTableGenerator - columns', [columns]);
|
|
8718
|
+
|
|
8523
8719
|
return columns
|
|
8524
8720
|
},
|
|
8525
8721
|
|
|
@@ -8536,16 +8732,22 @@ var script$3 = {
|
|
|
8536
8732
|
},
|
|
8537
8733
|
|
|
8538
8734
|
resultsByFields () {
|
|
8735
|
+
if (!Object.keys(this.fields).length) return []
|
|
8736
|
+
|
|
8539
8737
|
const results = quasar.extend(true, [], this.results);
|
|
8540
8738
|
|
|
8541
|
-
|
|
8739
|
+
const mappedResults = results.map((result, index) => {
|
|
8542
8740
|
for (const key in result) {
|
|
8543
8741
|
result.default = this.results[index];
|
|
8544
8742
|
result[key] = humanize(this.fields[key], result[key]) || this.emptyResultText;
|
|
8545
8743
|
}
|
|
8546
8744
|
|
|
8547
8745
|
return result
|
|
8548
|
-
})
|
|
8746
|
+
});
|
|
8747
|
+
|
|
8748
|
+
this.$qas.logger.group('QasTableGenerator - resultsByFields', [mappedResults]);
|
|
8749
|
+
|
|
8750
|
+
return mappedResults
|
|
8549
8751
|
},
|
|
8550
8752
|
|
|
8551
8753
|
rowsPerPage () {
|
|
@@ -9259,7 +9461,7 @@ script.__file = "src/components/transfer/QasTransfer.vue";
|
|
|
9259
9461
|
|
|
9260
9462
|
var name = "@bildvitta/quasar-ui-asteroid";
|
|
9261
9463
|
var description = "Asteroid";
|
|
9262
|
-
var version$1 = "3.0.0-beta.
|
|
9464
|
+
var version$1 = "3.0.0-beta.11";
|
|
9263
9465
|
var author = "Bild & Vitta <systemteam@bild.com.br>";
|
|
9264
9466
|
var license = "MIT";
|
|
9265
9467
|
var main = "dist/asteroid.cjs.min.js";
|
|
@@ -9415,14 +9617,16 @@ function install (app) {
|
|
|
9415
9617
|
app.config.globalProperties.$qas = {
|
|
9416
9618
|
dialog: Dialog,
|
|
9417
9619
|
error: NotifyError,
|
|
9418
|
-
|
|
9419
|
-
screen: Screen()
|
|
9620
|
+
logger: Logger(),
|
|
9621
|
+
screen: Screen(),
|
|
9622
|
+
success: NotifySuccess
|
|
9420
9623
|
};
|
|
9421
9624
|
|
|
9422
9625
|
app.directive(Test.name, Test);
|
|
9423
9626
|
}
|
|
9424
9627
|
|
|
9425
9628
|
exports.Dialog = Dialog;
|
|
9629
|
+
exports.Logger = Logger;
|
|
9426
9630
|
exports.NotifyError = NotifyError;
|
|
9427
9631
|
exports.NotifySuccess = NotifySuccess;
|
|
9428
9632
|
exports.QasActions = script$L;
|