From ed9cfee9f9754e6e014b5c1807264c0dd19c5c1a Mon Sep 17 00:00:00 2001 From: Thaum Rystra Date: Wed, 29 Apr 2020 10:53:06 +0200 Subject: [PATCH] Added autocomplete for fields that expect variable names --- .../computation/ComputedForCreature.vue | 8 +++++- .../ui/components/global/SmartCombobox.vue | 26 +++++++++++++++++++ .../ui/components/global/SmartInputMixin.js | 2 +- .../ui/components/global/globalIndex.js | 12 +++++---- .../ui/properties/forms/AdjustmentForm.vue | 6 ++++- .../forms/AttributeConsumedForm.vue | 6 ++++- .../ui/properties/forms/EffectForm.vue | 16 ++++++------ .../ui/properties/forms/ProficiencyForm.vue | 11 +++++--- app/imports/ui/properties/forms/SkillForm.vue | 12 ++++++++- .../forms/shared/ProficiencySelect.vue | 21 ++++++--------- .../forms/shared/lists/attributeListMixin.js | 11 ++++++++ .../shared/lists/createListOfProperties.js | 21 +++++++++++++++ .../forms/shared/lists/skillListMixin.js | 11 ++++++++ 13 files changed, 128 insertions(+), 35 deletions(-) create mode 100644 app/imports/ui/components/global/SmartCombobox.vue create mode 100644 app/imports/ui/properties/forms/shared/lists/attributeListMixin.js create mode 100644 app/imports/ui/properties/forms/shared/lists/createListOfProperties.js create mode 100644 app/imports/ui/properties/forms/shared/lists/skillListMixin.js diff --git a/app/imports/ui/components/computation/ComputedForCreature.vue b/app/imports/ui/components/computation/ComputedForCreature.vue index 90e82e72..54bef855 100644 --- a/app/imports/ui/components/computation/ComputedForCreature.vue +++ b/app/imports/ui/components/computation/ComputedForCreature.vue @@ -1,9 +1,14 @@ diff --git a/app/imports/ui/components/global/SmartInputMixin.js b/app/imports/ui/components/global/SmartInputMixin.js index f483361c..cb2d4a1a 100644 --- a/app/imports/ui/components/global/SmartInputMixin.js +++ b/app/imports/ui/components/global/SmartInputMixin.js @@ -20,7 +20,7 @@ export default { inputValue: this.value, };}, props: { - value: [String, Number, Date], + value: [String, Number, Date, Array], debounceTime: { type: Number, default: 750, diff --git a/app/imports/ui/components/global/globalIndex.js b/app/imports/ui/components/global/globalIndex.js index 8560470d..1e578e5e 100644 --- a/app/imports/ui/components/global/globalIndex.js +++ b/app/imports/ui/components/global/globalIndex.js @@ -1,11 +1,13 @@ -import Vue from "vue"; +import Vue from 'vue'; // Global components import DatePicker from '/imports/ui/components/global/DatePicker.vue'; import TextField from '/imports/ui/components/global/TextField.vue'; import TextArea from '/imports/ui/components/global/TextArea.vue'; import SmartSelect from '/imports/ui/components/global/SmartSelect.vue'; +import SmartCombobox from '/imports/ui/components/global/SmartCombobox.vue'; -Vue.component("date-picker", DatePicker); -Vue.component("text-field", TextField); -Vue.component("text-area", TextArea); -Vue.component("smart-select", SmartSelect); +Vue.component('DatePicker', DatePicker); +Vue.component('TextField', TextField); +Vue.component('TextArea', TextArea); +Vue.component('SmartSelect', SmartSelect); +Vue.component('SmartCombobox', SmartCombobox); diff --git a/app/imports/ui/properties/forms/AdjustmentForm.vue b/app/imports/ui/properties/forms/AdjustmentForm.vue index 97616988..3d4ae5bf 100644 --- a/app/imports/ui/properties/forms/AdjustmentForm.vue +++ b/app/imports/ui/properties/forms/AdjustmentForm.vue @@ -1,10 +1,11 @@