Skip to content

Commit

Permalink
define components events with emits option
Browse files Browse the repository at this point in the history
  • Loading branch information
zeezo887 committed May 16, 2024
1 parent 174c992 commit 618783b
Show file tree
Hide file tree
Showing 46 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions frontend/js/components/BrowserItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<script>
export default {
name: 'A17BrowserItem',
emits: ['delete'],
props: {
name: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/CheckboxAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'a17-accordion': a17Accordion
},
mixins: [VisibilityMixin],
emits: ['open'],
props: {
value: {
default: function () { return [] }
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Cropper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
}
},
mixins: [cropperMixin],
emits: ['crop-end'],
data: function () {
return {
cropper: null,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<script>
export default {
name: 'A17Dropdown',
emits: ['open', 'close'],
props: {
title: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Filter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
export default {
name: 'A17Filter',
emits: ['submit', 'clear'],
props: {
initialSearchValue: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/LocaleField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
export default {
name: 'A17Locale',
emits: ['blur', 'focus', 'localize', 'change'],
props: {
type: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/LocationField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
export default {
name: 'A17Locationfield',
emits: ['focus'],
mixins: [InputMixin, InputframeMixin, LocaleMixin, FormStoreMixin],
props: {
type: {
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/MediaMetadata.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
export default {
name: 'A17MediaMetadata',
emits: ['change'],
props: {
media: {
type: Object,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
export default {
name: 'A17Modal',
emits: ['open', 'close', 'esc-key'],
props: {
title: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/MultiButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
export default {
name: 'A17Multibutton',
emits: ['button-clicked'],
props: {
type: {
default: 'button'
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Overlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
export default {
name: 'A17Overlay',
emits: ['open', 'close', 'esc-key'],
props: {
title: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/ParentsAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
export default {
name: 'A17Parents',
emits: ['open'],
components: {
'a17-accordion': a17Accordion
},
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/PreviewerFrame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<script>
export default {
name: 'A17previewerFrame',
emits: ['scrollDoc'],
props: {
size: {
type: Number,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/PubAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
export default {
name: 'A17Pubaccordion',
emits: ['open'],
components: {
'a17-accordion': a17Accordion
},
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Radio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
export default {
name: 'A17Radio',
emits: ['change'],
mixins: [randKeyMixin],
props: {
customClass: {
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/RadioAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'a17-accordion': a17Accordion
},
mixins: [VisibilityMixin],
emits: ['change', 'open'],
props: {
value: {
default: ''
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/RadioGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
export default {
name: 'A17CheckboxGroup',
mixins: [randKeyMixin, InputframeMixin, FormStoreMixin],
emits: ['change'],
props: {
radioClass: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/ReviewAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
'a17-accordion': a17Accordion
},
mixins: [VisibilityMixin],
emits: ['open'],
props: {
value: {
default: function () { return [] }
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/RevisionAccordion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
export default {
name: 'A17Revisions',
emits: ['open'],
components: {
'a17-accordion': a17Accordion
},
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
export default {
name: 'A17Select',
emits: ['change'],
mixins: [randKeyMixin, InputMixin, InputframeMixin, LocaleMixin, FormStoreMixin, AttributesMixin],
props: {
size: {
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/SingleCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
export default {
name: 'A17SingleCheckbox',
emits: ['change'],
mixins: [randKeyMixin, InputframeMixin, FormStoreMixin, ConfirmationMixin],
props: {
name: {
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/SingleSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
export default {
name: 'A17Singleselect',
emits: ['change'],
mixins: [randKeyMixin, InputframeMixin, FormStoreMixin, AttributesMixin, ConfirmationMixin],
props: {
name: {
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Switcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
export default {
name: 'A17Toggle',
emits: ['change'],
props: {
name: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/VSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import randKeyMixin from '@/mixins/randKey'
export default {
name: 'A17VueSelect',
emits: ['change'],
mixins: [randKeyMixin, InputframeMixin, FormStoreMixin, AttributesMixin],
props: {
placeholder: {
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/VSelect/ExtendedVSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
export default {
extends: vSelect,
emits: ['search'],
props: {
/**
* Enable/Disable deselect the option by double select it
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/Wysiwyg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
export default {
name: 'A17Wysiwyg',
emits: ['change', 'input', 'focus', 'blur', 'ready'],
mixins: [InputMixin, InputframeMixin, LocaleMixin, FormStoreMixin],
props: {
editSource: {
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/WysiwygMenuBarButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<script>
export default {
name: 'WysiwygMenuBarButton',
emits: ['btn:click'],
props: {
icon: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/buckets/BucketItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
export default {
components: { A17Dropdown },
name: 'a17BucketItem',
emits: ['remove-from-bucket', 'toggle-featured-in-bucket'],
props: {
bucket: {
type: String
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/editor/EditorIframe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
export default {
name: 'A17editorIframe',
emits: ['loaded'],
props: {
block: {
type: Object,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/files/FileItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
export default {
name: 'a17FileItem',
emits: ['delete'],
props: {
name: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/media-library/MediaSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@
export default {
name: 'A17MediaSidebar',
emits: ['triggerMediaReplace', 'delete', 'clear', 'tagUpdated'],
components: {
'a17-mediasidebar-upload': a17MediaSidebarUpload,
'a17-langswitcher': a17Langswitcher
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/media-library/Uploader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
export default {
name: 'A17Uploader',
emits: ['clear', 'loaded'],
props: {
type: {
type: Object,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/modals/ModalCreate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
export default {
name: 'A17ModalCreate',
mixins: [retrySubmitMixin],
emits: ['reload'],
props: {
formCreate: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/modals/ModalValidationButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
export default {
name: 'A17ModalValidationButtons',
emits: ['disable'],
props: {
publishedName: {
type: String,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/table/Paginate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<script>
export default {
name: 'A17Paginate',
emits: ['changePage', 'changeOffset'],
props: {
value: {
type: Number,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/table/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<script>
export default {
name: 'A17Table',
emits: ['scroll'],
props: {
xScroll: {
type: Number,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/components/table/TableHead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
export default {
name: 'A17Tablehead',
emits: ['sortColumn'],
props: {
sortable: {
type: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
export default {
name: 'TableCellActions',
emits: ['update'],
mixins: [TableCellMixin],
methods: {
update: function (colName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
export default {
name: 'A17TableCellLanguages',
emits: ['editInPlace'],
mixins: [TableCellMixin],
props: {
languages: {
Expand Down
1 change: 1 addition & 0 deletions frontend/js/mixins/buckets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
emits: ['add-to-bucket'],
props: {
buckets: {
type: Array,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/mixins/checkboxes.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default {
default: function () { return [] }
}
},
emits: ['change'],
data: function () {
return {
currentValue: this.selected
Expand Down
1 change: 1 addition & 0 deletions frontend/js/mixins/locale.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { mapState } from 'vuex'

export default {
emits: ['localize'],
props: {
locale: {
default: null
Expand Down
1 change: 1 addition & 0 deletions frontend/js/mixins/maxlength.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
emits: ['localize'],
props: {
maxlength: {
type: Number,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/mixins/mediaLibrary/mediaItems.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { mapState } from 'vuex'

export default {
emits: ['change', 'shiftChange'],
props: {
items: {
type: Array,
Expand Down
8 changes: 8 additions & 0 deletions frontend/js/mixins/tableCell.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
export default {
emits: [
'update',
'editInPlace',
'restoreRow',
'destroyRow',
'deleteRow',
'duplicateRow'
],
props: {
col: {
type: Object,
Expand Down
1 change: 1 addition & 0 deletions frontend/js/mixins/toggleVisibility.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export default {
emits: ['toggleVisibility'],
props: {
open: {
type: Boolean,
Expand Down

0 comments on commit 618783b

Please sign in to comment.