Skip to content

Commit

Permalink
Import vuetify components so they can be externalized by rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
dopenguin committed Mar 8, 2024
1 parent 63509e4 commit 5955aae
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# CHANGELOG

## unpublished
## 2.0.0-alpha.5

- Fix: Remove vuetify plugin for rollup.
- Fix: Import vuetify components so they can be externalized by rollup.

## 2.0.0-alpha.5

Expand Down
1 change: 1 addition & 0 deletions packages/core/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const external = createFilter(
'olcs',
'vue',
'vuetify',
'vuetify/lib/components',
'vuex',
],
null,
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/components/MapContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import Hammer from 'hammerjs'
import i18next from 'i18next'
import { defaults } from 'ol/interaction'
import { LanguageOption, MoveHandleProperties } from '@polar/lib-custom-types'
import { VApp } from 'vuetify/lib/components'
import { SMALL_DISPLAY_HEIGHT, SMALL_DISPLAY_WIDTH } from '../utils/constants'
import { addClusterStyle } from '../utils/addClusterStyle'
import MapUi from './MapUi.vue'
Expand All @@ -62,6 +63,7 @@ export default Vue.extend({
components: {
MapUi,
MoveHandle,
VApp,
},
props: {
mapConfiguration: {
Expand Down
8 changes: 8 additions & 0 deletions packages/core/src/components/MoveHandle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
import Vue from 'vue'
import { mapGetters, mapMutations } from 'vuex'
import { VBtn, VCardActions, VIcon, VSpacer } from 'vuetify/lib/components'
type EndEventName = 'touchend' | 'mouseup'
type MoveEventName = 'touchmove' | 'mousemove'
interface MoveEventNames {
Expand Down Expand Up @@ -53,6 +55,12 @@ function calculateTop(
export default Vue.extend({
name: 'MoveHandle',
components: {
VBtn,
VCardActions,
VIcon,
VSpacer,
},
props: {
closeLabel: {
type: String,
Expand Down
3 changes: 2 additions & 1 deletion packages/plugins/AddressSearch/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# CHANGELOG

## unpublished
## 2.0.0-alpha.3

- Fix: Remove vuetify plugin for rollup.
- - Fix: Import vuetify components so they can be externalized by rollup.

## 2.0.0-alpha.2

Expand Down
1 change: 1 addition & 0 deletions packages/plugins/AddressSearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@repositoryname/vuex-generators": "^1.1.2",
"ol": "7.1.0",
"vue": "^2.6.14",
"vuetify": "^2.5.9",
"vuex": "^3.6.2"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/plugins/AddressSearch/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const external = createFilter(
'lodash.debounce',
'ol/**',
'vue',
'vuetify/lib/components',
'vuex',
],
null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<script lang="ts">
import Vue from 'vue'
import { VContainer, VToolbar } from 'vuetify/lib/components'
import { mapGetters } from 'vuex'
import GroupSelect from './GroupSelect.vue'
import Results from './Results.vue'
Expand All @@ -25,6 +26,8 @@ export default Vue.extend({
GroupSelect,
SearchInput,
Results,
VContainer,
VToolbar,
},
computed: {
...mapGetters(['clientWidth', 'hasSmallWidth', 'hasWindowSize']),
Expand Down
4 changes: 4 additions & 0 deletions packages/plugins/AddressSearch/src/components/GroupSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@

<script lang="ts">
import Vue from 'vue'
import { VSelect } from 'vuetify/lib/components'
import { mapGetters, mapActions } from 'vuex'
export default Vue.extend({
name: 'AddressSearchGroupSelect',
components: {
VSelect,
},
computed: {
...mapGetters('plugin/addressSearch', [
'selectedGroupId',
Expand Down
4 changes: 4 additions & 0 deletions packages/plugins/AddressSearch/src/components/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@

<script lang="ts">
import Vue from 'vue'
import { VTextField } from 'vuetify/lib/components'
import { mapActions, mapGetters } from 'vuex'
import { focusFirstResult } from '../utils/focusFirstResult'
export default Vue.extend({
name: 'AddressSearchInput',
components: {
VTextField,
},
computed: {
...mapGetters('plugin/addressSearch', [
'featureListsWithCategory',
Expand Down
16 changes: 16 additions & 0 deletions packages/plugins/AddressSearch/src/components/Results.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,28 @@

<script lang="ts">
import Vue from 'vue'
import {
VBtn,
VCard,
VIcon,
VList,
VListItem,
VSubheader,
} from 'vuetify/lib/components'
import { mapGetters, mapActions } from 'vuex'
import { focusFirstResult } from '../utils/focusFirstResult'
import { emTitleByInput } from '../utils/emTitleByInput'
export default Vue.extend({
name: 'AddressSearchResults',
components: {
VBtn,
VCard,
VIcon,
VList,
VListItem,
VSubheader,
},
data: () => ({
openCategories: [] as string[],
}),
Expand Down

0 comments on commit 5955aae

Please sign in to comment.