diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2019-12-08 10:22:10 +0000 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-12-08 17:48:12 +0100 |
commit | 213a1fc421da26a9d3852721aaf1cd3fbdc7b162 (patch) | |
tree | 3c036c4d500cc40c3eb2bbbf89943e15f6a5d24f /src/components/Properties | |
parent | 544cc04f1608e8c0555cde50dbccd6e0e964589b (diff) |
Bump eslint-config-nextcloud from 0.0.6 to 0.1.0
Bumps [eslint-config-nextcloud](https://github.com/nextcloud/eslint-config-nextcloud) from 0.0.6 to 0.1.0.
- [Release notes](https://github.com/nextcloud/eslint-config-nextcloud/releases)
- [Commits](https://github.com/nextcloud/eslint-config-nextcloud/compare/v0.0.6...v0.1.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Diffstat (limited to 'src/components/Properties')
-rw-r--r-- | src/components/Properties/PropertyActions.vue | 12 | ||||
-rw-r--r-- | src/components/Properties/PropertyDateTime.vue | 40 | ||||
-rw-r--r-- | src/components/Properties/PropertyGroups.vue | 26 | ||||
-rw-r--r-- | src/components/Properties/PropertyMultipleText.vue | 18 | ||||
-rw-r--r-- | src/components/Properties/PropertyRev.vue | 8 | ||||
-rw-r--r-- | src/components/Properties/PropertySelect.vue | 20 | ||||
-rw-r--r-- | src/components/Properties/PropertyText.vue | 22 | ||||
-rw-r--r-- | src/components/Properties/PropertyTitle.vue | 10 |
8 files changed, 78 insertions, 78 deletions
diff --git a/src/components/Properties/PropertyActions.vue b/src/components/Properties/PropertyActions.vue index 19ce5f02..2232e2ca 100644 --- a/src/components/Properties/PropertyActions.vue +++ b/src/components/Properties/PropertyActions.vue @@ -39,24 +39,24 @@ export default { name: 'PropertyActions', components: { - ActionButton + ActionButton, }, props: { actions: { type: Array, - default: () => [] + default: () => [], }, propertyComponent: { type: Object, - required: true - } + required: true, + }, }, methods: { deleteProperty() { this.$emit('delete') - } - } + }, + }, } </script> diff --git a/src/components/Properties/PropertyDateTime.vue b/src/components/Properties/PropertyDateTime.vue index a9b2cce2..31c6bab5 100644 --- a/src/components/Properties/PropertyDateTime.vue +++ b/src/components/Properties/PropertyDateTime.vue @@ -87,7 +87,7 @@ export default { components: { DatetimePicker, PropertyTitle, - PropertyActions + PropertyActions, }, mixins: [PropertyMixin], @@ -96,8 +96,8 @@ export default { value: { type: [VCardTime, String], default: '', - required: true - } + required: true, + }, }, data() { @@ -111,26 +111,26 @@ export default { // locale and lang data locale: 'en', - firstDay: window.firstDay === 0 ? 7 : window.firstDay, // provided by nextcloud + firstDay: window.firstDay === 0 ? 7 : window.firstDay, // provided by nextcloud lang: { - days: window.dayNamesShort, // provided by nextcloud - months: window.monthNamesShort, // provided by nextcloud + days: window.dayNamesShort, // provided by nextcloud + months: window.monthNamesShort, // provided by nextcloud placeholder: { - date: t('contacts', 'Select Date') - } + date: t('contacts', 'Select Date'), + }, }, dateFormat: { stringify: (date) => { return date ? this.formatDateTime() : null - } - } + }, + }, } }, computed: { gridLength() { - let hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 - let isLast = this.isLastProperty ? 1 : 0 + const hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 + const isLast = this.isLastProperty ? 1 : 0 // length is always one & add one space at the end return hasTitle + 1 + isLast }, @@ -142,7 +142,7 @@ export default { return new VCardTime.fromDateAndOrTimeString(this.localValue) } return this.localValue - } + }, }, async mounted() { @@ -180,7 +180,7 @@ export default { const objMap = ['year', 'month', 'day', 'hour', 'minute', 'second'] const rawArray = moment(date).toArray() - let dateObject = rawArray.reduce((acc, cur, index) => { + const dateObject = rawArray.reduce((acc, cur, index) => { acc[objMap[index]] = cur return acc }, {}) @@ -250,7 +250,7 @@ export default { // this is the only possibility for us to ensure // no data is lost. e.g. if no second are set // the second will be null and not 0 - let datetimeData = this.vcardTimeLocalValue.toJSON() + const datetimeData = this.vcardTimeLocalValue.toJSON() let datetime = '' const ignoreYear = this.property.getParameter('x-apple-omit-year') @@ -286,10 +286,10 @@ export default { .locale(this.locale) .format( this.inputType === 'datetime' - ? 'llll' // date & time display + ? 'llll' // date & time display : this.inputType === 'date' - ? 'll' // only date - : 'LTS' // only time + ? 'll' // only date + : 'LTS' // only time ) } @@ -297,8 +297,8 @@ export default { // replace year and remove double spaces ? datetime.replace(moment(this.vcardTimeLocalValue).year(), '').replace(/\s\s+/g, ' ') : datetime - } - } + }, + }, } </script> diff --git a/src/components/Properties/PropertyGroups.vue b/src/components/Properties/PropertyGroups.vue index 41964ef5..b2ce1547 100644 --- a/src/components/Properties/PropertyGroups.vue +++ b/src/components/Properties/PropertyGroups.vue @@ -67,28 +67,28 @@ export default { propModel: { type: Object, default: () => {}, - required: true + required: true, }, value: { type: Array, default: () => [], - required: true + required: true, }, contact: { type: Contact, default: null, - required: true + required: true, }, // Is it read-only? isReadOnly: { type: Boolean, - default: false - } + default: false, + }, }, data() { return { - localValue: this.value + localValue: this.value, } }, @@ -105,7 +105,7 @@ export default { */ formatGroupsTitle() { return this.localValue.slice(3).join(', ') - } + }, }, watch: { @@ -119,7 +119,7 @@ export default { }, selectType: function() { this.localType = this.selectType - } + }, }, methods: { @@ -140,7 +140,7 @@ export default { async addContactToGroup(groupName) { await this.$store.dispatch('addContactToGroup', { contact: this.contact, - groupName + groupName, }) this.updateValue() }, @@ -153,7 +153,7 @@ export default { removeContactToGroup(groupName) { this.$store.dispatch('removeContactToGroup', { contact: this.contact, - groupName + groupName, }) }, @@ -165,15 +165,15 @@ export default { */ validateGroup(groupName) { // Only allow characters without vcard special chars - let groupRegex = /^[^;,:]+$/gmi + const groupRegex = /^[^;,:]+$/gmi if (groupName.match(groupRegex)) { this.addContactToGroup(groupName) this.localValue.push(groupName) return true } return false - } - } + }, + }, } </script> diff --git a/src/components/Properties/PropertyMultipleText.vue b/src/components/Properties/PropertyMultipleText.vue index 6579fb12..efa09c5c 100644 --- a/src/components/Properties/PropertyMultipleText.vue +++ b/src/components/Properties/PropertyMultipleText.vue @@ -109,7 +109,7 @@ export default { components: { PropertyTitle, - PropertyActions + PropertyActions, }, mixins: [PropertyMixin], @@ -118,23 +118,23 @@ export default { value: { type: [Array, Object], default: () => [], - required: true - } + required: true, + }, }, computed: { gridLength() { - let hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 - let isLast = this.isLastProperty - let hasValueNames = this.propModel.options || this.selectType || !this.property.isStructuredValue ? 1 : 0 - let length = this.propModel.displayOrder ? this.propModel.displayOrder.length : this.value.length + const hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 + const isLast = this.isLastProperty + const hasValueNames = this.propModel.options || this.selectType || !this.property.isStructuredValue ? 1 : 0 + const length = this.propModel.displayOrder ? this.propModel.displayOrder.length : this.value.length return hasValueNames + hasTitle + length + isLast }, filteredValue() { return this.localValue.filter((value, index) => index > 0) - } - } + }, + }, } </script> diff --git a/src/components/Properties/PropertyRev.vue b/src/components/Properties/PropertyRev.vue index 03bbff8b..321ef69c 100644 --- a/src/components/Properties/PropertyRev.vue +++ b/src/components/Properties/PropertyRev.vue @@ -36,14 +36,14 @@ export default { value: { type: VCardTime, required: true, - default: null - } + default: null, + }, }, computed: { relativeDate() { return OC.Util.relativeModifiedDate(this.value.toUnixTime() * 1000) - } - } + }, + }, } </script> diff --git a/src/components/Properties/PropertySelect.vue b/src/components/Properties/PropertySelect.vue index ec8dc517..a2c5989d 100644 --- a/src/components/Properties/PropertySelect.vue +++ b/src/components/Properties/PropertySelect.vue @@ -64,7 +64,7 @@ export default { components: { PropertyTitle, - PropertyActions + PropertyActions, }, mixins: [PropertyMixin], @@ -73,14 +73,14 @@ export default { value: { type: [Object, String, Array], default: '', - required: true - } + required: true, + }, }, computed: { gridLength() { - let hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 - let isLast = this.isLastProperty ? 1 : 0 + const hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 + const isLast = this.isLastProperty ? 1 : 0 // length is one & add one space at the end return hasTitle + 1 + isLast }, @@ -105,12 +105,12 @@ export default { if (Array.isArray(this.localValue)) { return selected || { id: this.localValue.join(';'), - name: this.localValue.join(';') + name: this.localValue.join(';'), } } return selected || { id: this.localValue, - name: this.localValue + name: this.localValue, } }, set(value) { @@ -120,9 +120,9 @@ export default { } else { this.localValue = value.id } - } - } - } + }, + }, + }, } </script> diff --git a/src/components/Properties/PropertyText.vue b/src/components/Properties/PropertyText.vue index 2d300b6f..089c47da 100644 --- a/src/components/Properties/PropertyText.vue +++ b/src/components/Properties/PropertyText.vue @@ -97,7 +97,7 @@ export default { components: { PropertyTitle, - PropertyActions + PropertyActions, }, mixins: [PropertyMixin], @@ -106,28 +106,28 @@ export default { propName: { type: String, default: 'text', - required: true + required: true, }, value: { type: String, default: '', - required: true - } + required: true, + }, }, data() { return { // the textarea additionnal height compared to the // default input text. Min is 2 grid height - noteHeight: 1 + noteHeight: 1, } }, computed: { gridLength() { - let hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 - let isLast = this.isLastProperty ? 1 : 0 - let noteHeight = this.propName === 'note' + const hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 + const isLast = this.isLastProperty ? 1 : 0 + const noteHeight = this.propName === 'note' ? this.noteHeight : 0 // length is one & add one space at the end @@ -167,7 +167,7 @@ export default { haveExtHandler() { return this.externalHandler.trim() !== '' && this.localValue && this.localValue.length > 0 - } + }, }, mounted() { @@ -198,7 +198,7 @@ export default { updateValueNoDebounce(e) { this.resizeGrid(e) this.updateValue(e) - } - } + }, + }, } </script> diff --git a/src/components/Properties/PropertyTitle.vue b/src/components/Properties/PropertyTitle.vue index 56d64b8f..4bda3363 100644 --- a/src/components/Properties/PropertyTitle.vue +++ b/src/components/Properties/PropertyTitle.vue @@ -39,18 +39,18 @@ export default { icon: { type: String, default: '', - required: true + required: true, }, readableName: { type: String, default: '', - required: true + required: true, }, info: { type: String, default: '', - required: false - } - } + required: false, + }, + }, } </script> |