@nativescript/template-tab-navigation
Advanced tools
Comparing version 7.0.5 to 8.0.0
@@ -1,4 +0,4 @@ | ||
const { Application } = require("@nativescript/core"); | ||
import { Application } from '@nativescript/core' | ||
Application.run({ moduleName: "app-root" }); | ||
Application.run({ moduleName: 'app-root' }) | ||
@@ -5,0 +5,0 @@ /* |
@@ -1,8 +0,6 @@ | ||
const BrowseViewModel = require("./browse-view-model"); | ||
import { BrowseViewModel } from './browse-view-model' | ||
function onNavigatingTo(args) { | ||
const component = args.object; | ||
component.bindingContext = new BrowseViewModel(); | ||
export function onNavigatingTo(args) { | ||
const component = args.object | ||
component.bindingContext = new BrowseViewModel() | ||
} | ||
exports.onNavigatingTo = onNavigatingTo; |
@@ -1,11 +0,9 @@ | ||
const { fromObject } = require("@nativescript/core"); | ||
import { fromObject } from '@nativescript/core' | ||
function BrowseViewModel() { | ||
const viewModel = fromObject({ | ||
/* Add your view model properties here */ | ||
}); | ||
export function BrowseViewModel() { | ||
const viewModel = fromObject({ | ||
/* Add your view model properties here */ | ||
}) | ||
return viewModel; | ||
return viewModel | ||
} | ||
module.exports = BrowseViewModel; |
@@ -1,16 +0,12 @@ | ||
function onNavigatingTo(args) { | ||
const page = args.object; | ||
export function onNavigatingTo(args) { | ||
const page = args.object | ||
page.bindingContext = args.context; | ||
page.bindingContext = args.context | ||
} | ||
function onBackButtonTap(args) { | ||
const view = args.object; | ||
const page = view.page; | ||
export function onBackButtonTap(args) { | ||
const view = args.object | ||
const page = view.page | ||
page.frame.goBack(); | ||
page.frame.goBack() | ||
} | ||
exports.onNavigatingTo = onNavigatingTo; | ||
exports.onBackButtonTap = onBackButtonTap; | ||
@@ -1,26 +0,23 @@ | ||
const HomeItemsViewModel = require("./home-items-view-model"); | ||
import { HomeItemsViewModel } from './home-items-view-model' | ||
function onNavigatingTo(args) { | ||
const component = args.object; | ||
component.bindingContext = new HomeItemsViewModel(); | ||
export function onNavigatingTo(args) { | ||
const component = args.object | ||
component.bindingContext = new HomeItemsViewModel() | ||
} | ||
function onItemTap(args) { | ||
const view = args.view; | ||
const page = view.page; | ||
const tappedItem = view.bindingContext; | ||
export function onItemTap(args) { | ||
const view = args.view | ||
const page = view.page | ||
const tappedItem = view.bindingContext | ||
page.frame.navigate({ | ||
moduleName: "home/home-item-detail/home-item-detail-page", | ||
context: tappedItem, | ||
animated: true, | ||
transition: { | ||
name: "slide", | ||
duration: 200, | ||
curve: "ease" | ||
} | ||
}); | ||
page.frame.navigate({ | ||
moduleName: 'home/home-item-detail/home-item-detail-page', | ||
context: tappedItem, | ||
animated: true, | ||
transition: { | ||
name: 'slide', | ||
duration: 200, | ||
curve: 'ease', | ||
}, | ||
}) | ||
} | ||
exports.onItemTap = onItemTap; | ||
exports.onNavigatingTo = onNavigatingTo; |
@@ -1,76 +0,74 @@ | ||
const { fromObject } = require("@nativescript/core"); | ||
import { fromObject } from '@nativescript/core' | ||
function HomeItemsViewModel() { | ||
const viewModel = fromObject({ | ||
items: [ | ||
{ | ||
name: "Item 1", | ||
description: "Description for Item 1" | ||
}, | ||
{ | ||
name: "Item 2", | ||
description: "Description for Item 2" | ||
}, | ||
{ | ||
name: "Item 3", | ||
description: "Description for Item 3" | ||
}, | ||
{ | ||
name: "Item 4", | ||
description: "Description for Item 4" | ||
}, | ||
{ | ||
name: "Item 5", | ||
description: "Description for Item 5" | ||
}, | ||
{ | ||
name: "Item 6", | ||
description: "Description for Item 6" | ||
}, | ||
{ | ||
name: "Item 7", | ||
description: "Description for Item 7" | ||
}, | ||
{ | ||
name: "Item 8", | ||
description: "Description for Item 8" | ||
}, | ||
{ | ||
name: "Item 9", | ||
description: "Description for Item 9" | ||
}, | ||
{ | ||
name: "Item 10", | ||
description: "Description for Item 10" | ||
}, | ||
{ | ||
name: "Item 11", | ||
description: "Description for Item 11" | ||
}, | ||
{ | ||
name: "Item 12", | ||
description: "Description for Item 12" | ||
}, | ||
{ | ||
name: "Item 13", | ||
description: "Description for Item 13" | ||
}, | ||
{ | ||
name: "Item 14", | ||
description: "Description for Item 14" | ||
}, | ||
{ | ||
name: "Item 15", | ||
description: "Description for Item 15" | ||
}, | ||
{ | ||
name: "Item 16", | ||
description: "Description for Item 16" | ||
} | ||
] | ||
}); | ||
export function HomeItemsViewModel() { | ||
const viewModel = fromObject({ | ||
items: [ | ||
{ | ||
name: 'Item 1', | ||
description: 'Description for Item 1', | ||
}, | ||
{ | ||
name: 'Item 2', | ||
description: 'Description for Item 2', | ||
}, | ||
{ | ||
name: 'Item 3', | ||
description: 'Description for Item 3', | ||
}, | ||
{ | ||
name: 'Item 4', | ||
description: 'Description for Item 4', | ||
}, | ||
{ | ||
name: 'Item 5', | ||
description: 'Description for Item 5', | ||
}, | ||
{ | ||
name: 'Item 6', | ||
description: 'Description for Item 6', | ||
}, | ||
{ | ||
name: 'Item 7', | ||
description: 'Description for Item 7', | ||
}, | ||
{ | ||
name: 'Item 8', | ||
description: 'Description for Item 8', | ||
}, | ||
{ | ||
name: 'Item 9', | ||
description: 'Description for Item 9', | ||
}, | ||
{ | ||
name: 'Item 10', | ||
description: 'Description for Item 10', | ||
}, | ||
{ | ||
name: 'Item 11', | ||
description: 'Description for Item 11', | ||
}, | ||
{ | ||
name: 'Item 12', | ||
description: 'Description for Item 12', | ||
}, | ||
{ | ||
name: 'Item 13', | ||
description: 'Description for Item 13', | ||
}, | ||
{ | ||
name: 'Item 14', | ||
description: 'Description for Item 14', | ||
}, | ||
{ | ||
name: 'Item 15', | ||
description: 'Description for Item 15', | ||
}, | ||
{ | ||
name: 'Item 16', | ||
description: 'Description for Item 16', | ||
}, | ||
], | ||
}) | ||
return viewModel; | ||
return viewModel | ||
} | ||
module.exports = HomeItemsViewModel; |
@@ -1,8 +0,6 @@ | ||
const SearchViewModel = require("./search-view-model"); | ||
import { SearchViewModel } from './search-view-model' | ||
function onNavigatingTo(args) { | ||
const component = args.object; | ||
component.bindingContext = new SearchViewModel(); | ||
export function onNavigatingTo(args) { | ||
const component = args.object | ||
component.bindingContext = new SearchViewModel() | ||
} | ||
exports.onNavigatingTo = onNavigatingTo; |
@@ -1,11 +0,9 @@ | ||
const { fromObject } = require("@nativescript/core"); | ||
import { fromObject } from '@nativescript/core' | ||
function SearchViewModel() { | ||
const viewModel = fromObject({ | ||
/* Add your view model properties here */ | ||
}); | ||
export function SearchViewModel() { | ||
const viewModel = fromObject({ | ||
/* Add your view model properties here */ | ||
}) | ||
return viewModel; | ||
return viewModel | ||
} | ||
module.exports = SearchViewModel; |
{ | ||
"name": "@nativescript/template-tab-navigation", | ||
"main": "app.js", | ||
"main": "app/app.js", | ||
"displayName": "Tabs", | ||
"templateType": "App template", | ||
"version": "7.0.5", | ||
"version": "8.0.0", | ||
"description": "Tabbed interface template", | ||
@@ -13,2 +13,11 @@ "author": "NativeScript Team <oss@nativescript.org>", | ||
}, | ||
"files": [ | ||
"app", | ||
"App_Resources", | ||
"tools", | ||
"hooks", | ||
"!tools/assets", | ||
".editorconfig", | ||
"jsconfig.json" | ||
], | ||
"keywords": [ | ||
@@ -37,7 +46,7 @@ "nstudio", | ||
"dependencies": { | ||
"@nativescript/core": "~7.1.0", | ||
"@nativescript/theme": "~2.3.0" | ||
"@nativescript/core": "~8.0.0", | ||
"@nativescript/theme": "~3.0.1" | ||
}, | ||
"devDependencies": { | ||
"@nativescript/webpack": "~4.0.0", | ||
"@nativescript/webpack": "5.0.0-beta.0", | ||
"eslint": "~7.7.0", | ||
@@ -44,0 +53,0 @@ "sass": "^1.32.8" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
394119
22
140
1
+ Added@nativescript/core@8.0.11(transitive)
+ Added@nativescript/theme@3.0.2(transitive)
- Removed@nativescript/core@7.1.4(transitive)
- Removed@nativescript/theme@2.3.4(transitive)
Updated@nativescript/core@~8.0.0
Updated@nativescript/theme@~3.0.1