diff --git a/demo-angular/.editorconfig b/demo-angular/.editorconfig index 85652768..84ba4fa6 100644 --- a/demo-angular/.editorconfig +++ b/demo-angular/.editorconfig @@ -10,6 +10,10 @@ charset = utf-8 indent_style = space indent_size = 2 +[*.js] +indent_style = space +indent_size = 2 + [*.ts] indent_style = space -indent_size = 4 +indent_size = 2 \ No newline at end of file diff --git a/demo-angular/.gitignore b/demo-angular/.gitignore index 38209fae..1cb1231c 100644 --- a/demo-angular/.gitignore +++ b/demo-angular/.gitignore @@ -3,11 +3,6 @@ hooks/ node_modules/ platforms/ -# NativeScript Template -*.js.map -*.js -!webpack.config.js - # Logs logs *.log diff --git a/demo-angular/.migration_backup/_backup.json b/demo-angular/.migration_backup/_backup.json deleted file mode 100644 index 4fdcc9cc..00000000 --- a/demo-angular/.migration_backup/_backup.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "migration", - "paths": [ - "webpack.config.js", - "package.json", - "tsconfig.tns.json", - "nsconfig.json", - "src/package.json", - "webpack.config.js", - "package.json", - "nsconfig.json", - "src/package.json" - ] -} \ No newline at end of file diff --git a/demo-angular/.migration_backup/nsconfig.json b/demo-angular/.migration_backup/nsconfig.json deleted file mode 100644 index a3f4b5e6..00000000 --- a/demo-angular/.migration_backup/nsconfig.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "appResourcesPath": "App_Resources", - "appPath": "src", - "useLegacyWorkflow": false -} diff --git a/demo-angular/.migration_backup/package.json b/demo-angular/.migration_backup/package.json deleted file mode 100644 index b9aec63f..00000000 --- a/demo-angular/.migration_backup/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "nativescript": { - "id": "org.nativescript.sqliteacces", - "tns-android": { - "version": "6.0.2" - }, - "tns-ios": { - "version": "6.0.2" - } - }, - "description": "NativeScript Application", - "license": "SEE LICENSE IN ", - "repository": "", - "dependencies": { - "nativescript-sqlite-access": "file:../src", - "@angular/animations": "~8.2.0", - "@angular/common": "~8.2.0", - "@angular/compiler": "~8.2.0", - "@angular/core": "~8.2.0", - "@angular/forms": "~8.2.0", - "@angular/platform-browser": "~8.2.0", - "@angular/platform-browser-dynamic": "~8.2.0", - "@angular/router": "~8.2.0", - "nativescript-angular": "~8.2.0", - "nativescript-theme-core": "~1.0.6", - "reflect-metadata": "~0.1.12", - "rxjs": "^6.4.0", - "tns-core-modules": "~6.0.0", - "zone.js": "~0.9.1" - }, - "devDependencies": { - "@angular/compiler-cli": "~8.2.0", - "@ngtools/webpack": "~8.2.0", - "nativescript-dev-webpack": "~1.1.0", - "typescript": "~3.5.3" - }, - "gitHead": "42f2a6a9c94eaf9c68d2a41e0daaa1a2544bc28f", - "readme": "NativeScript Application" -} diff --git a/demo-angular/.migration_backup/src/package.json b/demo-angular/.migration_backup/src/package.json deleted file mode 100644 index baca5e01..00000000 --- a/demo-angular/.migration_backup/src/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "main": "main.js", - "android": { - "v8Flags": "--expose_gc", - "markingMode": "none" - } -} diff --git a/demo-angular/.migration_backup/tsconfig.tns.json b/demo-angular/.migration_backup/tsconfig.tns.json deleted file mode 100644 index 95f2ecee..00000000 --- a/demo-angular/.migration_backup/tsconfig.tns.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig", - "compilerOptions": { - "module": "es2015", - "moduleResolution": "node" - } -} diff --git a/demo-angular/.migration_backup/webpack.config.js b/demo-angular/.migration_backup/webpack.config.js deleted file mode 100644 index e6110ff0..00000000 --- a/demo-angular/.migration_backup/webpack.config.js +++ /dev/null @@ -1,319 +0,0 @@ -const { join, relative, resolve, sep, dirname } = require("path"); - -const webpack = require("webpack"); -const nsWebpack = require("nativescript-dev-webpack"); -const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target"); -const { nsReplaceBootstrap } = require("nativescript-dev-webpack/transformers/ns-replace-bootstrap"); -const { nsReplaceLazyLoader } = require("nativescript-dev-webpack/transformers/ns-replace-lazy-loader"); -const { nsSupportHmrNg } = require("nativescript-dev-webpack/transformers/ns-support-hmr-ng"); -const { getMainModulePath } = require("nativescript-dev-webpack/utils/ast-utils"); -const CleanWebpackPlugin = require("clean-webpack-plugin"); -const CopyWebpackPlugin = require("copy-webpack-plugin"); -const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer"); -const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin"); -const TerserPlugin = require("terser-webpack-plugin"); -const { getAngularCompilerPlugin } = require("nativescript-dev-webpack/plugins/NativeScriptAngularCompilerPlugin"); -const hashSalt = Date.now().toString(); - -module.exports = env => { - // Add your custom Activities, Services and other Android app components here. - const appComponents = [ - "tns-core-modules/ui/frame", - "tns-core-modules/ui/frame/activity", - ]; - - const platform = env && (env.android && "android" || env.ios && "ios"); - if (!platform) { - throw new Error("You need to provide a target platform!"); - } - - const AngularCompilerPlugin = getAngularCompilerPlugin(platform); - const projectRoot = __dirname; - - // Default destination inside platforms//... - const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot)); - - const { - // The 'appPath' and 'appResourcesPath' values are fetched from - // the nsconfig.json configuration file. - appPath = "src", - appResourcesPath = "App_Resources", - - // You can provide the following flags when running 'tns run android|ios' - aot, // --env.aot - snapshot, // --env.snapshot, - production, // --env.production - uglify, // --env.uglify - report, // --env.report - sourceMap, // --env.sourceMap - hiddenSourceMap, // --env.hiddenSourceMap - hmr, // --env.hmr, - unitTesting, // --env.unitTesting - verbose, // --env.verbose - } = env; - - const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap; - const externals = nsWebpack.getConvertedExternals(env.externals); - const appFullPath = resolve(projectRoot, appPath); - const appResourcesFullPath = resolve(projectRoot, appResourcesPath); - const tsConfigName = "tsconfig.tns.json"; - const entryModule = `${nsWebpack.getEntryModule(appFullPath, platform)}.ts`; - const entryPath = `.${sep}${entryModule}`; - const entries = { bundle: entryPath }; - const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("tns-core-modules") > -1); - if (platform === "ios" && !areCoreModulesExternal) { - entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules"; - }; - - const ngCompilerTransformers = []; - const additionalLazyModuleResources = []; - if (aot) { - ngCompilerTransformers.push(nsReplaceBootstrap); - } - - if (hmr) { - ngCompilerTransformers.push(nsSupportHmrNg); - } - - // when "@angular/core" is external, it's not included in the bundles. In this way, it will be used - // directly from node_modules and the Angular modules loader won't be able to resolve the lazy routes - // fixes https://github.com/NativeScript/nativescript-cli/issues/4024 - if (env.externals && env.externals.indexOf("@angular/core") > -1) { - const appModuleRelativePath = getMainModulePath(resolve(appFullPath, entryModule), tsConfigName); - if (appModuleRelativePath) { - const appModuleFolderPath = dirname(resolve(appFullPath, appModuleRelativePath)); - // include the lazy loader inside app module - ngCompilerTransformers.push(nsReplaceLazyLoader); - // include the new lazy loader path in the allowed ones - additionalLazyModuleResources.push(appModuleFolderPath); - } - } - - const ngCompilerPlugin = new AngularCompilerPlugin({ - hostReplacementPaths: nsWebpack.getResolver([platform, "tns"]), - platformTransformers: ngCompilerTransformers.map(t => t(() => ngCompilerPlugin, resolve(appFullPath, entryModule), projectRoot)), - mainPath: join(appFullPath, entryModule), - tsConfigPath: join(__dirname, tsConfigName), - skipCodeGeneration: !aot, - sourceMap: !!isAnySourceMapEnabled, - additionalLazyModuleResources: additionalLazyModuleResources - }); - - let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist); - - const itemsToClean = [`${dist}/**/*`]; - if (platform === "android") { - itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`); - itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`); - } - - nsWebpack.processAppComponents(appComponents, platform); - const config = { - mode: production ? "production" : "development", - context: appFullPath, - externals, - watchOptions: { - ignored: [ - appResourcesFullPath, - // Don't watch hidden files - "**/.*", - ] - }, - target: nativescriptTarget, - entry: entries, - output: { - pathinfo: false, - path: dist, - sourceMapFilename, - libraryTarget: "commonjs2", - filename: "[name].js", - globalObject: "global", - hashSalt - }, - resolve: { - extensions: [".ts", ".js", ".scss", ".css"], - // Resolve {N} system modules from tns-core-modules - modules: [ - resolve(__dirname, "node_modules/tns-core-modules"), - resolve(__dirname, "node_modules"), - "node_modules/tns-core-modules", - "node_modules", - ], - alias: { - '~': appFullPath - }, - symlinks: true - }, - resolveLoader: { - symlinks: false - }, - node: { - // Disable node shims that conflict with NativeScript - "http": false, - "timers": false, - "setImmediate": false, - "fs": "empty", - "__dirname": false, - }, - devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"), - optimization: { - runtimeChunk: "single", - splitChunks: { - cacheGroups: { - vendor: { - name: "vendor", - chunks: "all", - test: (module, chunks) => { - const moduleName = module.nameForCondition ? module.nameForCondition() : ''; - return /[\\/]node_modules[\\/]/.test(moduleName) || - appComponents.some(comp => comp === moduleName); - }, - enforce: true, - }, - } - }, - minimize: !!uglify, - minimizer: [ - new TerserPlugin({ - parallel: true, - cache: true, - sourceMap: isAnySourceMapEnabled, - terserOptions: { - output: { - comments: false, - semicolons: !isAnySourceMapEnabled - }, - compress: { - // The Android SBG has problems parsing the output - // when these options are enabled - 'collapse_vars': platform !== "android", - sequences: platform !== "android", - } - } - }) - ], - }, - module: { - rules: [ - { - include: join(appFullPath, entryPath), - use: [ - // Require all Android app components - platform === "android" && { - loader: "nativescript-dev-webpack/android-app-components-loader", - options: { modules: appComponents } - }, - - { - loader: "nativescript-dev-webpack/bundle-config-loader", - options: { - angular: true, - loadCss: !snapshot, // load the application css if in debug mode - unitTesting, - appFullPath, - projectRoot, - ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform) - } - }, - ].filter(loader => !!loader) - }, - - { test: /\.html$|\.xml$/, use: "raw-loader" }, - - // tns-core-modules reads the app.css and its imports using css-loader - { - test: /[\/|\\]app\.css$/, - use: [ - "nativescript-dev-webpack/style-hot-loader", - { loader: "css-loader", options: { url: false } } - ] - }, - { - test: /[\/|\\]app\.scss$/, - use: [ - "nativescript-dev-webpack/style-hot-loader", - { loader: "css-loader", options: { url: false } }, - "sass-loader" - ] - }, - - // Angular components reference css files and their imports using raw-loader - { test: /\.css$/, exclude: /[\/|\\]app\.css$/, use: "raw-loader" }, - { test: /\.scss$/, exclude: /[\/|\\]app\.scss$/, use: ["raw-loader", "resolve-url-loader", "sass-loader"] }, - - { - test: /(?:\.ngfactory\.js|\.ngstyle\.js|\.ts)$/, - use: [ - "nativescript-dev-webpack/moduleid-compat-loader", - "nativescript-dev-webpack/lazy-ngmodule-hot-loader", - "@ngtools/webpack", - ] - }, - - // Mark files inside `@angular/core` as using SystemJS style dynamic imports. - // Removing this will cause deprecation warnings to appear. - { - test: /[\/\\]@angular[\/\\]core[\/\\].+\.js$/, - parser: { system: true }, - }, - ], - }, - plugins: [ - // Define useful constants like TNS_WEBPACK - new webpack.DefinePlugin({ - "global.TNS_WEBPACK": "true", - "process": "global.process", - }), - // Remove all files from the out dir. - new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }), - // Copy assets to out dir. Add your own globs as needed. - new CopyWebpackPlugin([ - { from: { glob: "fonts/**" } }, - { from: { glob: "**/*.jpg" } }, - { from: { glob: "**/*.png" } }, - ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }), - new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"), - // For instructions on how to set up workers with webpack - // check out https://github.com/nativescript/worker-loader - new NativeScriptWorkerPlugin(), - ngCompilerPlugin, - // Does IPC communication with the {N} CLI to notify events when running in watch mode. - new nsWebpack.WatchStateLoggerPlugin(), - ], - }; - - if (report) { - // Generate report files for bundles content - config.plugins.push(new BundleAnalyzerPlugin({ - analyzerMode: "static", - openAnalyzer: false, - generateStatsFile: true, - reportFilename: resolve(projectRoot, "report", `report.html`), - statsFilename: resolve(projectRoot, "report", `stats.json`), - })); - } - - if (snapshot) { - config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({ - chunk: "vendor", - angular: true, - requireModules: [ - "reflect-metadata", - "@angular/platform-browser", - "@angular/core", - "@angular/common", - "@angular/router", - "nativescript-angular/platform-static", - "nativescript-angular/router", - ], - projectRoot, - webpackConfig: config, - })); - } - - if (hmr) { - config.plugins.push(new webpack.HotModuleReplacementPlugin()); - } - - return config; -}; diff --git a/demo-angular/App_Resources/Android/app.gradle b/demo-angular/App_Resources/Android/app.gradle index bb484214..5b26299f 100644 --- a/demo-angular/App_Resources/Android/app.gradle +++ b/demo-angular/App_Resources/Android/app.gradle @@ -1,19 +1,24 @@ -// Add your native dependencies here: - -// Uncomment to add recyclerview-v7 dependency -//dependencies { -// implementation 'com.android.support:recyclerview-v7:+' -//} - -// If you want to add something to be applied before applying plugins' include.gradle files -// e.g. project.ext.googlePlayServicesVersion = "15.0.1" -// create a file named before-plugins.gradle in the current directory and place it there +// You can add your native dependencies here +dependencies { +// implementation 'androidx.multidex:multidex:2.0.1' +} android { + // compileSdkVersion 32 + // buildToolsVersion "32.0.0" + // ndkVersion "" + defaultConfig { minSdkVersion 17 + // targetSdkVersion 32 + + // Version Information + versionCode 1 + versionName "1.0.0" + generatedDensities = [] } + aaptOptions { additionalParameters "--no-version-vectors" } diff --git a/demo-angular/App_Resources/Android/before-plugins.gradle b/demo-angular/App_Resources/Android/before-plugins.gradle new file mode 100644 index 00000000..9faffb81 --- /dev/null +++ b/demo-angular/App_Resources/Android/before-plugins.gradle @@ -0,0 +1,15 @@ +// this configurations is loaded before building plugins, as well as before building +// the app - this is where you can apply global settings and overrides + +project.ext { + // androidXAppCompat = "1.4.1" + // androidXExifInterface = "1.3.3" + // androidXFragment = "1.4.1" + // androidXMaterial = "1.5.0" + // androidXMultidex = "2.0.1" + // androidXTransition = "1.4.1" + // androidXViewPager = "1.0.0" + + // useKotlin = true + // kotlinVersion = "1.6.0" +} diff --git a/demo-angular/App_Resources/Android/src/main/AndroidManifest.xml b/demo-angular/App_Resources/Android/src/main/AndroidManifest.xml index 1bd6826c..66017732 100644 --- a/demo-angular/App_Resources/Android/src/main/AndroidManifest.xml +++ b/demo-angular/App_Resources/Android/src/main/AndroidManifest.xml @@ -1,8 +1,6 @@ + package="__PACKAGE__"> + + android:theme="@style/AppTheme" + android:hardwareAccelerated="true"> + android:theme="@style/LaunchScreenTheme" + android:hardwareAccelerated="true" + android:launchMode="singleTask" + android:exported="true"> diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png b/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png index eb381c25..bbefbf42 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/background.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/icon.png b/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/icon.png deleted file mode 100644 index 9cde84cd..00000000 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png b/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png index 5218f4c9..e788deb3 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-hdpi/logo.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png b/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png index 748b2adf..f6a08eea 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/background.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/icon.png b/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/icon.png deleted file mode 100644 index 4d6a674b..00000000 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png b/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png index b9e102a7..e4cac1ad 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-ldpi/logo.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png b/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png index efeaf290..0c90f0f7 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/background.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/icon.png b/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/icon.png deleted file mode 100644 index 92ccc85a..00000000 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png b/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png index 62633876..ce3c3a4b 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-mdpi/logo.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png b/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png index 612bbd07..3541570c 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/background.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png b/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png deleted file mode 100644 index 8bcde627..00000000 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png and /dev/null differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png b/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png index ad8ee2f4..88267df0 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png b/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png index 0fa88e23..abb0fc70 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png b/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png deleted file mode 100644 index 9d81c85d..00000000 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png and /dev/null differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png b/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png index 66832783..55800c9a 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png b/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png index c650f643..10897752 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png b/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png deleted file mode 100644 index 9a34d0d4..00000000 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png and /dev/null differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png b/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png index fa6331c8..0703f90f 100644 Binary files a/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png and b/demo-angular/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml b/demo-angular/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml new file mode 100644 index 00000000..fd826a31 --- /dev/null +++ b/demo-angular/App_Resources/Android/src/main/res/drawable/ic_launcher_foreground.xml @@ -0,0 +1,15 @@ + + + + + diff --git a/demo-angular/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/demo-angular/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml new file mode 100644 index 00000000..7353dbd1 --- /dev/null +++ b/demo-angular/App_Resources/Android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/demo-angular/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png b/demo-angular/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..69948d22 Binary files /dev/null and b/demo-angular/App_Resources/Android/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png b/demo-angular/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..90a58cd7 Binary files /dev/null and b/demo-angular/App_Resources/Android/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png b/demo-angular/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..70a2a0d0 Binary files /dev/null and b/demo-angular/App_Resources/Android/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png b/demo-angular/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..1ee5a941 Binary files /dev/null and b/demo-angular/App_Resources/Android/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/demo-angular/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 00000000..66e9d4bb Binary files /dev/null and b/demo-angular/App_Resources/Android/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/demo-angular/App_Resources/Android/src/main/res/values-v21/colors.xml b/demo-angular/App_Resources/Android/src/main/res/values-v21/colors.xml index a64641a9..da5ca2fe 100644 --- a/demo-angular/App_Resources/Android/src/main/res/values-v21/colors.xml +++ b/demo-angular/App_Resources/Android/src/main/res/values-v21/colors.xml @@ -1,4 +1,5 @@ - + - #3d5afe - \ No newline at end of file + + + diff --git a/demo-angular/App_Resources/Android/src/main/res/values-v21/styles.xml b/demo-angular/App_Resources/Android/src/main/res/values-v21/styles.xml index dac8727c..04d8a065 100644 --- a/demo-angular/App_Resources/Android/src/main/res/values-v21/styles.xml +++ b/demo-angular/App_Resources/Android/src/main/res/values-v21/styles.xml @@ -1,23 +1,34 @@ - - + + - + + - \ No newline at end of file + + + + + diff --git a/demo-angular/App_Resources/Android/src/main/res/values-v29/styles.xml b/demo-angular/App_Resources/Android/src/main/res/values-v29/styles.xml new file mode 100644 index 00000000..9a2a79d5 --- /dev/null +++ b/demo-angular/App_Resources/Android/src/main/res/values-v29/styles.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/demo-angular/App_Resources/Android/src/main/res/values/colors.xml b/demo-angular/App_Resources/Android/src/main/res/values/colors.xml index 74ad8829..78c4a519 100644 --- a/demo-angular/App_Resources/Android/src/main/res/values/colors.xml +++ b/demo-angular/App_Resources/Android/src/main/res/values/colors.xml @@ -1,7 +1,14 @@ - + + #F5F5F5 - #757575 - #33B5E5 - #272734 - \ No newline at end of file + + + #757575 + + + #65ADF1 + + + + diff --git a/demo-angular/App_Resources/Android/src/main/res/values/ic_launcher_background.xml b/demo-angular/App_Resources/Android/src/main/res/values/ic_launcher_background.xml new file mode 100644 index 00000000..c5d5899f --- /dev/null +++ b/demo-angular/App_Resources/Android/src/main/res/values/ic_launcher_background.xml @@ -0,0 +1,4 @@ + + + #FFFFFF + \ No newline at end of file diff --git a/demo-angular/App_Resources/Android/src/main/res/values/styles.xml b/demo-angular/App_Resources/Android/src/main/res/values/styles.xml index c793e6d4..4f91b610 100644 --- a/demo-angular/App_Resources/Android/src/main/res/values/styles.xml +++ b/demo-angular/App_Resources/Android/src/main/res/values/styles.xml @@ -10,10 +10,9 @@ @color/ns_accent @drawable/splash_screen - - true - true + true + true - + diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png index a1d7eb47..b46c8bb2 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png index 5797bdef..d73288a7 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png index a0bc5691..c8d24cdc 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png index 851ac65f..1b00c848 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png index bb9b9e86..72a16410 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png index ec609dcf..05ab752b 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png index a9718080..ee720825 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png index 214800ee..2859288b 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png index 8554b88a..88824fa7 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png index a22626ba..02a930cc 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png index a22626ba..d7b077f1 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png index 492c9c8e..2f872dd4 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png index 9208113c..7fb23a70 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png index 24415e5a..cb04c367 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png index b3ef1bf0..e882226b 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index bb3b4a5f..00000000 --- a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "images" : [ - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "2688h", - "filename" : "Default-Portrait-XS-Max.png", - "minimum-system-version" : "12.0", - "orientation" : "portrait", - "scale" : "3x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "2688h", - "filename" : "Default-Landscape-XS-Max.png", - "minimum-system-version" : "12.0", - "orientation" : "landscape", - "scale" : "3x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "1792h", - "filename" : "Default-Portrait-XR.png", - "minimum-system-version" : "12.0", - "orientation" : "portrait", - "scale" : "2x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "1792h", - "filename" : "Default-Landscape-XR.png", - "minimum-system-version" : "12.0", - "orientation" : "landscape", - "scale" : "2x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "2436h", - "filename" : "Default-1125h.png", - "minimum-system-version" : "11.0", - "orientation" : "portrait", - "scale" : "3x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "2436h", - "filename" : "Default-Landscape-X.png", - "minimum-system-version" : "11.0", - "orientation" : "landscape", - "scale" : "3x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "736h", - "filename" : "Default-736h@3x.png", - "minimum-system-version" : "8.0", - "orientation" : "portrait", - "scale" : "3x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "736h", - "filename" : "Default-Landscape@3x.png", - "minimum-system-version" : "8.0", - "orientation" : "landscape", - "scale" : "3x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "667h", - "filename" : "Default-667h@2x.png", - "minimum-system-version" : "8.0", - "orientation" : "portrait", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default@2x.png", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "extent" : "full-screen", - "idiom" : "iphone", - "subtype" : "retina4", - "filename" : "Default-568h@2x.png", - "minimum-system-version" : "7.0", - "orientation" : "portrait", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "filename" : "Default-Portrait.png", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "filename" : "Default-Landscape.png", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "filename" : "Default-Portrait@2x.png", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "filename" : "Default-Landscape@2x.png", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default.png", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default@2x.png", - "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default-568h@2x.png", - "extent" : "full-screen", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "filename" : "Default-Portrait.png", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "filename" : "Default-Landscape.png", - "extent" : "full-screen", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "filename" : "Default-Portrait@2x.png", - "extent" : "full-screen", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "to-status-bar", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "filename" : "Default-Landscape@2x.png", - "extent" : "full-screen", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png deleted file mode 100644 index 2913f85d..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png deleted file mode 100644 index d7f17fcd..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png deleted file mode 100644 index b8841540..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png deleted file mode 100644 index faab4b63..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png deleted file mode 100644 index cd94a3ac..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png deleted file mode 100644 index 686fda12..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XR.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png deleted file mode 100644 index 415e9c86..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-XS-Max.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png deleted file mode 100644 index 3365ba3c..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png deleted file mode 100644 index a44945c1..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png deleted file mode 100644 index e6dca626..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png deleted file mode 100644 index b66a4f2d..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XR.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png deleted file mode 100644 index e34463dd..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait-XS-Max.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png deleted file mode 100644 index 1a500796..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png deleted file mode 100644 index 73d8b920..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png deleted file mode 100644 index 9f1f6ce3..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png deleted file mode 100644 index 514fc5cd..00000000 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png and /dev/null differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png index c293f9c7..cb35cfae 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png index 233693a6..6eefb9a7 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png index a954cc8f..0ef51020 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png index a5a775a2..280c30e0 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png index 154c1934..f984b9e4 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png differ diff --git a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png index b2973b02..95d86f3f 100644 Binary files a/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png and b/demo-angular/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png differ diff --git a/demo-angular/App_Resources/iOS/build.xcconfig b/demo-angular/App_Resources/iOS/build.xcconfig index 4b011849..0d38fe0a 100644 --- a/demo-angular/App_Resources/iOS/build.xcconfig +++ b/demo-angular/App_Resources/iOS/build.xcconfig @@ -1,7 +1,6 @@ // You can add custom settings here // for example you can uncomment the following line to force distribution code signing // CODE_SIGN_IDENTITY = iPhone Distribution -// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html +// To build for device with XCode you need to specify your development team. // DEVELOPMENT_TEAM = YOUR_TEAM_ID; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; -ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; diff --git a/demo-angular/LICENSE b/demo-angular/LICENSE deleted file mode 100644 index 4794b436..00000000 --- a/demo-angular/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright (c) 2015-2019 Progress Software Corporation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/demo-angular/angular.json b/demo-angular/angular.json deleted file mode 100644 index 1fbd4467..00000000 --- a/demo-angular/angular.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "cli": { - "defaultCollection": "@nativescript/schematics" - }, - "projects": { - "hello-world": { - "root": "", - "sourceRoot": "src", - "projectType": "application", - "prefix": "ns" - } - }, - "defaultProject": "hello-world" -} diff --git a/demo-angular/nativescript.config.ts b/demo-angular/nativescript.config.ts index 1821aabf..4dd03d3f 100644 --- a/demo-angular/nativescript.config.ts +++ b/demo-angular/nativescript.config.ts @@ -1,12 +1,11 @@ -import { NativeScriptConfig } from '@nativescript/core' +import { NativeScriptConfig } from '@nativescript/core'; export default { - id: 'org.nativescript.sqliteacces', + id: 'org.nativescript.demoangularb', appPath: 'src', appResourcesPath: 'App_Resources', android: { v8Flags: '--expose_gc', - markingMode: 'none', - }, - useLegacyWorkflow: false, -} as NativeScriptConfig + markingMode: 'none' + } +} as NativeScriptConfig; \ No newline at end of file diff --git a/demo-angular/package.json b/demo-angular/package.json index 340edf2d..723c0da5 100644 --- a/demo-angular/package.json +++ b/demo-angular/package.json @@ -1,32 +1,32 @@ { - "description": "NativeScript Application", - "license": "SEE LICENSE IN ", - "repository": "", + "name": "demo-angularb", + "main": "./src/main.ts", + "version": "1.0.0", + "private": true, "dependencies": { - "@angular/animations": "^12.2.5", - "@angular/common": "^12.2.5", - "@angular/compiler": "^12.2.5", - "@angular/core": "^12.2.5", - "@angular/forms": "^12.2.5", - "@angular/platform-browser": "^12.2.5", - "@angular/platform-browser-dynamic": "^12.2.5", - "@angular/router": "^12.2.5", - "@nativescript/angular": "^12.2.0", - "@nativescript/core": "~8.1.1", + "@angular/animations": "~13.2.0", + "@angular/common": "~13.2.0", + "@angular/compiler": "~13.2.0", + "@angular/core": "~13.2.0", + "@angular/forms": "~13.2.0", + "@angular/platform-browser": "~13.2.0", + "@angular/platform-browser-dynamic": "~13.2.0", + "@angular/router": "~13.2.0", + "@nativescript/angular": "^13.0.0", + "@nativescript/core": "~8.2.0", + "@nativescript/theme": "~3.0.2", "nativescript-sqlite-access": "file:../src", - "nativescript-theme-core": "~1.0.6", - "reflect-metadata": "~0.1.12", - "rxjs": "~7.3.0", - "zone.js": "~0.11.4" + "rxjs": "~7.5.0", + "zone.js": "~0.11.5" }, "devDependencies": { - "@angular/compiler-cli": "^12.2.5", - "@nativescript/android": "8.1.1", - "@nativescript/webpack": "~5.0.0", - "@ngtools/webpack": "^12.2.5", - "typescript": "~4.3.5" - }, - "gitHead": "42f2a6a9c94eaf9c68d2a41e0daaa1a2544bc28f", - "readme": "NativeScript Application", - "main": "./src/main.ts" + "@angular-devkit/build-angular": "~13.2.0", + "@angular/compiler-cli": "~13.2.0", + "@nativescript/android": "8.2.2", + "@nativescript/ios": "8.2.3", + "@nativescript/types": "~8.2.0", + "@nativescript/webpack": "~5.0.6", + "@ngtools/webpack": "~13.2.0", + "typescript": "~4.5.5" + } } diff --git a/demo-angular/references.d.ts b/demo-angular/references.d.ts new file mode 100644 index 00000000..d7433268 --- /dev/null +++ b/demo-angular/references.d.ts @@ -0,0 +1 @@ +/// diff --git a/demo-angular/src/app.css b/demo-angular/src/app.css index d23504c4..ef4958e7 100644 --- a/demo-angular/src/app.css +++ b/demo-angular/src/app.css @@ -6,7 +6,20 @@ selectors and properties you can use to style UI components. /* In many cases you may want to use the NativeScript core theme instead -of writing your own CSS rules. For a full list of class names in the theme -refer to http://docs.nativescript.org/ui/theme. +of writing your own CSS rules. You can learn more about the +NativeScript core theme at https://github.com/nativescript/theme +The imported CSS rules must precede all other types of rules. */ -@import '~nativescript-theme-core/css/core.light.css'; +@import '@nativescript/theme/css/core.css'; +@import '@nativescript/theme/css/default.css'; + +/* Place any CSS rules you want to apply on both iOS and Android here. +This is where the vast majority of your CSS code goes. */ + +/* +The following CSS rule changes the font size of all Buttons that have the +"-primary" class modifier. +*/ +Button.-primary { + font-size: 18; +} diff --git a/demo-angular/src/app/app-routing.module.ts b/demo-angular/src/app/app-routing.module.ts index d8f1bd82..4f109656 100644 --- a/demo-angular/src/app/app-routing.module.ts +++ b/demo-angular/src/app/app-routing.module.ts @@ -1,6 +1,6 @@ -import { NgModule } from "@angular/core"; -import { NativeScriptRouterModule } from "@nativescript/angular"; -import { Routes } from "@angular/router"; +import { NgModule } from '@angular/core' +import { Routes } from '@angular/router' +import { NativeScriptRouterModule } from '@nativescript/angular' import { HomeComponent } from "./home/home.component"; @@ -10,7 +10,7 @@ const routes: Routes = [ ]; @NgModule({ - imports: [NativeScriptRouterModule.forRoot(routes)], - exports: [NativeScriptRouterModule] + imports: [NativeScriptRouterModule.forRoot(routes)], + exports: [NativeScriptRouterModule], }) -export class AppRoutingModule { } +export class AppRoutingModule {} diff --git a/demo-angular/src/app/app.component.html b/demo-angular/src/app/app.component.html index 8a2c1a75..be22686f 100644 --- a/demo-angular/src/app/app.component.html +++ b/demo-angular/src/app/app.component.html @@ -1,2 +1,3 @@ - - + + + diff --git a/demo-angular/src/app/app.component.ts b/demo-angular/src/app/app.component.ts index d88b2fe1..5920b7ac 100644 --- a/demo-angular/src/app/app.component.ts +++ b/demo-angular/src/app/app.component.ts @@ -1,8 +1,7 @@ -import { Component } from "@angular/core"; +import { Component } from '@angular/core' @Component({ - selector: "ns-app", - moduleId: module.id, - templateUrl: "./app.component.html" + selector: 'ns-app', + templateUrl: './app.component.html', }) -export class AppComponent { } +export class AppComponent {} diff --git a/demo-angular/src/app/app.module.ts b/demo-angular/src/app/app.module.ts index 0ed63f34..edcdb9d1 100644 --- a/demo-angular/src/app/app.module.ts +++ b/demo-angular/src/app/app.module.ts @@ -1,34 +1,15 @@ -import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; -import { NativeScriptModule, NativeScriptFormsModule } from "@nativescript/angular"; +import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core' +import { NativeScriptFormsModule, NativeScriptModule } from '@nativescript/angular' -import { AppRoutingModule } from "./app-routing.module"; -import { AppComponent } from "./app.component"; -import { HomeComponent } from "./home/home.component"; - -// Uncomment and add to NgModule imports if you need to use two-way binding - -// Uncomment and add to NgModule imports if you need to use the HttpClient wrapper -// import { NativeScriptHttpClientModule } from "nativescript-angular/http-client"; +import { AppRoutingModule } from './app-routing.module' +import { AppComponent } from './app.component' +import { HomeComponent } from './home/home.component' @NgModule({ - bootstrap: [ - AppComponent - ], - imports: [ - NativeScriptModule, - NativeScriptFormsModule, - AppRoutingModule - ], - declarations: [ - AppComponent, - HomeComponent - ], - providers: [], - schemas: [ - NO_ERRORS_SCHEMA - ] + bootstrap: [AppComponent], + imports: [NativeScriptModule, AppRoutingModule, NativeScriptFormsModule], + declarations: [AppComponent, HomeComponent], + providers: [], + schemas: [NO_ERRORS_SCHEMA], }) -/* -Pass your application module to the bootstrapModule function located in main.ts to start your app -*/ -export class AppModule { } +export class AppModule {} diff --git a/demo-angular/src/app/home/home.component.html b/demo-angular/src/app/home/home.component.html index 161f13a4..14019969 100644 --- a/demo-angular/src/app/home/home.component.html +++ b/demo-angular/src/app/home/home.component.html @@ -1,20 +1,18 @@ - - + - - - + + + - + - diff --git a/demo-angular/src/app/home/home.component.ts b/demo-angular/src/app/home/home.component.ts index ca60c35d..7760ff55 100644 --- a/demo-angular/src/app/home/home.component.ts +++ b/demo-angular/src/app/home/home.component.ts @@ -4,11 +4,10 @@ import { databaseName, creationTableQueries, dropTableQueries, databaseTables } @Component({ selector: "ns-home", - moduleId: module.id, - templateUrl: "./home.component.html" + templateUrl: "home.component.html" }) export class HomeComponent implements OnInit { - items: Array; + items: Array>; text: string = ""; hint: string = 'Name something here'; private db: IDatabase; @@ -33,7 +32,7 @@ export class HomeComponent implements OnInit { } addText() { - let id = this.db.insert(databaseTables.PERSONS, { + this.db.insert(databaseTables.PERSONS, { name: this.text, n: { No: "po' si" }, i: 1 * ++this.updateCounter @@ -62,7 +61,7 @@ export class HomeComponent implements OnInit { reload() { this.db.select(`SELECT * FROM ${databaseTables.PERSONS}`, null).process() .then(result => { - this.items = result; + this.items = result as Array>; }) .catch(err => { console.log(err); @@ -80,7 +79,7 @@ export class HomeComponent implements OnInit { }; this.db.query({ tableName: databaseTables.PERSONS }) - .reduce(reducerFn, {}) + .process(reducerFn, {}) .then(result => { console.log("Reducing.: "); console.log(result); @@ -88,12 +87,11 @@ export class HomeComponent implements OnInit { .catch(console.error); this.db.query({ tableName: databaseTables.PERSONS }) - .map(mapFn) + .process(mapFn) .then(result => { console.log("Mapping.: "); console.log(result); }) .catch(console.error); } - } diff --git a/demo-angular/src/main.ts b/demo-angular/src/main.ts index f442b684..4883e8f9 100644 --- a/demo-angular/src/main.ts +++ b/demo-angular/src/main.ts @@ -1,13 +1,8 @@ -// this import should be first in order to load some required settings (like globals and reflect-metadata) -import { platformNativeScriptDynamic } from "@nativescript/angular"; +import { platformNativeScript, runNativeScriptAngularApp } from '@nativescript/angular'; -import { AppModule } from "./app/app.module"; +import { AppModule } from './app/app.module'; + +runNativeScriptAngularApp({ + appModuleBootstrap: () => platformNativeScript().bootstrapModule(AppModule), +}); -// A traditional NativeScript application starts by initializing global objects, -// setting up global CSS rules, creating, and navigating to the main page. -// Angular applications need to take care of their own initialization: -// modules, components, directives, routes, DI providers. -// A NativeScript Angular app needs to make both paradigms work together, -// so we provide a wrapper platform object, platformNativeScriptDynamic, -// that sets up a NativeScript application and can bootstrap the Angular framework. -platformNativeScriptDynamic().bootstrapModule(AppModule); diff --git a/demo-angular/src/polyfills.ts b/demo-angular/src/polyfills.ts new file mode 100644 index 00000000..05df9622 --- /dev/null +++ b/demo-angular/src/polyfills.ts @@ -0,0 +1,20 @@ +/** + * NativeScript Polyfills + */ + +// Install @nativescript/core polyfills (XHR, setTimeout, requestAnimationFrame) +import '@nativescript/core/globals'; +// Install @nativescript/angular specific polyfills +import '@nativescript/angular/polyfills'; + +/** + * Zone.js and patches + */ +// Add pre-zone.js patches needed for the NativeScript platform +import '@nativescript/zone-js/dist/pre-zone-polyfills'; + +// Zone JS is required by default for Angular itself +import 'zone.js'; + +// Add NativeScript specific Zone JS patches +import '@nativescript/zone-js'; diff --git a/demo-angular/tsconfig.json b/demo-angular/tsconfig.json index 630e93d1..6e523385 100644 --- a/demo-angular/tsconfig.json +++ b/demo-angular/tsconfig.json @@ -1,35 +1,27 @@ { - "compilerOptions": { - "module": "esnext", - "target": "es2017", - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "noEmitHelpers": true, - "noEmitOnError": true, - "lib": [ - "es6", - "dom", - "es2015.iterable", - "es2017" - ], - "baseUrl": ".", - "paths": { - "~/*": [ - "src/*" - ], - "*": [ - "./node_modules/*" - ] - }, - "moduleResolution": "node", - "removeComments": false - }, - "exclude": [ - "node_modules", - "platforms" - ], - "include": [ - "../src", - "**/*" - ] -} \ No newline at end of file + "compilerOptions": { + "module": "esnext", + "target": "es2017", + "moduleResolution": "node", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noEmitHelpers": true, + "noEmitOnError": true, + "skipLibCheck": true, + "lib": ["es2017", "dom"], + "baseUrl": ".", + "paths": { + "~/*": ["src/*"], + "@/*": ["src/*", "./node_modules/*"] + } + }, + "include": [ + "src/tests/**/*.ts", + "src/**/*.ios.ts", + "src/**/*.android.ts", + "/Users/juanchinovas/nativescript/nativescript-sqlite-access/src/sqlite-access.android.ts", + "/Users/juanchinovas/nativescript/nativescript-sqlite-access/src/sqlite-access.ios.ts" + ], + "files": ["./src/main.ts", "./references.d.ts", "./src/polyfills.ts"], + "exclude": ["node_modules", "platforms", "e2e"] +} diff --git a/demo-angular/tsfmt.json b/demo-angular/tsfmt.json deleted file mode 100644 index f9e47f79..00000000 --- a/demo-angular/tsfmt.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "indentSize": 4, - "tabSize": 4 -} diff --git a/demo-svelte/app/components/Home.svelte b/demo-svelte/app/components/Home.svelte index 941dee6b..0b0c8f96 100644 --- a/demo-svelte/app/components/Home.svelte +++ b/demo-svelte/app/components/Home.svelte @@ -27,12 +27,10 @@ import { Template } from "svelte-native/components" import { DbBuilder, IDatabase, DbCreationOptions } from 'nativescript-sqlite-access'; import { version, databaseName, creationTableQueries, dropTableQueries, databaseTables } from "../db-setting"; - let message: string = "Blank Svelte Native App" let text = ''; let updateCounter = 0; - let items = []; + let items: Array> = []; let localDb: IDatabase; - let onMountCallTwice = false; let loading = true; function init() { @@ -58,7 +56,7 @@ reload(); } - function remove(event) { + function remove(event: {index: number}) { localDb.beginTransact(); let test = items[event.index]; let deleted = localDb.delete(databaseTables.PERSONS, '_id=?', [test._id]); @@ -78,19 +76,19 @@ function reload() { if (!localDb) return; - const reducerFn = (acc, next) => { + const reducerFn = (acc: Record, next: Record) => { acc["name"] = acc["name"] || []; - acc["name"].push(next.name); + acc["name"].push(next.name as string); return acc; }; - const mapFn = (next) => { + const mapFn = (next: Record) => { return next.name; }; console.log("------------- as select and reduce -------------"); localDb.select(`SELECT * FROM ${databaseTables.PERSONS}`) - .reduce(reducerFn, {}) + .process(reducerFn, {}) .then(result => { console.log("Reducing.: "); console.log(result); @@ -99,7 +97,7 @@ console.log("------------- as query and map -------------"); localDb.query({tableName: databaseTables.PERSONS}) - .map(mapFn) + .process(mapFn) .then(result => { console.log("Mapping.: "); console.log(result); @@ -108,17 +106,19 @@ console.log("------------- as generator -------------"); - const asGenerator = (localDb as any).queryAsCursor({tableName: databaseTables.PERSONS }); - items = []; - const id = setInterval(() => { - const it = asGenerator.next(); - if(it.done) { - clearInterval(id); - loading = false; - return; - } - items = [].concat(items, [it.value]); - }, 1000); + localDb.query({tableName: databaseTables.PERSONS }).asGenerator() + .then((asGenerator) => { + items = []; + const id = setInterval(() => { + const it = asGenerator.next(); + if(it.done) { + clearInterval(id); + loading = false; + return; + } + items = [].concat(items, [it.value]); + }, 1000); + }); } onMount(init); diff --git a/demo-svelte/package.json b/demo-svelte/package.json index c70542c9..7a020f97 100644 --- a/demo-svelte/package.json +++ b/demo-svelte/package.json @@ -11,6 +11,7 @@ }, "devDependencies": { "@nativescript/android": "8.1.1", + "@nativescript/ios": "8.2.3", "@nativescript/types": "~8.1.1", "@nativescript/webpack": "~5.0.0", "svelte": "~3.44.0", diff --git a/demo-vue/App_Resources/Android/src/main/AndroidManifest.xml b/demo-vue/App_Resources/Android/src/main/AndroidManifest.xml index 1bd256dd..e5423cd3 100644 --- a/demo-vue/App_Resources/Android/src/main/AndroidManifest.xml +++ b/demo-vue/App_Resources/Android/src/main/AndroidManifest.xml @@ -25,7 +25,8 @@ android:name="com.tns.NativeScriptActivity" android:label="@string/title_activity_kimera" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode" - android:theme="@style/LaunchScreenTheme"> + android:theme="@style/LaunchScreenTheme" + android:exported="true"> diff --git a/demo-vue/app/components/Home.vue b/demo-vue/app/components/Home.vue index 38985ed5..075bb1f3 100644 --- a/demo-vue/app/components/Home.vue +++ b/demo-vue/app/components/Home.vue @@ -32,7 +32,7 @@ return { db: null, updateCounter: 0, - items: [],cl + items: [], hint: "Name something here", text: "" } @@ -95,7 +95,7 @@ }; this.db.query({ tableName: databaseTables.PERSONS }) - .reduce(reducerFn, {}) + .process(reducerFn, {}) .then(result => { console.log("Reducing.: "); console.log(result); @@ -103,7 +103,7 @@ .catch(console.error); this.db.query({ tableName: databaseTables.PERSONS }) - .map(mapFn) + .process(mapFn) .then(result => { console.log("Mapping.: "); console.log(result); diff --git a/demo-vue/package.json b/demo-vue/package.json index f3f950b8..063a267f 100644 --- a/demo-vue/package.json +++ b/demo-vue/package.json @@ -10,6 +10,7 @@ }, "devDependencies": { "@nativescript/android": "8.1.1", + "@nativescript/ios": "8.2.3", "@nativescript/webpack": "~5.0.0", "nativescript-vue-template-compiler": "~2.9.0", "sass": "~1.39.0",