From 5cce2741adf652c35a1e56a5b8a614af62008c9a Mon Sep 17 00:00:00 2001 From: jnbhm <hello@jeanboehm.de> Date: Thu, 8 Jul 2021 12:53:22 +0200 Subject: [PATCH 1/4] Globally Importing Components --- quasar.conf.js | 3 +- src/boot/mb-components.js | 66 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 src/boot/mb-components.js diff --git a/quasar.conf.js b/quasar.conf.js index cd1d0c537..f61a72b24 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -11,7 +11,8 @@ module.exports = function (ctx) { 'auth', 'i18n', 'axios', - 'errors' + 'errors', + 'mb-components' ], // https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css diff --git a/src/boot/mb-components.js b/src/boot/mb-components.js new file mode 100644 index 000000000..49497081f --- /dev/null +++ b/src/boot/mb-components.js @@ -0,0 +1,66 @@ +import Vue from 'vue' + +// import single file components +import MbBtn from 'src/components/MbComponents/MbBtn' +import MbBtnDropdown from 'src/components/MbComponents/MbBtnDropdown' +import MbCheckbox from 'src/components/MbComponents/MbCheckbox' +import MbChip from 'src/components/MbComponents/MbChip' +import MbExpansionItem from 'src/components/MbComponents/MbExpansionItem' +import MbHeadline from 'src/components/MbComponents/MbHeadline' +import MbIconBtn from 'src/components/MbComponents/MbIconBtn' +import MbIconRadioBtn from 'src/components/MbComponents/MbIconRadioBtn' +import MbImg from 'src/components/MbComponents/MbImg' +import MbInputText from 'src/components/MbComponents/MbInputText' +import MbList from 'src/components/MbComponents/MbList' +import MbLogo from 'src/components/MbComponents/MbLogo' +import MbMenu from 'src/components/MbComponents/MbMenu' +import MbNameTag from 'src/components/MbComponents/MbNameTag' +import MbPopupProxy from 'src/components/MbComponents/MbPopupProxy' +import MbSelect from 'src/components/MbComponents/MbSelect' +import MbToggle from 'src/components/MbComponents/MbToggle' +import MbTooltip from 'src/components/MbComponents/MbTooltip' + +// import multi file components +import MbCard from 'src/components/MbComponents/MbCard/MbCard' + +import MbCarousel from 'src/components/MbComponents/MbCarousel/MbCarousel' +import MbCarouselSlide from 'src/components/MbComponents/MbCarousel/MbCarouselSlide' + +import MbDialog from 'src/components/MbComponents/MbDialog/MbDialog' + +import MbDialogOverlay from 'src/components/MbComponents/MbDialogOverlay/MbDialogOverlay' + +import MbSwiper from 'src/components/MbComponents/MbSwiper/MbSwiper' +import MbSwiperSlide from 'src/components/MbComponents/MbSwiper/MbSwiperSlide' + +import MbTableList from 'src/components/MbComponents/MbTableList/MbTableList' + +// use single file components +Vue.component('mb-btn', MbBtn) +Vue.component('mb-btn-dropdown', MbBtnDropdown) +Vue.component('mb-checkbox', MbCheckbox) +Vue.component('mb-chip', MbChip) +Vue.component('mb-expansion-item', MbExpansionItem) +Vue.component('mb-headline', MbHeadline) +Vue.component('mb-icon-btn', MbIconBtn) +Vue.component('mb-icon-radio-btn', MbIconRadioBtn) +Vue.component('mb-img', MbImg) +Vue.component('mb-input-text', MbInputText) +Vue.component('mb-list', MbList) +Vue.component('mb-logo', MbLogo) +Vue.component('mb-menu', MbMenu) +Vue.component('mb-name-tag', MbNameTag) +Vue.component('mb-popup-proxy', MbPopupProxy) +Vue.component('mb-select', MbSelect) +Vue.component('mb-toggle', MbToggle) +Vue.component('mb-tooltip', MbTooltip) + +// use multi file components +Vue.component('mb-card', MbCard) +Vue.component('mb-carousel', MbCarousel) +Vue.component('mb-carousel-slide', MbCarouselSlide) +Vue.component('mb-dialog', MbDialog) +Vue.component('mb-dialog-overlay', MbDialogOverlay) +Vue.component('mb-swiper', MbSwiper) +Vue.component('mb-swiper-slide', MbSwiperSlide) +Vue.component('mb-table-list', MbTableList) -- GitLab From 2838c9b05c18e13f120ecd968c0f1cba9e81e5f6 Mon Sep 17 00:00:00 2001 From: jnbhm <hello@jeanboehm.de> Date: Thu, 8 Jul 2021 13:02:49 +0200 Subject: [PATCH 2/4] removed local imports --- src/components/MbComponents/MbCard/MbCard.vue | 6 -- .../Containers/CardTagContainer.vue | 4 -- .../MbCard/SubComponents/MbCardMoreOption.vue | 4 -- .../MbCard/SubComponents/MbCardOverlay.vue | 8 --- .../MbComponents/MbCarousel/MbCarousel.vue | 4 -- .../MbCard/DialogCardMoreContent.vue | 4 +- .../Navigation/DialogCreateGrid.vue | 5 +- .../Navigation/DialogCreateTimeline.vue | 5 +- .../Navigation/DialogNavNotifications.vue | 4 -- .../DialogSelectTimelineLiveAnnotate.vue | 6 +- .../DialogSelectTimelinePostAnnotate.vue | 6 +- .../MbComponents/MbDialog/MbDialog.vue | 2 - .../MbDialogOverlay/MbDialogOverlay.vue | 2 - .../Groups/GroupOverlayContent.vue | 10 +-- .../OverlayContents/Groups/Sub/GroupAcl.vue | 6 -- .../Groups/Sub/GroupAuthor.vue | 2 - .../OverlayContents/Groups/Sub/GroupTitle.vue | 2 - .../Tags/TagOverlayContent.vue | 10 --- src/components/MbComponents/MbHeadline.vue | 3 +- src/components/MbComponents/MbIconBtn.vue | 2 - .../MbComponents/MbIconRadioBtn.vue | 2 - .../MbComponents/{MbList => }/MbList.vue | 0 src/components/MbComponents/MbMenu.vue | 2 - src/components/MbComponents/MbNameTag.vue | 6 -- .../MbComponents/MbSwiper/MbSwiper.vue | 2 - .../MbComponents/MbTable/MbTable.vue | 18 +---- .../MbTableData/CellContents/AclContent.vue | 5 -- .../CellContents/AuthorContent.vue | 2 - .../CellContents/PreviewContent.vue | 5 +- .../MbTableData/CellContents/TitleContent.vue | 2 - .../MbComponents/MbTable/MbTableData/MbTd.vue | 9 ++- .../MbComponents/MbTableList/MbTableList.vue | 66 +++++++++---------- .../Navigation/Drawer/NavDrawerContent.vue | 4 -- .../GlobalSwitches/ThemeHandler.vue | 4 -- .../Drawer/SubComponents/NavActionButtons.vue | 8 +-- .../Drawer/SubComponents/NavMainLinks.vue | 2 - .../Navigation/Toolbar/NavNotifications.vue | 6 +- .../globals/Navigation/Toolbar/NavToolbar.vue | 2 - .../ComponentsOverview/ComponentsOverview.vue | 58 +--------------- 39 files changed, 55 insertions(+), 243 deletions(-) rename src/components/MbComponents/{MbList => }/MbList.vue (100%) diff --git a/src/components/MbComponents/MbCard/MbCard.vue b/src/components/MbComponents/MbCard/MbCard.vue index 0d2edae17..098be46f2 100644 --- a/src/components/MbComponents/MbCard/MbCard.vue +++ b/src/components/MbComponents/MbCard/MbCard.vue @@ -50,17 +50,11 @@ import CardAuthorContainer from 'components/MbComponents/MbCard/SubComponents/Co import CardTagContainer from 'components/MbComponents/MbCard/SubComponents/Containers/CardTagContainer' import CardMoreOption from 'components/MbComponents/MbCard/SubComponents/MbCardMoreOption' import CardAclContainer from 'components/MbComponents/MbCard/SubComponents/Containers/CardAclContainer' -import MbCardOverlay from 'components/MbComponents/MbCard/SubComponents/MbCardOverlay' -import MbImg from 'components/MbComponents/MbImg' -import MbHeadline from 'components/MbComponents/MbHeadline' export default { name: 'MbCard', extends: MbCardDataProvider, components: { - MbHeadline, - MbImg, - MbCardOverlay, CardAclContainer, CardMoreOption, CardTagContainer, diff --git a/src/components/MbComponents/MbCard/SubComponents/Containers/CardTagContainer.vue b/src/components/MbComponents/MbCard/SubComponents/Containers/CardTagContainer.vue index ebd44df75..b45246997 100644 --- a/src/components/MbComponents/MbCard/SubComponents/Containers/CardTagContainer.vue +++ b/src/components/MbComponents/MbCard/SubComponents/Containers/CardTagContainer.vue @@ -11,12 +11,8 @@ </template> <script> -import MbChip from 'components/MbComponents/MbChip' export default { name: 'CardTagContainer', - components: { - MbChip - }, props: ['tags'] } </script> diff --git a/src/components/MbComponents/MbCard/SubComponents/MbCardMoreOption.vue b/src/components/MbComponents/MbCard/SubComponents/MbCardMoreOption.vue index 20e07ce75..1e818a9ff 100644 --- a/src/components/MbComponents/MbCard/SubComponents/MbCardMoreOption.vue +++ b/src/components/MbComponents/MbCard/SubComponents/MbCardMoreOption.vue @@ -12,13 +12,9 @@ <script> import DialogCardMoreContent from 'components/MbComponents/MbDialog/DialogContents/MbCard/DialogCardMoreContent' -import MbDialog from 'components/MbComponents/MbDialog/MbDialog' -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'CardMoreOption', components: { - MbIconBtn, - MbDialog, DialogCardMoreContent }, props: ['data'], diff --git a/src/components/MbComponents/MbCard/SubComponents/MbCardOverlay.vue b/src/components/MbComponents/MbCard/SubComponents/MbCardOverlay.vue index 3871c3f49..ccff9c0fa 100644 --- a/src/components/MbComponents/MbCard/SubComponents/MbCardOverlay.vue +++ b/src/components/MbComponents/MbCard/SubComponents/MbCardOverlay.vue @@ -22,16 +22,8 @@ </template> <script> -import MbHeadline from 'components/MbComponents/MbHeadline' -import MbImg from 'components/MbComponents/MbImg' -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'MbCardOverlay', - components: { - MbIconBtn, - MbImg, - MbHeadline - }, props: ['value', 'data'], data () { return { diff --git a/src/components/MbComponents/MbCarousel/MbCarousel.vue b/src/components/MbComponents/MbCarousel/MbCarousel.vue index 9b3f82d54..6a5575865 100644 --- a/src/components/MbComponents/MbCarousel/MbCarousel.vue +++ b/src/components/MbComponents/MbCarousel/MbCarousel.vue @@ -34,12 +34,8 @@ </template> <script> -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'MbCarousel', - components: { - MbIconBtn - }, props: ['slidesLength'], data () { return { diff --git a/src/components/MbComponents/MbDialog/DialogContents/MbCard/DialogCardMoreContent.vue b/src/components/MbComponents/MbDialog/DialogContents/MbCard/DialogCardMoreContent.vue index 8446d8972..be39deec0 100644 --- a/src/components/MbComponents/MbDialog/DialogContents/MbCard/DialogCardMoreContent.vue +++ b/src/components/MbComponents/MbDialog/DialogContents/MbCard/DialogCardMoreContent.vue @@ -7,10 +7,8 @@ </template> <script> -import MbBtn from 'components/MbComponents/MbBtn' export default { - name: 'DialogCardMoreContent', - components: { MbBtn } + name: 'DialogCardMoreContent' } </script> diff --git a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateGrid.vue b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateGrid.vue index 2db341e9f..1ac104753 100644 --- a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateGrid.vue +++ b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateGrid.vue @@ -9,11 +9,8 @@ </template> <script> -import MbInputText from 'components/MbComponents/MbInputText' -import MbBtn from 'components/MbComponents/MbBtn' export default { - name: 'DialogCreateGrid', - components: { MbBtn, MbInputText } + name: 'DialogCreateGrid' } </script> diff --git a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateTimeline.vue b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateTimeline.vue index 89e370b58..6fae208c8 100644 --- a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateTimeline.vue +++ b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateTimeline.vue @@ -9,11 +9,8 @@ </template> <script> -import MbInputText from 'components/MbComponents/MbInputText' -import MbBtn from 'components/MbComponents/MbBtn' export default { - name: 'DialogCreateTimeline', - components: { MbBtn, MbInputText } + name: 'DialogCreateTimeline' } </script> diff --git a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogNavNotifications.vue b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogNavNotifications.vue index 6bf6ffa8f..ecd91cede 100644 --- a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogNavNotifications.vue +++ b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogNavNotifications.vue @@ -22,12 +22,8 @@ mb-list </template> <script> -import MbList from 'components/MbComponents/MbList/MbList' export default { name: 'DialogNavNotifications', - components: { - MbList - }, data () { return { notifications: [ diff --git a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelineLiveAnnotate.vue b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelineLiveAnnotate.vue index 6c5726dfb..65ab0f5c0 100644 --- a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelineLiveAnnotate.vue +++ b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelineLiveAnnotate.vue @@ -18,12 +18,8 @@ </template> <script> -import MbCarousel from 'components/MbComponents/MbCarousel/MbCarousel' -import MbCarouselSlide from 'components/MbComponents/MbCarousel/MbCarouselSlide' -import MbCard from 'components/MbComponents/MbCard/MbCard' export default { - name: 'DialogSelectTimelineLiveAnnotate', - components: { MbCard, MbCarouselSlide, MbCarousel } + name: 'DialogSelectTimelineLiveAnnotate' } </script> diff --git a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelinePostAnnotate.vue b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelinePostAnnotate.vue index d34614b7c..df8ec601e 100644 --- a/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelinePostAnnotate.vue +++ b/src/components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelinePostAnnotate.vue @@ -18,12 +18,8 @@ </template> <script> -import MbCarousel from 'components/MbComponents/MbCarousel/MbCarousel' -import MbCarouselSlide from 'components/MbComponents/MbCarousel/MbCarouselSlide' -import MbCard from 'components/MbComponents/MbCard/MbCard' export default { - name: 'DialogSelectTimelinePostAnnotate', - components: { MbCard, MbCarouselSlide, MbCarousel } + name: 'DialogSelectTimelinePostAnnotate' } </script> diff --git a/src/components/MbComponents/MbDialog/MbDialog.vue b/src/components/MbComponents/MbDialog/MbDialog.vue index 2c7c969c7..b1141d1d3 100644 --- a/src/components/MbComponents/MbDialog/MbDialog.vue +++ b/src/components/MbComponents/MbDialog/MbDialog.vue @@ -27,10 +27,8 @@ q-dialog( </template> <script> -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'MbDialog', - components: { MbIconBtn }, props: ['value', 'width', 'label'], data () { return { diff --git a/src/components/MbComponents/MbDialogOverlay/MbDialogOverlay.vue b/src/components/MbComponents/MbDialogOverlay/MbDialogOverlay.vue index a2fedbeae..d9cfc83df 100644 --- a/src/components/MbComponents/MbDialogOverlay/MbDialogOverlay.vue +++ b/src/components/MbComponents/MbDialogOverlay/MbDialogOverlay.vue @@ -39,10 +39,8 @@ </template> <script> -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'MbDialogOverlay', - components: { MbIconBtn }, props: ['value', 'label'], data () { return { diff --git a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/GroupOverlayContent.vue b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/GroupOverlayContent.vue index 5a673a073..1eb2f8a66 100644 --- a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/GroupOverlayContent.vue +++ b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/GroupOverlayContent.vue @@ -49,16 +49,16 @@ </template> <script> -import MbExpansionItem from 'components/MbComponents/MbExpansionItem' -import MbInputText from 'components/MbComponents/MbInputText' import GroupTitle from 'components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupTitle' import GroupAuthor from 'components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAuthor' import GroupAcl from 'components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAcl' -import MbBtn from 'components/MbComponents/MbBtn' -import MbCard from 'components/MbComponents/MbCard/MbCard' export default { name: 'GroupOverlayContent', - components: { MbCard, MbBtn, GroupAcl, GroupAuthor, GroupTitle, MbInputText, MbExpansionItem }, + components: { + GroupAcl, + GroupAuthor, + GroupTitle + }, props: ['data'], data () { return { diff --git a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAcl.vue b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAcl.vue index 54adeb0fb..3fd3072a1 100644 --- a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAcl.vue +++ b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAcl.vue @@ -45,14 +45,8 @@ </template> <script> -import MbNameTag from 'components/MbComponents/MbNameTag' -import MbList from 'components/MbComponents/MbList/MbList' -import MbIconRadioBtn from 'components/MbComponents/MbIconRadioBtn' -import MbBtn from 'components/MbComponents/MbBtn' -import MbCheckbox from 'components/MbComponents/MbCheckbox' export default { name: 'GroupAcl', - components: { MbCheckbox, MbBtn, MbIconRadioBtn, MbList, MbNameTag }, props: ['data'], data () { return { diff --git a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAuthor.vue b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAuthor.vue index 87b1c7ffb..b46dfd798 100644 --- a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAuthor.vue +++ b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupAuthor.vue @@ -7,10 +7,8 @@ </template> <script> -import MbNameTag from 'components/MbComponents/MbNameTag' export default { name: 'GroupAuthor', - components: { MbNameTag }, props: ['data'] } </script> diff --git a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupTitle.vue b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupTitle.vue index ed646d1cb..9ce12253b 100644 --- a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupTitle.vue +++ b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Groups/Sub/GroupTitle.vue @@ -7,10 +7,8 @@ </template> <script> - import MbInputText from 'components/MbComponents/MbInputText' export default { name: 'GroupTitle', - components: { MbInputText }, props: ['data'] } </script> diff --git a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Tags/TagOverlayContent.vue b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Tags/TagOverlayContent.vue index 68cd698c8..9b0c39cfe 100644 --- a/src/components/MbComponents/MbDialogOverlay/OverlayContents/Tags/TagOverlayContent.vue +++ b/src/components/MbComponents/MbDialogOverlay/OverlayContents/Tags/TagOverlayContent.vue @@ -82,18 +82,8 @@ </template> <script> -import MbCarousel from 'components/MbComponents/MbCarousel/MbCarousel' -import MbCarouselSlide from 'components/MbComponents/MbCarousel/MbCarouselSlide' -import MbCard from 'components/MbComponents/MbCard/MbCard' -import MbBtn from 'components/MbComponents/MbBtn' -import MbTableList from 'components/MbComponents/MbTableList/MbTableList' -import MbExpansionItem from 'components/MbComponents/MbExpansionItem' -import MbTooltip from 'components/MbComponents/MbTooltip' -import MbList from 'components/MbComponents/MbList/MbList' - export default { name: 'TagOverlayContent', - components: { MbList, MbTooltip, MbExpansionItem, MbTableList, MbBtn, MbCard, MbCarouselSlide, MbCarousel }, props: ['data'], data () { return { diff --git a/src/components/MbComponents/MbHeadline.vue b/src/components/MbComponents/MbHeadline.vue index ffd1f0ba3..fe10ea629 100644 --- a/src/components/MbComponents/MbHeadline.vue +++ b/src/components/MbComponents/MbHeadline.vue @@ -29,12 +29,11 @@ </template> <script> -import MbTooltip from 'components/MbComponents/MbTooltip' import VClamp from 'vue-clamp' export default { name: 'MbHeadline', - components: { MbTooltip, VClamp }, + components: { VClamp }, props: { title: { type: String, default: undefined }, contentClass: { type: String, default: 'mb-subheadline' }, diff --git a/src/components/MbComponents/MbIconBtn.vue b/src/components/MbComponents/MbIconBtn.vue index b73535270..0b8c8ff48 100644 --- a/src/components/MbComponents/MbIconBtn.vue +++ b/src/components/MbComponents/MbIconBtn.vue @@ -15,10 +15,8 @@ q-btn( </template> <script> -import MbTooltip from 'components/MbComponents/MbTooltip' export default { name: 'MbIconBtn', - components: { MbTooltip }, props: { iconName: { type: String }, active: { type: Boolean, default: false }, diff --git a/src/components/MbComponents/MbIconRadioBtn.vue b/src/components/MbComponents/MbIconRadioBtn.vue index 2c4653bcc..446858eb3 100644 --- a/src/components/MbComponents/MbIconRadioBtn.vue +++ b/src/components/MbComponents/MbIconRadioBtn.vue @@ -11,10 +11,8 @@ div </template> <script> -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'MbIconRadioBtn', - components: { MbIconBtn }, props: ['icons', 'value'], data () { return { diff --git a/src/components/MbComponents/MbList/MbList.vue b/src/components/MbComponents/MbList.vue similarity index 100% rename from src/components/MbComponents/MbList/MbList.vue rename to src/components/MbComponents/MbList.vue diff --git a/src/components/MbComponents/MbMenu.vue b/src/components/MbComponents/MbMenu.vue index 7042e15aa..b3b57e084 100644 --- a/src/components/MbComponents/MbMenu.vue +++ b/src/components/MbComponents/MbMenu.vue @@ -16,10 +16,8 @@ mb-btn(:label="label") </template> <script> -import MbBtn from 'components/MbComponents/MbBtn' export default { name: 'MbMenu', - components: { MbBtn }, props: [ 'label', 'items', diff --git a/src/components/MbComponents/MbNameTag.vue b/src/components/MbComponents/MbNameTag.vue index 87fa77439..2c3db6faf 100644 --- a/src/components/MbComponents/MbNameTag.vue +++ b/src/components/MbComponents/MbNameTag.vue @@ -28,14 +28,8 @@ </template> <script> -import MbTooltip from 'components/MbComponents/MbTooltip' -import MbImg from 'components/MbComponents/MbImg' export default { name: 'MbNameTag', - components: { - MbImg, - MbTooltip - }, props: ['data', 'size', 'editable', 'truncate', 'tooltip', 'hover'], computed: { relativeLuminance () { diff --git a/src/components/MbComponents/MbSwiper/MbSwiper.vue b/src/components/MbComponents/MbSwiper/MbSwiper.vue index af8c66da6..91b62ab04 100644 --- a/src/components/MbComponents/MbSwiper/MbSwiper.vue +++ b/src/components/MbComponents/MbSwiper/MbSwiper.vue @@ -27,12 +27,10 @@ swiper.mb-swiper.q-px-lg( <script> import { Swiper } from 'vue-awesome-swiper' import 'swiper/css/swiper.css' -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'MbSwiper', props: ['slidesPerView'], components: { - MbIconBtn, Swiper }, data () { diff --git a/src/components/MbComponents/MbTable/MbTable.vue b/src/components/MbComponents/MbTable/MbTable.vue index 774536288..6603f6f0e 100644 --- a/src/components/MbComponents/MbTable/MbTable.vue +++ b/src/components/MbComponents/MbTable/MbTable.vue @@ -107,16 +107,8 @@ div </template> <script> -import MbBtn from 'components/MbComponents/MbBtn' -import MbInputText from 'components/MbComponents/MbInputText' -import MbPopupProxy from 'components/MbComponents/MbPopupProxy' -import MbImg from 'components/MbComponents/MbImg' -import MbSelect from 'components/MbComponents/MbSelect' -import MbIconRadioBtn from 'components/MbComponents/MbIconRadioBtn' import MbTd from 'components/MbComponents/MbTable/MbTableData/MbTd' -import MbCard from 'components/MbComponents/MbCard/MbCard' import MbTableProvider from 'components/MbComponents/MbTable/MbTableDataProvider' -import MbDialogOverlay from 'components/MbComponents/MbDialogOverlay/MbDialogOverlay' import GroupOverlayContent from 'components/MbComponents/MbDialogOverlay/OverlayContents/Groups/GroupOverlayContent' export default { @@ -124,15 +116,7 @@ export default { extends: MbTableProvider, components: { GroupOverlayContent, - MbDialogOverlay, - MbCard, - MbTd, - MbIconRadioBtn, - MbSelect, - MbImg, - MbPopupProxy, - MbInputText, - MbBtn + MbTd }, data () { return { diff --git a/src/components/MbComponents/MbTable/MbTableData/CellContents/AclContent.vue b/src/components/MbComponents/MbTable/MbTableData/CellContents/AclContent.vue index e69f8f85d..ac940adb0 100644 --- a/src/components/MbComponents/MbTable/MbTableData/CellContents/AclContent.vue +++ b/src/components/MbComponents/MbTable/MbTableData/CellContents/AclContent.vue @@ -28,13 +28,8 @@ </template> <script> -import MbPopupProxy from 'components/MbComponents/MbPopupProxy' -import MbChip from 'components/MbComponents/MbChip' -import MbBtn from 'components/MbComponents/MbBtn' -import MbNameTag from 'components/MbComponents/MbNameTag' export default { name: 'AclContent', - components: { MbNameTag, MbBtn, MbChip, MbPopupProxy }, props: ['props'], mounted () { // console.log(this.props) diff --git a/src/components/MbComponents/MbTable/MbTableData/CellContents/AuthorContent.vue b/src/components/MbComponents/MbTable/MbTableData/CellContents/AuthorContent.vue index c31553904..981f30383 100644 --- a/src/components/MbComponents/MbTable/MbTableData/CellContents/AuthorContent.vue +++ b/src/components/MbComponents/MbTable/MbTableData/CellContents/AuthorContent.vue @@ -7,10 +7,8 @@ </template> <script> -import MbNameTag from 'components/MbComponents/MbNameTag' export default { name: 'AuthorContent', - components: { MbNameTag }, props: ['props'] } </script> diff --git a/src/components/MbComponents/MbTable/MbTableData/CellContents/PreviewContent.vue b/src/components/MbComponents/MbTable/MbTableData/CellContents/PreviewContent.vue index 00f84ce0b..7285f5ee7 100644 --- a/src/components/MbComponents/MbTable/MbTableData/CellContents/PreviewContent.vue +++ b/src/components/MbComponents/MbTable/MbTableData/CellContents/PreviewContent.vue @@ -19,12 +19,9 @@ </template> <script> - import MbImg from 'components/MbComponents/MbImg' - import MbPopupProxy from 'components/MbComponents/MbPopupProxy' export default { name: 'PreviewContent', - props: ['props'], - components: { MbPopupProxy, MbImg } + props: ['props'] } </script> diff --git a/src/components/MbComponents/MbTable/MbTableData/CellContents/TitleContent.vue b/src/components/MbComponents/MbTable/MbTableData/CellContents/TitleContent.vue index 2fff1f24b..5b3c58766 100644 --- a/src/components/MbComponents/MbTable/MbTableData/CellContents/TitleContent.vue +++ b/src/components/MbComponents/MbTable/MbTableData/CellContents/TitleContent.vue @@ -7,10 +7,8 @@ </template> <script> -import MbHeadline from 'components/MbComponents/MbHeadline' export default { name: 'TitleContent', - components: { MbHeadline }, props: ['props'] } </script> diff --git a/src/components/MbComponents/MbTable/MbTableData/MbTd.vue b/src/components/MbComponents/MbTable/MbTableData/MbTd.vue index e687ed164..c47637d4c 100644 --- a/src/components/MbComponents/MbTable/MbTableData/MbTd.vue +++ b/src/components/MbComponents/MbTable/MbTableData/MbTd.vue @@ -41,7 +41,14 @@ import CollectionsContent from 'components/MbComponents/MbTable/MbTableData/Cell import AuthorContent from 'components/MbComponents/MbTable/MbTableData/CellContents/AuthorContent' export default { name: 'MbTd', - components: { AuthorContent, CollectionsContent, CellContent, AclContent, TitleContent, PreviewContent }, + components: { + AuthorContent, + CollectionsContent, + CellContent, + AclContent, + TitleContent, + PreviewContent + }, props: ['props', 'selectedCollection'], computed: { classObj () { diff --git a/src/components/MbComponents/MbTableList/MbTableList.vue b/src/components/MbComponents/MbTableList/MbTableList.vue index e164982af..0b36b3a87 100644 --- a/src/components/MbComponents/MbTableList/MbTableList.vue +++ b/src/components/MbComponents/MbTableList/MbTableList.vue @@ -94,45 +94,41 @@ </template> <script> - import MbInputText from 'components/MbComponents/MbInputText' - import MbIconBtn from 'components/MbComponents/MbIconBtn' - import MbCard from 'components/MbComponents/MbCard/MbCard' - export default { - name: 'MbTableList', - components: { MbCard, MbIconBtn, MbInputText }, - props: ['data', 'forceGridMode', 'expandable'], - data () { - return { - selected: { - collection: undefined - }, - columns: [ - { name: 'content', field: 'content' }, - { name: 'icons', field: 'icons' } - ], - initialPagination: { - sortBy: 'desc', - descending: false, - page: 2, - rowsPerPage: 0 - // rowsNumber: xx if getting data from a server - }, - filter: undefined +export default { + name: 'MbTableList', + props: ['data', 'forceGridMode', 'expandable'], + data () { + return { + selected: { + collection: undefined + }, + columns: [ + { name: 'content', field: 'content' }, + { name: 'icons', field: 'icons' } + ], + initialPagination: { + sortBy: 'desc', + descending: false, + page: 2, + rowsPerPage: 0 + // rowsNumber: xx if getting data from a server + }, + filter: undefined + } + }, + methods: { + selectCollection (id) { + if (id !== this.selected.collection) { + this.selected.collection = id + this.$emit('selectedCollection', id) } - }, - methods: { - selectCollection (id) { - if (id !== this.selected.collection) { - this.selected.collection = id - this.$emit('selectedCollection', id) - } - else { - this.selected.collection = undefined - this.$emit('selectedCollection', undefined) - } + else { + this.selected.collection = undefined + this.$emit('selectedCollection', undefined) } } } +} </script> <style scoped lang="stylus"> diff --git a/src/components/globals/Navigation/Drawer/NavDrawerContent.vue b/src/components/globals/Navigation/Drawer/NavDrawerContent.vue index 7f1f428f1..284496eef 100644 --- a/src/components/globals/Navigation/Drawer/NavDrawerContent.vue +++ b/src/components/globals/Navigation/Drawer/NavDrawerContent.vue @@ -63,13 +63,9 @@ import NavGlobalSwitches from 'components/globals/Navigation/Drawer/SubComponent import NavFooter from 'components/globals/Navigation/Drawer/SubComponents/NavFooter' import NavActionButtons from 'components/globals/Navigation/Drawer/SubComponents/NavActionButtons' import NavMainLinks from 'components/globals/Navigation/Drawer/SubComponents/NavMainLinks' -import MbLogo from 'components/MbComponents/MbLogo' -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'NavDrawerContent', components: { - MbIconBtn, - MbLogo, NavMainLinks, NavActionButtons, NavFooter, diff --git a/src/components/globals/Navigation/Drawer/SubComponents/GlobalSwitches/ThemeHandler.vue b/src/components/globals/Navigation/Drawer/SubComponents/GlobalSwitches/ThemeHandler.vue index dbfaf6a25..f84d5a075 100644 --- a/src/components/globals/Navigation/Drawer/SubComponents/GlobalSwitches/ThemeHandler.vue +++ b/src/components/globals/Navigation/Drawer/SubComponents/GlobalSwitches/ThemeHandler.vue @@ -8,12 +8,8 @@ </template> <script> -import MbToggle from 'components/MbComponents/MbToggle' export default { name: 'ThemeHandler', - components: { - MbToggle - }, computed: { label () { return this.$q.dark.isActive ? 'Dark' : 'Light' diff --git a/src/components/globals/Navigation/Drawer/SubComponents/NavActionButtons.vue b/src/components/globals/Navigation/Drawer/SubComponents/NavActionButtons.vue index 262c33649..c8628d293 100644 --- a/src/components/globals/Navigation/Drawer/SubComponents/NavActionButtons.vue +++ b/src/components/globals/Navigation/Drawer/SubComponents/NavActionButtons.vue @@ -42,25 +42,19 @@ </template> <script> -import MbIconBtn from 'components/MbComponents/MbIconBtn' -import MbDialog from 'components/MbComponents/MbDialog/MbDialog' import DialogCreateGrid from 'components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateGrid' import DialogCreateTimeline from 'components/MbComponents/MbDialog/DialogContents/Navigation/DialogCreateTimeline' import DialogSelectTimelineLiveAnnotate from 'components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelineLiveAnnotate' import DialogSelectTimelinePostAnnotate from 'components/MbComponents/MbDialog/DialogContents/Navigation/DialogSelectTimelinePostAnnotate' -import MbBtn from 'components/MbComponents/MbBtn' export default { name: 'NavActionButtons', components: { - MbBtn, DialogSelectTimelinePostAnnotate, DialogSelectTimelineLiveAnnotate, DialogCreateTimeline, - DialogCreateGrid, - MbDialog, - MbIconBtn + DialogCreateGrid }, data () { return { diff --git a/src/components/globals/Navigation/Drawer/SubComponents/NavMainLinks.vue b/src/components/globals/Navigation/Drawer/SubComponents/NavMainLinks.vue index 1e184ccba..256ab6afb 100644 --- a/src/components/globals/Navigation/Drawer/SubComponents/NavMainLinks.vue +++ b/src/components/globals/Navigation/Drawer/SubComponents/NavMainLinks.vue @@ -23,10 +23,8 @@ </template> <script> -import MbNameTag from 'components/MbComponents/MbNameTag' export default { name: 'NavigationMainLinks', - components: { MbNameTag }, data () { return { links: [ diff --git a/src/components/globals/Navigation/Toolbar/NavNotifications.vue b/src/components/globals/Navigation/Toolbar/NavNotifications.vue index 8db9b424c..a42c7cc30 100644 --- a/src/components/globals/Navigation/Toolbar/NavNotifications.vue +++ b/src/components/globals/Navigation/Toolbar/NavNotifications.vue @@ -7,15 +7,11 @@ </template> <script> -import MbDialogOverlay from 'components/MbComponents/MbDialogOverlay/MbDialogOverlay' import DialogNavNotifications from 'components/MbComponents/MbDialog/DialogContents/Navigation/DialogNavNotifications' -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'NavNotifications', components: { - MbIconBtn, - DialogNavNotifications, - MbDialogOverlay + DialogNavNotifications }, data () { return { diff --git a/src/components/globals/Navigation/Toolbar/NavToolbar.vue b/src/components/globals/Navigation/Toolbar/NavToolbar.vue index 168bd8668..4d3dbede1 100644 --- a/src/components/globals/Navigation/Toolbar/NavToolbar.vue +++ b/src/components/globals/Navigation/Toolbar/NavToolbar.vue @@ -13,11 +13,9 @@ <script> import NavNotifications from 'components/globals/Navigation/Toolbar/NavNotifications' -import MbIconBtn from 'components/MbComponents/MbIconBtn' export default { name: 'NavToolbar', components: { - MbIconBtn, NavNotifications }, props: ['value'], diff --git a/src/pages/ComponentsOverview/ComponentsOverview.vue b/src/pages/ComponentsOverview/ComponentsOverview.vue index 0b1b122bd..3272b9a7f 100644 --- a/src/pages/ComponentsOverview/ComponentsOverview.vue +++ b/src/pages/ComponentsOverview/ComponentsOverview.vue @@ -869,67 +869,11 @@ </template> <script> -import MbInputText from 'components/MbComponents/MbInputText' -import MbToggle from 'components/MbComponents/MbToggle' -import MbImg from 'components/MbComponents/MbImg' -import MbIconRadioBtn from 'components/MbComponents/MbIconRadioBtn' -import MbIconBtn from 'components/MbComponents/MbIconBtn' -import MbBtnDropdown from 'components/MbComponents/MbBtnDropdown' -import MbCheckbox from 'components/MbComponents/MbCheckbox' -import MbBtn from 'components/MbComponents/MbBtn' -import MbCarousel from 'components/MbComponents/MbCarousel/MbCarousel' -import MbCarouselSlide from 'components/MbComponents/MbCarousel/MbCarouselSlide' -import MbPopupProxy from 'components/MbComponents/MbPopupProxy' -import MbCard from 'components/MbComponents/MbCard/MbCard' -import MbDialog from 'components/MbComponents/MbDialog/MbDialog' -import MbMenu from 'components/MbComponents/MbMenu' -import MbSelect from 'components/MbComponents/MbSelect' -import MbChip from 'components/MbComponents/MbChip' -import MbDialogOverlay from 'components/MbComponents/MbDialogOverlay/MbDialogOverlay' import ComponentBlock from 'pages/ComponentsOverview/ComponentBlock' -import MbList from 'components/MbComponents/MbList/MbList' -import MbHeadline from 'components/MbComponents/MbHeadline' -import MbLogo from 'components/MbComponents/MbLogo' -import MbTooltip from 'components/MbComponents/MbTooltip' -import MbExpansionItem from 'components/MbComponents/MbExpansionItem' -import MbNameTag from 'components/MbComponents/MbNameTag' -import MbTable from 'components/MbComponents/MbTable/MbTable' -import MbTableList from 'components/MbComponents/MbTableList/MbTableList' -import MbSwiper from 'components/MbComponents/MbSwiper/MbSwiper' -import MbSwiperSlide from 'components/MbComponents/MbSwiper/MbSwiperSlide' export default { name: 'ComponentsOverview', - components: { - MbSwiperSlide, - MbSwiper, - MbTableList, - MbTable, - MbNameTag, - MbExpansionItem, - MbTooltip, - MbLogo, - MbHeadline, - MbList, - ComponentBlock, - MbDialogOverlay, - MbCard, - MbChip, - MbDialog, - MbSelect, - MbMenu, - MbPopupProxy, - MbBtn, - MbCheckbox, - MbBtnDropdown, - MbIconBtn, - MbIconRadioBtn, - MbImg, - MbToggle, - MbInputText, - MbCarouselSlide, - MbCarousel - }, + components: { ComponentBlock }, data () { return { collections: [{ -- GitLab From 8805057575bea78eb4c80ff44808d02d22e27567 Mon Sep 17 00:00:00 2001 From: jnbhm <hello@jeanboehm.de> Date: Thu, 8 Jul 2021 13:06:19 +0200 Subject: [PATCH 3/4] Import MbTable --- src/boot/mb-components.js | 3 +++ src/components/MbComponents/MbCard/MbCard.vue | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/boot/mb-components.js b/src/boot/mb-components.js index 49497081f..77ea883ef 100644 --- a/src/boot/mb-components.js +++ b/src/boot/mb-components.js @@ -35,6 +35,8 @@ import MbSwiperSlide from 'src/components/MbComponents/MbSwiper/MbSwiperSlide' import MbTableList from 'src/components/MbComponents/MbTableList/MbTableList' +import MbTable from 'src/components/MbComponents/MbTable/MbTable' + // use single file components Vue.component('mb-btn', MbBtn) Vue.component('mb-btn-dropdown', MbBtnDropdown) @@ -64,3 +66,4 @@ Vue.component('mb-dialog-overlay', MbDialogOverlay) Vue.component('mb-swiper', MbSwiper) Vue.component('mb-swiper-slide', MbSwiperSlide) Vue.component('mb-table-list', MbTableList) +Vue.component('mb-table', MbTable) diff --git a/src/components/MbComponents/MbCard/MbCard.vue b/src/components/MbComponents/MbCard/MbCard.vue index 098be46f2..d56263210 100644 --- a/src/components/MbComponents/MbCard/MbCard.vue +++ b/src/components/MbComponents/MbCard/MbCard.vue @@ -35,9 +35,8 @@ q-card.full-width.bg-transparent(v-if="parsedData" flat ref="card") :data="data" v-model="hover" ) - // MORE BUTTON HAS TO BE LAST Before the Resize Observer ------------------------------------------------------------- - card-more-option(@mouseenter="cacheHover = false" :data="parsedData") + mb-card-more-option(@mouseenter="cacheHover = false" :data="parsedData") // Resize Observer is the last --------------------------------------------------------------------------------------- q-resize-observer(@resize="handleResize") </template> @@ -48,15 +47,17 @@ import CardCollectionsContainer from 'components/MbComponents/MbCard/SubComponen import CardLastUpdateContainer from 'components/MbComponents/MbCard/SubComponents/Containers/CardLastUpdateContainer' import CardAuthorContainer from 'components/MbComponents/MbCard/SubComponents/Containers/CardAuthorContainer' import CardTagContainer from 'components/MbComponents/MbCard/SubComponents/Containers/CardTagContainer' -import CardMoreOption from 'components/MbComponents/MbCard/SubComponents/MbCardMoreOption' +import MbCardMoreOption from 'components/MbComponents/MbCard/SubComponents/MbCardMoreOption' import CardAclContainer from 'components/MbComponents/MbCard/SubComponents/Containers/CardAclContainer' +import MbCardOverlay from 'components/MbComponents/MbCard/SubComponents/MbCardOverlay' export default { name: 'MbCard', extends: MbCardDataProvider, components: { + MbCardOverlay, CardAclContainer, - CardMoreOption, + MbCardMoreOption, CardTagContainer, CardAuthorContainer, CardLastUpdateContainer, -- GitLab From 27d79e87e33c30fad339f8bd8d8145161e9d5a5d Mon Sep 17 00:00:00 2001 From: jnbhm <hello@jeanboehm.de> Date: Tue, 13 Jul 2021 10:18:34 +0200 Subject: [PATCH 4/4] Fixed import --- src/components/MbComponents/MbTable/MbTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/MbComponents/MbTable/MbTable.vue b/src/components/MbComponents/MbTable/MbTable.vue index 6603f6f0e..4ae89d410 100644 --- a/src/components/MbComponents/MbTable/MbTable.vue +++ b/src/components/MbComponents/MbTable/MbTable.vue @@ -108,7 +108,7 @@ div <script> import MbTd from 'components/MbComponents/MbTable/MbTableData/MbTd' -import MbTableProvider from 'components/MbComponents/MbTable/MbTableDataProvider' +import MbTableProvider from 'components/MbComponents/MbTable/mb-table-data-provider' import GroupOverlayContent from 'components/MbComponents/MbDialogOverlay/OverlayContents/Groups/GroupOverlayContent' export default { -- GitLab