@bildvitta/quasar-ui-asteroid 3.0.0 → 3.1.0-beta.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/dist/api/QasFormGenerator.json +5 -0
- package/dist/api/QasNestedFields.json +22 -1
- package/dist/asteroid.cjs.css +1 -1
- package/dist/asteroid.cjs.js +144 -72
- package/dist/asteroid.cjs.min.js +2 -2
- package/dist/asteroid.esm.css +1 -1
- package/dist/asteroid.esm.js +144 -72
- package/dist/asteroid.esm.min.js +2 -2
- package/dist/asteroid.umd.css +1 -1
- package/dist/asteroid.umd.js +147 -76
- package/dist/asteroid.umd.min.js +2 -2
- package/dist/vetur/asteroid-attributes.json +12 -0
- package/dist/vetur/asteroid-tags.json +3 -0
- package/package.json +2 -1
- package/src/components/delete/QasDelete.vue +6 -1
- package/src/components/filters/QasFilters.vue +9 -3
- package/src/components/form-generator/QasFormGenerator.vue +6 -2
- package/src/components/form-generator/QasFormGenerator.yml +5 -0
- package/src/components/form-view/QasFormView.vue +11 -2
- package/src/components/list-view/QasListView.vue +8 -3
- package/src/components/nested-fields/QasNestedFields.vue +31 -5
- package/src/components/nested-fields/QasNestedFields.yml +16 -1
- package/src/components/single-view/QasSingleView.vue +7 -2
- package/src/components/sortable/QasSortable.vue +8 -3
- package/src/mixins/search-filter.js +12 -7
package/dist/asteroid.umd.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-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}}.qas-alert{border-style:solid;border-width:0 10px}.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 !important;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.umd.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @bildvitta/quasar-ui-asteroid v3.0.0
|
|
2
|
+
* @bildvitta/quasar-ui-asteroid v3.1.0-beta.0
|
|
3
3
|
* (c) 2022 Bild & Vitta <systemteam@bild.com.br>
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
(function (global, factory) {
|
|
7
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue'), require('humps'), require('date-fns'), require('date-fns/locale'), require('quasar'), require('lodash-es'), require('autonumeric'), require('pica'), require('signature_pad'), require('vue-router'), require('lodash'), require('fuse.js'), require('sortablejs'), require('@fawmi/vue-google-maps')) :
|
|
8
|
-
typeof define === 'function' && define.amd ? define(['vue', 'humps', 'date-fns', 'date-fns/locale', 'quasar', 'lodash-es', 'autonumeric', 'pica', 'signature_pad', 'vue-router', 'lodash', 'fuse.js', 'sortablejs', '@fawmi/vue-google-maps'], factory) :
|
|
9
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global["{{ umdExportName }}"] = factory(global.Vue, global.humps, global.dateFns, global.dateFnsLocale, global.Quasar, global._, global.AutoNumeric, global.Pica, global.SignaturePad, global.VueRouter, global.lodash, global.Fuse, global.Sortable, global.VueGoogleMaps));
|
|
10
|
-
})(this, (function (vue, humps, dateFns, locale, quasar, lodashEs, AutoNumeric, Pica, SignaturePad, vueRouter, lodash, Fuse, Sortable, VueGoogleMaps) { 'use strict';
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('vue'), require('humps'), require('date-fns'), require('date-fns/locale'), require('quasar'), require('@bildvitta/store-adapter'), require('lodash-es'), require('autonumeric'), require('pica'), require('signature_pad'), require('vue-router'), require('lodash'), require('fuse.js'), require('sortablejs'), require('@fawmi/vue-google-maps')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(['vue', 'humps', 'date-fns', 'date-fns/locale', 'quasar', '@bildvitta/store-adapter', 'lodash-es', 'autonumeric', 'pica', 'signature_pad', 'vue-router', 'lodash', 'fuse.js', 'sortablejs', '@fawmi/vue-google-maps'], factory) :
|
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global["{{ umdExportName }}"] = factory(global.Vue, global.humps, global.dateFns, global.dateFnsLocale, global.Quasar, global.storeAdapter, global._, global.AutoNumeric, global.Pica, global.SignaturePad, global.VueRouter, global.lodash, global.Fuse, global.Sortable, global.VueGoogleMaps));
|
|
10
|
+
})(this, (function (vue, humps, dateFns, locale, quasar, storeAdapter, lodashEs, AutoNumeric, Pica, SignaturePad, vueRouter, lodash, Fuse, Sortable, VueGoogleMaps) { 'use strict';
|
|
11
11
|
|
|
12
12
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
13
|
|
|
@@ -2716,7 +2716,11 @@
|
|
|
2716
2716
|
`QasDelete - destroy -> Payload do parâmetro do ${this.entity}/destroy`, [payload]
|
|
2717
2717
|
);
|
|
2718
2718
|
|
|
2719
|
-
await
|
|
2719
|
+
await storeAdapter.getAction.call(this, {
|
|
2720
|
+
entity: this.entity,
|
|
2721
|
+
key: 'destroy',
|
|
2722
|
+
payload
|
|
2723
|
+
});
|
|
2720
2724
|
|
|
2721
2725
|
NotifySuccess('Item deletado com sucesso!');
|
|
2722
2726
|
|
|
@@ -4791,7 +4795,7 @@
|
|
|
4791
4795
|
},
|
|
4792
4796
|
|
|
4793
4797
|
fields () {
|
|
4794
|
-
return this
|
|
4798
|
+
return storeAdapter.getState.call(this, { entity: this.entity, key: 'filters' })
|
|
4795
4799
|
},
|
|
4796
4800
|
|
|
4797
4801
|
filterButtonColor () {
|
|
@@ -4807,7 +4811,7 @@
|
|
|
4807
4811
|
},
|
|
4808
4812
|
|
|
4809
4813
|
hasFields () {
|
|
4810
|
-
return !!Object.keys(this.fields).length
|
|
4814
|
+
return !!Object.keys(this.fields || {}).length
|
|
4811
4815
|
},
|
|
4812
4816
|
|
|
4813
4817
|
hasSearch () {
|
|
@@ -4889,7 +4893,12 @@
|
|
|
4889
4893
|
[{ url: this.url }]
|
|
4890
4894
|
);
|
|
4891
4895
|
|
|
4892
|
-
const response = await
|
|
4896
|
+
const response = await storeAdapter.getAction.call(this, {
|
|
4897
|
+
entity: this.entity,
|
|
4898
|
+
key: 'fetchFilters',
|
|
4899
|
+
payload: { url: this.url }
|
|
4900
|
+
});
|
|
4901
|
+
|
|
4893
4902
|
this.$emit('fetch-success', response);
|
|
4894
4903
|
|
|
4895
4904
|
this.$qas.logger.group(
|
|
@@ -5301,6 +5310,10 @@
|
|
|
5301
5310
|
validator: value => {
|
|
5302
5311
|
return typeof value === 'boolean' || ['xs', 'sm', 'md', 'lg', 'xl'].includes(value)
|
|
5303
5312
|
}
|
|
5313
|
+
},
|
|
5314
|
+
|
|
5315
|
+
disable: {
|
|
5316
|
+
type: Boolean
|
|
5304
5317
|
}
|
|
5305
5318
|
},
|
|
5306
5319
|
|
|
@@ -5422,12 +5435,12 @@
|
|
|
5422
5435
|
class: vue.normalizeClass(_ctx.mx_getFieldClass(key))
|
|
5423
5436
|
}, [
|
|
5424
5437
|
vue.renderSlot(_ctx.$slots, `field-${field.name}`, { field: field }, () => [
|
|
5425
|
-
vue.createVNode(_component_qas_field, vue.mergeProps($props.fieldsProps[field.name], {
|
|
5438
|
+
vue.createVNode(_component_qas_field, vue.mergeProps({ disable: $props.disable }, $props.fieldsProps[field.name], {
|
|
5426
5439
|
error: $props.errors[key],
|
|
5427
5440
|
field: field,
|
|
5428
5441
|
"model-value": $props.modelValue[field.name],
|
|
5429
5442
|
"onUpdate:modelValue": $event => ($options.updateModelValue(field.name, $event))
|
|
5430
|
-
}), null, 16 /* FULL_PROPS */, ["error", "field", "model-value", "onUpdate:modelValue"])
|
|
5443
|
+
}), null, 16 /* FULL_PROPS */, ["disable", "error", "field", "model-value", "onUpdate:modelValue"])
|
|
5431
5444
|
])
|
|
5432
5445
|
], 2 /* CLASS */))
|
|
5433
5446
|
}), 128 /* KEYED_FRAGMENT */))
|
|
@@ -5435,11 +5448,11 @@
|
|
|
5435
5448
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fieldsetItem.fields.hidden, (field, key) => {
|
|
5436
5449
|
return (vue.openBlock(), vue.createElementBlock("div", { key: key }, [
|
|
5437
5450
|
vue.renderSlot(_ctx.$slots, `field-${field.name}`, { field: field }, () => [
|
|
5438
|
-
vue.createVNode(_component_qas_field, vue.mergeProps($props.fieldsProps[field.name], {
|
|
5451
|
+
vue.createVNode(_component_qas_field, vue.mergeProps({ disable: $props.disable }, $props.fieldsProps[field.name], {
|
|
5439
5452
|
field: field,
|
|
5440
5453
|
"model-value": $props.modelValue[field.name],
|
|
5441
5454
|
"onUpdate:modelValue": $event => ($options.updateModelValue(field.name, $event))
|
|
5442
|
-
}), null, 16 /* FULL_PROPS */, ["field", "model-value", "onUpdate:modelValue"])
|
|
5455
|
+
}), null, 16 /* FULL_PROPS */, ["disable", "field", "model-value", "onUpdate:modelValue"])
|
|
5443
5456
|
])
|
|
5444
5457
|
]))
|
|
5445
5458
|
}), 128 /* KEYED_FRAGMENT */))
|
|
@@ -5598,13 +5611,17 @@
|
|
|
5598
5611
|
|
|
5599
5612
|
const { url, params, decamelizeFieldName } = this.mx_defaultLazyLoadingProps;
|
|
5600
5613
|
|
|
5601
|
-
const { data } = await
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5614
|
+
const { data } = await storeAdapter.getAction.call(this, {
|
|
5615
|
+
entity: this.entity,
|
|
5616
|
+
key: 'fetchFieldOptions',
|
|
5617
|
+
payload: {
|
|
5618
|
+
url,
|
|
5619
|
+
field: decamelizeFieldName ? humps.decamelize(this.name, { separator: '-' }) : this.name,
|
|
5620
|
+
params: {
|
|
5621
|
+
...params,
|
|
5622
|
+
search: this.mx_search,
|
|
5623
|
+
offset: (this.mx_pagination.page - 1) * params.limit
|
|
5624
|
+
}
|
|
5608
5625
|
}
|
|
5609
5626
|
});
|
|
5610
5627
|
|
|
@@ -6040,7 +6057,11 @@
|
|
|
6040
6057
|
`QasFormView - fetchSingle -> payload do parâmetro do ${this.entity}/fetchSingle`, [payload]
|
|
6041
6058
|
);
|
|
6042
6059
|
|
|
6043
|
-
const response = await
|
|
6060
|
+
const response = await storeAdapter.getAction.call(this, {
|
|
6061
|
+
entity: this.entity,
|
|
6062
|
+
key: 'fetchSingle',
|
|
6063
|
+
payload
|
|
6064
|
+
});
|
|
6044
6065
|
|
|
6045
6066
|
const { errors, fields, metadata, result } = response.data;
|
|
6046
6067
|
|
|
@@ -6175,7 +6196,11 @@
|
|
|
6175
6196
|
`QasFormView - submit -> payload do ${this.entity}/${this.mode}`, [payload]
|
|
6176
6197
|
);
|
|
6177
6198
|
|
|
6178
|
-
const response = await
|
|
6199
|
+
const response = await storeAdapter.getAction.call(this, {
|
|
6200
|
+
entity: this.entity,
|
|
6201
|
+
key: this.mode,
|
|
6202
|
+
payload
|
|
6203
|
+
});
|
|
6179
6204
|
|
|
6180
6205
|
if (this.useDialogOnUnsavedChanges) {
|
|
6181
6206
|
this.cachedResult = quasar.extend(true, {}, this.modelValue);
|
|
@@ -7019,11 +7044,11 @@
|
|
|
7019
7044
|
},
|
|
7020
7045
|
|
|
7021
7046
|
resultsModel () {
|
|
7022
|
-
return this
|
|
7047
|
+
return storeAdapter.getState.call(this, { entity: this.entity, key: 'list' })
|
|
7023
7048
|
},
|
|
7024
7049
|
|
|
7025
7050
|
totalPages () {
|
|
7026
|
-
return this
|
|
7051
|
+
return storeAdapter.getState.call(this, { entity: this.entity, key: 'totalPages' })
|
|
7027
7052
|
},
|
|
7028
7053
|
|
|
7029
7054
|
showResults () {
|
|
@@ -7074,7 +7099,11 @@
|
|
|
7074
7099
|
`QasListView - fetchList -> Payload do parâmetro do ${this.entity}/fetchList`, [payload]
|
|
7075
7100
|
);
|
|
7076
7101
|
|
|
7077
|
-
const response = await
|
|
7102
|
+
const response = await storeAdapter.getAction.call(this, {
|
|
7103
|
+
entity: this.entity,
|
|
7104
|
+
key: 'fetchList',
|
|
7105
|
+
payload
|
|
7106
|
+
});
|
|
7078
7107
|
|
|
7079
7108
|
const { errors, fields, metadata } = response.data;
|
|
7080
7109
|
|
|
@@ -7379,6 +7408,11 @@
|
|
|
7379
7408
|
default: 'destroyed'
|
|
7380
7409
|
},
|
|
7381
7410
|
|
|
7411
|
+
disabledRows: {
|
|
7412
|
+
type: [Array, Boolean],
|
|
7413
|
+
default: false
|
|
7414
|
+
},
|
|
7415
|
+
|
|
7382
7416
|
errors: {
|
|
7383
7417
|
type: [Array, Object],
|
|
7384
7418
|
default: () => ({})
|
|
@@ -7428,6 +7462,11 @@
|
|
|
7428
7462
|
default: () => ({})
|
|
7429
7463
|
},
|
|
7430
7464
|
|
|
7465
|
+
useAdd: {
|
|
7466
|
+
type: Boolean,
|
|
7467
|
+
default: true
|
|
7468
|
+
},
|
|
7469
|
+
|
|
7431
7470
|
useAnimation: {
|
|
7432
7471
|
type: Boolean,
|
|
7433
7472
|
default: true
|
|
@@ -7601,6 +7640,22 @@
|
|
|
7601
7640
|
}
|
|
7602
7641
|
|
|
7603
7642
|
return this.fieldLabel
|
|
7643
|
+
},
|
|
7644
|
+
|
|
7645
|
+
isDisabledRow (row) {
|
|
7646
|
+
if (!this.disabledRows) return false
|
|
7647
|
+
|
|
7648
|
+
if (typeof this.disabledRows === 'boolean') return true
|
|
7649
|
+
|
|
7650
|
+
return this.disabledRows.includes(row[this.identifierItemKey])
|
|
7651
|
+
},
|
|
7652
|
+
|
|
7653
|
+
hasBlockActions (row) {
|
|
7654
|
+
return !this.useInlineActions && !this.isDisabledRow(row)
|
|
7655
|
+
},
|
|
7656
|
+
|
|
7657
|
+
hasInlineActions (row) {
|
|
7658
|
+
return this.useInlineActions && !this.isDisabledRow(row)
|
|
7604
7659
|
}
|
|
7605
7660
|
}
|
|
7606
7661
|
};
|
|
@@ -7621,7 +7676,10 @@
|
|
|
7621
7676
|
const _hoisted_8 = { class: "col-auto" };
|
|
7622
7677
|
const _hoisted_9 = { class: "col-auto" };
|
|
7623
7678
|
const _hoisted_10 = { class: "col-12" };
|
|
7624
|
-
const _hoisted_11 = {
|
|
7679
|
+
const _hoisted_11 = {
|
|
7680
|
+
key: 0,
|
|
7681
|
+
class: "q-mt-md"
|
|
7682
|
+
};
|
|
7625
7683
|
const _hoisted_12 = { class: "col" };
|
|
7626
7684
|
const _hoisted_13 = { class: "col-auto" };
|
|
7627
7685
|
const _hoisted_14 = {
|
|
@@ -7669,7 +7727,7 @@
|
|
|
7669
7727
|
label: $options.getRowLabel(index)
|
|
7670
7728
|
}, null, 8 /* PROPS */, ["label"]))
|
|
7671
7729
|
: vue.createCommentVNode("v-if", true),
|
|
7672
|
-
(
|
|
7730
|
+
($options.hasBlockActions(row))
|
|
7673
7731
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
7674
7732
|
($props.useDuplicate)
|
|
7675
7733
|
? (vue.openBlock(), vue.createBlock(_component_qas_btn, vue.mergeProps({ key: 0 }, $props.buttonDuplicateProps, {
|
|
@@ -7700,6 +7758,7 @@
|
|
|
7700
7758
|
"onUpdate:modelValue": [$event => (($data.nested[index]) = $event), $event => ($options.updateValuesFromInput($event, index))],
|
|
7701
7759
|
class: vue.normalizeClass($options.formClasses),
|
|
7702
7760
|
columns: $props.formColumns,
|
|
7761
|
+
disable: $options.isDisabledRow(row),
|
|
7703
7762
|
errors: $options.transformedErrors[index],
|
|
7704
7763
|
fields: $options.children,
|
|
7705
7764
|
"fields-props": $props.fieldsProps
|
|
@@ -7709,15 +7768,16 @@
|
|
|
7709
7768
|
name: key,
|
|
7710
7769
|
fn: vue.withCtx((scope) => [
|
|
7711
7770
|
vue.renderSlot(_ctx.$slots, key, vue.mergeProps(scope, {
|
|
7771
|
+
disabled: $options.isDisabledRow(row),
|
|
7712
7772
|
errors: $options.transformedErrors,
|
|
7713
7773
|
index: index
|
|
7714
7774
|
}))
|
|
7715
7775
|
])
|
|
7716
7776
|
}
|
|
7717
7777
|
})
|
|
7718
|
-
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "onUpdate:modelValue", "class", "columns", "errors", "fields", "fields-props"])
|
|
7778
|
+
]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["modelValue", "onUpdate:modelValue", "class", "columns", "disable", "errors", "fields", "fields-props"])
|
|
7719
7779
|
]),
|
|
7720
|
-
($
|
|
7780
|
+
($options.hasInlineActions(row))
|
|
7721
7781
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
7722
7782
|
vue.createElementVNode("div", _hoisted_8, [
|
|
7723
7783
|
($props.useDuplicate)
|
|
@@ -7762,47 +7822,49 @@
|
|
|
7762
7822
|
]),
|
|
7763
7823
|
_: 3 /* FORWARDED */
|
|
7764
7824
|
}, 16 /* FULL_PROPS */)),
|
|
7765
|
-
|
|
7766
|
-
vue.
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
vue.
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7825
|
+
($props.useAdd)
|
|
7826
|
+
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
|
|
7827
|
+
vue.renderSlot(_ctx.$slots, "add-input", { add: $options.add }, () => [
|
|
7828
|
+
($props.useInlineActions)
|
|
7829
|
+
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
7830
|
+
key: 0,
|
|
7831
|
+
class: "cursor-pointer items-center q-col-gutter-x-md q-mt-md row",
|
|
7832
|
+
onClick: _cache[1] || (_cache[1] = $event => ($options.add()))
|
|
7833
|
+
}, [
|
|
7834
|
+
vue.createElementVNode("div", _hoisted_12, [
|
|
7835
|
+
vue.createVNode(_component_qas_input, {
|
|
7836
|
+
class: "disabled no-pointer-events",
|
|
7837
|
+
"hide-bottom-space": "",
|
|
7838
|
+
label: $props.addInputLabel,
|
|
7839
|
+
outlined: "",
|
|
7840
|
+
onFocus: _cache[0] || (_cache[0] = $event => ($options.add()))
|
|
7841
|
+
}, null, 8 /* PROPS */, ["label"])
|
|
7842
|
+
]),
|
|
7843
|
+
vue.createElementVNode("div", _hoisted_13, [
|
|
7844
|
+
vue.createVNode(_component_qas_btn, {
|
|
7845
|
+
color: "green",
|
|
7846
|
+
flat: "",
|
|
7847
|
+
icon: "o_add_circle_outline",
|
|
7848
|
+
round: ""
|
|
7849
|
+
})
|
|
7850
|
+
])
|
|
7851
|
+
]))
|
|
7852
|
+
: (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
|
|
7853
|
+
vue.createVNode(_component_qas_btn, {
|
|
7854
|
+
class: "full-width q-py-md",
|
|
7855
|
+
icon: "o_add",
|
|
7856
|
+
outline: "",
|
|
7857
|
+
onClick: _cache[2] || (_cache[2] = $event => ($options.add()))
|
|
7858
|
+
}, {
|
|
7859
|
+
default: vue.withCtx(() => [
|
|
7860
|
+
vue.createTextVNode(vue.toDisplayString($props.addInputLabel), 1 /* TEXT */)
|
|
7861
|
+
]),
|
|
7862
|
+
_: 1 /* STABLE */
|
|
7863
|
+
})
|
|
7864
|
+
]))
|
|
7865
|
+
])
|
|
7866
|
+
]))
|
|
7867
|
+
: vue.createCommentVNode("v-if", true)
|
|
7806
7868
|
], 512 /* NEED_PATCH */)
|
|
7807
7869
|
], 8 /* PROPS */, _hoisted_1$9))
|
|
7808
7870
|
}
|
|
@@ -8951,7 +9013,7 @@
|
|
|
8951
9013
|
},
|
|
8952
9014
|
|
|
8953
9015
|
resultModel () {
|
|
8954
|
-
return this
|
|
9016
|
+
return storeAdapter.getGetter.call(this, { entity: this.entity, key: 'byId' })(this.id) || {}
|
|
8955
9017
|
}
|
|
8956
9018
|
},
|
|
8957
9019
|
|
|
@@ -8983,7 +9045,11 @@
|
|
|
8983
9045
|
[payload]
|
|
8984
9046
|
);
|
|
8985
9047
|
|
|
8986
|
-
const response = await
|
|
9048
|
+
const response = await storeAdapter.getAction.call(this, {
|
|
9049
|
+
entity: this.entity,
|
|
9050
|
+
key: 'fetchSingle',
|
|
9051
|
+
payload
|
|
9052
|
+
});
|
|
8987
9053
|
|
|
8988
9054
|
const { errors, fields, metadata } = response.data;
|
|
8989
9055
|
|
|
@@ -9174,9 +9240,13 @@
|
|
|
9174
9240
|
quasar.Loading.show();
|
|
9175
9241
|
|
|
9176
9242
|
try {
|
|
9177
|
-
const response = await
|
|
9178
|
-
|
|
9179
|
-
|
|
9243
|
+
const response = await storeAdapter.getAction.call(this, {
|
|
9244
|
+
entity: this.entity,
|
|
9245
|
+
key: 'replace',
|
|
9246
|
+
payload: {
|
|
9247
|
+
payload: { order: this.identifiers },
|
|
9248
|
+
url: this.url || `${this.entity}/sort`
|
|
9249
|
+
}
|
|
9180
9250
|
});
|
|
9181
9251
|
|
|
9182
9252
|
this.$emit('success', response);
|
|
@@ -10063,7 +10133,7 @@
|
|
|
10063
10133
|
|
|
10064
10134
|
var name = "@bildvitta/quasar-ui-asteroid";
|
|
10065
10135
|
var description = "Asteroid";
|
|
10066
|
-
var version$1 = "3.0.0";
|
|
10136
|
+
var version$1 = "3.1.0-beta.0";
|
|
10067
10137
|
var author = "Bild & Vitta <systemteam@bild.com.br>";
|
|
10068
10138
|
var license = "MIT";
|
|
10069
10139
|
var main = "dist/asteroid.cjs.min.js";
|
|
@@ -10107,6 +10177,7 @@
|
|
|
10107
10177
|
sass: "^1.49.0"
|
|
10108
10178
|
};
|
|
10109
10179
|
var dependencies = {
|
|
10180
|
+
"@bildvitta/store-adapter": "^1.0.0-beta.22",
|
|
10110
10181
|
"@fawmi/vue-google-maps": "^0.9.4",
|
|
10111
10182
|
autonumeric: "^4.6.0",
|
|
10112
10183
|
axios: "^0.21.1",
|