@bildvitta/quasar-ui-asteroid 3.0.0-beta.13 → 3.0.0-beta.16
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/QasFormView.json +16 -0
- package/dist/api/QasListView.json +12 -0
- package/dist/api/QasNestedFields.json +10 -0
- package/dist/api/QasSingleView.json +8 -0
- package/dist/asteroid.cjs.css +1 -1
- package/dist/asteroid.cjs.js +87 -28
- package/dist/asteroid.cjs.min.js +2 -2
- package/dist/asteroid.esm.css +1 -1
- package/dist/asteroid.esm.js +87 -28
- package/dist/asteroid.esm.min.js +2 -2
- package/dist/asteroid.umd.css +1 -1
- package/dist/asteroid.umd.js +87 -28
- package/dist/asteroid.umd.min.js +2 -2
- package/dist/vetur/asteroid-attributes.json +24 -0
- package/dist/vetur/asteroid-tags.json +7 -1
- package/package.json +1 -1
- package/src/components/form-view/QasFormView.vue +30 -6
- package/src/components/form-view/QasFormView.yml +12 -0
- package/src/components/list-view/QasListView.vue +15 -8
- package/src/components/list-view/QasListView.yml +10 -0
- package/src/components/nested-fields/QasNestedFields.vue +12 -7
- package/src/components/nested-fields/QasNestedFields.yml +6 -0
- package/src/components/single-view/QasSingleView.vue +6 -4
- package/src/components/single-view/QasSingleView.yml +6 -0
- package/src/mixins/view.js +22 -1
|
@@ -4,6 +4,22 @@
|
|
|
4
4
|
"desc": "Componente para C.R.U.D. responsável pela pela criação (Create) e edição (Update)."
|
|
5
5
|
},
|
|
6
6
|
"props": {
|
|
7
|
+
"before-fetch": {
|
|
8
|
+
"desc": "Callback para controlar como funciona o comportamento do fetch.",
|
|
9
|
+
"default": null,
|
|
10
|
+
"type": "Function",
|
|
11
|
+
"examples": [
|
|
12
|
+
"beforeFetch({ payload, resolve })"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"before-submit": {
|
|
16
|
+
"desc": "Callback para controlar como funciona o comportamento do submit.",
|
|
17
|
+
"default": null,
|
|
18
|
+
"type": "Function",
|
|
19
|
+
"examples": [
|
|
20
|
+
"beforeSubmit({ payload, resolve })"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
7
23
|
"cancel-button-label": {
|
|
8
24
|
"desc": "Rótulo do botão \"cancelar\".",
|
|
9
25
|
"default": "Cancelar",
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
"desc": "Componente para C.R.U.D. responsável pela parte de listagem (Read)."
|
|
5
5
|
},
|
|
6
6
|
"props": {
|
|
7
|
+
"before-fetch": {
|
|
8
|
+
"desc": "Callback para controlar como funciona o comportamento do fetchList.",
|
|
9
|
+
"default": null,
|
|
10
|
+
"type": "Function",
|
|
11
|
+
"examples": [
|
|
12
|
+
"beforeFetch({ payload, resolve, done })"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
7
15
|
"entity": {
|
|
8
16
|
"desc": "Entidade da store, por exemplo se tiver que trabalhar com modulo de usuários, teremos o model \"users\" na store, que vai ser nossa \"entity\".",
|
|
9
17
|
"required": true,
|
|
@@ -76,6 +84,10 @@
|
|
|
76
84
|
"desc": "Controla o [pull-to-refresh](https://quasar.dev/vue-components/pull-to-refresh#basic).",
|
|
77
85
|
"default": true,
|
|
78
86
|
"type": "Boolean"
|
|
87
|
+
},
|
|
88
|
+
"use-results-area-only": {
|
|
89
|
+
"desc": "Controla se irá sempre ser exibido os resultados independente se não há nenhum resultado a ser exibido.",
|
|
90
|
+
"type": "Boolean"
|
|
79
91
|
}
|
|
80
92
|
},
|
|
81
93
|
"slots": {
|
|
@@ -72,6 +72,16 @@
|
|
|
72
72
|
"xl"
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
|
+
"identifier-item-key": {
|
|
76
|
+
"desc": "Define um identificador para o item. O identificador será utilizado para validar exclusão do item, por exemplo.",
|
|
77
|
+
"default": "uuid",
|
|
78
|
+
"type": "String",
|
|
79
|
+
"examples": [
|
|
80
|
+
"id",
|
|
81
|
+
"uuid",
|
|
82
|
+
"slug"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
75
85
|
"model-value": {
|
|
76
86
|
"desc": "Model do componente",
|
|
77
87
|
"default": [],
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
"desc": "Componente para C.R.U.D. responsável pela visualização (Read) ou conhecido também como \"show\"."
|
|
5
5
|
},
|
|
6
6
|
"props": {
|
|
7
|
+
"before-fetch": {
|
|
8
|
+
"desc": "Callback para controlar como funciona o comportamento do fetchSingle.",
|
|
9
|
+
"default": null,
|
|
10
|
+
"type": "Function",
|
|
11
|
+
"examples": [
|
|
12
|
+
"beforeFetch({ payload, resolve, done })"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
7
15
|
"custom-id": {
|
|
8
16
|
"desc": "Por padrão, o componente vai pegar o \"id\" que vem como parâmetro na url, caso queira que o id seja diferente da url, use esta prop.",
|
|
9
17
|
"type": "String",
|
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-actions-menu__list{width:265px;z-index:1}.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}}.q-expansion-item--expanded .q-item:not(.qas-app-menu--active.q-item){background-color:#fafafa}.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-actions-menu__list{width:265px;z-index:1}.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}}.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.16
|
|
3
3
|
* (c) 2022 Bild & Vitta <systemteam@bild.com.br>
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -5339,6 +5339,11 @@ var viewMixin = {
|
|
|
5339
5339
|
useBoundary: {
|
|
5340
5340
|
default: true,
|
|
5341
5341
|
type: Boolean
|
|
5342
|
+
},
|
|
5343
|
+
|
|
5344
|
+
beforeFetch: {
|
|
5345
|
+
default: null,
|
|
5346
|
+
type: Function
|
|
5342
5347
|
}
|
|
5343
5348
|
},
|
|
5344
5349
|
|
|
@@ -5354,7 +5359,7 @@ var viewMixin = {
|
|
|
5354
5359
|
mx_errors: {},
|
|
5355
5360
|
mx_fields: {},
|
|
5356
5361
|
mx_metadata: {},
|
|
5357
|
-
|
|
5362
|
+
mx_cancelBeforeFetch: false,
|
|
5358
5363
|
mx_isFetching: false
|
|
5359
5364
|
}
|
|
5360
5365
|
},
|
|
@@ -5420,6 +5425,22 @@ var viewMixin = {
|
|
|
5420
5425
|
|
|
5421
5426
|
this.$emit(`update:${key}`, models[key]);
|
|
5422
5427
|
}
|
|
5428
|
+
},
|
|
5429
|
+
|
|
5430
|
+
mx_fetchHandler (payload, resolve) {
|
|
5431
|
+
const hasBeforeFetch = typeof this.beforeFetch === 'function';
|
|
5432
|
+
|
|
5433
|
+
if (hasBeforeFetch && !this.mx_cancelBeforeFetch) {
|
|
5434
|
+
return this.beforeFetch({
|
|
5435
|
+
payload,
|
|
5436
|
+
resolve: payload => resolve(payload),
|
|
5437
|
+
done: () => {
|
|
5438
|
+
this.mx_cancelBeforeFetch = true;
|
|
5439
|
+
}
|
|
5440
|
+
})
|
|
5441
|
+
}
|
|
5442
|
+
|
|
5443
|
+
resolve();
|
|
5423
5444
|
}
|
|
5424
5445
|
}
|
|
5425
5446
|
};
|
|
@@ -5501,6 +5522,11 @@ var script$k = {
|
|
|
5501
5522
|
useSubmitButton: {
|
|
5502
5523
|
default: true,
|
|
5503
5524
|
type: Boolean
|
|
5525
|
+
},
|
|
5526
|
+
|
|
5527
|
+
beforeSubmit: {
|
|
5528
|
+
default: null,
|
|
5529
|
+
type: Function
|
|
5504
5530
|
}
|
|
5505
5531
|
},
|
|
5506
5532
|
|
|
@@ -5594,7 +5620,7 @@ var script$k = {
|
|
|
5594
5620
|
|
|
5595
5621
|
window.addEventListener('delete-success', this.setIgnoreRouterGuard);
|
|
5596
5622
|
|
|
5597
|
-
this.fetch
|
|
5623
|
+
this.mx_fetchHandler({ form: true, id: this.id, url: this.fetchURL }, this.fetch);
|
|
5598
5624
|
},
|
|
5599
5625
|
|
|
5600
5626
|
onUnmounted () {
|
|
@@ -5729,6 +5755,7 @@ var script$k = {
|
|
|
5729
5755
|
const { addRoute } = useHistory();
|
|
5730
5756
|
|
|
5731
5757
|
this.defaultDialogProps.ok.onClick = () => addRoute(this.$route);
|
|
5758
|
+
|
|
5732
5759
|
this.defaultDialogProps.cancel.onClick = next;
|
|
5733
5760
|
},
|
|
5734
5761
|
|
|
@@ -5748,17 +5775,35 @@ var script$k = {
|
|
|
5748
5775
|
});
|
|
5749
5776
|
},
|
|
5750
5777
|
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5778
|
+
/**
|
|
5779
|
+
* Se existe a propriedade com callback "beforeSubmit", então o controle de quando e como chamar o método "submit"
|
|
5780
|
+
* está sendo controlado fora do QasFormView, se não existir a propriedade "beforeSubmit", então o controle do método
|
|
5781
|
+
* submit é feito pelo próprio QasFormView, chamado pelo evento @submit.
|
|
5782
|
+
*/
|
|
5783
|
+
submitHandler (event) {
|
|
5754
5784
|
if (event) {
|
|
5755
5785
|
event.preventDefault();
|
|
5756
5786
|
}
|
|
5757
5787
|
|
|
5788
|
+
const hasBeforeSubmit = typeof this.beforeSubmit === 'function';
|
|
5789
|
+
|
|
5790
|
+
if (hasBeforeSubmit) {
|
|
5791
|
+
return this.beforeSubmit({
|
|
5792
|
+
payload: { id: this.id, payload: this.modelValue, url: this.url },
|
|
5793
|
+
resolve: payload => this.submit(payload)
|
|
5794
|
+
})
|
|
5795
|
+
}
|
|
5796
|
+
|
|
5797
|
+
this.submit();
|
|
5798
|
+
},
|
|
5799
|
+
|
|
5800
|
+
async submit (externalPayload = {}) {
|
|
5801
|
+
if (this.disable) return null
|
|
5802
|
+
|
|
5758
5803
|
this.isSubmitting = true;
|
|
5759
5804
|
|
|
5760
5805
|
try {
|
|
5761
|
-
const payload = { id: this.id, payload: this.modelValue, url: this.url };
|
|
5806
|
+
const payload = { id: this.id, payload: this.modelValue, url: this.url, ...externalPayload };
|
|
5762
5807
|
|
|
5763
5808
|
this.$qas.logger.group(
|
|
5764
5809
|
`QasFormView - submit -> payload do ${this.entity}/${this.mode}`, [payload]
|
|
@@ -5832,7 +5877,7 @@ function render$k(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
5832
5877
|
: vue.createCommentVNode("v-if", true),
|
|
5833
5878
|
vue.createVNode(_component_q_form, {
|
|
5834
5879
|
ref: "form",
|
|
5835
|
-
onSubmit: $options.
|
|
5880
|
+
onSubmit: $options.submitHandler
|
|
5836
5881
|
}, {
|
|
5837
5882
|
default: vue.withCtx(() => [
|
|
5838
5883
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
@@ -6570,6 +6615,10 @@ var script$e = {
|
|
|
6570
6615
|
useFilter: {
|
|
6571
6616
|
default: true,
|
|
6572
6617
|
type: Boolean
|
|
6618
|
+
},
|
|
6619
|
+
|
|
6620
|
+
useResultsAreaOnly: {
|
|
6621
|
+
type: Boolean
|
|
6573
6622
|
}
|
|
6574
6623
|
},
|
|
6575
6624
|
|
|
@@ -6605,13 +6654,17 @@ var script$e = {
|
|
|
6605
6654
|
|
|
6606
6655
|
totalPages () {
|
|
6607
6656
|
return this.$store.getters[`${this.entity}/totalPages`]
|
|
6657
|
+
},
|
|
6658
|
+
|
|
6659
|
+
showResults () {
|
|
6660
|
+
return this.hasResults || this.useResultsAreaOnly
|
|
6608
6661
|
}
|
|
6609
6662
|
},
|
|
6610
6663
|
|
|
6611
6664
|
watch: {
|
|
6612
6665
|
$route (to, from) {
|
|
6613
6666
|
if (to.name === from.name) {
|
|
6614
|
-
this.fetchList
|
|
6667
|
+
this.mx_fetchHandler({ ...this.mx_context, url: this.url }, this.fetchList);
|
|
6615
6668
|
this.setCurrentPage();
|
|
6616
6669
|
}
|
|
6617
6670
|
},
|
|
@@ -6626,7 +6679,8 @@ var script$e = {
|
|
|
6626
6679
|
},
|
|
6627
6680
|
|
|
6628
6681
|
created () {
|
|
6629
|
-
this.fetchList
|
|
6682
|
+
this.mx_fetchHandler({ ...this.mx_context, url: this.url }, this.fetchList);
|
|
6683
|
+
|
|
6630
6684
|
this.setCurrentPage();
|
|
6631
6685
|
},
|
|
6632
6686
|
|
|
@@ -6636,16 +6690,14 @@ var script$e = {
|
|
|
6636
6690
|
this.$router.push({ query });
|
|
6637
6691
|
},
|
|
6638
6692
|
|
|
6639
|
-
async fetchList (
|
|
6693
|
+
async fetchList (externalPayload = {}) {
|
|
6640
6694
|
this.mx_isFetching = true;
|
|
6641
6695
|
|
|
6642
|
-
const hasFilters = !!Object.keys(filters).length;
|
|
6643
|
-
|
|
6644
6696
|
try {
|
|
6645
6697
|
const payload = {
|
|
6646
6698
|
...this.mx_context,
|
|
6647
6699
|
url: this.url,
|
|
6648
|
-
...
|
|
6700
|
+
...externalPayload
|
|
6649
6701
|
};
|
|
6650
6702
|
|
|
6651
6703
|
this.$qas.logger.group(
|
|
@@ -6669,7 +6721,7 @@ var script$e = {
|
|
|
6669
6721
|
this.$emit('fetch-success', response);
|
|
6670
6722
|
|
|
6671
6723
|
this.$qas.logger.group(
|
|
6672
|
-
`QasListView -
|
|
6724
|
+
`QasListView - fetchList -> resposta da action ${this.entity}/fetchList`, [response]
|
|
6673
6725
|
);
|
|
6674
6726
|
} catch (error) {
|
|
6675
6727
|
this.mx_fetchError(error);
|
|
@@ -6743,7 +6795,7 @@ function render$e(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
6743
6795
|
])
|
|
6744
6796
|
: vue.createCommentVNode("v-if", true),
|
|
6745
6797
|
vue.createElementVNode("main", _hoisted_2$7, [
|
|
6746
|
-
($options.
|
|
6798
|
+
($options.showResults)
|
|
6747
6799
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$4, [
|
|
6748
6800
|
vue.renderSlot(_ctx.$slots, "default")
|
|
6749
6801
|
]))
|
|
@@ -6991,6 +7043,11 @@ var script$c = {
|
|
|
6991
7043
|
}
|
|
6992
7044
|
},
|
|
6993
7045
|
|
|
7046
|
+
identifierItemKey: {
|
|
7047
|
+
type: String,
|
|
7048
|
+
default: 'uuid'
|
|
7049
|
+
},
|
|
7050
|
+
|
|
6994
7051
|
rowLabel: {
|
|
6995
7052
|
type: String,
|
|
6996
7053
|
default: ''
|
|
@@ -7093,13 +7150,8 @@ var script$c = {
|
|
|
7093
7150
|
modelValue: {
|
|
7094
7151
|
handler (value) {
|
|
7095
7152
|
this.nested = quasar.extend(true, [], value);
|
|
7096
|
-
},
|
|
7097
|
-
immediate: true
|
|
7098
|
-
},
|
|
7099
7153
|
|
|
7100
|
-
|
|
7101
|
-
handler () {
|
|
7102
|
-
!this.modelValue.length && this.setDefaultNestedValue();
|
|
7154
|
+
if (!this.nested.length) return this.setDefaultNestedValue()
|
|
7103
7155
|
},
|
|
7104
7156
|
immediate: true
|
|
7105
7157
|
}
|
|
@@ -7108,6 +7160,11 @@ var script$c = {
|
|
|
7108
7160
|
methods: {
|
|
7109
7161
|
add (row = {}) {
|
|
7110
7162
|
const payload = { ...this.rowObject, ...row };
|
|
7163
|
+
const hasIdentifierKey = payload[this.identifierItemKey];
|
|
7164
|
+
|
|
7165
|
+
if (hasIdentifierKey) {
|
|
7166
|
+
delete payload[this.identifierItemKey];
|
|
7167
|
+
}
|
|
7111
7168
|
|
|
7112
7169
|
this.nested.push(payload);
|
|
7113
7170
|
|
|
@@ -7133,7 +7190,7 @@ var script$c = {
|
|
|
7133
7190
|
},
|
|
7134
7191
|
|
|
7135
7192
|
destroy (index, row) {
|
|
7136
|
-
this.useRemoveOnDestroy
|
|
7193
|
+
!row[this.identifierItemKey] || this.useRemoveOnDestroy
|
|
7137
7194
|
? this.nested.splice(index, 1)
|
|
7138
7195
|
: this.nested.splice(index, 1, { [this.destroyKey]: true, ...row });
|
|
7139
7196
|
|
|
@@ -8388,7 +8445,9 @@ var script$5 = {
|
|
|
8388
8445
|
|
|
8389
8446
|
watch: {
|
|
8390
8447
|
$route (to, from) {
|
|
8391
|
-
to.name === from.name
|
|
8448
|
+
if (to.name === from.name) {
|
|
8449
|
+
this.mx_fetchHandler({ id: this.id, url: this.url }, this.fetchSingle);
|
|
8450
|
+
}
|
|
8392
8451
|
},
|
|
8393
8452
|
|
|
8394
8453
|
resultModel (value) {
|
|
@@ -8397,15 +8456,15 @@ var script$5 = {
|
|
|
8397
8456
|
},
|
|
8398
8457
|
|
|
8399
8458
|
created () {
|
|
8400
|
-
this.fetchSingle
|
|
8459
|
+
this.mx_fetchHandler({ id: this.id, url: this.url }, this.fetchSingle);
|
|
8401
8460
|
},
|
|
8402
8461
|
|
|
8403
8462
|
methods: {
|
|
8404
|
-
async fetchSingle (
|
|
8463
|
+
async fetchSingle (externalPayload = {}) {
|
|
8405
8464
|
this.mx_isFetching = true;
|
|
8406
8465
|
|
|
8407
8466
|
try {
|
|
8408
|
-
const payload = { id: this.id, url: this.url,
|
|
8467
|
+
const payload = { id: this.id, url: this.url, ...externalPayload };
|
|
8409
8468
|
|
|
8410
8469
|
this.$qas.logger.group(
|
|
8411
8470
|
`QasSingleView - fetchSingle -> payload do parâmetro do ${this.entity}/fetchSingle`,
|
|
@@ -9492,7 +9551,7 @@ script.__file = "src/components/transfer/QasTransfer.vue";
|
|
|
9492
9551
|
|
|
9493
9552
|
var name = "@bildvitta/quasar-ui-asteroid";
|
|
9494
9553
|
var description = "Asteroid";
|
|
9495
|
-
var version$1 = "3.0.0-beta.
|
|
9554
|
+
var version$1 = "3.0.0-beta.16";
|
|
9496
9555
|
var author = "Bild & Vitta <systemteam@bild.com.br>";
|
|
9497
9556
|
var license = "MIT";
|
|
9498
9557
|
var main = "dist/asteroid.cjs.min.js";
|