@nativescript/template-drawer-navigation-vue 9.0.2 → 9.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,14 +9,15 @@
9
9
  </Drawer>
10
10
  </template>
11
11
 
12
- <script>
12
+ <script lang="ts">
13
+ import { defineComponent } from 'nativescript-vue'
13
14
  import DrawerContent from './DrawerContent.vue'
14
15
  import Home from './Home.vue'
15
16
 
16
- export default {
17
+ export default defineComponent({
17
18
  components: {
18
19
  DrawerContent,
19
20
  Home
20
21
  }
21
- }
22
+ })
22
23
  </script>
@@ -14,14 +14,15 @@
14
14
  </Page>
15
15
  </template>
16
16
 
17
- <script>
17
+ <script lang="ts">
18
+ import { defineComponent } from 'nativescript-vue'
18
19
  import * as utils from '~/shared/utils'
19
20
 
20
- export default {
21
+ export default defineComponent({
21
22
  methods: {
22
23
  onDrawerButtonTap() {
23
24
  utils.showDrawer()
24
25
  }
25
26
  }
26
- }
27
+ })
27
28
  </script>
@@ -49,8 +49,8 @@
49
49
  </GridLayout>
50
50
  </template>
51
51
 
52
- <script>
53
- import { $navigateTo } from 'nativescript-vue'
52
+ <script lang="ts">
53
+ import { defineComponent, $navigateTo } from 'nativescript-vue'
54
54
  import * as utils from '~/shared/utils'
55
55
  import Home from './Home.vue'
56
56
  import Browse from './Browse.vue'
@@ -58,14 +58,14 @@
58
58
  import Search from './Search.vue'
59
59
  import Settings from './Settings.vue'
60
60
 
