├── .gitignore
├── demo
├── tsfmt.json
├── types
│ ├── references.d.ts
│ └── shims.svelte.d.ts
├── app
│ ├── App_Resources
│ │ ├── iOS
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── Contents.json
│ │ │ │ ├── AppIcon.appiconset
│ │ │ │ │ ├── icon-20.png
│ │ │ │ │ ├── icon-29.png
│ │ │ │ │ ├── icon-40.png
│ │ │ │ │ ├── icon-76.png
│ │ │ │ │ ├── icon-1024.png
│ │ │ │ │ ├── icon-20@2x.png
│ │ │ │ │ ├── icon-20@3x.png
│ │ │ │ │ ├── icon-29@2x.png
│ │ │ │ │ ├── icon-29@3x.png
│ │ │ │ │ ├── icon-40@2x.png
│ │ │ │ │ ├── icon-40@3x.png
│ │ │ │ │ ├── icon-60@2x.png
│ │ │ │ │ ├── icon-60@3x.png
│ │ │ │ │ ├── icon-76@2x.png
│ │ │ │ │ ├── icon-83.5@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ ├── LaunchScreen.Center.imageset
│ │ │ │ │ ├── LaunchScreen-Center.png
│ │ │ │ │ ├── LaunchScreen-Center@2x.png
│ │ │ │ │ ├── LaunchScreen-Center@3x.png
│ │ │ │ │ └── Contents.json
│ │ │ │ └── LaunchScreen.AspectFill.imageset
│ │ │ │ │ ├── LaunchScreen-AspectFill.png
│ │ │ │ │ ├── LaunchScreen-AspectFill@2x.png
│ │ │ │ │ ├── LaunchScreen-AspectFill@3x.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── menu.png
│ │ │ ├── menu@2x.png
│ │ │ ├── menu@3x.png
│ │ │ ├── build.xcconfig
│ │ │ ├── Info.plist
│ │ │ └── LaunchScreen.storyboard
│ │ └── Android
│ │ │ ├── src
│ │ │ └── main
│ │ │ │ ├── res
│ │ │ │ ├── values-v21
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ ├── drawable-hdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ ├── menu.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-ldpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-mdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ ├── menu.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-xhdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ ├── menu.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-xxhdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ ├── menu.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── drawable-xxxhdpi
│ │ │ │ │ ├── icon.png
│ │ │ │ │ ├── logo.png
│ │ │ │ │ ├── menu.png
│ │ │ │ │ └── background.png
│ │ │ │ ├── values
│ │ │ │ │ ├── colors.xml
│ │ │ │ │ └── styles.xml
│ │ │ │ └── drawable-nodpi
│ │ │ │ │ └── splash_screen.xml
│ │ │ │ └── AndroidManifest.xml
│ │ │ └── app.gradle
│ ├── fonts
│ │ ├── fa-solid-900.ttf
│ │ ├── fa-brands-400.ttf
│ │ ├── fa-regular-400.ttf
│ │ └── LICENSE.txt
│ ├── Header.svelte
│ ├── Nav.ts
│ ├── app.ts
│ ├── app.css
│ ├── pages
│ │ ├── GaugePage.svelte
│ │ ├── AutoCompletePage.svelte
│ │ ├── CalendarPage.svelte
│ │ ├── ChartPage.svelte
│ │ ├── DataFormPage.svelte
│ │ └── ListViewPage.svelte
│ └── App.svelte
├── .editorconfig
├── svelte.config.js
├── nativescript.config.ts
├── assets
│ └── icons
│ │ ├── menu.svg
│ │ └── LICENSE
├── webpack.config.js
├── .gitignore
├── tsconfig.json
├── package.json
└── build-assets.js
├── svelte-native-nativescript-ui.gif
├── scripts
├── export-types.cmd
└── create-pkg.js
├── tsconfig.json
├── src
├── calendar
│ └── index.ts
├── sidedrawer
│ └── index.ts
├── svelte-native-jsx-nativescript-ui-sidedrawer.d.ts
├── gauge
│ └── index.ts
├── dataform
│ └── index.ts
├── chart
│ └── index.ts
├── svelte-native-jsx-nativescript-ui-autocomplete.d.ts
├── autocomplete
│ └── index.ts
├── listview
│ └── index.ts
├── svelte-native-jsx-nativescript-ui-listview.d.ts
├── svelte-native-jsx-nativescript-ui-gauge.d.ts
├── svelte-native-jsx-nativescript-ui-dataform.d.ts
├── svelte-native-jsx-nativescript-ui-calendar.d.ts
└── svelte-native-jsx-nativescript-ui-chart.d.ts
├── CHANGELOG.md
├── rollup.config.js
├── LICENSE
├── package.json
└── Readme.md
/.gitignore:
--------------------------------------------------------------------------------
1 | dist/
2 | node_modules/
3 |
--------------------------------------------------------------------------------
/demo/tsfmt.json:
--------------------------------------------------------------------------------
1 | {
2 | "indentSize": 4,
3 | "tabSize": 4
4 | }
5 |
--------------------------------------------------------------------------------
/demo/types/references.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/demo/types/shims.svelte.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.svelte' {
2 | export { SvelteComponent as default };
3 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/demo/app/fonts/fa-solid-900.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/fonts/fa-solid-900.ttf
--------------------------------------------------------------------------------
/demo/app/fonts/fa-brands-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/fonts/fa-brands-400.ttf
--------------------------------------------------------------------------------
/demo/app/fonts/fa-regular-400.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/fonts/fa-regular-400.ttf
--------------------------------------------------------------------------------
/svelte-native-nativescript-ui.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/svelte-native-nativescript-ui.gif
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/menu.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/menu@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/menu@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/menu@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/menu@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3d5afe
4 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/menu.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/menu.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/menu.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/menu.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/logo.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/menu.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-hdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-ldpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-mdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/Android/src/main/res/drawable-xxxhdpi/background.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@3x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/halfnelson/svelte-native-nativescript-ui/HEAD/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@3x.png
--------------------------------------------------------------------------------
/demo/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | end_of_line = lf
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 | charset = utf-8
8 |
9 | [*.json]
10 | indent_style = space
11 | indent_size = 2
12 |
13 | [*.ts]
14 | indent_style = space
15 | indent_size = 4
16 |
--------------------------------------------------------------------------------
/demo/svelte.config.js:
--------------------------------------------------------------------------------
1 | const sveltePreprocess = require('svelte-preprocess')
2 | const svelteNativePreprocessor = require('svelte-native-preprocessor')
3 |
4 | module.exports = {
5 | compilerOptions: {
6 | namespace: "foreign"
7 | },
8 | preprocess: [ sveltePreprocess(), svelteNativePreprocessor() ]
9 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #F5F5F5
4 | #757575
5 | #33B5E5
6 | #272734
7 |
--------------------------------------------------------------------------------
/demo/nativescript.config.ts:
--------------------------------------------------------------------------------
1 | import { NativeScriptConfig } from '@nativescript/core'
2 |
3 | export default {
4 | id: 'technology.sveltenative.template',
5 | appResourcesPath: 'app/App_Resources',
6 | android: {
7 | v8Flags: '--expose_gc',
8 | markingMode: 'none',
9 | },
10 | appPath: 'app',
11 | } as NativeScriptConfig
12 |
--------------------------------------------------------------------------------
/demo/assets/icons/menu.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/build.xcconfig:
--------------------------------------------------------------------------------
1 | // You can add custom settings here
2 | // for example you can uncomment the following line to force distribution code signing
3 | // CODE_SIGN_IDENTITY = iPhone Distribution
4 | // To build for device with XCode you need to specify your development team.
5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID;
6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/drawable-nodpi/splash_screen.xml:
--------------------------------------------------------------------------------
1 |
2 | -
3 |
4 |
5 | -
6 |
7 |
8 |
--------------------------------------------------------------------------------
/demo/webpack.config.js:
--------------------------------------------------------------------------------
1 | const webpack = require("@nativescript/webpack");
2 |
3 | module.exports = (env) => {
4 | webpack.init(env);
5 |
6 | // Learn how to customize:
7 | // https://docs.nativescript.org/webpack
8 | webpack.chainWebpack(conf => {
9 | conf.resolve.alias.set('svelte$', 'svelte/internal')
10 | })
11 |
12 | return webpack.resolveConfig();
13 | };
14 |
15 |
16 |
--------------------------------------------------------------------------------
/demo/app/Header.svelte:
--------------------------------------------------------------------------------
1 |
2 | {#if isAndroid}
3 |
4 | {:else}
5 |
6 | {/if}
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/scripts/export-types.cmd:
--------------------------------------------------------------------------------
1 | cd "%~dp0"
2 | cd ..\src
3 | call ..\node_modules\.bin\export-jsx nativescript-ui-autocomplete
4 | call ..\node_modules\.bin\export-jsx nativescript-ui-calendar
5 | call ..\node_modules\.bin\export-jsx nativescript-ui-chart
6 | call ..\node_modules\.bin\export-jsx nativescript-ui-dataform
7 | call ..\node_modules\.bin\export-jsx nativescript-ui-gauge
8 | call ..\node_modules\.bin\export-jsx nativescript-ui-listview
9 | call ..\node_modules\.bin\export-jsx nativescript-ui-sidedrawer
--------------------------------------------------------------------------------
/demo/.gitignore:
--------------------------------------------------------------------------------
1 | # NativeScript
2 | hooks/
3 | node_modules/
4 | platforms/
5 |
6 | # NativeScript Template
7 | *.js.map
8 |
9 | # Logs
10 | logs
11 | *.log
12 | npm-debug.log*
13 | yarn-debug.log*
14 | yarn-error.log*
15 |
16 | # General
17 | .DS_Store
18 | .AppleDouble
19 | .LSOverride
20 | .idea
21 | .cloud
22 | .project
23 | tmp/
24 | typings/
25 |
26 | # Visual Studio Code
27 | .vscode/*
28 | !.vscode/settings.json
29 | !.vscode/tasks.json
30 | !.vscode/launch.json
31 | !.vscode/extensions.json
32 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-Center.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-Center@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchScreen-Center@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchScreen-AspectFill.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchScreen-AspectFill@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchScreen-AspectFill@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "baseUrl": ".",
4 | "paths": { "*": ["types/*"] },
5 | "declaration": true,
6 | "declarationDir": "./dist",
7 | "module": "es2015",
8 | "noImplicitAny": true,
9 | "outDir": "./dist",
10 | "target": "ES2017",
11 | "moduleResolution": "node",
12 | "allowSyntheticDefaultImports": false,
13 | "esModuleInterop": false,
14 | "types": [
15 | "./node_modules/svelte-native"
16 | ]
17 | },
18 | "include": [
19 | "src/**/*"
20 | ],
21 | "exclude": ["node_modules"]
22 | }
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/app.gradle:
--------------------------------------------------------------------------------
1 | // Add your native dependencies here:
2 |
3 | // Uncomment to add recyclerview-v7 dependency
4 | //dependencies {
5 | // implementation 'com.android.support:recyclerview-v7:+'
6 | //}
7 |
8 | // If you want to add something to be applied before applying plugins' include.gradle files
9 | // e.g. project.ext.googlePlayServicesVersion = "15.0.1"
10 | // create a file named before-plugins.gradle in the current directory and place it there
11 |
12 | android {
13 | defaultConfig {
14 | minSdkVersion 17
15 | generatedDensities = []
16 | }
17 | aaptOptions {
18 | additionalParameters "--no-version-vectors"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/calendar/index.ts:
--------------------------------------------------------------------------------
1 | import { registerElement } from 'svelte-native/dom'
2 | import { NativeViewElementNode } from "svelte-native/dom";
3 | import { RadCalendar } from 'nativescript-ui-calendar';
4 |
5 | export default class RadCalendarElement extends NativeViewElementNode {
6 | constructor() {
7 | super('radCalendar', RadCalendar);
8 | }
9 | navigateForward() {
10 | this.nativeView.navigateForward();
11 | }
12 |
13 | navigateBack() {
14 | this.nativeView.navigateBack();
15 | }
16 |
17 | goToDate(date:Date) {
18 | this.nativeView.goToDate(date);
19 | }
20 |
21 | static register() {
22 | registerElement('radCalendar', () => new RadCalendarElement());
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/demo/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "strict": true,
4 | "target": "es2017",
5 | "module": "esnext",
6 | "moduleResolution": "node",
7 | "lib": ["dom", "es2017"],
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 | }
27 |
--------------------------------------------------------------------------------
/demo/app/Nav.ts:
--------------------------------------------------------------------------------
1 | import { navigate } from 'svelte-native'
2 | import { writable } from 'svelte/store'
3 | import RadSideDrawerElement from 'svelte-native-nativescript-ui/sidedrawer';
4 | import { FrameElement } from 'svelte-native/dom';
5 |
6 | export let current_page = writable(undefined);
7 | let nav_frame: FrameElement
8 | let drawer: RadSideDrawerElement;
9 |
10 | export function init(navFrame: FrameElement, navDrawer: RadSideDrawerElement, startPage: typeof SvelteComponent) {
11 | nav_frame = navFrame;
12 | drawer = navDrawer;
13 | current_page.set(startPage)
14 | }
15 |
16 | export function goto(view: typeof SvelteComponent, props: unknown) {
17 | current_page.set(view);
18 | navigate({
19 | page: view,
20 | props: props,
21 | clearHistory: true,
22 | frame: nav_frame
23 | });
24 | }
25 |
26 | export function toggleDrawer() {
27 | drawer.toggleDrawerState();
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 | All notable changes to this project will be documented in this file.
3 |
4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6 |
7 | ## [1.0.0] - 2021-10-29
8 | ### Changed
9 | - Update to Nativescript 8 and latest version of components
10 | - Bundles with JSX types
11 |
12 | ## [0.9.0] - 2020-09-05
13 | ### Changed
14 | - Updated to nativescript 7 support and latest NS7 compatible versions of modules.
15 | - Targets es2017
16 |
17 |
18 | ## [0.8.1] - 2020-03-21
19 | ### Changed
20 | - Call reloadScales on RadRadialGauge whenever a scale item has its configuration changed.
21 |
22 | ## [0.8.0] - 2020-03-08
23 | ### Changed
24 | - Updated to support svelte-native 0.8.0 and nativescript core modules 6.4
25 |
26 |
27 | ## [0.6.1] - 2019-10-13
28 |
29 | ### Added
30 | - Support for Nativescript Sidedrawer
31 |
--------------------------------------------------------------------------------
/src/sidedrawer/index.ts:
--------------------------------------------------------------------------------
1 | import { registerElement } from 'svelte-native/dom'
2 | import { NativeViewElementNode } from "svelte-native/dom";
3 | import { RadSideDrawer } from 'nativescript-ui-sidedrawer';
4 |
5 |
6 | export default class RadSideDrawerElement extends NativeViewElementNode {
7 | constructor() {
8 | super('radSideDrawer', RadSideDrawer);
9 | }
10 |
11 | private get _drawer() {
12 | return this.nativeView as RadSideDrawer;
13 | }
14 |
15 | closeDrawer() {
16 | this._drawer.closeDrawer();
17 | }
18 |
19 | getIsOpen(): boolean {
20 | return this._drawer.getIsOpen();
21 | }
22 |
23 | showDrawer() {
24 | this._drawer.showDrawer();
25 | }
26 |
27 | toggleDrawerState() {
28 | this._drawer.toggleDrawerState();
29 | }
30 |
31 | static register() {
32 | registerElement('radSideDrawer', () => new RadSideDrawerElement());
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/demo/app/app.ts:
--------------------------------------------------------------------------------
1 |
2 | import { svelteNativeNoFrame, DomTraceCategory } from "svelte-native";
3 | import RadListViewElement from "svelte-native-nativescript-ui/listview"
4 | import RadSideDrawerElement from "svelte-native-nativescript-ui/sidedrawer"
5 | import RadCalendarElement from "svelte-native-nativescript-ui/calendar"
6 | import Charts from "svelte-native-nativescript-ui/chart"
7 | import RadDataFrom from "svelte-native-nativescript-ui/dataform"
8 | import Gauges from "svelte-native-nativescript-ui/gauge"
9 | import AutoCompleteElement from "svelte-native-nativescript-ui/autocomplete"
10 |
11 | RadListViewElement.register();
12 | RadSideDrawerElement.register();
13 | RadCalendarElement.register();
14 | Charts.register();
15 | RadDataFrom.register();
16 | Gauges.register();
17 | AutoCompleteElement.register();
18 |
19 | //import * as trace from "tns-core-modules/trace"
20 | //trace.enable();
21 | //trace.addCategories(DomTraceCategory);
22 |
23 | import App from "./App.svelte";
24 | svelteNativeNoFrame(App, {});
25 |
--------------------------------------------------------------------------------
/demo/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "nativescript-ui-demo-app",
3 | "main": "app/app.ts",
4 | "version": "1.0.0",
5 | "private": true,
6 | "dependencies": {
7 | "@nativescript/core": "~8.1.1",
8 | "@nativescript/theme": "~3.0.1",
9 | "nativescript-ui-autocomplete": "~8.0.0",
10 | "nativescript-ui-calendar": "~8.0.1",
11 | "nativescript-ui-chart": "~9.0.0",
12 | "nativescript-ui-dataform": "~8.0.0",
13 | "nativescript-ui-gauge": "~8.0.0",
14 | "nativescript-ui-listview": "~10.0.1",
15 | "nativescript-ui-sidedrawer": "~10.0.1",
16 | "svelte-native": "~1.0.0",
17 | "svelte-native-nativescript-ui": "file:../dist"
18 | },
19 | "devDependencies": {
20 | "@nativescript/android": "8.1.1",
21 | "@nativescript/types": "~8.1.1",
22 | "@nativescript/webpack": "~5.0.0",
23 | "svelte": "^3.44.0",
24 | "svelte-loader": "^3.1.2",
25 | "svelte-native-preprocessor": "^1.0.0",
26 | "svelte-preprocess": "^4.7.0",
27 | "typescript": "~4.3.5"
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values-v21/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
10 |
11 |
14 |
15 |
16 |
19 |
20 |
23 |
--------------------------------------------------------------------------------
/rollup.config.js:
--------------------------------------------------------------------------------
1 | import typescript from 'rollup-plugin-typescript2'
2 | import resolve from 'rollup-plugin-node-resolve'
3 | import pkg from './package.json'
4 |
5 |
6 | let externalModules = pkg.peerDependencies ? Object.keys(pkg.peerDependencies) : []
7 |
8 | let localModules = ["sidedrawer", "listview", "calendar", "chart", "dataform", "gauge", "autocomplete"]
9 |
10 | let plugins = [
11 | resolve({
12 | extensions: ['.js']
13 | }),
14 | typescript({
15 | typescript: require('typescript'),
16 | useTsconfigDeclarationDir: true
17 | })
18 | ]
19 |
20 | function module_defs() {
21 | return localModules.map(mod => {
22 | return {
23 | input: `src/${mod}/index.ts`,
24 | output: [{
25 | file: `dist/${mod}/index.js`,
26 | format: 'esm'
27 | }],
28 | external: (id) => externalModules.find(e => e == id || id.startsWith(e+'/') ) || id.startsWith('nativescript-ui'),
29 | plugins: plugins
30 | }
31 | })
32 |
33 | }
34 |
35 |
36 | export default [
37 | ...module_defs()
38 | ];
--------------------------------------------------------------------------------
/demo/app/app.css:
--------------------------------------------------------------------------------
1 | /*
2 | In NativeScript, the app.css file is where you place CSS rules that
3 | you would like to apply to your entire application. Check out
4 | http://docs.nativescript.org/ui/styling for a full list of the CSS
5 | selectors and properties you can use to style UI components.
6 |
7 | /*
8 | In many cases you may want to use the NativeScript core theme instead
9 | of writing your own CSS rules. For a full list of class names in the theme
10 | refer to http://docs.nativescript.org/ui/theme.
11 | The imported CSS rules must precede all other types of rules.
12 | */
13 | @import '@nativescript/theme/css/core.css';
14 | @import '@nativescript/theme/css/default.css';
15 |
16 | /* Font icon class */
17 | .fab {
18 | font-family: 'Font Awesome 5 Brands', 'fa-brands-400';
19 | font-weight: 400;
20 | }
21 |
22 | .fas {
23 | font-family: 'Font Awesome 5 Free', 'fa-solid-900';
24 | font-weight: 900;
25 | }
26 |
27 | .far {
28 | font-family: 'Font Awesome 5 Free', 'fa-regular-400';
29 | font-weight: 400;
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2019 David Pershouse
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/demo/assets/icons/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013-2017 Cole Bemis
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/demo/app/pages/GaugePage.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
14 |
15 |
16 |
17 |
23 |
24 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ${PRODUCT_NAME}
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiresFullScreen
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/demo/app/fonts/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Font Awesome Free License
2 | -------------------------
3 |
4 | Font Awesome Free is free, open source, and GPL friendly. You can use it for
5 | commercial projects, open source projects, or really almost whatever you want.
6 | Full Font Awesome Free license: https://fontawesome.com/license/free.
7 |
8 | # Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
9 | In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
10 | packaged as SVG and JS file types.
11 |
12 | # Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
13 | In the Font Awesome Free download, the SIL OFL license applies to all icons
14 | packaged as web and desktop font files.
15 |
16 | # Code: MIT License (https://opensource.org/licenses/MIT)
17 | In the Font Awesome Free download, the MIT license applies to all non-font and
18 | non-icon files.
19 |
20 | # Attribution
21 | Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
22 | Awesome Free files already contain embedded comments with sufficient
23 | attribution, so you shouldn't need to do anything additional when using these
24 | files normally.
25 |
26 | We've kept attribution comments terse, so we ask that you do not actively work
27 | to remove them from files, especially code. They're a great way for folks to
28 | learn about Font Awesome.
29 |
30 | # Brand Icons
31 | All brand icons are trademarks of their respective owners. The use of these
32 | trademarks does not indicate endorsement of the trademark holder by Font
33 | Awesome, nor vice versa. **Please do not use brand logos for any purpose except
34 | to represent the company, product, or service to which they refer.**
35 |
--------------------------------------------------------------------------------
/demo/build-assets.js:
--------------------------------------------------------------------------------
1 | let svg2png = require('convert-svg-to-png');
2 | let fs = require('fs');
3 |
4 | let icon_sizes = [
5 | {
6 | size: [24,24],
7 | path: (f) => `./app/App_resources/iOS/${f}.png`
8 | },
9 | {
10 | size: [48,48],
11 | path: (f) => `./app/App_resources/iOS/${f}@2x.png`
12 | },
13 | {
14 | size: [72,72],
15 | path: (f) => `./app/App_resources/iOS/${f}@3x.png`
16 | },
17 | {
18 | size: [32,32],
19 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-mdpi/${f}.png`
20 | },
21 | {
22 | size: [48,48],
23 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-hdpi/${f}.png`
24 | },
25 | {
26 | size: [64,64],
27 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-xhdpi/${f}.png`
28 | },
29 | {
30 | size: [96,96],
31 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-xxhdpi/${f}.png`
32 | },
33 | {
34 | size: [128,128],
35 | path: (f) => `./app/App_resources/Android/src/main/res/drawable-xxxhdpi/${f}.png`
36 | }
37 | ]
38 |
39 | for (let f of fs.readdirSync('./assets/icons')) {
40 | console.log("found "+f);
41 | if (f.endsWith('.svg')) {
42 | for (let transform of icon_sizes) {
43 | let outFile = transform.path(f.replace(/\.svg$/i, ''));
44 | svg2png.convertFile(`./assets/icons/${f}`,
45 | {
46 | width: transform.size[0],
47 | height: transform.size[1],
48 | outputFilePath: outFile
49 | })
50 | console.log(`Created ${outFile}`);
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/demo/app/pages/AutoCompletePage.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/src/svelte-native-jsx-nativescript-ui-sidedrawer.d.ts:
--------------------------------------------------------------------------------
1 | export {} //Ensure this is a module
2 | type Color = import("@nativescript/core/color").Color;
3 | type DrawerTransitionBase = import("nativescript-ui-sidedrawer").DrawerTransitionBase;
4 | type PropertyChangeData = import("@nativescript/core/data/observable").PropertyChangeData;
5 | type SideDrawerLocation = import("nativescript-ui-sidedrawer").SideDrawerLocation;
6 | type View = import("@nativescript/core/ui/core/view").View;
7 | type Override = Omit & With
8 |
9 |
10 | declare global {
11 | namespace svelteNative.JSX {
12 |
13 | // common.d.ts
14 | type TRadSideDrawerAttributes = Override void;
23 | ondrawerContentChange?: (args: PropertyChangeData) => void;
24 | ondrawerContentSizeChange?: (args: PropertyChangeData) => void;
25 | ondrawerLocationChange?: (args: PropertyChangeData) => void;
26 | ondrawerTransitionChange?: (args: PropertyChangeData) => void;
27 | ongesturesEnabledChange?: (args: PropertyChangeData) => void;
28 | onmainContentChange?: (args: PropertyChangeData) => void;
29 | onshadowColorChange?: (args: PropertyChangeData) => void;
30 | shadowColor?: string | Color;
31 | }>
32 | interface RadSideDrawerAttributes extends TRadSideDrawerAttributes {}
33 |
34 |
35 | interface IntrinsicElements {
36 | radSideDrawer: RadSideDrawerAttributes;
37 | }
38 |
39 |
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/demo/app/pages/CalendarPage.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 | {#if current_view_mode == CalendarViewMode.Month}
4 | current_view_mode = CalendarViewMode.Year } />
5 | {:else if current_view_mode == CalendarViewMode.Year}
6 | current_view_mode = CalendarViewMode.Day } />
7 | {:else if current_view_mode == CalendarViewMode.Day}
8 | current_view_mode = CalendarViewMode.Week } />
9 | {:else if current_view_mode == CalendarViewMode.Week}
10 | current_view_mode = CalendarViewMode.Month } />
11 | {/if}
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "svelte-native-nativescript-ui",
3 | "version": "1.0.0",
4 | "description": "Svelte Native support for Nativescript UI",
5 | "repository": {
6 | "type": "git",
7 | "url": "git+https://github.com/halfnelson/svelte-native-nativescript-ui.git"
8 | },
9 | "keywords": [
10 | "sveltejs",
11 | "nativescript",
12 | "nativescript-ui",
13 | "svelte-native"
14 | ],
15 | "private": true,
16 | "author": "David Pershouse",
17 | "license": "MIT",
18 | "bugs": {
19 | "url": "https://github.com/halfnelson/svelte-native-nativescript-ui/issues"
20 | },
21 | "homepage": "https://github.com/halfnelson/svelte-native-nativescript-ui#readme",
22 | "peerDependencies": {
23 | "@nativescript/core": "~8.1.5",
24 | "svelte-native": "~1.0.0"
25 | },
26 | "scripts": {
27 | "clean": "npx rimraf ./dist/*",
28 | "build": "npm run clean && rollup -c && node ./scripts/create-pkg.js",
29 | "watch": "rollup -cw",
30 | "deploy": "npm run build && cd dist && npm publish"
31 | },
32 | "devDependencies": {
33 | "@nativescript/core": "~8.1.5",
34 | "@nativescript/types": "~8.1.1",
35 | "glob": "^7.1.3",
36 | "nativescript-source-to-jsx-def": "../../svelte/nativescriptSourceToJsxDef",
37 | "nativescript-ui-autocomplete": "~8.0.0",
38 | "nativescript-ui-calendar": "~8.0.1",
39 | "nativescript-ui-chart": "~9.0.0",
40 | "nativescript-ui-dataform": "~8.0.0",
41 | "nativescript-ui-gauge": "~8.0.0",
42 | "nativescript-ui-listview": "~10.0.1",
43 | "nativescript-ui-sidedrawer": "~10.0.1",
44 | "rimraf": "^2.6.3",
45 | "rollup": "^2.26.10",
46 | "rollup-plugin-commonjs": "^10.1.0",
47 | "rollup-plugin-node-resolve": "^5.2.0",
48 | "rollup-plugin-typescript2": "^0.27.2",
49 | "svelte": "^3.44.0",
50 | "svelte-native": "~1.0.0",
51 | "typescript": "^4.4.4"
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/Android/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
18 |
20 |
21 |
22 |
29 |
30 |
32 |
33 |
34 |
39 |
40 |
42 |
43 |
--------------------------------------------------------------------------------
/scripts/create-pkg.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs')
2 | const path = require('path')
3 | const packageFileContent = fs.readFileSync(path.resolve(__dirname, '../package.json'), { encoding: "utf8" });
4 | const rootPackageContent = JSON.parse(packageFileContent);
5 |
6 | let desiredKeys = [
7 | "name",
8 | "version",
9 | "description",
10 | "author",
11 | "license",
12 | "peerDependencies",
13 | "keywords",
14 | "homepage",
15 | "repository",
16 | "types"
17 | ]
18 |
19 | let destinationPackageContent = {}
20 |
21 | for (let key of desiredKeys) {
22 | destinationPackageContent[key] = rootPackageContent[key]
23 | }
24 |
25 | Object.assign(destinationPackageContent, {
26 | ...destinationPackageContent
27 | })
28 |
29 | const finalFileContent = JSON.stringify(destinationPackageContent, null, 4)
30 | fs.writeFileSync(path.resolve(__dirname, "../dist/package.json"), finalFileContent)
31 |
32 | //Copy our readme and license file
33 | const filesToCopy = ["Readme.md", "LICENSE", "CHANGELOG.md"]
34 | for (let file of filesToCopy) {
35 | fs.copyFileSync(path.resolve(__dirname, `../${file}`), path.resolve(__dirname, `../dist/${file}`))
36 | }
37 |
38 | const typeDefsToCopy = [
39 | "svelte-native-jsx-nativescript-ui-autocomplete.d.ts",
40 | "svelte-native-jsx-nativescript-ui-calendar.d.ts",
41 | "svelte-native-jsx-nativescript-ui-chart.d.ts",
42 | "svelte-native-jsx-nativescript-ui-dataform.d.ts",
43 | "svelte-native-jsx-nativescript-ui-gauge.d.ts",
44 | "svelte-native-jsx-nativescript-ui-listview.d.ts",
45 | "svelte-native-jsx-nativescript-ui-sidedrawer.d.ts",
46 | ]
47 |
48 | for (let file of typeDefsToCopy) {
49 | fs.copyFileSync(path.resolve(__dirname, `../src/${file}`), path.resolve(__dirname, `../dist/${file}`))
50 | }
51 |
52 | // inject our JSX types
53 | const modules = ["autocomplete", "calendar", "chart", "dataform", "gauge", "listview", "sidedrawer"]
54 | for (let mod of modules) {
55 | var indexdtspath = path.resolve(__dirname, `../dist/${mod}/index.d.ts`);
56 | var indexdts = fs.readFileSync(indexdtspath, "utf-8");
57 | fs.writeFileSync(indexdtspath, indexdts + `\n\nimport '../svelte-native-jsx-nativescript-ui-${mod}'\n`, "utf-8");
58 | }
--------------------------------------------------------------------------------
/src/gauge/index.ts:
--------------------------------------------------------------------------------
1 | import { registerElement, registerNativeConfigElement, NativeElementPropType, NativeElementNode, NativeElementPropConfig, ViewNode } from 'svelte-native/dom'
2 | import { NativeViewElementNode } from "svelte-native/dom";
3 | import { RadRadialGauge, RadialScale, RadialNeedle, RadialBarIndicator, ScaleStyle, BarIndicatorStyle } from 'nativescript-ui-gauge';
4 |
5 | class RadialScaleElement extends NativeElementNode {
6 | onInsertedChild(childNode: ViewNode, index: number) {
7 | super.onInsertedChild(childNode, index);
8 | let gauge = this.parentNode as any;
9 | if (gauge && gauge.nativeElement && gauge.nativeElement.nativeObject && gauge.nativeElement.reloadScales) {
10 | gauge.nativeElement.reloadScales();
11 | }
12 | }
13 | onRemovedChild(childNode: ViewNode) {
14 | super.onRemovedChild(childNode);
15 | let gauge = this.parentNode as any;
16 | if (gauge && gauge.nativeElement && gauge.nativeElement.nativeObject && gauge.nativeElement.reloadScales) {
17 | gauge.nativeElement.reloadScales();
18 | }
19 | }
20 | }
21 |
22 |
23 | export default class Gauges {
24 | static register() {
25 | const registerConfigElement = (tag: string, native: new () => any, setsParentProp: string = null, propconfig: NativeElementPropConfig = {}) =>
26 | registerNativeConfigElement(tag, () => native, setsParentProp, propconfig)
27 |
28 | registerElement('radRadialGauge', () => new NativeViewElementNode('radRadialGauge', RadRadialGauge, null, { "scales": NativeElementPropType.ObservableArray } ));
29 | registerElement('radialScale', () => new RadialScaleElement("radialScale", RadialScale, "scales", { "indicators": NativeElementPropType.ObservableArray }));
30 | //registerConfigElement('radialScale', RadialScale, "scales", { "indicators": NativeElementPropType.ObservableArray })
31 | registerConfigElement('radialNeedle', RadialNeedle, "indicators")
32 | registerConfigElement('radialBarIndicator', RadialBarIndicator, "indicators")
33 | registerConfigElement('scaleStyle', ScaleStyle, "scaleStyle")
34 | registerConfigElement('barIndicatorStyle', BarIndicatorStyle, "indicatorStyle")
35 | }
36 | }
--------------------------------------------------------------------------------
/demo/app/App.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
46 |
47 |
52 |
--------------------------------------------------------------------------------
/src/dataform/index.ts:
--------------------------------------------------------------------------------
1 | import { registerElement, registerNativeConfigElement, NativeElementNode, NativeElementPropType, NativeElementPropConfig } from 'svelte-native/dom'
2 | import { NativeViewElementNode } from "svelte-native/dom";
3 | import { RadDataForm, DataFormStackLayout, DataFormGridLayout, EntityProperty, PropertyEditor, PropertyEditorParams, PropertyEditorStyle, PropertyGroup, EmailValidator, IsTrueValidator, NonEmptyValidator, MaximumLengthValidator, MinimumLengthValidator, PhoneValidator, RangeValidator, RegExValidator } from 'nativescript-ui-dataform';
4 |
5 | export default class RadDataFormElement extends NativeViewElementNode {
6 | constructor() {
7 | super('radDataForm', RadDataForm, null, { "groups": NativeElementPropType.Array, "properties": NativeElementPropType.Array});
8 | }
9 |
10 | getPropertyByName(prop: string) {
11 | return this.nativeView.getPropertyByName(prop);
12 | }
13 | notifyValidated(prop: string, validated: boolean) {
14 | return this.nativeView.notifyValidated(prop, validated);
15 | }
16 | commitAll() {
17 | return this.nativeView.commitAll();
18 | }
19 | validateAll() {
20 | return this.nativeView.validateAll();
21 | }
22 |
23 | static register() {
24 |
25 | const registerConfigElement = (tag: string, native: new () => any, setsParentProp: string = null, propconfig: NativeElementPropConfig = {}) =>
26 | registerNativeConfigElement(tag, () => native, setsParentProp, propconfig)
27 |
28 | registerConfigElement('DataFormStackLayout', DataFormStackLayout, "layout");
29 | registerConfigElement('DataFormGridLayout', DataFormGridLayout, "layout");
30 | registerConfigElement('EntityProperty', EntityProperty, "properties", { "validators": NativeElementPropType.Array});
31 | registerConfigElement('PropertyEditor', PropertyEditor, "editor");
32 | registerConfigElement('PropertyEditorParams', PropertyEditorParams, "params");
33 | registerConfigElement('PropertyEditorStyle', PropertyEditorStyle, "propertyEditorStyle");
34 | registerConfigElement('PropertyGroup', PropertyGroup, "groups", { "properties": NativeElementPropType.Array });
35 | registerConfigElement('EmailValidator', EmailValidator, "validators");
36 | registerConfigElement('IsTrueValidator', IsTrueValidator, "validators");
37 | registerConfigElement('NonEmptyValidator', NonEmptyValidator, "validators");
38 | registerConfigElement('MaximumLengthValidator', MaximumLengthValidator, "validators");
39 | registerConfigElement('MinimumLengthValidator', MinimumLengthValidator, "validators");
40 | registerConfigElement('PhoneValidator', PhoneValidator, "validators");
41 | registerConfigElement('RangeValidator', RangeValidator, "validators");
42 | registerConfigElement('RegExValidator', RegExValidator, "validators");
43 |
44 | registerElement('radDataForm', () => new RadDataFormElement());
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "icon-20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "icon-20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "icon-29.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "icon-29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "icon-29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "icon-40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "icon-40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "icon-60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "icon-60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "icon-20.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "icon-20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "icon-29.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "icon-29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "icon-40.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "icon-40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "icon-76.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "icon-76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "icon-83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "icon-1024.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
--------------------------------------------------------------------------------
/demo/app/pages/ChartPage.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 | {#if mode == "cartesian"}
4 | mode = "pie" } />
5 | {:else}
6 | mode = "cartesian" } />
7 | {/if}
8 |
9 | {#if mode == "pie"}
10 |
11 |
12 |
19 |
20 |
21 |
22 |
23 |
31 |
32 |
33 |
34 |
35 | {:else}
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | {/if}
49 |
50 |
51 |
74 |
75 |
--------------------------------------------------------------------------------
/demo/app/pages/DataFormPage.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/demo/app/App_Resources/iOS/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/chart/index.ts:
--------------------------------------------------------------------------------
1 | import { registerElement, registerNativeConfigElement, NativeElementNode } from 'svelte-native/dom'
2 | import { NativeViewElementNode, NativeElementPropType as PropType } from "svelte-native/dom";
3 | import { RadPieChart, RadCartesianChart, PieSeries, DonutSeries,
4 | LineSeries, SplineSeries, SplineAreaSeries,
5 | AreaSeries, BarSeries, RangeBarSeries,
6 | BubbleSeries, ScatterBubbleSeries,
7 | ScatterSeries, CandlestickSeries,
8 | OhlcSeries,
9 | CategoricalAxis, DateTimeCategoricalAxis, DateTimeContinuousAxis,
10 | LinearAxis, LogarithmicAxis,
11 | RadCartesianChartGrid, RadLegendView,
12 | Palette, PaletteEntry, Trackball,
13 | ChartGridLineAnnotation, ChartPlotBandAnnotation
14 | } from 'nativescript-ui-chart';
15 |
16 | import { ViewBase } from '@nativescript/core';
17 |
18 | class BaseChartElement extends NativeViewElementNode {
19 | constructor(tagName: string, viewClass: new () => T) {
20 | super(tagName, viewClass, null, { "series": PropType.ObservableArray,
21 | "annotations": PropType.ObservableArray,
22 | "palettes": PropType.ObservableArray});
23 | }
24 | }
25 |
26 | class PieChartElement extends BaseChartElement {
27 | constructor() {
28 | super('radPieChart', RadPieChart)
29 | }
30 | }
31 |
32 | class CartesianChartElement extends BaseChartElement {
33 | constructor() {
34 | super('radCartesianChart', RadCartesianChart)
35 | }
36 | }
37 |
38 | class PaletteElement extends NativeElementNode {
39 | constructor() {
40 | super('pallete', Palette, "palettes", { "entries": PropType.ObservableArray })
41 | }
42 | }
43 |
44 | class ChartSeriesElement extends NativeElementNode {
45 | constructor(tagName: string, elClass: new () => T) {
46 | super(tagName, elClass, "series", { "seriesName": PropType.Value })
47 | }
48 | }
49 |
50 |
51 | export default class Charts {
52 | static register() {
53 |
54 | const registerConfigElement = (tag: string, native: new () => any, parentProp: string = null) =>
55 | registerNativeConfigElement(tag, () => native, parentProp)
56 |
57 | const registerSeries = (tag: string, native: new () => any) =>
58 | registerElement(tag, () => new ChartSeriesElement(tag, native))
59 |
60 | //chart types
61 | registerElement('radPieChart', () => new PieChartElement());
62 | registerElement('radCartesianChart', () => new CartesianChartElement());
63 |
64 | //series types
65 | registerSeries('pieSeries', PieSeries);
66 | registerSeries('donutSeries', DonutSeries);
67 | registerSeries('lineSeries', LineSeries)
68 | registerSeries('splineSeries', SplineSeries)
69 | registerSeries('splineAreaSeries', SplineAreaSeries)
70 | registerSeries('areaSeries', AreaSeries)
71 | registerSeries('barSeries', BarSeries)
72 | registerSeries('rangeBarSeries', RangeBarSeries)
73 | registerSeries('bubbleSeries', BubbleSeries)
74 | registerSeries('scatterBubbleSeries', ScatterBubbleSeries)
75 | registerSeries('scatterSeries', ScatterSeries)
76 | registerSeries('candlestickSeries', CandlestickSeries)
77 | registerSeries('OhlcSeries', OhlcSeries)
78 |
79 | //axes types
80 | registerConfigElement('categoricalAxis', CategoricalAxis)
81 | registerConfigElement('dateTimeCategoricalAxis', DateTimeCategoricalAxis)
82 | registerConfigElement('dateTimeContinuousAxis', DateTimeContinuousAxis)
83 | registerConfigElement('linearAxis', LinearAxis)
84 | registerConfigElement('logarithmicAxis', LogarithmicAxis)
85 |
86 | //grid
87 | registerConfigElement('radCartesianChartGrid', RadCartesianChartGrid, "grid")
88 |
89 | //legend
90 | registerConfigElement('radLegendView', RadLegendView, "legend")
91 |
92 | //palette
93 | registerConfigElement('paletteEntry', PaletteEntry, "entries")
94 | registerElement('palette', () => new PaletteElement())
95 |
96 | //Trackball
97 | registerConfigElement('trackball', Trackball, "trackball")
98 |
99 | //Annotations
100 | registerConfigElement('chartGridLineAnnotation', ChartGridLineAnnotation, "annotations")
101 | registerConfigElement('chartPlotBandAnnotation', ChartPlotBandAnnotation, "annotations")
102 | }
103 | }
--------------------------------------------------------------------------------
/src/svelte-native-jsx-nativescript-ui-autocomplete.d.ts:
--------------------------------------------------------------------------------
1 | export {} //Ensure this is a module
2 | type AutoCompleteCompletionMode = import("nativescript-ui-autocomplete/common").AutoCompleteCompletionMode;
3 | type AutoCompleteDisplayMode = import("nativescript-ui-autocomplete/common").AutoCompleteDisplayMode;
4 | type AutoCompleteLayoutMode = import("nativescript-ui-autocomplete/common").AutoCompleteLayoutMode;
5 | type AutoCompleteSuggestMode = import("nativescript-ui-autocomplete/common").AutoCompleteSuggestMode;
6 | type ClearButton = import("nativescript-ui-autocomplete/common").ClearButton;
7 | type NoResultsLabel = import("nativescript-ui-autocomplete/common").NoResultsLabel;
8 | type ObservableArray = import("@nativescript/core/data/observable-array").ObservableArray;
9 | type PropertyChangeData = import("@nativescript/core/data/observable").PropertyChangeData;
10 | type RadAutoCompleteTextView = import("nativescript-ui-autocomplete/common").RadAutoCompleteTextView;
11 | type SuggestionView = import("nativescript-ui-autocomplete/common").SuggestionView;
12 | type TokenModel = import("nativescript-ui-autocomplete/common").TokenModel;
13 | type View = import("@nativescript/core/ui/core/view").View;
14 | type Override = Omit & With
15 |
16 |
17 | declare global {
18 | namespace svelteNative.JSX {
19 |
20 | // common.d.ts
21 | type TClearButtonAttributes = Override
24 | interface ClearButtonAttributes extends TClearButtonAttributes {}
25 |
26 | // common.d.ts
27 | type TNoResultsLabelAttributes = Override
30 | interface NoResultsLabelAttributes extends TNoResultsLabelAttributes {}
31 |
32 | // common.d.ts
33 | type TRadAutoCompleteTextViewAttributes = Override View;
41 | items?: string | ObservableArray;
42 | layoutMode?: AutoCompleteLayoutMode;
43 | loadSuggestionsAsync?: string | any;
44 | minimumCharactersToSearch?: string | number;
45 | noResultsLabel?: NoResultsLabel;
46 | noResultsText?: string;
47 | oncloseButtonImageSrcChange?: (args: PropertyChangeData) => void;
48 | oncompletionModeChange?: (args: PropertyChangeData) => void;
49 | ondisplayModeChange?: (args: PropertyChangeData) => void;
50 | onhintChange?: (args: PropertyChangeData) => void;
51 | onitemsChange?: (args: PropertyChangeData) => void;
52 | onlayoutModeChange?: (args: PropertyChangeData) => void;
53 | onloadSuggestionsAsyncChange?: (args: PropertyChangeData) => void;
54 | onminimumCharactersToSearchChange?: (args: PropertyChangeData) => void;
55 | onnoResultsTextChange?: (args: PropertyChangeData) => void;
56 | onreadOnlyChange?: (args: PropertyChangeData) => void;
57 | onshowCloseButtonChange?: (args: PropertyChangeData) => void;
58 | onsuggestModeChange?: (args: PropertyChangeData) => void;
59 | onsuggestionViewChange?: (args: PropertyChangeData) => void;
60 | ontextChange?: (args: PropertyChangeData) => void;
61 | ontokenItemSpacingChange?: (args: PropertyChangeData) => void;
62 | readOnly?: string | boolean;
63 | selectedTokens?: TokenModel[];
64 | showCloseButton?: string | boolean;
65 | suggestMode?: AutoCompleteSuggestMode;
66 | suggestionView?: string | SuggestionView;
67 | text?: string;
68 | tokenItemSpacing?: string | number;
69 | }>
70 | interface RadAutoCompleteTextViewAttributes extends TRadAutoCompleteTextViewAttributes {}
71 |
72 | // common.d.ts
73 | type TSuggestionViewAttributes = Override void;
76 | onsuggestionViewHeightChange?: (args: PropertyChangeData) => void;
77 | owner?: RadAutoCompleteTextView;
78 | suggestionItemTemplate?: string;
79 | suggestionViewHeight?: string | number;
80 | }>
81 | interface SuggestionViewAttributes extends TSuggestionViewAttributes {}
82 |
83 | // common.d.ts
84 | type TTokenAttributes = Override
87 | interface TokenAttributes extends TTokenAttributes {}
88 |
89 | // common.d.ts
90 | type TTokenClearButtonAttributes = Override
93 | interface TokenClearButtonAttributes extends TTokenClearButtonAttributes {}
94 |
95 |
96 | interface IntrinsicElements {
97 | clearButton: ClearButtonAttributes;
98 | noResultsLabel: NoResultsLabelAttributes;
99 | radAutoCompleteTextView: RadAutoCompleteTextViewAttributes;
100 | suggestionView: SuggestionViewAttributes;
101 | token: TokenAttributes;
102 | tokenClearButton: TokenClearButtonAttributes;
103 | }
104 |
105 |
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/src/autocomplete/index.ts:
--------------------------------------------------------------------------------
1 | import { registerElement, NativeElementNode, NativeElementPropType as PropType, TemplateElement, logger, createElement } from 'svelte-native/dom'
2 | import { NativeViewElementNode } from "svelte-native/dom";
3 | import { RadAutoCompleteTextView, TokenModel, SuggestionView, AutoCompleteViewType } from 'nativescript-ui-autocomplete';
4 | import { View, ItemEventData } from '@nativescript/core';
5 |
6 |
7 |
8 | class SuggestionViewElement extends NativeElementNode {
9 | _templateComponent: TemplateElement = null
10 | constructor() {
11 | super('suggestionView', SuggestionView, "suggestionView", {"suggestionItemTemplate": PropType.Value, "suggestionViewHeight": PropType.Value});
12 | }
13 |
14 | get itemTemplateComponent() {
15 | if (!this._templateComponent) {
16 | let templateEl = this.childNodes.find(n => n.tagName == "template") as TemplateElement;
17 | if (!templateEl)
18 | return null;
19 | this._templateComponent = templateEl;
20 | }
21 | return this._templateComponent.component;
22 | }
23 |
24 | }
25 |
26 | type AutocompleteItemEventData = ItemEventData & { data: any }
27 |
28 | export default class RadAutoCompleteTextViewElement extends NativeViewElementNode {
29 | constructor() {
30 | super('radAutoCompleteTextView', RadAutoCompleteTextView, null, {
31 | "closeButtonImageSrc": PropType.Value,
32 | "completionMode": PropType.Value,
33 | "displayMode": PropType.Value,
34 | "filteredItems": PropType.Value,
35 | "itemViewLoader": PropType.Value,
36 | "layoutMode": PropType.Value,
37 | "loadSuggestionsAsync": PropType.Value,
38 | "minimumCharactersToSearch": PropType.Value,
39 | "noResultsText": PropType.Value,
40 | "readOnly": PropType.Value,
41 | "selectedTokens": PropType.Value,
42 | "showCloseButton": PropType.Value,
43 | "suggestMode": PropType.Value,
44 | "suggestionView": PropType.Value,
45 | "text": PropType.Value,
46 | "items": PropType.Value,
47 | "hint": PropType.Value
48 | });
49 | (this.nativeElement as any).itemViewLoader = (viewType: string) => this.loadView(viewType)
50 | this.nativeView.on(RadAutoCompleteTextView.itemLoadingEvent, (args) => { this.updateListItem(args as AutocompleteItemEventData) });
51 |
52 | }
53 |
54 | private loadView(viewType: string): View {
55 | if (viewType != AutoCompleteViewType.ItemView)
56 | return null;
57 |
58 | let suggestionView = this.nativeView.suggestionView
59 | if (!suggestionView || !suggestionView.__SvelteNativeElement__) return;
60 |
61 | let componentClass = (suggestionView.__SvelteNativeElement__ as SuggestionViewElement).itemTemplateComponent;
62 | if (!componentClass) return null;
63 |
64 | logger.debug(() => "creating view for " + viewType);
65 |
66 | let wrapper = createElement('StackLayout') as NativeViewElementNode;
67 | wrapper.setStyle("padding", 0)
68 | wrapper.setStyle("margin", 0)
69 | let nativeEl = wrapper.nativeView;
70 |
71 | let builder = (props: any) => {
72 | let componentInstance = new componentClass({
73 | target: wrapper,
74 | props: props
75 | });
76 | (nativeEl as any).__SvelteComponent__ = componentInstance;
77 | }
78 | (nativeEl as any).__SvelteComponentBuilder__ = builder;
79 |
80 | return nativeEl;
81 | }
82 |
83 | private updateListItem(args: AutocompleteItemEventData) {
84 | let componentInstance:SvelteComponent;
85 | let view = args.view as any;
86 |
87 | //if we are a svelte component, update our props
88 | if (!view) return;
89 |
90 | if (!view.__SvelteComponent__) {
91 | if (view.__SvelteComponentBuilder__) {
92 | logger.debug(() => "mounting to view "+view+" with props "+Object.keys(args.data).join(","));
93 | view.__SvelteComponentBuilder__({ item: args.data });
94 | view.__SvelteComponentBuilder__ = null;
95 | return;
96 | }
97 | }
98 |
99 | if (view.__SvelteComponent__) {
100 | componentInstance = view.__SvelteComponent__
101 | }
102 |
103 | if (componentInstance) {
104 | logger.debug(() => "updating view "+view+" with props "+Object.keys(args.data).join(","));
105 | componentInstance.$set({ item: args.data })
106 | }
107 | }
108 |
109 | addToken(token: TokenModel) {
110 | return this.nativeView.addToken(token)
111 | }
112 |
113 | insertTokenAtIndex(token: TokenModel, index: number) {
114 | return this.nativeView.insertTokenAtIndex(token, index)
115 | }
116 |
117 | removeAllTokens() {
118 | return this.nativeView.removeAllTokens()
119 | }
120 |
121 | removeToken(token: TokenModel) {
122 | return this.nativeView.removeToken(token)
123 | }
124 |
125 | removeTokenAtIndex(index: number) {
126 | return this.nativeView.removeTokenAtIndex(index);
127 | }
128 |
129 | resetAutoComplete() {
130 | return this.nativeView.resetAutoComplete()
131 | }
132 |
133 | tokenAtIndex(index: number) {
134 | return this.nativeView.tokenAtIndex(index);
135 | }
136 |
137 | tokens() {
138 | return this.nativeView.tokens();
139 | }
140 |
141 | static register() {
142 | registerElement('radAutoCompleteTextView', () => new RadAutoCompleteTextViewElement());
143 | registerElement('suggestionView', () => new SuggestionViewElement)
144 | }
145 | }
146 |
--------------------------------------------------------------------------------
/Readme.md:
--------------------------------------------------------------------------------
1 | # Svelte Native - NativeScript UI
2 |
3 | Provides support for using [NativeScript UI](https://docs.nativescript.org/ui/overview#nativescript-ui-overview) in [Svelte Native](https://svelte-native.technology) Applications
4 |
5 | 
6 |
7 | ## Usage
8 |
9 | npm install any of the following nativescript ui packages you wish to use.
10 |
11 | Supported:
12 |
13 | * Side Drawer ([nativescript-ui-sidedrawer](https://www.npmjs.com/package/nativescript-ui-sidedrawer))
14 | * List View ([nativescript-ui-listview](https://www.npmjs.com/package/nativescript-ui-listview))
15 | * Chart ([nativescript-ui-chart](https://www.npmjs.com/package/nativescript-ui-chart))
16 | * Calendar ([nativescript-ui-calendar](https://www.npmjs.com/package/nativescript-ui-calendar)))
17 | * Data Form ([nativescript-ui-dataform](https://www.npmjs.com/package/nativescript-ui-dataform))
18 | * Gauge ([nativescript-ui-gauge](https://www.npmjs.com/package/nativescript-ui-gauge))
19 | * AutoComplete ([nativescript-ui-autocomplete](https://www.npmjs.com/package/nativescript-ui-autocomplete))
20 |
21 |
22 | In your project's `app.ts` file, add:
23 |
24 | ```js
25 | //import the components you are using
26 | import RadListViewElement from "svelte-native-nativescript-ui/listview"
27 | import RadSideDrawerElement from "svelte-native-nativescript-ui/sidedrawer"
28 | import RadCalendarElement from "svelte-native-nativescript-ui/calendar"
29 | import Charts from "svelte-native-nativescript-ui/chart"
30 | import RadDataFrom from "svelte-native-nativescript-ui/dataform"
31 | import Gauges from "svelte-native-nativescript-ui/gauge"
32 | import AutoCompleteElement from "svelte-native-nativescript-ui/autocomplete"
33 |
34 | //register them with svelte-native so they can be used in svelte components
35 | RadListViewElement.register();
36 | RadSideDrawerElement.register();
37 | RadCalendarElement.register();
38 | Charts.register();
39 | RadDataFrom.register();
40 | Gauges.register();
41 | AutoCompleteElement.register();
42 | ```
43 |
44 | Then use them in your `.svelte` components:
45 |
46 | ```html
47 |
48 | ...
49 |
50 |
51 | ...
52 |
53 |
54 |
55 | ```
56 |
57 | ## Demo Project
58 |
59 | The included demo project can be launched with:
60 |
61 | ```sh
62 | $ cd demo
63 | $ npm install
64 | $ tns run android
65 | ```
66 |
67 | The demo contains examples for each of the supported elements that you can use as a starting poing.
68 |
69 |
70 | ## Usage
71 |
72 | The documentation for the supported controls can be obtained from the NativeScript site
73 |
74 | * Side Drawer ([docs](https://docs.nativescript.org/ui/components/SideDrawer/overview))
75 | * List View ([docs](https://docs.nativescript.org/ui/components/RadListView))
76 | * Chart ([docs](https://docs.nativescript.org/ui/components/Chart))
77 | * Calendar ([docs](https://docs.nativescript.org/ui/components/Calendar))
78 | * Data Form ([docs](https://docs.nativescript.org/ui/components/DataForm/dataform-overview))
79 | * Gauge ([docs](https://docs.nativescript.org/ui/components/Gauge/overview))
80 | * AutoComplete ([docs](https://docs.nativescript.org/ui/components/AutoCompleteTextView/overview))
81 |
82 | The differences between the documentation at the nativescript site and the usage in svelte-native can be observed by looking at the examples in the demo project.
83 |
84 | The main differences are the assigning of configuration elements to their parent's properties, and the handling of templates.
85 |
86 | ### Automatic parent properties
87 |
88 | Most configuration elements in the nativescript-ui components only have a single valid parent component and property that they can be assigned to. Svelte Native sets the default parent property for these configuration elements where possible.
89 |
90 | eg
91 | ```html
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 | ```
105 | becomes:
106 | ```html
107 |
108 |
109 |
110 |
111 |
112 | ```
113 |
114 | Note that since the `axis` elements are valid on either the `horizontalAxis` or `verticalAxis` properties, they still need to be specified using svelte-natives `prop:` directive.
115 |
116 |
117 | ### Template Element
118 |
119 | When a controls needs to render a child view multiple times (RadAutoCompleteTextView, RadListView) , Svelte Native configures the controls to use Template elements.
120 |
121 | For RadListView the item the template represents is given by the type, eg:
122 |
123 | ```html
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 | ```
132 |
133 | For Autocomplete it is given as the child of a `suggestionView` element:
134 |
135 | ```html
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 | ```
144 |
145 |
--------------------------------------------------------------------------------
/demo/app/pages/ListViewPage.svelte:
--------------------------------------------------------------------------------
1 |
2 |
3 | {#if layoutType == "linear"}
4 | layoutType = "grid"}>
5 | {:else if layoutType == "grid"}
6 | layoutType = "linear"}>
7 | {/if}
8 |
9 |
21 |
22 |
23 | {#if layoutType == "grid"}
24 |
25 | {:else}
26 |
27 | {/if}
28 |
29 |
30 |
31 |
32 |
33 |
34 | {item.name}
35 | {item.description}
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | {item.name}
44 | {item.description}
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | {item}
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
119 |
120 |
--------------------------------------------------------------------------------
/src/listview/index.ts:
--------------------------------------------------------------------------------
1 | import { NativeViewElementNode, createElement, registerElement, NativeElementNode, logger, ViewNode, TemplateElement, SvelteKeyedTemplate } from "svelte-native/dom";
2 | import { RadListView, ListViewEventData, SwipeActionsEventData, ListViewLinearLayout, ListViewGridLayout, ListViewStaggeredLayout, ListViewViewType, ReorderHandle } from "nativescript-ui-listview";
3 | import { View } from "@nativescript/core";
4 |
5 |
6 |
7 | export default class RadListViewElement extends NativeViewElementNode {
8 | constructor() {
9 | super('radlistview', RadListView);
10 | let nativeView = this.nativeView;
11 | nativeView.itemViewLoader = (viewType: any): View => this.loadView(viewType)
12 | this.nativeView.on(RadListView.itemLoadingEvent, (args) => { this.updateListItem(args as ListViewEventData) });
13 | this.nativeView.on(RadListView.itemSwipeProgressStartedEvent, (args) => { this.updateSwipeItem(args as SwipeActionsEventData) });
14 | }
15 |
16 | private loadView(viewType: string): View {
17 | if (viewType.toLowerCase() == ListViewViewType.ItemView.toLowerCase() && typeof this.nativeElement.itemTemplates == "object" ) {
18 | let keyedTemplate = this.nativeElement.itemTemplates.find(t => t.key == "default");
19 | if (keyedTemplate) {
20 | return keyedTemplate.createView()
21 | }
22 | }
23 |
24 | let componentClass = this.getComponentForView(viewType);
25 | if (!componentClass) return null;
26 | logger.debug(() => "creating view for " + viewType);
27 |
28 | let wrapper = createElement('StackLayout', this.ownerDocument) as NativeViewElementNode;
29 | wrapper.setStyle("padding", 0)
30 | wrapper.setStyle("margin", 0)
31 | let nativeEl = wrapper.nativeView;
32 |
33 | let builder = (props: any) => {
34 | let componentInstance = new componentClass({
35 | target: wrapper,
36 | props: props
37 | });
38 | (nativeEl as any).__SvelteComponent__ = componentInstance;
39 | }
40 | //for certain view types we like to delay until we have the data
41 | if (viewType.toLowerCase() == ListViewViewType.ItemView.toLowerCase()
42 | || viewType.toLowerCase() == ListViewViewType.GroupView.toLowerCase()
43 | // || viewType.toLowerCase() == ListViewViewType.ItemSwipeView.toLowerCase() doesn't work at the moment
44 | ) {
45 | (nativeEl as any).__SvelteComponentBuilder__ = builder;
46 | } else {
47 | //otherwise, do it now
48 | builder({});
49 | }
50 |
51 | return nativeEl;
52 | }
53 |
54 |
55 | // For some reason itemTemplateSelector isn't defined as a "property" on radListView, so when we set the property, it is lowercase (due to svelte's forced downcasing)
56 | // we intercept and fix the case here.
57 | setAttribute(fullkey: string, value: any): void {
58 | if (fullkey.toLowerCase() == "itemtemplateselector") {
59 | fullkey = "itemTemplateSelector";
60 | }
61 | super.setAttribute(fullkey, value);
62 | }
63 |
64 |
65 | private getComponentForView(viewType: string): any {
66 | const normalizedViewType = viewType.toLowerCase();
67 |
68 |
69 | let templateEl = this.childNodes.find(n => n.tagName == "template" && String(n.getAttribute("type")).toLowerCase() == normalizedViewType) as any;
70 | if (!templateEl)
71 | return null;
72 | return templateEl.component;
73 | }
74 |
75 | onInsertedChild(childNode: ViewNode, index: number) {
76 | super.onInsertedChild(childNode, index);
77 | if (childNode instanceof TemplateElement) {
78 | let type = childNode.getAttribute('type') || ListViewViewType.ItemView
79 | if (type.toLowerCase() != ListViewViewType.ItemView.toLowerCase()) return;
80 |
81 | let key = childNode.getAttribute('key') || "default"
82 | logger.debug(() => `Adding template for key ${key}`);
83 | if (!this.nativeView.itemTemplates || typeof this.nativeView.itemTemplates == "string") {
84 | this.nativeView.itemTemplates = []
85 | }
86 | this.nativeView.itemTemplates = this.nativeView.itemTemplates.concat(new SvelteKeyedTemplate(key, childNode))
87 | }
88 | }
89 |
90 | onRemovedChild(childNode: ViewNode) {
91 | super.onRemovedChild(childNode);
92 | if (childNode instanceof TemplateElement) {
93 | let type = childNode.getAttribute('type') || ListViewViewType.ItemView
94 | if (type != ListViewViewType) return;
95 |
96 | let key = childNode.getAttribute('key') || "default"
97 | if (this.nativeView.itemTemplates && typeof this.nativeView.itemTemplates != "string") {
98 | this.nativeView.itemTemplates = this.nativeView.itemTemplates.filter(t => t.key != key);
99 | }
100 | }
101 | }
102 |
103 | private updateSwipeItem(args: SwipeActionsEventData) {
104 | let item;
105 | let items = this.nativeElement.items;
106 | if (items.getItem) {
107 | item = items.getItem(args.index);
108 | } else {
109 | item = items[args.index]
110 | }
111 | // logger.debug(`updating with swiped item idx: ${args.index} ${args.swipeView.bindingContext}`)
112 | this.updateViewWithProps(args.swipeView, { item });
113 | }
114 |
115 | private updateViewWithProps(view: View, props: any) {
116 | let componentInstance:SvelteComponent;
117 | let _view = view as any;
118 | if (!_view.__SvelteComponent__) {
119 | if (_view.__SvelteComponentBuilder__) {
120 | logger.debug(() => "mounting to view "+view+" with props "+Object.keys(props).join(","));
121 | _view.__SvelteComponentBuilder__(props);
122 | _view.__SvelteComponentBuilder__ = null;
123 | return;
124 | }
125 | }
126 |
127 | if (_view.__SvelteComponent__) {
128 | componentInstance = _view.__SvelteComponent__
129 | }
130 |
131 | if (componentInstance) {
132 | logger.debug(() => "updating view "+view+" with props "+Object.keys(props).join(","));
133 | componentInstance.$set(props)
134 | } else {
135 | console.error("Couldn't find component for ", view);
136 | }
137 | }
138 |
139 |
140 | private updateListItem(args: ListViewEventData) {
141 | let item;
142 | let listView = this.nativeView;
143 | let items = listView.items;
144 |
145 | if (args.index >= items.length) {
146 | logger.warn(() => "Got request for item at index that didn't exist");
147 | return;
148 | }
149 |
150 | //groups have index less than zero
151 | if (args.index < 0) {
152 | this.updateViewWithProps(args.view, { item: args.view.bindingContext.category } );
153 | return;
154 | }
155 |
156 | if (items.getItem) {
157 | item = items.getItem(args.index);
158 | } else {
159 | item = items[args.index]
160 | }
161 |
162 | this.updateViewWithProps(args.view, { item });
163 | }
164 |
165 | static register() {
166 | registerElement('listViewLinearLayout', () => new NativeElementNode('listViewLinearLayout', ListViewLinearLayout));
167 | registerElement('listViewGridLayout', () => new NativeElementNode('listViewGridLayout', ListViewGridLayout));
168 | registerElement('listViewStaggeredLayout', () => new NativeElementNode('listViewStaggeredLayout', ListViewStaggeredLayout));
169 |
170 | registerElement('reorderHandle', () => new NativeViewElementNode('reorderHandle', ReorderHandle));
171 |
172 | registerElement('radlistview', () => new RadListViewElement());
173 | }
174 | }
175 |
--------------------------------------------------------------------------------
/src/svelte-native-jsx-nativescript-ui-listview.d.ts:
--------------------------------------------------------------------------------
1 | export {} //Ensure this is a module
2 | type Color = import("@nativescript/core/color").Color;
3 | type KeyedTemplate = import("@nativescript/core/ui/core/view").KeyedTemplate;
4 | type ListViewItemAnimation = import("nativescript-ui-listview/common").ListViewItemAnimation;
5 | type ListViewLayoutBase = import("nativescript-ui-listview").ListViewLayoutBase;
6 | type ListViewLoadOnDemandMode = import("nativescript-ui-listview").ListViewLoadOnDemandMode;
7 | type ListViewReorderMode = import("nativescript-ui-listview").ListViewReorderMode;
8 | type ListViewScrollDirection = import("nativescript-ui-listview/common").ListViewScrollDirection;
9 | type ListViewScrollPosition = import("nativescript-ui-listview").ListViewScrollPosition;
10 | type ListViewSelectionBehavior = import("nativescript-ui-listview").ListViewSelectionBehavior;
11 | type NativescriptUiListviewListViewItemAnimation = import("nativescript-ui-listview").ListViewItemAnimation;
12 | type NativescriptUiListviewListViewScrollDirection = import("nativescript-ui-listview").ListViewScrollDirection;
13 | type PropertyChangeData = import("@nativescript/core/data/observable").PropertyChangeData;
14 | type PullToRefreshStyle = import("nativescript-ui-listview").PullToRefreshStyle;
15 | type View = import("@nativescript/core/ui/core/view").View;
16 | type Override = Omit & With
17 |
18 |
19 | declare global {
20 | namespace svelteNative.JSX {
21 |
22 | // index.d.ts
23 | type TListViewGridLayoutAttributes = Override void;
26 | onspanCountChange?: (args: PropertyChangeData) => void;
27 | spanCount?: string | number;
28 | }>
29 | interface ListViewGridLayoutAttributes extends TListViewGridLayoutAttributes {}
30 |
31 | // index.d.ts
32 | type TListViewLayoutBaseAttributes = Override void;
38 | onitemHeightChange?: (args: PropertyChangeData) => void;
39 | onitemInsertAnimationChange?: (args: PropertyChangeData) => void;
40 | onitemWidthChange?: (args: PropertyChangeData) => void;
41 | onscrollDirectionChange?: (args: PropertyChangeData) => void;
42 | scrollDirection?: ListViewScrollDirection;
43 | }>
44 | interface ListViewLayoutBaseAttributes extends TListViewLayoutBaseAttributes {}
45 |
46 | // index.d.ts
47 | type TListViewLinearLayoutAttributes = Override void;
56 | onitemDeleteAnimationChange?: (args: PropertyChangeData) => void;
57 | onitemHeightChange?: (args: PropertyChangeData) => void;
58 | onitemInsertAnimationChange?: (args: PropertyChangeData) => void;
59 | onitemWidthChange?: (args: PropertyChangeData) => void;
60 | onscrollDirectionChange?: (args: PropertyChangeData) => void;
61 | scrollDirection?: NativescriptUiListviewListViewScrollDirection;
62 | }>
63 | interface ListViewLinearLayoutAttributes extends TListViewLinearLayoutAttributes {}
64 |
65 | // index.d.ts
66 | type TListViewStaggeredLayoutAttributes = Override
69 | interface ListViewStaggeredLayoutAttributes extends TListViewStaggeredLayoutAttributes {}
70 |
71 | // common.d.ts
72 | type TPullToRefreshStyleAttributes = Override void;
76 | onindicatorColorChange?: (args: PropertyChangeData) => void;
77 | }>
78 | interface PullToRefreshStyleAttributes extends TPullToRefreshStyleAttributes {}
79 |
80 | // common.d.ts
81 | type TRadListViewAttributes = Override boolean);
84 | footerItemTemplate?: string;
85 | groupTemplate?: string;
86 | groupingFunction?: string | ((item: any) => any);
87 | headerItemTemplate?: string;
88 | isDataOperationsEnabled?: boolean;
89 | itemReorder?: string | boolean;
90 | itemSelectedBackgroundColor?: string | Color;
91 | itemSwipe?: string;
92 | itemSwipeTemplate?: string;
93 | itemTemplate?: string;
94 | itemTemplateSelector?: string | ((item: any, index: number, items: any) => string);
95 | itemTemplates?: string | KeyedTemplate[];
96 | itemViewDisposer?: () => void;
97 | itemViewLoader?: (viewType: any) => View;
98 | items?: string | any;
99 | listViewLayout?: string | ListViewLayoutBase;
100 | loadOnDemandBufferSize?: string | number;
101 | loadOnDemandItemTemplate?: string;
102 | loadOnDemandMode?: ListViewLoadOnDemandMode;
103 | multipleSelection?: string | boolean;
104 | nativeScriptViewAdded?: (parent: View, child: View) => void;
105 | onenableCollapsibleGroupsChange?: (args: PropertyChangeData) => void;
106 | onfilteringFunctionChange?: (args: PropertyChangeData) => void;
107 | onfooterItemTemplateChange?: (args: PropertyChangeData) => void;
108 | ongroupTemplateChange?: (args: PropertyChangeData) => void;
109 | ongroupingFunctionChange?: (args: PropertyChangeData) => void;
110 | onheaderItemTemplateChange?: (args: PropertyChangeData) => void;
111 | onitemReorderChange?: (args: PropertyChangeData) => void;
112 | onitemSelectedBackgroundColorChange?: (args: PropertyChangeData) => void;
113 | onitemSwipeChange?: (args: PropertyChangeData) => void;
114 | onitemSwipeTemplateChange?: (args: PropertyChangeData) => void;
115 | onitemTemplateChange?: (args: PropertyChangeData) => void;
116 | onitemTemplateSelectorChange?: (args: PropertyChangeData) => void;
117 | onitemTemplatesChange?: (args: PropertyChangeData) => void;
118 | onitemsChange?: (args: PropertyChangeData) => void;
119 | onlistViewLayoutChange?: (args: PropertyChangeData) => void;
120 | onloadOnDemandBufferSizeChange?: (args: PropertyChangeData) => void;
121 | onloadOnDemandItemTemplateChange?: (args: PropertyChangeData) => void;
122 | onloadOnDemandModeChange?: (args: PropertyChangeData) => void;
123 | onmultipleSelectionChange?: (args: PropertyChangeData) => void;
124 | onpullToRefreshChange?: (args: PropertyChangeData) => void;
125 | onpullToRefreshStyleChange?: (args: PropertyChangeData) => void;
126 | onreorderModeChange?: (args: PropertyChangeData) => void;
127 | onscrollPositionChange?: (args: PropertyChangeData) => void;
128 | onselectionBehaviorChange?: (args: PropertyChangeData) => void;
129 | onsortingFunctionChange?: (args: PropertyChangeData) => void;
130 | onswipeActionsChange?: (args: PropertyChangeData) => void;
131 | pullToRefresh?: string | boolean;
132 | pullToRefreshStyle?: string | PullToRefreshStyle;
133 | reorderMode?: ListViewReorderMode;
134 | scrollPosition?: ListViewScrollPosition;
135 | selectionBehavior?: ListViewSelectionBehavior;
136 | sortingFunction?: string | ((item: any, otherItem: any) => number);
137 | swipeActions?: string | boolean;
138 | }>
139 | interface RadListViewAttributes extends TRadListViewAttributes {}
140 |
141 | // common.d.ts
142 | type TReorderHandleAttributes = Override
145 | interface ReorderHandleAttributes extends TReorderHandleAttributes {}
146 |
147 |
148 | interface IntrinsicElements {
149 | listViewGridLayout: ListViewGridLayoutAttributes;
150 | listViewLinearLayout: ListViewLinearLayoutAttributes;
151 | listViewStaggeredLayout: ListViewStaggeredLayoutAttributes;
152 | pullToRefreshStyle: PullToRefreshStyleAttributes;
153 | radListView: RadListViewAttributes;
154 | reorderHandle: ReorderHandleAttributes;
155 | }
156 |
157 |
158 | }
159 | }
160 |
--------------------------------------------------------------------------------
/src/svelte-native-jsx-nativescript-ui-gauge.d.ts:
--------------------------------------------------------------------------------
1 | export {} //Ensure this is a module
2 | type BarIndicatorStyle = import("nativescript-ui-gauge").BarIndicatorStyle;
3 | type Color = import("@nativescript/core/color").Color;
4 | type CommonGaugeScale = import("nativescript-ui-gauge/common").GaugeScale;
5 | type GaugeIndicator = import("nativescript-ui-gauge").GaugeIndicator;
6 | type GaugeIndicatorCapMode = import("nativescript-ui-gauge").GaugeIndicatorCapMode;
7 | type GaugeIndicatorValueMapper = import("nativescript-ui-gauge/initializers/gauges-initializers.common").GaugeIndicatorValueMapper;
8 | type GaugeScale = import("nativescript-ui-gauge").GaugeScale;
9 | type GaugeScaleLayoutMode = import("nativescript-ui-gauge").GaugeScaleLayoutMode;
10 | type GaugeScaleValueMapper = import("nativescript-ui-gauge/initializers/gauges-initializers.common").GaugeScaleValueMapper;
11 | type NeedleStyle = import("nativescript-ui-gauge").NeedleStyle;
12 | type ObservableArray = import("@nativescript/core/data/observable-array").ObservableArray;
13 | type PropertyChangeData = import("@nativescript/core/data/observable").PropertyChangeData;
14 | type RadGauge = import("nativescript-ui-gauge/common").RadGauge;
15 | type RadGaugeValueMapper = import("nativescript-ui-gauge/initializers/gauges-initializers.common").RadGaugeValueMapper;
16 | type ScaleStyle = import("nativescript-ui-gauge").ScaleStyle;
17 | type SubtitleStyle = import("nativescript-ui-gauge").SubtitleStyle;
18 | type TitleStyle = import("nativescript-ui-gauge").TitleStyle;
19 | type Override = Omit & With
20 |
21 |
22 | declare global {
23 | namespace svelteNative.JSX {
24 |
25 | // common.d.ts
26 | type TBarIndicatorAttributes = Override void;
34 | onindicatorStyleChange?: (args: PropertyChangeData) => void;
35 | onlocationChange?: (args: PropertyChangeData) => void;
36 | onmaximumChange?: (args: PropertyChangeData) => void;
37 | onminimumChange?: (args: PropertyChangeData) => void;
38 | }>
39 | interface BarIndicatorAttributes extends TBarIndicatorAttributes {}
40 |
41 | // common.d.ts
42 | type TBarIndicatorStyleAttributes = Override void;
46 | oncapChange?: (args: PropertyChangeData) => void;
47 | }>
48 | interface BarIndicatorStyleAttributes extends TBarIndicatorStyleAttributes {}
49 |
50 | // common.d.ts
51 | type TGaugeIndicatorAttributes = Override void;
59 | onisAnimatedChange?: (args: PropertyChangeData) => void;
60 | owner?: CommonGaugeScale;
61 | }>
62 | interface GaugeIndicatorAttributes extends TGaugeIndicatorAttributes {}
63 |
64 | // common.d.ts
65 | type TGaugeScaleAttributes = Override;
68 | initializer?: GaugeScaleValueMapper;
69 | ios?: any;
70 | maximum?: string | number;
71 | minimum?: string | number;
72 | nativeObject?: any;
73 | onindicatorsChange?: (args: PropertyChangeData) => void;
74 | onmaximumChange?: (args: PropertyChangeData) => void;
75 | onminimumChange?: (args: PropertyChangeData) => void;
76 | onscaleStyleChange?: (args: PropertyChangeData) => void;
77 | owner?: RadGauge;
78 | scaleStyle?: string | ScaleStyle;
79 | }>
80 | interface GaugeScaleAttributes extends TGaugeScaleAttributes {}
81 |
82 | // common.d.ts
83 | type TGaugeStyleBaseAttributes = Override void;
86 | onstrokeColorChange?: (args: PropertyChangeData) => void;
87 | onstrokeWidthChange?: (args: PropertyChangeData) => void;
88 | owner?: any;
89 | strokeColor?: string | Color;
90 | strokeWidth?: string;
91 | }>
92 | interface GaugeStyleBaseAttributes extends TGaugeStyleBaseAttributes {}
93 |
94 | // common.d.ts
95 | type TIndicatorStyleAttributes = Override
98 | interface IndicatorStyleAttributes extends TIndicatorStyleAttributes {}
99 |
100 | // common.d.ts
101 | type TNeedleStyleAttributes = Override void;
111 | oncircleFillColorChange?: (args: PropertyChangeData) => void;
112 | oncircleInnerRadiusChange?: (args: PropertyChangeData) => void;
113 | oncircleRadiusChange?: (args: PropertyChangeData) => void;
114 | oncircleStrokeColorChange?: (args: PropertyChangeData) => void;
115 | oncircleStrokeWidthChange?: (args: PropertyChangeData) => void;
116 | onlengthChange?: (args: PropertyChangeData) => void;
117 | onoffsetChange?: (args: PropertyChangeData) => void;
118 | ontopWidthChange?: (args: PropertyChangeData) => void;
119 | topWidth?: string | number;
120 | }>
121 | interface NeedleStyleAttributes extends TNeedleStyleAttributes {}
122 |
123 | // common.d.ts
124 | type TRadGaugeAttributes = Override void;
129 | onscalesChange?: (args: PropertyChangeData) => void;
130 | onsubtitleChange?: (args: PropertyChangeData) => void;
131 | onsubtitleStyleChange?: (args: PropertyChangeData) => void;
132 | ontitleChange?: (args: PropertyChangeData) => void;
133 | ontitleStyleChange?: (args: PropertyChangeData) => void;
134 | scales?: string | ObservableArray;
135 | subtitle?: string;
136 | subtitleStyle?: string | SubtitleStyle;
137 | title?: string;
138 | titleStyle?: string | TitleStyle;
139 | }>
140 | interface RadGaugeAttributes extends TRadGaugeAttributes {}
141 |
142 | // common.d.ts
143 | type TRadRadialGaugeAttributes = Override
146 | interface RadRadialGaugeAttributes extends TRadRadialGaugeAttributes {}
147 |
148 | // common.d.ts
149 | type TRadialBarIndicatorAttributes = Override
152 | interface RadialBarIndicatorAttributes extends TRadialBarIndicatorAttributes {}
153 |
154 | // common.d.ts
155 | type TRadialNeedleAttributes = Override void;
159 | onvalueChange?: (args: PropertyChangeData) => void;
160 | value?: string | number;
161 | }>
162 | interface RadialNeedleAttributes extends TRadialNeedleAttributes {}
163 |
164 | // common.d.ts
165 | type TRadialScaleAttributes = Override void;
167 | onstartAngleChange?: (args: PropertyChangeData) => void;
168 | onsweepAngleChange?: (args: PropertyChangeData) => void;
169 | radius?: string | number;
170 | startAngle?: string | number;
171 | sweepAngle?: string | number;
172 | }>
173 | interface RadialScaleAttributes extends TRadialScaleAttributes {}
174 |
175 | // common.d.ts
176 | type TScaleStyleAttributes = Override void;
198 | onlabelsCountChange?: (args: PropertyChangeData) => void;
199 | onlabelsLayoutModeChange?: (args: PropertyChangeData) => void;
200 | onlabelsOffsetChange?: (args: PropertyChangeData) => void;
201 | onlabelsSizeChange?: (args: PropertyChangeData) => void;
202 | onlabelsVisibleChange?: (args: PropertyChangeData) => void;
203 | onlineColorChange?: (args: PropertyChangeData) => void;
204 | onlineThicknessChange?: (args: PropertyChangeData) => void;
205 | onmajorTicksCountChange?: (args: PropertyChangeData) => void;
206 | onmajorTicksFillColorChange?: (args: PropertyChangeData) => void;
207 | onmajorTicksLengthChange?: (args: PropertyChangeData) => void;
208 | onmajorTicksStrokeColorChange?: (args: PropertyChangeData) => void;
209 | onmajorTicksStrokeWidthChange?: (args: PropertyChangeData) => void;
210 | onmajorTicksWidthChange?: (args: PropertyChangeData) => void;
211 | onminorTicksCountChange?: (args: PropertyChangeData) => void;
212 | onminorTicksFillColorChange?: (args: PropertyChangeData) => void;
213 | onminorTicksLengthChange?: (args: PropertyChangeData) => void;
214 | onminorTicksStrokeColorChange?: (args: PropertyChangeData) => void;
215 | onminorTicksStrokeWidthChange?: (args: PropertyChangeData) => void;
216 | onminorTicksWidthChange?: (args: PropertyChangeData) => void;
217 | onticksLayoutModeChange?: (args: PropertyChangeData) => void;
218 | onticksOffsetChange?: (args: PropertyChangeData) => void;
219 | onticksVisibleChange?: (args: PropertyChangeData) => void;
220 | ticksLayoutMode?: GaugeScaleLayoutMode;
221 | ticksOffset?: string | number;
222 | ticksVisible?: string | boolean;
223 | }>
224 | interface ScaleStyleAttributes extends TScaleStyleAttributes {}
225 |
226 | // common.d.ts
227 | type TSubtitleStyleAttributes = Override
230 | interface SubtitleStyleAttributes extends TSubtitleStyleAttributes {}
231 |
232 | // common.d.ts
233 | type TTitleStyleAttributes = Override void;
236 | ontextColorChange?: (args: PropertyChangeData) => void;
237 | ontextSizeChange?: (args: PropertyChangeData) => void;
238 | onverticalOffsetChange?: (args: PropertyChangeData) => void;
239 | textColor?: string | Color;
240 | textSize?: string | number;
241 | verticalOffset?: string | number;
242 | }>
243 | interface TitleStyleAttributes extends TTitleStyleAttributes {}
244 |
245 |
246 | interface IntrinsicElements {
247 | barIndicator: BarIndicatorAttributes;
248 | barIndicatorStyle: BarIndicatorStyleAttributes;
249 | gaugeIndicator: GaugeIndicatorAttributes;
250 | gaugeScale: GaugeScaleAttributes;
251 | indicatorStyle: IndicatorStyleAttributes;
252 | needleStyle: NeedleStyleAttributes;
253 | radGauge: RadGaugeAttributes;
254 | radRadialGauge: RadRadialGaugeAttributes;
255 | radialBarIndicator: RadialBarIndicatorAttributes;
256 | radialNeedle: RadialNeedleAttributes;
257 | radialScale: RadialScaleAttributes;
258 | scaleStyle: ScaleStyleAttributes;
259 | subtitleStyle: SubtitleStyleAttributes;
260 | titleStyle: TitleStyleAttributes;
261 | }
262 |
263 |
264 | }
265 | }
266 |
--------------------------------------------------------------------------------
/src/svelte-native-jsx-nativescript-ui-dataform.d.ts:
--------------------------------------------------------------------------------
1 | export {} //Ensure this is a module
2 | type AutoCompleteDisplayMode = import("C:/dev/nativescript/svelte-native-nativescript-ui/node_modules/nativescript-ui-autocomplete").AutoCompleteDisplayMode;
3 | type Color = import("@nativescript/core/color").Color;
4 | type DataFormCommitMode = import("nativescript-ui-dataform").DataFormCommitMode;
5 | type DataFormEditorType = import("nativescript-ui-dataform").DataFormEditorType;
6 | type DataFormFontStyle = import("nativescript-ui-dataform").DataFormFontStyle;
7 | type DataFormLabelPosition = import("nativescript-ui-dataform").DataFormLabelPosition;
8 | type DataFormLayout = import("nativescript-ui-dataform").DataFormLayout;
9 | type DataFormValidationMode = import("nativescript-ui-dataform").DataFormValidationMode;
10 | type EntityProperty = import("nativescript-ui-dataform").EntityProperty;
11 | type GroupTitleStyle = import("nativescript-ui-dataform").GroupTitleStyle;
12 | type PropertyChangeData = import("@nativescript/core/data/observable").PropertyChangeData;
13 | type PropertyConverter = import("nativescript-ui-dataform").PropertyConverter;
14 | type PropertyEditor = import("nativescript-ui-dataform").PropertyEditor;
15 | type PropertyEditorParams = import("nativescript-ui-dataform/common").PropertyEditorParams;
16 | type PropertyEditorStyle = import("nativescript-ui-dataform").PropertyEditorStyle;
17 | type PropertyGroup = import("nativescript-ui-dataform").PropertyGroup;
18 | type PropertyValidator = import("nativescript-ui-dataform").PropertyValidator;
19 | type Override = Omit & With
20 |
21 |
22 | declare global {
23 | namespace svelteNative.JSX {
24 |
25 | // common.d.ts
26 | type TCustomPropertyEditorAttributes = Override
30 | interface CustomPropertyEditorAttributes extends TCustomPropertyEditorAttributes {}
31 |
32 | // common.d.ts
33 | type TDataFormEditorCoreAttributes = Override
37 | interface DataFormEditorCoreAttributes extends TDataFormEditorCoreAttributes {}
38 |
39 | // common.d.ts
40 | type TDataFormEditorLabelAttributes = Override
44 | interface DataFormEditorLabelAttributes extends TDataFormEditorLabelAttributes {}
45 |
46 | // common.d.ts
47 | type TDataFormGridLayoutAttributes = Override
50 | interface DataFormGridLayoutAttributes extends TDataFormGridLayoutAttributes {}
51 |
52 | // common.d.ts
53 | type TDataFormLayoutAttributes = Override
56 | interface DataFormLayoutAttributes extends TDataFormLayoutAttributes {}
57 |
58 | // common.d.ts
59 | type TDataFormStackLayoutAttributes = Override void;
61 | orientation?: string | any;
62 | }>
63 | interface DataFormStackLayoutAttributes extends TDataFormStackLayoutAttributes {}
64 |
65 | // common.d.ts
66 | type TDataFormStyleBaseAttributes = Override void;
73 | onlabelFontNameChange?: (args: PropertyChangeData) => void;
74 | onlabelFontStyleChange?: (args: PropertyChangeData) => void;
75 | onlabelTextColorChange?: (args: PropertyChangeData) => void;
76 | onlabelTextSizeChange?: (args: PropertyChangeData) => void;
77 | onseparatorColorChange?: (args: PropertyChangeData) => void;
78 | onstrokeColorChange?: (args: PropertyChangeData) => void;
79 | onstrokeWidthChange?: (args: PropertyChangeData) => void;
80 | separatorColor?: string | Color;
81 | strokeColor?: string | Color;
82 | strokeWidth?: string | number;
83 | }>
84 | interface DataFormStyleBaseAttributes extends TDataFormStyleBaseAttributes {}
85 |
86 | // common.d.ts
87 | type TEmailValidatorAttributes = Override
90 | interface EmailValidatorAttributes extends TEmailValidatorAttributes {}
91 |
92 | // common.d.ts
93 | type TEntityPropertyAttributes = Override void;
109 | oncolumnIndexChange?: (args: PropertyChangeData) => void;
110 | onconverterChange?: (args: PropertyChangeData) => void;
111 | ondisplayNameChange?: (args: PropertyChangeData) => void;
112 | oneditorChange?: (args: PropertyChangeData) => void;
113 | onhiddenChange?: (args: PropertyChangeData) => void;
114 | onhintTextChange?: (args: PropertyChangeData) => void;
115 | onimageResourceChange?: (args: PropertyChangeData) => void;
116 | onindexChange?: (args: PropertyChangeData) => void;
117 | onnameChange?: (args: PropertyChangeData) => void;
118 | onreadOnlyChange?: (args: PropertyChangeData) => void;
119 | onrequiredChange?: (args: PropertyChangeData) => void;
120 | onvalidatorsChange?: (args: PropertyChangeData) => void;
121 | onvaluesProviderChange?: (args: PropertyChangeData) => void;
122 | readOnly?: string | boolean;
123 | required?: string | boolean;
124 | successMessage?: string;
125 | validators?: string | PropertyValidator[];
126 | value?: any;
127 | valueCandidate?: any;
128 | valuesProvider?: string | any;
129 | }>
130 | interface EntityPropertyAttributes extends TEntityPropertyAttributes {}
131 |
132 | // common.d.ts
133 | type TGroupTitleStyleAttributes = Override
136 | interface GroupTitleStyleAttributes extends TGroupTitleStyleAttributes {}
137 |
138 | // common.d.ts
139 | type TIsTrueValidatorAttributes = Override
142 | interface IsTrueValidatorAttributes extends TIsTrueValidatorAttributes {}
143 |
144 | // common.d.ts
145 | type TLengthValidatorAttributes = Override void;
148 | }>
149 | interface LengthValidatorAttributes extends TLengthValidatorAttributes {}
150 |
151 | // common.d.ts
152 | type TMaximumLengthValidatorAttributes = Override
155 | interface MaximumLengthValidatorAttributes extends TMaximumLengthValidatorAttributes {}
156 |
157 | // common.d.ts
158 | type TMinimumLengthValidatorAttributes = Override
161 | interface MinimumLengthValidatorAttributes extends TMinimumLengthValidatorAttributes {}
162 |
163 | // common.d.ts
164 | type TNonEmptyValidatorAttributes = Override
167 | interface NonEmptyValidatorAttributes extends TNonEmptyValidatorAttributes {}
168 |
169 | // common.d.ts
170 | type TPhoneValidatorAttributes = Override
173 | interface PhoneValidatorAttributes extends TPhoneValidatorAttributes {}
174 |
175 | // common.d.ts
176 | type TPropertyEditorAttributes = Override void;
182 | onpropertyEditorStyleChange?: (args: PropertyChangeData) => void;
183 | ontypeChange?: (args: PropertyChangeData) => void;
184 | params?: string | PropertyEditorParams;
185 | propertyEditorStyle?: string | PropertyEditorStyle;
186 | type?: DataFormEditorType;
187 | }>
188 | interface PropertyEditorAttributes extends TPropertyEditorAttributes {}
189 |
190 | // common.d.ts
191 | type TPropertyEditorParamsAttributes = Override void;
195 | onminimumChange?: (args: PropertyChangeData) => void;
196 | onstepChange?: (args: PropertyChangeData) => void;
197 | step?: string | number;
198 | }>
199 | interface PropertyEditorParamsAttributes extends TPropertyEditorParamsAttributes {}
200 |
201 | // common.d.ts
202 | type TPropertyEditorStyleAttributes = Override void;
211 | oneditorVerticalOffsetChange?: (args: PropertyChangeData) => void;
212 | onlabelHiddenChange?: (args: PropertyChangeData) => void;
213 | onlabelHorizontalOffsetChange?: (args: PropertyChangeData) => void;
214 | onlabelPositionChange?: (args: PropertyChangeData) => void;
215 | onlabelVerticalOffsetChange?: (args: PropertyChangeData) => void;
216 | onlabelWidthChange?: (args: PropertyChangeData) => void;
217 | }>
218 | interface PropertyEditorStyleAttributes extends TPropertyEditorStyleAttributes {}
219 |
220 | // common.d.ts
221 | type TPropertyGroupAttributes = Override void;
228 | oncollapsibleChange?: (args: PropertyChangeData) => void;
229 | onhiddenChange?: (args: PropertyChangeData) => void;
230 | onlayoutChange?: (args: PropertyChangeData) => void;
231 | onnameChange?: (args: PropertyChangeData) => void;
232 | onpropertiesChange?: (args: PropertyChangeData) => void;
233 | ontitleHiddenChange?: (args: PropertyChangeData) => void;
234 | ontitleStyleChange?: (args: PropertyChangeData) => void;
235 | properties?: string | EntityProperty[];
236 | titleHidden?: string | boolean;
237 | titleStyle?: string | GroupTitleStyle;
238 | }>
239 | interface PropertyGroupAttributes extends TPropertyGroupAttributes {}
240 |
241 | // common.d.ts
242 | type TPropertyValidatorAttributes = Override void;
247 | onsuccessMessageChange?: (args: PropertyChangeData) => void;
248 | successMessage?: string;
249 | }>
250 | interface PropertyValidatorAttributes extends TPropertyValidatorAttributes {}
251 |
252 | // common.d.ts
253 | type TRadDataFormAttributes = Override void;
260 | ongroupsChange?: (args: PropertyChangeData) => void;
261 | onisReadOnlyChange?: (args: PropertyChangeData) => void;
262 | onmetadataChange?: (args: PropertyChangeData) => void;
263 | onpropertiesChange?: (args: PropertyChangeData) => void;
264 | onsourceChange?: (args: PropertyChangeData) => void;
265 | onvalidationModeChange?: (args: PropertyChangeData) => void;
266 | properties?: string | EntityProperty[];
267 | source?: string | any;
268 | validationMode?: DataFormValidationMode;
269 | }>
270 | interface RadDataFormAttributes extends TRadDataFormAttributes {}
271 |
272 | // common.d.ts
273 | type TRangeValidatorAttributes = Override void;
277 | onminimumChange?: (args: PropertyChangeData) => void;
278 | }>
279 | interface RangeValidatorAttributes extends TRangeValidatorAttributes {}
280 |
281 | // common.d.ts
282 | type TRegExValidatorAttributes = Override void;
284 | regEx?: string;
285 | }>
286 | interface RegExValidatorAttributes extends TRegExValidatorAttributes {}
287 |
288 |
289 | interface IntrinsicElements {
290 | customPropertyEditor: CustomPropertyEditorAttributes;
291 | dataFormEditorCore: DataFormEditorCoreAttributes;
292 | dataFormEditorLabel: DataFormEditorLabelAttributes;
293 | dataFormGridLayout: DataFormGridLayoutAttributes;
294 | dataFormLayout: DataFormLayoutAttributes;
295 | dataFormStackLayout: DataFormStackLayoutAttributes;
296 | emailValidator: EmailValidatorAttributes;
297 | entityProperty: EntityPropertyAttributes;
298 | groupTitleStyle: GroupTitleStyleAttributes;
299 | isTrueValidator: IsTrueValidatorAttributes;
300 | lengthValidator: LengthValidatorAttributes;
301 | maximumLengthValidator: MaximumLengthValidatorAttributes;
302 | minimumLengthValidator: MinimumLengthValidatorAttributes;
303 | nonEmptyValidator: NonEmptyValidatorAttributes;
304 | phoneValidator: PhoneValidatorAttributes;
305 | propertyEditor: PropertyEditorAttributes;
306 | propertyEditorParams: PropertyEditorParamsAttributes;
307 | propertyEditorStyle: PropertyEditorStyleAttributes;
308 | propertyGroup: PropertyGroupAttributes;
309 | propertyValidator: PropertyValidatorAttributes;
310 | radDataForm: RadDataFormAttributes;
311 | rangeValidator: RangeValidatorAttributes;
312 | regExValidator: RegExValidatorAttributes;
313 | }
314 |
315 |
316 | }
317 | }
318 |
--------------------------------------------------------------------------------
/src/svelte-native-jsx-nativescript-ui-calendar.d.ts:
--------------------------------------------------------------------------------
1 | export {} //Ensure this is a module
2 | type CalendarCellAlignment = import("nativescript-ui-calendar").CalendarCellAlignment;
3 | type CalendarDayViewStyle = import("nativescript-ui-calendar").CalendarDayViewStyle;
4 | type CalendarEvent = import("nativescript-ui-calendar").CalendarEvent;
5 | type CalendarEventsViewMode = import("nativescript-ui-calendar").CalendarEventsViewMode;
6 | type CalendarFontStyle = import("nativescript-ui-calendar").CalendarFontStyle;
7 | type CalendarMonthNamesViewStyle = import("nativescript-ui-calendar").CalendarMonthNamesViewStyle;
8 | type CalendarMonthViewStyle = import("nativescript-ui-calendar").CalendarMonthViewStyle;
9 | type CalendarSelectionMode = import("nativescript-ui-calendar").CalendarSelectionMode;
10 | type CalendarSelectionShape = import("nativescript-ui-calendar").CalendarSelectionShape;
11 | type CalendarTransitionMode = import("nativescript-ui-calendar").CalendarTransitionMode;
12 | type CalendarViewMode = import("nativescript-ui-calendar").CalendarViewMode;
13 | type CalendarWeekViewStyle = import("nativescript-ui-calendar").CalendarWeekViewStyle;
14 | type CalendarYearViewStyle = import("nativescript-ui-calendar").CalendarYearViewStyle;
15 | type CellStyle = import("nativescript-ui-calendar").CellStyle;
16 | type Color = import("@nativescript/core/color").Color;
17 | type CommonCalendarFontStyle = import("nativescript-ui-calendar/common").CalendarFontStyle;
18 | type CommonCellStyle = import("nativescript-ui-calendar/common").CellStyle;
19 | type DateRange = import("nativescript-ui-calendar").DateRange;
20 | type DayCellStyle = import("nativescript-ui-calendar").DayCellStyle;
21 | type DayEventsViewStyle = import("nativescript-ui-calendar").DayEventsViewStyle;
22 | type InlineEventCellStyle = import("nativescript-ui-calendar").InlineEventCellStyle;
23 | type MonthCellStyle = import("nativescript-ui-calendar").MonthCellStyle;
24 | type ObservableArray = import("@nativescript/core/data/observable-array").ObservableArray;
25 | type PropertyChangeData = import("@nativescript/core/data/observable").PropertyChangeData;
26 | type RadCalendar = import("nativescript-ui-calendar/common").RadCalendar;
27 | type Override = Omit & With
28 |
29 |
30 | declare global {
31 | namespace svelteNative.JSX {
32 |
33 | // common.d.ts
34 | type TAllDayEventsViewStyleAttributes = Override void;
41 | onallDayTextIsVisibleChange?: (args: PropertyChangeData) => void;
42 | onbackgroundColorChange?: (args: PropertyChangeData) => void;
43 | owner?: any;
44 | }>
45 | interface AllDayEventsViewStyleAttributes extends TAllDayEventsViewStyleAttributes {}
46 |
47 | // common.d.ts
48 | type TCalendarDayViewStyleAttributes = Override void;
52 | ondayEventsViewStyleChange?: (args: PropertyChangeData) => void;
53 | onshowWeekChange?: (args: PropertyChangeData) => void;
54 | showWeek?: string | boolean;
55 | }>
56 | interface CalendarDayViewStyleAttributes extends TCalendarDayViewStyleAttributes {}
57 |
58 | // common.d.ts
59 | type TCalendarMonthNamesViewStyleAttributes = Override void;
62 | ontitleCellStyleChange?: (args: PropertyChangeData) => void;
63 | owner?: RadCalendar;
64 | titleCellStyle?: string | CommonCellStyle;
65 | }>
66 | interface CalendarMonthNamesViewStyleAttributes extends TCalendarMonthNamesViewStyleAttributes {}
67 |
68 | // common.d.ts
69 | type TCalendarMonthViewStyleAttributes = Override void;
77 | onbackgroundColorChange?: (args: PropertyChangeData) => void;
78 | ondayCellStyleChange?: (args: PropertyChangeData) => void;
79 | ondayNameCellStyleChange?: (args: PropertyChangeData) => void;
80 | ondisabledCellStyleChange?: (args: PropertyChangeData) => void;
81 | oninlineEventCellStyleChange?: (args: PropertyChangeData) => void;
82 | onselectedDayCellStyleChange?: (args: PropertyChangeData) => void;
83 | onselectionShapeChange?: (args: PropertyChangeData) => void;
84 | onselectionShapeColorChange?: (args: PropertyChangeData) => void;
85 | onselectionShapeSizeChange?: (args: PropertyChangeData) => void;
86 | onshowDayNamesChange?: (args: PropertyChangeData) => void;
87 | onshowTitleChange?: (args: PropertyChangeData) => void;
88 | onshowWeekNumbersChange?: (args: PropertyChangeData) => void;
89 | ontitleCellStyleChange?: (args: PropertyChangeData) => void;
90 | ontodayCellStyleChange?: (args: PropertyChangeData) => void;
91 | onweekNumberCellStyleChange?: (args: PropertyChangeData) => void;
92 | onweekendCellStyleChange?: (args: PropertyChangeData) => void;
93 | owner?: RadCalendar;
94 | selectedDayCellStyle?: string | DayCellStyle;
95 | selectionShape?: CalendarSelectionShape;
96 | selectionShapeColor?: string | Color;
97 | selectionShapeSize?: string | number;
98 | showDayNames?: string | boolean;
99 | showTitle?: string | boolean;
100 | showWeekNumbers?: string | boolean;
101 | titleCellStyle?: string | CellStyle;
102 | todayCellStyle?: string | DayCellStyle;
103 | weekNumberCellStyle?: string | CellStyle;
104 | weekendCellStyle?: string | CellStyle;
105 | }>
106 | interface CalendarMonthViewStyleAttributes extends TCalendarMonthViewStyleAttributes {}
107 |
108 | // common.d.ts
109 | type TCalendarWeekViewStyleAttributes = Override
112 | interface CalendarWeekViewStyleAttributes extends TCalendarWeekViewStyleAttributes {}
113 |
114 | // common.d.ts
115 | type TCalendarYearViewStyleAttributes = Override void;
118 | ontitleCellStyleChange?: (args: PropertyChangeData) => void;
119 | owner?: RadCalendar;
120 | titleCellStyle?: string | CellStyle;
121 | }>
122 | interface CalendarYearViewStyleAttributes extends TCalendarYearViewStyleAttributes {}
123 |
124 | // common.d.ts
125 | type TCellStyleAttributes = Override void;
139 | oncellBackgroundColorChange?: (args: PropertyChangeData) => void;
140 | oncellBorderColorChange?: (args: PropertyChangeData) => void;
141 | oncellBorderWidthChange?: (args: PropertyChangeData) => void;
142 | oncellPaddingHorizontalChange?: (args: PropertyChangeData) => void;
143 | oncellPaddingVerticalChange?: (args: PropertyChangeData) => void;
144 | oncellTextColorChange?: (args: PropertyChangeData) => void;
145 | oncellTextFontNameChange?: (args: PropertyChangeData) => void;
146 | oncellTextFontStyleChange?: (args: PropertyChangeData) => void;
147 | oncellTextSizeChange?: (args: PropertyChangeData) => void;
148 | owner?: any;
149 | }>
150 | interface CellStyleAttributes extends TCellStyleAttributes {}
151 |
152 | // common.d.ts
153 | type TDayCellStyleAttributes = Override void;
159 | oneventFontStyleChange?: (args: PropertyChangeData) => void;
160 | oneventTextColorChange?: (args: PropertyChangeData) => void;
161 | oneventTextSizeChange?: (args: PropertyChangeData) => void;
162 | onshowEventsTextChange?: (args: PropertyChangeData) => void;
163 | showEventsText?: string | boolean;
164 | }>
165 | interface DayCellStyleAttributes extends TDayCellStyleAttributes {}
166 |
167 | // common.d.ts
168 | type TDayEventsViewStyleAttributes = Override void;
173 | ontimeLabelFontNameChange?: (args: PropertyChangeData) => void;
174 | ontimeLabelFontStyleChange?: (args: PropertyChangeData) => void;
175 | ontimeLabelFormatChange?: (args: PropertyChangeData) => void;
176 | ontimeLabelTextColorChange?: (args: PropertyChangeData) => void;
177 | ontimeLabelTextSizeChange?: (args: PropertyChangeData) => void;
178 | ontimeLinesColorChange?: (args: PropertyChangeData) => void;
179 | ontimeLinesWidthChange?: (args: PropertyChangeData) => void;
180 | owner?: any;
181 | timeLabelFontName?: string;
182 | timeLabelFontStyle?: CommonCalendarFontStyle;
183 | timeLabelFormat?: string;
184 | timeLabelTextColor?: string | Color;
185 | timeLabelTextSize?: string | number;
186 | timeLinesColor?: string | Color;
187 | timeLinesWidth?: string | number;
188 | }>
189 | interface DayEventsViewStyleAttributes extends TDayEventsViewStyleAttributes {}
190 |
191 | // common.d.ts
192 | type TInlineEventCellStyleAttributes = Override void;
199 | oneventFontNameChange?: (args: PropertyChangeData) => void;
200 | oneventFontStyleChange?: (args: PropertyChangeData) => void;
201 | oneventTextColorChange?: (args: PropertyChangeData) => void;
202 | oneventTextSizeChange?: (args: PropertyChangeData) => void;
203 | ontimeFontNameChange?: (args: PropertyChangeData) => void;
204 | ontimeFontStyleChange?: (args: PropertyChangeData) => void;
205 | ontimeTextColorChange?: (args: PropertyChangeData) => void;
206 | ontimeTextSizeChange?: (args: PropertyChangeData) => void;
207 | timeFontName?: string;
208 | timeFontStyle?: CalendarFontStyle;
209 | timeTextColor?: string | Color;
210 | timeTextSize?: string | number;
211 | }>
212 | interface InlineEventCellStyleAttributes extends TInlineEventCellStyleAttributes {}
213 |
214 | // common.d.ts
215 | type TMonthCellStyleAttributes = Override void;
229 | ondayFontStyleChange?: (args: PropertyChangeData) => void;
230 | ondayNameFontNameChange?: (args: PropertyChangeData) => void;
231 | ondayNameFontStyleChange?: (args: PropertyChangeData) => void;
232 | ondayNameTextColorChange?: (args: PropertyChangeData) => void;
233 | ondayNameTextSizeChange?: (args: PropertyChangeData) => void;
234 | ondayTextColorChange?: (args: PropertyChangeData) => void;
235 | ondayTextSizeChange?: (args: PropertyChangeData) => void;
236 | onmonthNameFontNameChange?: (args: PropertyChangeData) => void;
237 | onmonthNameFontStyleChange?: (args: PropertyChangeData) => void;
238 | onmonthNameTextColorChange?: (args: PropertyChangeData) => void;
239 | onmonthNameTextSizeChange?: (args: PropertyChangeData) => void;
240 | ontodayTextColorChange?: (args: PropertyChangeData) => void;
241 | onweekendTextColorChange?: (args: PropertyChangeData) => void;
242 | owner?: any;
243 | todayTextColor?: string | Color;
244 | weekendTextColor?: string | Color;
245 | }>
246 | interface MonthCellStyleAttributes extends TMonthCellStyleAttributes {}
247 |
248 | // common.d.ts
249 | type TRadCalendarAttributes = Override;
253 | eventsViewMode?: CalendarEventsViewMode;
254 | horizontalTransition?: string | boolean;
255 | locale?: string;
256 | maxDate?: string | Date;
257 | minDate?: string | Date;
258 | monthNamesViewStyle?: string | CalendarMonthNamesViewStyle;
259 | monthViewStyle?: string | CalendarMonthViewStyle;
260 | ondayViewStyleChange?: (args: PropertyChangeData) => void;
261 | ondisplayedDateChange?: (args: PropertyChangeData) => void;
262 | oneventSourceChange?: (args: PropertyChangeData) => void;
263 | oneventsViewModeChange?: (args: PropertyChangeData) => void;
264 | onhorizontalTransitionChange?: (args: PropertyChangeData) => void;
265 | onlocaleChange?: (args: PropertyChangeData) => void;
266 | onmaxDateChange?: (args: PropertyChangeData) => void;
267 | onminDateChange?: (args: PropertyChangeData) => void;
268 | onmonthNamesViewStyleChange?: (args: PropertyChangeData) => void;
269 | onmonthViewStyleChange?: (args: PropertyChangeData) => void;
270 | onselectedDateChange?: (args: PropertyChangeData) => void;
271 | onselectedDateRangeChange?: (args: PropertyChangeData) => void;
272 | onselectedDatesChange?: (args: PropertyChangeData) => void;
273 | onselectionModeChange?: (args: PropertyChangeData) => void;
274 | ontransitionModeChange?: (args: PropertyChangeData) => void;
275 | onviewModeChange?: (args: PropertyChangeData) => void;
276 | onweekViewStyleChange?: (args: PropertyChangeData) => void;
277 | onyearViewStyleChange?: (args: PropertyChangeData) => void;
278 | selectedDate?: string | Date;
279 | selectedDateRange?: string | DateRange;
280 | selectedDates?: string | any;
281 | selectionMode?: CalendarSelectionMode;
282 | transitionMode?: CalendarTransitionMode;
283 | viewMode?: CalendarViewMode;
284 | weekViewStyle?: string | CalendarWeekViewStyle;
285 | yearViewStyle?: string | CalendarYearViewStyle;
286 | }>
287 | interface RadCalendarAttributes extends TRadCalendarAttributes {}
288 |
289 |
290 | interface IntrinsicElements {
291 | allDayEventsViewStyle: AllDayEventsViewStyleAttributes;
292 | calendarDayViewStyle: CalendarDayViewStyleAttributes;
293 | calendarMonthNamesViewStyle: CalendarMonthNamesViewStyleAttributes;
294 | calendarMonthViewStyle: CalendarMonthViewStyleAttributes;
295 | calendarWeekViewStyle: CalendarWeekViewStyleAttributes;
296 | calendarYearViewStyle: CalendarYearViewStyleAttributes;
297 | cellStyle: CellStyleAttributes;
298 | dayCellStyle: DayCellStyleAttributes;
299 | dayEventsViewStyle: DayEventsViewStyleAttributes;
300 | inlineEventCellStyle: InlineEventCellStyleAttributes;
301 | monthCellStyle: MonthCellStyleAttributes;
302 | radCalendar: RadCalendarAttributes;
303 | }
304 |
305 |
306 | }
307 | }
308 |
--------------------------------------------------------------------------------
/src/svelte-native-jsx-nativescript-ui-chart.d.ts:
--------------------------------------------------------------------------------
1 | export {} //Ensure this is a module
2 | type CartesianAxis = import("nativescript-ui-chart").CartesianAxis;
3 | type ChartAnnotationZPosition = import("nativescript-ui-chart").ChartAnnotationZPosition;
4 | type ChartAxisDateTimeComponent = import("nativescript-ui-chart").ChartAxisDateTimeComponent;
5 | type ChartAxisHorizontalLocation = import("nativescript-ui-chart").ChartAxisHorizontalLocation;
6 | type ChartAxisLabelFitMode = import("nativescript-ui-chart").ChartAxisLabelFitMode;
7 | type ChartAxisLabelLayoutMode = import("nativescript-ui-chart").ChartAxisLabelLayoutMode;
8 | type ChartAxisLabelVisibility = import("nativescript-ui-chart").ChartAxisLabelVisibility;
9 | type ChartAxisPlotMode = import("nativescript-ui-chart").ChartAxisPlotMode;
10 | type ChartAxisVerticalLocation = import("nativescript-ui-chart").ChartAxisVerticalLocation;
11 | type ChartBaseValueMapper = import("nativescript-ui-chart/initializers/chart-initializers.common").ChartBaseValueMapper;
12 | type ChartFontStyle = import("nativescript-ui-chart").ChartFontStyle;
13 | type ChartLegendOffsetOrigin = import("nativescript-ui-chart").ChartLegendOffsetOrigin;
14 | type ChartLegendPosition = import("nativescript-ui-chart").ChartLegendPosition;
15 | type ChartPaletteSeriesState = import("nativescript-ui-chart").ChartPaletteSeriesState;
16 | type ChartPublicEnumChartAxisLabelFitMode = import("nativescript-ui-chart/misc/chart-public-enum").ChartAxisLabelFitMode;
17 | type ChartPublicEnumChartAxisLabelLayoutMode = import("nativescript-ui-chart/misc/chart-public-enum").ChartAxisLabelLayoutMode;
18 | type ChartSelectionMode = import("nativescript-ui-chart").ChartSelectionMode;
19 | type ChartSeriesPaletteMode = import("nativescript-ui-chart").ChartSeriesPaletteMode;
20 | type ChartSeriesSelectionMode = import("nativescript-ui-chart").ChartSeriesSelectionMode;
21 | type ChartSeriesStackMode = import("nativescript-ui-chart").ChartSeriesStackMode;
22 | type ChartTrackballSnapMode = import("nativescript-ui-chart").ChartTrackballSnapMode;
23 | type Color = import("@nativescript/core/color").Color;
24 | type ObservableArray = import("@nativescript/core/data/observable-array").ObservableArray;
25 | type Palette = import("nativescript-ui-chart").Palette;
26 | type PaletteEntry = import("nativescript-ui-chart").PaletteEntry;
27 | type PointLabelStyle = import("nativescript-ui-chart").PointLabelStyle;
28 | type Property = import("@nativescript/core/ui/core/properties").Property;
29 | type PropertyChangeData = import("@nativescript/core/data/observable").PropertyChangeData;
30 | type RadCartesianChartGrid = import("nativescript-ui-chart").RadCartesianChartGrid;
31 | type RadLegendView = import("nativescript-ui-chart").RadLegendView;
32 | type Trackball = import("nativescript-ui-chart").Trackball;
33 | type Override = Omit & With
34 |
35 |
36 | declare global {
37 | namespace svelteNative.JSX {
38 |
39 | // index.d.ts
40 | type TAreaSeriesAttributes = Override
43 | interface AreaSeriesAttributes extends TAreaSeriesAttributes {}
44 |
45 | // index.d.ts
46 | type TBarSeriesAttributes = Override void;
50 | onminBarSizeChange?: (args: PropertyChangeData) => void;
51 | }>
52 | interface BarSeriesAttributes extends TBarSeriesAttributes {}
53 |
54 | // index.d.ts
55 | type TBubbleSeriesAttributes = Override void;
59 | onbubbleSizePropertyChange?: (args: PropertyChangeData) => void;
60 | }>
61 | interface BubbleSeriesAttributes extends TBubbleSeriesAttributes {}
62 |
63 | // index.d.ts
64 | type TCandlestickSeriesAttributes = Override void;
67 | }>
68 | interface CandlestickSeriesAttributes extends TCandlestickSeriesAttributes {}
69 |
70 | // index.d.ts
71 | type TCartesianAxisAttributes = Override;
85 | labelMargin?: string | any;
86 | labelRotationAngle?: string | any;
87 | labelSize?: string | any;
88 | labelTextColor?: string | Color;
89 | lineColor?: string | Color;
90 | lineHidden?: string | boolean;
91 | lineThickness?: string | number;
92 | onallowPanChange?: (args: PropertyChangeData) => void;
93 | onallowZoomChange?: (args: PropertyChangeData) => void;
94 | onhiddenChange?: (args: PropertyChangeData) => void;
95 | onhorizontalLocationChange?: (args: PropertyChangeData) => void;
96 | onidChange?: (args: PropertyChangeData) => void;
97 | onlabelBackgroundColorChange?: (args: PropertyChangeData) => void;
98 | onlabelBorderColorChange?: (args: PropertyChangeData) => void;
99 | onlabelBorderWidthChange?: (args: PropertyChangeData) => void;
100 | onlabelFitModeChange?: (args: PropertyChangeData) => void;
101 | onlabelFormatChange?: (args: PropertyChangeData) => void;
102 | onlabelLayoutModeChange?: (args: PropertyChangeData) => void;
103 | onlabelMarginChange?: (args: PropertyChangeData) => void;
104 | onlabelRotationAngleChange?: (args: PropertyChangeData) => void;
105 | onlabelSizeChange?: (args: PropertyChangeData) => void;
106 | onlabelTextColorChange?: (args: PropertyChangeData) => void;
107 | onlineColorChange?: (args: PropertyChangeData) => void;
108 | onlineHiddenChange?: (args: PropertyChangeData) => void;
109 | onlineThicknessChange?: (args: PropertyChangeData) => void;
110 | onticksColorChange?: (args: PropertyChangeData) => void;
111 | onticksHiddenChange?: (args: PropertyChangeData) => void;
112 | onticksLengthChange?: (args: PropertyChangeData) => void;
113 | onticksOffsetChange?: (args: PropertyChangeData) => void;
114 | onticksThicknessChange?: (args: PropertyChangeData) => void;
115 | onverticalLocationChange?: (args: PropertyChangeData) => void;
116 | ticksColor?: string | Color;
117 | ticksHidden?: string | boolean;
118 | ticksLength?: string | number;
119 | ticksOffset?: string | number;
120 | ticksThickness?: string | number;
121 | verticalLocation?: ChartAxisVerticalLocation;
122 | }>
123 | interface CartesianAxisAttributes extends TCartesianAxisAttributes {}
124 |
125 | // index.d.ts
126 | type TCartesianChartAnnotationAttributes = Override void;
130 | onhiddenChange?: (args: PropertyChangeData) => void;
131 | onstrokeColorChange?: (args: PropertyChangeData) => void;
132 | onstrokeDashPatternChange?: (args: PropertyChangeData) => void;
133 | onstrokeWidthChange?: (args: PropertyChangeData) => void;
134 | onzPositionChange?: (args: PropertyChangeData) => void;
135 | strokeColor?: string | Color;
136 | strokeDashPattern?: string;
137 | strokeWidth?: string | number;
138 | zPosition?: ChartAnnotationZPosition;
139 | }>
140 | interface CartesianChartAnnotationAttributes extends TCartesianChartAnnotationAttributes {}
141 |
142 | // index.d.ts
143 | type TCartesianSeriesAttributes = Override void;
147 | onhorizontalAxisChange?: (args: PropertyChangeData) => void;
148 | onpaletteModeChange?: (args: PropertyChangeData) => void;
149 | onstrokeColorChange?: (args: PropertyChangeData) => void;
150 | onstrokeWidthChange?: (args: PropertyChangeData) => void;
151 | onverticalAxisChange?: (args: PropertyChangeData) => void;
152 | paletteMode?: ChartSeriesPaletteMode;
153 | strokeColor?: string | Color;
154 | strokeWidth?: string | number;
155 | verticalAxis?: string | CartesianAxis;
156 | }>
157 | interface CartesianSeriesAttributes extends TCartesianSeriesAttributes {}
158 |
159 | // index.d.ts
160 | type TCategoricalAxisAttributes = Override void;
165 | onlastLabelVisibilityChange?: (args: PropertyChangeData) => void;
166 | onmajorTickIntervalChange?: (args: PropertyChangeData) => void;
167 | onplotModeChange?: (args: PropertyChangeData) => void;
168 | plotMode?: ChartAxisPlotMode;
169 | }>
170 | interface CategoricalAxisAttributes extends TCategoricalAxisAttributes {}
171 |
172 | // index.d.ts
173 | type TCategoricalSeriesAttributes = Override void;
176 | onstackModeChange?: (args: PropertyChangeData) => void;
177 | stackMode?: ChartSeriesStackMode;
178 | }>
179 | interface CategoricalSeriesAttributes extends TCategoricalSeriesAttributes {}
180 |
181 | // visualization\views\chart-axis.common.d.ts
182 | type TChartAxisLabelAttributes = Override void;
187 | onformatChange?: (args: PropertyChangeData) => void;
188 | onlayoutModeChange?: (args: PropertyChangeData) => void;
189 | onrotationAngleChange?: (args: PropertyChangeData) => void;
190 | rotationAngle?: string | number;
191 | }>
192 | interface ChartAxisLabelAttributes extends TChartAxisLabelAttributes {}
193 |
194 | // index.d.ts
195 | type TChartGridLineAnnotationAttributes = Override void;
197 | value?: string | any;
198 | }>
199 | interface ChartGridLineAnnotationAttributes extends TChartGridLineAnnotationAttributes {}
200 |
201 | // index.d.ts
202 | type TChartPlotBandAnnotationAttributes = Override void;
207 | onmaxValueChange?: (args: PropertyChangeData) => void;
208 | onminValueChange?: (args: PropertyChangeData) => void;
209 | }>
210 | interface ChartPlotBandAnnotationAttributes extends TChartPlotBandAnnotationAttributes {}
211 |
212 | // index.d.ts
213 | type TChartSeriesAttributes = Override void;
220 | onlabelStyleChange?: (args: PropertyChangeData) => void;
221 | onlegendTitleChange?: (args: PropertyChangeData) => void;
222 | onselectionModeChange?: (args: PropertyChangeData) => void;
223 | onshowLabelsChange?: (args: PropertyChangeData) => void;
224 | onvalueChange?: (args: PropertyChangeData) => void;
225 | onvaluePropertyChange?: (args: PropertyChangeData) => void;
226 | selectionMode?: ChartSeriesSelectionMode;
227 | seriesName?: string;
228 | showLabels?: string | boolean;
229 | value?: string | any;
230 | valueProperty?: string | any;
231 | }>
232 | interface ChartSeriesAttributes extends TChartSeriesAttributes {}
233 |
234 | // visualization\views\chart-series.common.d.ts
235 | type TChartSeriesLabelAttributes = Override void;
238 | }>
239 | interface ChartSeriesLabelAttributes extends TChartSeriesLabelAttributes {}
240 |
241 | // index.d.ts
242 | type TDateTimeCategoricalAxisAttributes = Override void;
246 | ondateTimeComponentChange?: (args: PropertyChangeData) => void;
247 | }>
248 | interface DateTimeCategoricalAxisAttributes extends TDateTimeCategoricalAxisAttributes {}
249 |
250 | // index.d.ts
251 | type TDateTimeContinuousAxisAttributes = Override void;
255 | onmajorStepUnitChange?: (args: PropertyChangeData) => void;
256 | onplotModeChange?: (args: PropertyChangeData) => void;
257 | onsourceDateFormatChange?: (args: PropertyChangeData) => void;
258 | plotMode?: ChartAxisPlotMode;
259 | sourceDateFormat?: string;
260 | }>
261 | interface DateTimeContinuousAxisAttributes extends TDateTimeContinuousAxisAttributes {}
262 |
263 | // index.d.ts
264 | type TDonutSeriesAttributes = Override void;
267 | }>
268 | interface DonutSeriesAttributes extends TDonutSeriesAttributes {}
269 |
270 | // index.d.ts
271 | type TLineSeriesAttributes = Override
274 | interface LineSeriesAttributes extends TLineSeriesAttributes {}
275 |
276 | // index.d.ts
277 | type TLinearAxisAttributes = Override void;
282 | onmaximumChange?: (args: PropertyChangeData) => void;
283 | onminimumChange?: (args: PropertyChangeData) => void;
284 | }>
285 | interface LinearAxisAttributes extends TLinearAxisAttributes {}
286 |
287 | // index.d.ts
288 | type TLogarithmicAxisAttributes = Override void;
292 | onlogarithmBaseChange?: (args: PropertyChangeData) => void;
293 | }>
294 | interface LogarithmicAxisAttributes extends TLogarithmicAxisAttributes {}
295 |
296 | // index.d.ts
297 | type TOhlcSeriesAttributes = Override void;
302 | onhighPropertyNameChange?: (args: PropertyChangeData) => void;
303 | onlowPropertyNameChange?: (args: PropertyChangeData) => void;
304 | onopenPropertyNameChange?: (args: PropertyChangeData) => void;
305 | onstrokeColorsChange?: (args: PropertyChangeData) => void;
306 | openPropertyName?: string;
307 | strokeColors?: string | Color[];
308 | }>
309 | interface OhlcSeriesAttributes extends TOhlcSeriesAttributes {}
310 |
311 | // index.d.ts
312 | type TPaletteAttributes = Override;
314 | onentriesChange?: (args: PropertyChangeData) => void;
315 | onseriesNameChange?: (args: PropertyChangeData) => void;
316 | onseriesStateChange?: (args: PropertyChangeData) => void;
317 | seriesName?: string;
318 | seriesState?: ChartPaletteSeriesState;
319 | }>
320 | interface PaletteAttributes extends TPaletteAttributes {}
321 |
322 | // index.d.ts
323 | type TPaletteEntryAttributes = Override void;
326 | onstrokeColorChange?: (args: PropertyChangeData) => void;
327 | onstrokeWidthChange?: (args: PropertyChangeData) => void;
328 | strokeColor?: string | Color;
329 | strokeWidth?: string | number;
330 | }>
331 | interface PaletteEntryAttributes extends TPaletteEntryAttributes {}
332 |
333 | // index.d.ts
334 | type TPieSeriesAttributes = Override void;
340 | onexpandRadiusChange?: (args: PropertyChangeData) => void;
341 | onfillColorsChange?: (args: PropertyChangeData) => void;
342 | onlegendLabelChange?: (args: PropertyChangeData) => void;
343 | onouterRadiusFactorChange?: (args: PropertyChangeData) => void;
344 | onshowPercentageChange?: (args: PropertyChangeData) => void;
345 | onstartAngleChange?: (args: PropertyChangeData) => void;
346 | onstrokeColorsChange?: (args: PropertyChangeData) => void;
347 | onstrokeWidthChange?: (args: PropertyChangeData) => void;
348 | outerRadiusFactor?: string | number;
349 | showPercentage?: string | boolean;
350 | startAngle?: string | number;
351 | strokeColors?: string | Color[];
352 | strokeWidth?: string | number;
353 | }>
354 | interface PieSeriesAttributes extends TPieSeriesAttributes {}
355 |
356 | // index.d.ts
357 | type TPointLabelStyleAttributes = Override void;
363 | onfontNameChange?: (args: PropertyChangeData) => void;
364 | onfontStyleChange?: (args: PropertyChangeData) => void;
365 | onmarginChange?: (args: PropertyChangeData) => void;
366 | onstrokeColorChange?: (args: PropertyChangeData) => void;
367 | onstrokeWidthChange?: (args: PropertyChangeData) => void;
368 | ontextColorChange?: (args: PropertyChangeData) => void;
369 | ontextFormatChange?: (args: PropertyChangeData) => void;
370 | ontextSizeChange?: (args: PropertyChangeData) => void;
371 | strokeColor?: string | Color;
372 | strokeWidth?: string | number;
373 | textColor?: string | Color;
374 | textFormat?: string;
375 | textSize?: string | number;
376 | }>
377 | interface PointLabelStyleAttributes extends TPointLabelStyleAttributes {}
378 |
379 | // common.d.ts
380 | type TRadCartesianChartAttributes = Override void;
385 | onhorizontalAxisChange?: (args: PropertyChangeData) => void;
386 | onhorizontalZoomChange?: (args: PropertyChangeData) => void;
387 | ontrackballChange?: (args: PropertyChangeData) => void;
388 | onverticalAxisChange?: (args: PropertyChangeData) => void;
389 | onverticalZoomChange?: (args: PropertyChangeData) => void;
390 | trackball?: string | Trackball;
391 | verticalAxis?: string | CartesianAxis;
392 | verticalZoom?: string | number;
393 | }>
394 | interface RadCartesianChartAttributes extends TRadCartesianChartAttributes {}
395 |
396 | // index.d.ts
397 | type TRadCartesianChartGridAttributes = Override void;
406 | onhorizontalStripLineColorChange?: (args: PropertyChangeData) => void;
407 | onhorizontalStripLinesVisibleChange?: (args: PropertyChangeData) => void;
408 | onhorizontalStrokeColorChange?: (args: PropertyChangeData) => void;
409 | onhorizontalStrokeWidthChange?: (args: PropertyChangeData) => void;
410 | onverticalLinesVisibleChange?: (args: PropertyChangeData) => void;
411 | onverticalStripLineColorChange?: (args: PropertyChangeData) => void;
412 | onverticalStripLinesVisibleChange?: (args: PropertyChangeData) => void;
413 | onverticalStrokeColorChange?: (args: PropertyChangeData) => void;
414 | onverticalStrokeWidthChange?: (args: PropertyChangeData) => void;
415 | verticalLinesVisible?: string | boolean;
416 | verticalStripLineColor?: string | Color | Color[];
417 | verticalStripLinesVisible?: string | boolean;
418 | verticalStrokeColor?: string | Color | Color[];
419 | verticalStrokeWidth?: string | number;
420 | }>
421 | interface RadCartesianChartGridAttributes extends TRadCartesianChartGridAttributes {}
422 |
423 | // common.d.ts
424 | type TRadChartBaseAttributes = Override;
428 | initializer?: ChartBaseValueMapper;
429 | legend?: string | RadLegendView;
430 | onallowAnimationsChange?: (args: PropertyChangeData) => void;
431 | onannotationsChange?: (args: PropertyChangeData) => void;
432 | onlegendChange?: (args: PropertyChangeData) => void;
433 | onpalettesChange?: (args: PropertyChangeData) => void;
434 | onpointSelectionModeChange?: (args: PropertyChangeData) => void;
435 | onseriesChange?: (args: PropertyChangeData) => void;
436 | onseriesSelectionModeChange?: (args: PropertyChangeData) => void;
437 | palettes?: string | ObservableArray;
438 | pointSelectionMode?: ChartSelectionMode;
439 | rootLayout?: any;
440 | series?: string | ObservableArray;
441 | seriesSelectionMode?: ChartSelectionMode;
442 | }>
443 | interface RadChartBaseAttributes extends TRadChartBaseAttributes {}
444 |
445 | // index.d.ts
446 | type TRadLegendViewAttributes = Override void;
451 | onhorizontalOffsetChange?: (args: PropertyChangeData) => void;
452 | onoffsetOriginChange?: (args: PropertyChangeData) => void;
453 | onpositionChange?: (args: PropertyChangeData) => void;
454 | ontitleChange?: (args: PropertyChangeData) => void;
455 | ontitleColorChange?: (args: PropertyChangeData) => void;
456 | ontitleSizeChange?: (args: PropertyChangeData) => void;
457 | onverticalOffsetChange?: (args: PropertyChangeData) => void;
458 | position?: ChartLegendPosition;
459 | title?: string;
460 | titleColor?: string | Color;
461 | titleSize?: string | number;
462 | verticalOffset?: string | number;
463 | }>
464 | interface RadLegendViewAttributes extends TRadLegendViewAttributes {}
465 |
466 | // common.d.ts
467 | type TRadPieChartAttributes = Override
470 | interface RadPieChartAttributes extends TRadPieChartAttributes {}
471 |
472 | // index.d.ts
473 | type TRangeBarSeriesAttributes = Override void;
477 | onlowPropertyNameChange?: (args: PropertyChangeData) => void;
478 | }>
479 | interface RangeBarSeriesAttributes extends TRangeBarSeriesAttributes {}
480 |
481 | // index.d.ts
482 | type TScatterBubbleSeriesAttributes = Override void;
487 | onbubbleSizePropertyChange?: (args: PropertyChangeData) => void;
488 | onbubbleSizePropertyNameChange?: (args: PropertyChangeData) => void;
489 | }>
490 | interface ScatterBubbleSeriesAttributes extends TScatterBubbleSeriesAttributes {}
491 |
492 | // index.d.ts
493 | type TScatterSeriesAttributes = Override void;
495 | onyPropertyChange?: (args: PropertyChangeData) => void;
496 | xProperty?: string;
497 | yProperty?: string;
498 | }>
499 | interface ScatterSeriesAttributes extends TScatterSeriesAttributes {}
500 |
501 | // index.d.ts
502 | type TSplineAreaSeriesAttributes = Override
505 | interface SplineAreaSeriesAttributes extends TSplineAreaSeriesAttributes {}
506 |
507 | // index.d.ts
508 | type TSplineSeriesAttributes = Override
511 | interface SplineSeriesAttributes extends TSplineSeriesAttributes {}
512 |
513 | // index.d.ts
514 | type TTrackballAttributes = Override void;
516 | onsnapModeChange?: (args: PropertyChangeData) => void;
517 | showIntersectionPoints?: string | boolean;
518 | snapMode?: ChartTrackballSnapMode;
519 | }>
520 | interface TrackballAttributes extends TTrackballAttributes {}
521 |
522 |
523 | interface IntrinsicElements {
524 | areaSeries: AreaSeriesAttributes;
525 | barSeries: BarSeriesAttributes;
526 | bubbleSeries: BubbleSeriesAttributes;
527 | candlestickSeries: CandlestickSeriesAttributes;
528 | cartesianAxis: CartesianAxisAttributes;
529 | cartesianChartAnnotation: CartesianChartAnnotationAttributes;
530 | cartesianSeries: CartesianSeriesAttributes;
531 | categoricalAxis: CategoricalAxisAttributes;
532 | categoricalSeries: CategoricalSeriesAttributes;
533 | chartAxisLabel: ChartAxisLabelAttributes;
534 | chartGridLineAnnotation: ChartGridLineAnnotationAttributes;
535 | chartPlotBandAnnotation: ChartPlotBandAnnotationAttributes;
536 | chartSeries: ChartSeriesAttributes;
537 | chartSeriesLabel: ChartSeriesLabelAttributes;
538 | dateTimeCategoricalAxis: DateTimeCategoricalAxisAttributes;
539 | dateTimeContinuousAxis: DateTimeContinuousAxisAttributes;
540 | donutSeries: DonutSeriesAttributes;
541 | lineSeries: LineSeriesAttributes;
542 | linearAxis: LinearAxisAttributes;
543 | logarithmicAxis: LogarithmicAxisAttributes;
544 | ohlcSeries: OhlcSeriesAttributes;
545 | palette: PaletteAttributes;
546 | paletteEntry: PaletteEntryAttributes;
547 | pieSeries: PieSeriesAttributes;
548 | pointLabelStyle: PointLabelStyleAttributes;
549 | radCartesianChart: RadCartesianChartAttributes;
550 | radCartesianChartGrid: RadCartesianChartGridAttributes;
551 | radLegendView: RadLegendViewAttributes;
552 | radPieChart: RadPieChartAttributes;
553 | rangeBarSeries: RangeBarSeriesAttributes;
554 | scatterBubbleSeries: ScatterBubbleSeriesAttributes;
555 | scatterSeries: ScatterSeriesAttributes;
556 | splineAreaSeries: SplineAreaSeriesAttributes;
557 | splineSeries: SplineSeriesAttributes;
558 | trackball: TrackballAttributes;
559 | }
560 |
561 |
562 | }
563 | }
564 |
--------------------------------------------------------------------------------