61
- export default {
61
+ export default defineComponent({
62
62
  data() {
63
63
  return {
64
64
  selectedPage: 'Home'
65
65
  }
66
66
  },
67
67
  methods: {
68
- onNavigationItemTap(component, pageName) {
68
+ onNavigationItemTap(component: any, pageName: string) {
69
69
  this.selectedPage = pageName
70
70
  $navigateTo(component, {
71
71
  clearHistory: true
@@ -73,5 +73,5 @@
73
73
  utils.closeDrawer()
74
74
  }
75
75
  }
76
- }
76
+ })
77
77
  </script>
@@ -14,14 +14,15 @@
14
14
  </Page>
15
15
  </template>
16
16
 
17
- <script>
17
+ <script lang="ts">
18
+ import { defineComponent } from 'nativescript-vue'
18
19
  import * as utils from '~/shared/utils'
19
20
 
20
- export default {
21
+ export default defineComponent({
21
22
  methods: {
22
23
  onDrawerButtonTap() {
23
24
  utils.showDrawer()
24
25
  }
25
26
  }
26
- }
27
+ })
27
28
  </script>
@@ -14,14 +14,15 @@
14
14
  </Page>
15
15
  </template>
16
16
 
17
- <script>
17
+ <script lang="ts">
18
+ import { defineComponent } from 'nativescript-vue'
18
19
  import * as utils from '~/shared/utils'
19
20
 
20
- export default {
21
+ export default defineComponent({
21
22
  methods: {
22
23
  onDrawerButtonTap() {
23
24
  utils.showDrawer()
24
25
  }
25
26
  }
26
- }
27
+ })
27
28
  </script>
@@ -14,14 +14,15 @@
14
14
  </Page>
15
15
  </template>
16
16
 
17
- <script>
17
+ <script lang="ts">
18
+ import { defineComponent } from 'nativescript-vue'
18
19
  import * as utils from '~/shared/utils'
19
20
 
20
- export default {
21
+ export default defineComponent({
21
22
  methods: {
22
23
  onDrawerButtonTap() {
23
24
  utils.showDrawer()
24
25
  }
25
26
  }
26
- }
27
+ })
27
28
  </script>
@@ -14,14 +14,15 @@
14
14
  </Page>
15
15
  </template>
16
16
 
17
- <script>
17
+ <script lang="ts">
18
+ import { defineComponent } from 'nativescript-vue'
18
19
  import * as utils from '~/shared/utils'
19
20
 
20
- export default {
21
+ export default defineComponent({
21
22
  methods: {
22
23
  onDrawerButtonTap() {
23
24
  utils.showDrawer()
24
25
  }
25
26
  }
26
- }
27
+ })
27
28
  </script>
@@ -1,14 +1,14 @@
1
1
  import { Application } from '@nativescript/core'
2
2
 
3
3
  export const showDrawer = () => {
4
- const root = Application.getRootView()
4
+ const root: any = Application.getRootView()
5
5
  if (root && root.open) {
6
6
  root.open()
7
7
  }
8
8
  }
9
9
 
10
10
  export const closeDrawer = () => {
11
- const root = Application.getRootView()
11
+ const root: any = Application.getRootView()
12
12
  if (root && root.close) {
13
13
  root.close()
14
14
  }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@nativescript/template-drawer-navigation-vue",
3
- "main": "app/app.js",
3
+ "main": "app/app.ts",
4
4
  "displayName": "Navigation Drawer",
5
5
  "templateType": "App template",
6
- "version": "9.0.2",
6
+ "version": "9.0.4",
7
7
  "description": "Side navigation template using Vue.",
8
8
  "author": "NativeScript Team <oss@nativescript.org>",
9
9
  "license": "Apache-2.0",
@@ -17,7 +17,8 @@
17
17
  "tools",
18
18
  "!tools/assets",
19
19
  ".editorconfig",
20
- "jsconfig.json"
20
+ "types",
21
+ "tsconfig.json"
21
22
  ],
22
23
  "keywords": [
23
24
  "nstudio",
@@ -42,12 +43,15 @@
42
43
  },
43
44
  "dependencies": {
44
45
  "@nativescript/core": "~9.0.0",
45
- "@nativescript-community/ui-drawer": "^1.0.0",
46
+ "@nativescript-community/ui-drawer": "^0.1.31",
46
47
  "nativescript-vue": "^3.0.0"
47
48
  },
48
49
  "devDependencies": {
49
50
  "@nativescript/tailwind": "^4.0.0",
51
+ "@nativescript/types": "~9.0.0",
50
52
  "@nativescript/webpack": "~5.0.31",
51
- "tailwindcss": "^4.0.0"
53
+ "@types/node": "^20.0.0",
54
+ "tailwindcss": "^4.0.0",
55
+ "typescript": "~5.8.0"
52
56
  }
53
57
  }
package/tsconfig.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "target": "ES2020",
5
+ "module": "esnext",
6
+ "moduleResolution": "bundler",
7
+ "lib": ["dom", "ESNext"],
8
+ "sourceMap": true,
9
+ "noEmitHelpers": true,
10
+ "importHelpers": true,
11
+ "baseUrl": ".",
12
+ "paths": {
13
+ "~/*": ["app/*"],
14
+ "@/*": ["app/*"]
15
+ },
16
+ "typeRoots": ["types"],
17
+ "types": ["node"],
18
+ "allowSyntheticDefaultImports": true,
19
+ "esModuleInterop": true,
20
+ "experimentalDecorators": true,
21
+ "emitDecoratorMetadata": true,
22
+ "skipLibCheck": true
23
+ },
24
+ "include": ["app", "types"],
25
+ "exclude": ["node_modules", "platforms"]
26
+ }
@@ -0,0 +1 @@
1
+ /// <reference path="../node_modules/@nativescript/types/index.d.ts" />
@@ -0,0 +1,5 @@
1
+ declare module '*.vue' {
2
+ import { DefineComponent } from 'nativescript-vue'
3
+ const component: DefineComponent<{}, {}, any>
4
+ export default component
5
+ }
package/jsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "baseUrl": "./",
4
- "paths": {
5
- "~/*": ["app/*"],
6
- "@/*": ["app/*"]
7
- }
8
- },
9
- "include": ["app/**/*"]
10
- }
File without changes