├── .editorconfig ├── .github └── workflows │ └── lint-and-build.yml ├── .gitignore ├── .husky ├── .gitignore └── pre-commit ├── .npsrc ├── .nxignore ├── .prettierignore ├── .prettierrc ├── LICENSE ├── README.md ├── apps ├── demo-angular │ ├── .gitignore │ ├── eslint.config.mjs │ ├── nativescript.config.ts │ ├── package.json │ ├── project.json │ ├── references.d.ts │ ├── src │ │ ├── app-routing.module.ts │ │ ├── app.component.ts │ │ ├── app.module.ts │ │ ├── app.scss │ │ ├── fonts │ │ │ ├── ._IndieFlower.ttf │ │ │ ├── IndieFlower.ttf │ │ │ ├── SourceSansPro-Bold.otf │ │ │ └── SourceSansPro.otf │ │ ├── home.component.html │ │ ├── home.component.ts │ │ ├── main.ts │ │ ├── plugin-demos │ │ │ ├── .gitkeep │ │ │ ├── nativescript-barcodescanner.component.html │ │ │ ├── nativescript-barcodescanner.component.ts │ │ │ ├── nativescript-barcodescanner.module.ts │ │ │ ├── nativescript-feedback.component.css │ │ │ ├── nativescript-feedback.component.html │ │ │ ├── nativescript-feedback.component.ts │ │ │ ├── nativescript-feedback.module.ts │ │ │ ├── nativescript-in-app-review.component.html │ │ │ ├── nativescript-in-app-review.component.ts │ │ │ ├── nativescript-in-app-review.module.ts │ │ │ ├── nativescript-ngrx-devtools.module.ts │ │ │ ├── nativescript-ngrx-devtools.ngrx.ts │ │ │ ├── nativescript-view-shot.component.html │ │ │ ├── nativescript-view-shot.component.ts │ │ │ ├── nativescript-view-shot.module.ts │ │ │ ├── nativescript-websockets.component.html │ │ │ ├── nativescript-websockets.component.ts │ │ │ └── nativescript-websockets.module.ts │ │ └── polyfills.ts │ ├── tsconfig.json │ └── webpack.config.js └── demo │ ├── .gitignore │ ├── eslint.config.mjs │ ├── nativescript.config.ts │ ├── package.json │ ├── project.json │ ├── references.d.ts │ ├── src │ ├── app-root.xml │ ├── app.scss │ ├── app.ts │ ├── fonts │ │ ├── ._IndieFlower.ttf │ │ ├── IndieFlower.ttf │ │ ├── SourceSansPro-Bold.otf │ │ └── SourceSansPro.otf │ ├── main-page.ts │ ├── main-page.xml │ ├── main-view-model.ts │ └── plugin-demos │ │ ├── .gitkeep │ │ ├── nativescript-barcodescanner.ts │ │ ├── nativescript-barcodescanner.xml │ │ ├── nativescript-feedback.css │ │ ├── nativescript-feedback.ts │ │ ├── nativescript-feedback.xml │ │ ├── nativescript-in-app-review.ts │ │ ├── nativescript-in-app-review.xml │ │ ├── nativescript-view-shot.ts │ │ ├── nativescript-view-shot.xml │ │ ├── nativescript-websockets.ts │ │ └── nativescript-websockets.xml │ ├── tsconfig.json │ └── webpack.config.js ├── eslint.config.mjs ├── jest.config.ts ├── jest.preset.js ├── nx.json ├── package.json ├── packages ├── .gitkeep ├── nativescript-barcodescanner │ ├── README.md │ ├── common.ts │ ├── index.android.ts │ ├── index.d.ts │ ├── index.ios.ts │ ├── native-src │ │ └── ios │ │ │ ├── BarcodeScannerFramework.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── project.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ ├── BarcodeScannerFramework │ │ │ ├── BarcodeScannerFramework.h │ │ │ ├── QRCameraSwitchButton.h │ │ │ ├── QRCameraSwitchButton.m │ │ │ ├── QRCodeReader.h │ │ │ ├── QRCodeReader.m │ │ │ ├── QRCodeReaderDelegate.h │ │ │ ├── QRCodeReaderView.h │ │ │ ├── QRCodeReaderView.m │ │ │ ├── QRCodeReaderViewController.h │ │ │ ├── QRCodeReaderViewController.m │ │ │ ├── QRToggleTorchButton.h │ │ │ └── QRToggleTorchButton.m │ │ │ └── build.sh │ ├── package.json │ ├── platforms │ │ ├── android │ │ │ ├── AndroidManifest.xml │ │ │ └── barcodescanner-release-2.1.6.aar │ │ └── ios │ │ │ ├── BarcodeScannerFramework.xcframework │ │ │ ├── Info.plist │ │ │ ├── ios-arm64 │ │ │ │ ├── BarcodeScannerFramework.framework │ │ │ │ │ ├── BarcodeScannerFramework │ │ │ │ │ ├── Headers │ │ │ │ │ │ ├── BarcodeScannerFramework.h │ │ │ │ │ │ ├── QRCameraSwitchButton.h │ │ │ │ │ │ ├── QRCodeReader.h │ │ │ │ │ │ ├── QRCodeReaderDelegate.h │ │ │ │ │ │ ├── QRCodeReaderView.h │ │ │ │ │ │ ├── QRCodeReaderViewController.h │ │ │ │ │ │ └── QRToggleTorchButton.h │ │ │ │ │ ├── Info.plist │ │ │ │ │ └── Modules │ │ │ │ │ │ └── module.modulemap │ │ │ │ └── dSYMs │ │ │ │ │ └── BarcodeScannerFramework.framework.dSYM │ │ │ │ │ └── Contents │ │ │ │ │ ├── Info.plist │ │ │ │ │ └── Resources │ │ │ │ │ ├── DWARF │ │ │ │ │ └── BarcodeScannerFramework │ │ │ │ │ └── Relocations │ │ │ │ │ └── aarch64 │ │ │ │ │ └── BarcodeScannerFramework.yml │ │ │ └── ios-arm64_x86_64-simulator │ │ │ │ ├── BarcodeScannerFramework.framework │ │ │ │ ├── BarcodeScannerFramework │ │ │ │ ├── Headers │ │ │ │ │ ├── BarcodeScannerFramework.h │ │ │ │ │ ├── QRCameraSwitchButton.h │ │ │ │ │ ├── QRCodeReader.h │ │ │ │ │ ├── QRCodeReaderDelegate.h │ │ │ │ │ ├── QRCodeReaderView.h │ │ │ │ │ ├── QRCodeReaderViewController.h │ │ │ │ │ └── QRToggleTorchButton.h │ │ │ │ ├── Info.plist │ │ │ │ ├── Modules │ │ │ │ │ └── module.modulemap │ │ │ │ └── _CodeSignature │ │ │ │ │ └── CodeResources │ │ │ │ └── dSYMs │ │ │ │ └── BarcodeScannerFramework.framework.dSYM │ │ │ │ └── Contents │ │ │ │ ├── Info.plist │ │ │ │ └── Resources │ │ │ │ ├── DWARF │ │ │ │ └── BarcodeScannerFramework │ │ │ │ └── Relocations │ │ │ │ ├── aarch64 │ │ │ │ └── BarcodeScannerFramework.yml │ │ │ │ └── x86_64 │ │ │ │ └── BarcodeScannerFramework.yml │ │ │ └── Info.plist │ ├── project.json │ ├── references.d.ts │ ├── tsconfig.json │ └── types │ │ └── BarcodeScannerFramework.d.ts ├── nativescript-feedback │ ├── README.md │ ├── common.ts │ ├── eslint.config.mjs │ ├── index.android.ts │ ├── index.d.ts │ ├── index.ios.ts │ ├── package.json │ ├── platforms │ │ ├── android │ │ │ ├── include.gradle │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ └── erroricon.png │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── erroricon.png │ │ │ │ ├── infoicon.png │ │ │ │ ├── successicon.png │ │ │ │ └── warningicon.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── erroricon.png │ │ │ │ ├── infoicon.png │ │ │ │ ├── successicon.png │ │ │ │ └── warningicon.png │ │ │ │ └── drawable │ │ │ │ ├── erroricon.png │ │ │ │ ├── infoicon.png │ │ │ │ ├── successicon.png │ │ │ │ └── warningicon.png │ │ └── ios │ │ │ └── Podfile │ ├── project.json │ ├── references.d.ts │ ├── tsconfig.json │ └── types │ │ ├── ISMessages.d.ts │ │ └── android.d.ts ├── nativescript-in-app-review │ ├── CHANGELOG.md │ ├── README.md │ ├── common.ts │ ├── eslint.config.mjs │ ├── index.android.ts │ ├── index.d.ts │ ├── index.ios.ts │ ├── package.json │ ├── platforms │ │ └── android │ │ │ └── include.gradle │ ├── project.json │ ├── references.d.ts │ ├── tsconfig.json │ └── types │ │ ├── play-review.d.ts │ │ └── play-services-tasks.d.ts ├── nativescript-ngrx-devtools │ ├── .browserslistrc │ ├── README.md │ ├── eslint.config.mjs │ ├── jest.config.ts │ ├── nativescript.webpack.js │ ├── ng-package.json │ ├── package-alias-plugin.js │ ├── package.json │ ├── project.json │ ├── src │ │ ├── index.ts │ │ ├── lib │ │ │ ├── nativescript-ngrx-devtools.module.ts │ │ │ └── remotedev │ │ │ │ ├── model.ts │ │ │ │ ├── proxy.ts │ │ │ │ └── remotedev.ts │ │ └── test-setup.ts │ ├── tsconfig.json │ ├── tsconfig.lib.json │ ├── tsconfig.lib.prod.json │ └── tsconfig.spec.json ├── nativescript-view-shot │ ├── README.md │ ├── angular │ │ ├── .eslintrc.json │ │ ├── index.ts │ │ ├── ng-package.json │ │ ├── package.json │ │ ├── tsconfig.angular.json │ │ ├── tsconfig.json │ │ └── view-shot.service.ts │ ├── common.ts │ ├── eslint.config.mjs │ ├── index.android.ts │ ├── index.d.ts │ ├── index.ios.ts │ ├── package.json │ ├── project.json │ ├── references.d.ts │ └── tsconfig.json └── nativescript-websockets │ ├── README.md │ ├── bridge.android.ts │ ├── bridge.d.ts │ ├── bridge.ios.ts │ ├── common.ts │ ├── eslint.config.mjs │ ├── index.ts │ ├── native-src │ └── ios │ │ ├── NativeScriptWebSockets.xcodeproj │ │ ├── project.pbxproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── NativeScriptWebSockets │ │ ├── NativeScriptWebSockets.h │ │ ├── RCTImplementations.h │ │ ├── RCTImplementations.m │ │ ├── RCTSRWebSocket.h │ │ └── RCTSRWebSocket.m │ │ ├── NativeScriptWebSocketsTests │ │ └── NativeScriptWebSocketsTests.m │ │ └── build.sh │ ├── package.json │ ├── platforms │ ├── android │ │ └── include.gradle │ └── ios │ │ └── NativeScriptWebSockets.xcframework │ │ ├── Info.plist │ │ ├── ios-arm64-maccatalyst │ │ ├── NativeScriptWebSockets.framework │ │ │ ├── Headers │ │ │ ├── Modules │ │ │ ├── NativeScriptWebSockets │ │ │ ├── PrivateHeaders │ │ │ ├── Resources │ │ │ └── Versions │ │ │ │ ├── A │ │ │ │ ├── Headers │ │ │ │ │ ├── NativeScriptWebSockets.h │ │ │ │ │ └── RCTSRWebSocket.h │ │ │ │ ├── Modules │ │ │ │ │ └── module.modulemap │ │ │ │ ├── NativeScriptWebSockets │ │ │ │ ├── PrivateHeaders │ │ │ │ │ └── RCTImplementations.h │ │ │ │ └── Resources │ │ │ │ │ └── Info.plist │ │ │ │ └── Current │ │ └── dSYMs │ │ │ └── NativeScriptWebSockets.framework.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ ├── DWARF │ │ │ └── NativeScriptWebSockets │ │ │ └── Relocations │ │ │ └── aarch64 │ │ │ └── NativeScriptWebSockets.yml │ │ ├── ios-arm64 │ │ ├── NativeScriptWebSockets.framework │ │ │ ├── Headers │ │ │ │ ├── NativeScriptWebSockets.h │ │ │ │ └── RCTSRWebSocket.h │ │ │ ├── Info.plist │ │ │ ├── Modules │ │ │ │ └── module.modulemap │ │ │ ├── NativeScriptWebSockets │ │ │ └── PrivateHeaders │ │ │ │ └── RCTImplementations.h │ │ └── dSYMs │ │ │ └── NativeScriptWebSockets.framework.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ ├── DWARF │ │ │ └── NativeScriptWebSockets │ │ │ └── Relocations │ │ │ └── aarch64 │ │ │ └── NativeScriptWebSockets.yml │ │ ├── ios-arm64_x86_64-simulator │ │ ├── NativeScriptWebSockets.framework │ │ │ ├── Headers │ │ │ │ ├── NativeScriptWebSockets.h │ │ │ │ └── RCTSRWebSocket.h │ │ │ ├── Info.plist │ │ │ ├── Modules │ │ │ │ └── module.modulemap │ │ │ ├── NativeScriptWebSockets │ │ │ ├── PrivateHeaders │ │ │ │ └── RCTImplementations.h │ │ │ └── _CodeSignature │ │ │ │ └── CodeResources │ │ └── dSYMs │ │ │ └── NativeScriptWebSockets.framework.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ ├── DWARF │ │ │ └── NativeScriptWebSockets │ │ │ └── Relocations │ │ │ ├── aarch64 │ │ │ └── NativeScriptWebSockets.yml │ │ │ └── x86_64 │ │ │ └── NativeScriptWebSockets.yml │ │ ├── xros-arm64-simulator │ │ ├── NativeScriptWebSockets.framework │ │ │ ├── Headers │ │ │ │ ├── NativeScriptWebSockets.h │ │ │ │ └── RCTSRWebSocket.h │ │ │ ├── Info.plist │ │ │ ├── Modules │ │ │ │ └── module.modulemap │ │ │ ├── NativeScriptWebSockets │ │ │ ├── PrivateHeaders │ │ │ │ └── RCTImplementations.h │ │ │ └── _CodeSignature │ │ │ │ └── CodeResources │ │ └── dSYMs │ │ │ └── NativeScriptWebSockets.framework.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ ├── DWARF │ │ │ └── NativeScriptWebSockets │ │ │ └── Relocations │ │ │ └── aarch64 │ │ │ └── NativeScriptWebSockets.yml │ │ └── xros-arm64 │ │ ├── NativeScriptWebSockets.framework │ │ ├── Headers │ │ │ ├── NativeScriptWebSockets.h │ │ │ └── RCTSRWebSocket.h │ │ ├── Info.plist │ │ ├── Modules │ │ │ └── module.modulemap │ │ ├── NativeScriptWebSockets │ │ └── PrivateHeaders │ │ │ └── RCTImplementations.h │ │ └── dSYMs │ │ └── NativeScriptWebSockets.framework.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ ├── DWARF │ │ └── NativeScriptWebSockets │ │ └── Relocations │ │ └── aarch64 │ │ └── NativeScriptWebSockets.yml │ ├── project.json │ ├── references.d.ts │ ├── tsconfig.json │ ├── types │ ├── android.d.ts │ └── objc!NativeScriptWebSockets.d.ts │ ├── websocket.definition.ts │ └── websocket.ts ├── references.d.ts ├── tools ├── assets │ ├── App_Resources │ │ ├── Android │ │ │ ├── app.gradle │ │ │ └── src │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-ldpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-mdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-nodpi │ │ │ │ └── splash_screen.xml │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── background.png │ │ │ │ ├── icon.png │ │ │ │ └── logo.png │ │ │ │ ├── values-v21 │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ └── styles.xml │ │ └── iOS │ │ │ ├── Assets.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── icon-1024.png │ │ │ │ ├── icon-20.png │ │ │ │ ├── icon-20@2x.png │ │ │ │ ├── icon-20@3x.png │ │ │ │ ├── icon-29.png │ │ │ │ ├── icon-29@2x.png │ │ │ │ ├── icon-29@3x.png │ │ │ │ ├── icon-40.png │ │ │ │ ├── icon-40@2x.png │ │ │ │ ├── icon-40@3x.png │ │ │ │ ├── icon-60@2x.png │ │ │ │ ├── icon-60@3x.png │ │ │ │ ├── icon-76.png │ │ │ │ ├── icon-76@2x.png │ │ │ │ └── icon-83.5@2x.png │ │ │ ├── Contents.json │ │ │ ├── LaunchScreen.AspectFill.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ │ └── LaunchScreen-AspectFill@3x.png │ │ │ └── LaunchScreen.Center.imageset │ │ │ │ ├── Contents.json │ │ │ │ ├── LaunchScreen-Center.png │ │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ │ └── LaunchScreen-Center@3x.png │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ ├── Podfile │ │ │ ├── build.xcconfig │ │ │ ├── icon.png │ │ │ └── icon@2x.png │ ├── README.md │ └── publishing │ │ └── .npmignore ├── demo │ ├── index.ts │ ├── nativescript-barcodescanner │ │ └── index.ts │ ├── nativescript-feedback │ │ └── index.ts │ ├── nativescript-in-app-review │ │ └── index.ts │ ├── nativescript-view-shot │ │ └── index.ts │ ├── nativescript-websockets │ │ └── index.ts │ ├── references.d.ts │ ├── tsconfig.json │ └── utils │ │ ├── demo-base.ts │ │ └── index.ts ├── package-settings.json ├── schematics │ └── .gitkeep ├── scripts │ └── build-finish.ts ├── tsconfig.tools.json └── workspace-scripts.js ├── tsconfig.base.json └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.github/workflows/lint-and-build.yml: -------------------------------------------------------------------------------- 1 | name: Lint and Build (PR) 2 | 3 | env: 4 | NX_BRANCH: ${{ github.event.number || github.ref_name }} 5 | NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} 6 | 7 | on: 8 | push: 9 | branches: ['master'] 10 | pull_request: 11 | branches: ['master'] 12 | 13 | jobs: 14 | lint: 15 | name: Lint affected projects 16 | runs-on: ubuntu-latest 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v4 20 | with: 21 | fetch-depth: 0 22 | - uses: actions/setup-node@v4 23 | with: 24 | node-version: lts/* 25 | cache: 'yarn' 26 | - uses: nrwl/nx-set-shas@v4 27 | with: 28 | main-branch-name: 'master' 29 | - name: yarn install 30 | run: yarn --immutable 31 | - name: Lint affected 32 | run: yarn nx affected:lint 33 | build: 34 | name: Build affected projects 35 | needs: lint 36 | runs-on: macos-latest 37 | 38 | steps: 39 | - name: Checkout 40 | uses: actions/checkout@v4 41 | with: 42 | fetch-depth: 0 43 | - uses: actions/setup-node@v4 44 | with: 45 | node-version: lts/* 46 | cache: 'yarn' 47 | - uses: nrwl/nx-set-shas@v4 48 | with: 49 | main-branch-name: 'master' 50 | - name: Xcode Select Version 51 | # see available xcode versions in https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md#xcode 52 | uses: mobiledevops/xcode-select-version-action@v1 53 | with: 54 | xcode-select-version: 15.4 55 | - name: Install visionOS platform 56 | run: | 57 | defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES 58 | defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES 59 | xcodebuild -downloadPlatform visionOS 60 | - name: yarn install 61 | run: yarn --immutable 62 | - name: Build.all affected 63 | run: yarn nx affected --target=build.all 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | 8 | # dependencies 9 | node_modules 10 | package-lock.json 11 | 12 | # IDEs and editors 13 | /.idea 14 | .project 15 | .classpath 16 | .c9/ 17 | *.launch 18 | .settings/ 19 | *.sublime-workspace 20 | 21 | # IDE - VSCode 22 | .vscode/* 23 | !.vscode/settings.json 24 | !.vscode/tasks.json 25 | !.vscode/launch.json 26 | !.vscode/extensions.json 27 | 28 | # misc 29 | /.sass-cache 30 | /connect.lock 31 | /coverage 32 | /libpeerconnection.log 33 | npm-debug.log 34 | yarn-error.log 35 | testem.log 36 | /typings 37 | 38 | # System Files 39 | .DS_Store 40 | Thumbs.db 41 | 42 | *.tgz 43 | packages/**/angular/dist 44 | packages/*/native-src/ios/build 45 | .angular 46 | 47 | /.env 48 | 49 | 50 | # Xcode uneeded files 51 | *.xcuserstate 52 | xcuserdata/ 53 | 54 | .nx/cache 55 | .nx/workspace-data -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged --allow-empty --relative 5 | -------------------------------------------------------------------------------- /.npsrc: -------------------------------------------------------------------------------- 1 | { 2 | "config": "./tools/workspace-scripts.js" 3 | } -------------------------------------------------------------------------------- /.nxignore: -------------------------------------------------------------------------------- 1 | apps/**/*_off 2 | .nx/cache/** -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | 3 | /dist 4 | /coverage 5 | native-src 6 | packages/*/types 7 | 8 | /.nx/cache 9 | /.nx/workspace-data -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "useTabs": false, 3 | "printWidth": 800, 4 | "tabWidth": 2, 5 | "singleQuote": true 6 | } 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Valor Software 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 | -------------------------------------------------------------------------------- /apps/demo-angular/.gitignore: -------------------------------------------------------------------------------- 1 | hooks 2 | platforms 3 | !webpack.config.js -------------------------------------------------------------------------------- /apps/demo-angular/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import baseConfig from '../../eslint.config.mjs'; 2 | 3 | export default [ 4 | { 5 | ignores: ['**/dist'], 6 | }, 7 | ...baseConfig, 8 | { 9 | files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], 10 | // Override or add rules here 11 | rules: {}, 12 | }, 13 | { 14 | files: ['**/*.ts', '**/*.tsx'], 15 | // Override or add rules here 16 | rules: {}, 17 | }, 18 | { 19 | files: ['**/*.js', '**/*.jsx'], 20 | // Override or add rules here 21 | rules: {}, 22 | }, 23 | { 24 | ignores: ['node_modules/**/*'], 25 | }, 26 | ]; 27 | -------------------------------------------------------------------------------- /apps/demo-angular/nativescript.config.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core'; 2 | 3 | export default { 4 | id: 'org.nativescript.plugindemoangular', 5 | appResourcesPath: '../../tools/assets/App_Resources', 6 | android: { 7 | v8Flags: '--expose_gc', 8 | markingMode: 'none', 9 | }, 10 | appPath: 'src', 11 | cli: { 12 | packageManager: 'npm' 13 | } 14 | } as NativeScriptConfig; 15 | -------------------------------------------------------------------------------- /apps/demo-angular/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "./src/main.ts", 3 | "dependencies": { 4 | "@nativescript/core": "file:../../node_modules/@nativescript/core", 5 | "@valor/nativescript-websockets": "file:../../dist/packages/nativescript-websockets", 6 | "@valor/nativescript-ngrx-devtools": "file:../../dist/packages/nativescript-ngrx-devtools", 7 | "@valor/nativescript-barcodescanner": "file:../../dist/packages/nativescript-barcodescanner", 8 | "@valor/nativescript-feedback": "file:../../dist/packages/nativescript-feedback", 9 | "@valor/nativescript-view-shot": "file:../../dist/packages/nativescript-view-shot", 10 | "@valor/nativescript-in-app-review": "file:../../dist/packages/nativescript-in-app-review" 11 | }, 12 | "devDependencies": { 13 | "@nativescript/android": "~8.8.0", 14 | "@nativescript/ios": "~8.8.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /apps/demo-angular/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo-angular", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "apps/demo-angular/src", 5 | "projectType": "application", 6 | "prefix": "demo", 7 | "targets": { 8 | "build": { 9 | "executor": "@nativescript/nx:build", 10 | "options": { 11 | "noHmr": true, 12 | "production": true, 13 | "uglify": true, 14 | "release": true, 15 | "forDevice": true, 16 | "tsConfig": "apps/demo-angular/tsconfig.json" 17 | }, 18 | "dependsOn": ["^build.all"] 19 | }, 20 | "clean": { 21 | "executor": "@nativescript/nx:clean", 22 | "options": {} 23 | }, 24 | "lint": { 25 | "executor": "@nx/eslint:lint" 26 | }, 27 | "debug": { 28 | "executor": "@nativescript/nx:debug", 29 | "options": { 30 | "noHmr": true, 31 | "uglify": false, 32 | "release": false, 33 | "forDevice": false, 34 | "prepare": false 35 | }, 36 | "dependsOn": ["^build.all"] 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /apps/demo-angular/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /apps/demo-angular/src/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes } from '@angular/router'; 3 | import { NativeScriptRouterModule } from '@nativescript/angular'; 4 | 5 | import { HomeComponent } from './home.component'; 6 | 7 | const routes: Routes = [ 8 | { path: '', redirectTo: '/home', pathMatch: 'full' }, 9 | { path: 'home', component: HomeComponent }, 10 | { path: 'nativescript-barcodescanner', loadChildren: () => import('./plugin-demos/nativescript-barcodescanner.module').then((m) => m.NativescriptBarcodescannerModule) }, 11 | { path: 'nativescript-feedback', loadChildren: () => import('./plugin-demos/nativescript-feedback.module').then((m) => m.NativescriptFeedbackModule) }, 12 | { path: 'nativescript-in-app-review', loadChildren: () => import('./plugin-demos/nativescript-in-app-review.module').then((m) => m.NativescriptInAppReviewModule) }, 13 | { path: 'nativescript-ngrx-devtools', loadChildren: () => import('./plugin-demos/nativescript-ngrx-devtools.module').then((m) => m.NativeScriptNgRxDevtoolsDemoModule) }, 14 | { path: 'nativescript-view-shot', loadChildren: () => import('./plugin-demos/nativescript-view-shot.module').then((m) => m.NativescriptViewShotModule) }, 15 | { path: 'nativescript-websockets', loadChildren: () => import('./plugin-demos/nativescript-websockets.module').then((m) => m.NativescriptWebsocketsModule) }, 16 | ]; 17 | 18 | @NgModule({ 19 | imports: [NativeScriptRouterModule.forRoot(routes)], 20 | exports: [NativeScriptRouterModule], 21 | }) 22 | export class AppRoutingModule {} 23 | -------------------------------------------------------------------------------- /apps/demo-angular/src/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'demo-app', 5 | template: ` 6 | 7 | `, 8 | standalone: false, 9 | }) 10 | export class AppComponent {} 11 | -------------------------------------------------------------------------------- /apps/demo-angular/src/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { NativeScriptModule } from '@nativescript/angular'; 3 | 4 | import { AppRoutingModule } from './app-routing.module'; 5 | import { AppComponent } from './app.component'; 6 | import { HomeComponent } from './home.component'; 7 | import { AppNgRxModule } from './plugin-demos/nativescript-ngrx-devtools.ngrx'; 8 | 9 | @NgModule({ 10 | schemas: [NO_ERRORS_SCHEMA], 11 | declarations: [AppComponent, HomeComponent], 12 | bootstrap: [AppComponent], 13 | imports: [NativeScriptModule, AppRoutingModule, AppNgRxModule], 14 | }) 15 | export class AppModule {} 16 | -------------------------------------------------------------------------------- /apps/demo-angular/src/app.scss: -------------------------------------------------------------------------------- 1 | @import 'nativescript-theme-core/scss/light'; 2 | @import 'nativescript-theme-core/scss/index'; 3 | 4 | button, 5 | label, 6 | stack-layout { 7 | horizontal-align: center; 8 | } 9 | 10 | button { 11 | font-size: 36; 12 | } 13 | 14 | .title { 15 | font-size: 30; 16 | margin: 20; 17 | } 18 | 19 | .message { 20 | font-size: 20; 21 | color: #284848; 22 | text-align: center; 23 | margin: 0 20; 24 | } 25 | 26 | .view-shot { 27 | .child-label { 28 | color: blue; 29 | } 30 | } 31 | .child-label { 32 | color: red; 33 | } 34 | -------------------------------------------------------------------------------- /apps/demo-angular/src/fonts/._IndieFlower.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valor-software/nativescript-plugins/f3b15e7dbb78931556e8d49c5d2e39909638b144/apps/demo-angular/src/fonts/._IndieFlower.ttf -------------------------------------------------------------------------------- /apps/demo-angular/src/fonts/IndieFlower.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valor-software/nativescript-plugins/f3b15e7dbb78931556e8d49c5d2e39909638b144/apps/demo-angular/src/fonts/IndieFlower.ttf -------------------------------------------------------------------------------- /apps/demo-angular/src/fonts/SourceSansPro-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valor-software/nativescript-plugins/f3b15e7dbb78931556e8d49c5d2e39909638b144/apps/demo-angular/src/fonts/SourceSansPro-Bold.otf -------------------------------------------------------------------------------- /apps/demo-angular/src/fonts/SourceSansPro.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valor-software/nativescript-plugins/f3b15e7dbb78931556e8d49c5d2e39909638b144/apps/demo-angular/src/fonts/SourceSansPro.otf -------------------------------------------------------------------------------- /apps/demo-angular/src/home.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /apps/demo-angular/src/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'demo-home', 5 | templateUrl: 'home.component.html', 6 | standalone: false, 7 | }) 8 | export class HomeComponent { 9 | demos = [ 10 | { 11 | name: 'nativescript-barcodescanner', 12 | }, 13 | { 14 | name: 'nativescript-feedback', 15 | }, 16 | { 17 | name: 'nativescript-in-app-review', 18 | }, 19 | { 20 | name: 'nativescript-ngrx-devtools', 21 | }, 22 | { 23 | name: 'nativescript-view-shot', 24 | }, 25 | { 26 | name: 'nativescript-websockets', 27 | }, 28 | ]; 29 | } 30 | -------------------------------------------------------------------------------- /apps/demo-angular/src/main.ts: -------------------------------------------------------------------------------- 1 | import { runNativeScriptAngularApp, platformNativeScript } from '@nativescript/angular'; 2 | import { AppModule } from './app.module'; 3 | 4 | runNativeScriptAngularApp({ 5 | appModuleBootstrap: () => platformNativeScript().bootstrapModule(AppModule), 6 | }); -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valor-software/nativescript-plugins/f3b15e7dbb78931556e8d49c5d2e39909638b144/apps/demo-angular/src/plugin-demos/.gitkeep -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-barcodescanner.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-barcodescanner.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, NgZone } from '@angular/core'; 2 | import { DemoSharedNativescriptBarcodescanner } from '@demo/shared'; 3 | import {} from '@valor/nativescript-barcodescanner'; 4 | 5 | @Component({ 6 | selector: 'demo-nativescript-barcodescanner', 7 | templateUrl: 'nativescript-barcodescanner.component.html', 8 | standalone: false, 9 | }) 10 | export class NativescriptBarcodescannerComponent { 11 | demoShared: DemoSharedNativescriptBarcodescanner; 12 | 13 | constructor(private _ngZone: NgZone) {} 14 | 15 | ngOnInit() { 16 | this.demoShared = new DemoSharedNativescriptBarcodescanner(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-barcodescanner.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; 3 | import { NativescriptBarcodescannerComponent } from './nativescript-barcodescanner.component'; 4 | 5 | @NgModule({ 6 | imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptBarcodescannerComponent }])], 7 | declarations: [NativescriptBarcodescannerComponent], 8 | schemas: [NO_ERRORS_SCHEMA], 9 | }) 10 | export class NativescriptBarcodescannerModule {} 11 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-feedback.component.css: -------------------------------------------------------------------------------- 1 | .message { 2 | color: #333; 3 | font-size: 18; 4 | horizontal-align: center; 5 | padding-top: 30; 6 | padding-bottom: 20; 7 | } 8 | 9 | button { 10 | background-color: #6494aa; 11 | padding: 10 12; 12 | margin: 10; 13 | font-size: 14; 14 | border-radius: 4; 15 | } 16 | 17 | Image { 18 | margin: 20 0; 19 | } 20 | 21 | .button { 22 | color: #ffffff; 23 | } 24 | 25 | .button-success { 26 | background-color: #51ae8c; 27 | } 28 | 29 | .button-success-alt { 30 | background-color: lightskyblue; 31 | } 32 | 33 | .button-info { 34 | background-color: #516a78; 35 | } 36 | 37 | .button-warning { 38 | background-color: #f18b34; 39 | } 40 | 41 | .button-error { 42 | background-color: #ee664c; 43 | } 44 | 45 | .button-custom { 46 | background-color: #73b7e8; 47 | } 48 | 49 | .button-font { 50 | background-color: #c71fe8; 51 | } 52 | 53 | .button-custom-alt { 54 | background-color: yellowgreen; 55 | } 56 | 57 | .button-hide { 58 | background-color: black; 59 | } 60 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-feedback.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-feedback.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { DemoSharedNativescriptFeedback } from '@demo/shared'; 3 | 4 | @Component({ 5 | selector: 'demo-nativescript-feedback', 6 | styleUrls: ['./nativescript-feedback.component.css'], 7 | templateUrl: 'nativescript-feedback.component.html', 8 | standalone: false, 9 | }) 10 | export class NativescriptFeedbackComponent { 11 | demoShared: DemoSharedNativescriptFeedback; 12 | 13 | ngOnInit() { 14 | this.demoShared = new DemoSharedNativescriptFeedback(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-feedback.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; 3 | import { NativescriptFeedbackComponent } from './nativescript-feedback.component'; 4 | 5 | @NgModule({ 6 | imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptFeedbackComponent }])], 7 | declarations: [NativescriptFeedbackComponent], 8 | schemas: [NO_ERRORS_SCHEMA], 9 | }) 10 | export class NativescriptFeedbackModule {} 11 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-in-app-review.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-in-app-review.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, NgZone } from '@angular/core'; 2 | import { DemoSharedNativescriptInAppReview } from '@demo/shared'; 3 | import {} from '@valor/nativescript-in-app-review'; 4 | 5 | @Component({ 6 | selector: 'demo-nativescript-in-app-review', 7 | templateUrl: 'nativescript-in-app-review.component.html', 8 | standalone: false, 9 | }) 10 | export class NativescriptInAppReviewComponent { 11 | demoShared: DemoSharedNativescriptInAppReview; 12 | 13 | constructor(private _ngZone: NgZone) {} 14 | 15 | ngOnInit() { 16 | this.demoShared = new DemoSharedNativescriptInAppReview(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-in-app-review.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; 3 | import { NativescriptInAppReviewComponent } from './nativescript-in-app-review.component'; 4 | 5 | @NgModule({ 6 | imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptInAppReviewComponent }])], 7 | declarations: [NativescriptInAppReviewComponent], 8 | schemas: [NO_ERRORS_SCHEMA], 9 | }) 10 | export class NativescriptInAppReviewModule {} 11 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-ngrx-devtools.module.ts: -------------------------------------------------------------------------------- 1 | import { Component, NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; 3 | import { Label } from '@nativescript/core'; 4 | import { Store } from '@ngrx/store'; 5 | import { decrement, increment, incrementWithDelay, RootState, selectCount, unserializableAction } from './nativescript-ngrx-devtools.ngrx'; 6 | 7 | @Component({ 8 | selector: 'nativescript-ngrx-devtools', 9 | template: ` 10 | 11 | 12 | 13 | 14 | 15 | `, 16 | styles: [ 17 | ` 18 | button { 19 | font-size: 20; 20 | } 21 | `, 22 | ], 23 | standalone: false, 24 | }) 25 | export class NativeScriptNgRxDevtoolsComponent { 26 | count$ = this.store.select(selectCount); 27 | constructor(public store: Store) {} 28 | 29 | increment() { 30 | this.store.dispatch(increment()); 31 | } 32 | 33 | decrement() { 34 | this.store.dispatch(decrement()); 35 | } 36 | 37 | incrementWithDelay(delay: number) { 38 | this.store.dispatch(incrementWithDelay(delay)); 39 | } 40 | 41 | unserializableAction() { 42 | const label = new Label(); 43 | this.store.dispatch(unserializableAction(label)); 44 | } 45 | } 46 | 47 | @NgModule({ 48 | imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativeScriptNgRxDevtoolsComponent }])], 49 | declarations: [NativeScriptNgRxDevtoolsComponent], 50 | schemas: [NO_ERRORS_SCHEMA], 51 | }) 52 | export class NativeScriptNgRxDevtoolsDemoModule {} 53 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-view-shot.component.html: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-view-shot.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, inject, TemplateRef, ViewChild, ViewContainerRef } from '@angular/core'; 2 | import { DemoSharedNativescriptViewShot } from '@demo/shared'; 3 | import { ImageSource, isIOS, Screen, View } from '@nativescript/core'; 4 | import { renderToImageSource } from '@valor/nativescript-view-shot'; 5 | import { ViewShotService } from '@valor/nativescript-view-shot/angular'; 6 | 7 | @Component({ 8 | selector: 'demo-nativescript-view-shot', 9 | templateUrl: 'nativescript-view-shot.component.html', 10 | standalone: false, 11 | }) 12 | export class NativescriptViewShotComponent { 13 | demoShared: DemoSharedNativescriptViewShot; 14 | 15 | viewShotService = inject(ViewShotService); 16 | @ViewChild('viewHost', { read: ViewContainerRef }) vcRef: ViewContainerRef; 17 | srcUrl = `https://picsum.photos/${Screen.mainScreen.widthPixels}/200`; 18 | webImage$ = ImageSource.fromUrl(this.srcUrl); 19 | webImage2: ImageSource; 20 | imgSrc: ImageSource; 21 | loading = false; 22 | targetWidth = `${Screen.mainScreen.widthDIPs}`; 23 | 24 | async renderTemplate(template: TemplateRef, attached: boolean) { 25 | let width = parseInt(this.targetWidth, 10); 26 | if (isNaN(width)) { 27 | width = Screen.mainScreen.widthDIPs; 28 | } 29 | this.loading = true; 30 | const image = await this.webImage$; 31 | // reusing imageSource on iOS sometimes doesn't work, so we create a new one each time 32 | this.webImage2 = isIOS ? new ImageSource((await this.webImage$).ios) : image; 33 | this.loading = false; 34 | this.imgSrc = await this.viewShotService.captureInBackground(template, { 35 | logicalHost: attached ? this.vcRef : undefined, 36 | width, 37 | delay: 0, 38 | }); 39 | } 40 | 41 | screenshotView(view: View) { 42 | this.imgSrc = renderToImageSource(view); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-view-shot.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { NativeScriptCommonModule, NativeScriptFormsModule, NativeScriptRouterModule } from '@nativescript/angular'; 3 | import { NativescriptViewShotComponent } from './nativescript-view-shot.component'; 4 | 5 | @NgModule({ 6 | imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptViewShotComponent }]), NativeScriptFormsModule], 7 | declarations: [NativescriptViewShotComponent], 8 | schemas: [NO_ERRORS_SCHEMA], 9 | }) 10 | export class NativescriptViewShotModule {} 11 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-websockets.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-websockets.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, NgZone } from '@angular/core'; 2 | import { DemoSharedNativescriptWebsockets } from '@demo/shared'; 3 | 4 | @Component({ 5 | selector: 'demo-nativescript-websockets', 6 | templateUrl: 'nativescript-websockets.component.html', 7 | standalone: false, 8 | }) 9 | export class NativescriptWebsocketsComponent { 10 | demoShared: DemoSharedNativescriptWebsockets; 11 | 12 | constructor(private _ngZone: NgZone) {} 13 | 14 | ngOnInit() { 15 | this.demoShared = new DemoSharedNativescriptWebsockets(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /apps/demo-angular/src/plugin-demos/nativescript-websockets.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; 2 | import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular'; 3 | import { NativescriptWebsocketsComponent } from './nativescript-websockets.component'; 4 | 5 | @NgModule({ 6 | imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: NativescriptWebsocketsComponent }])], 7 | declarations: [NativescriptWebsocketsComponent], 8 | schemas: [ NO_ERRORS_SCHEMA] 9 | }) 10 | export class NativescriptWebsocketsModule {} 11 | -------------------------------------------------------------------------------- /apps/demo-angular/src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * NativeScript Polyfills 3 | */ 4 | 5 | // Install @nativescript/core polyfills (XHR, setTimeout, requestAnimationFrame) 6 | import '@nativescript/core/globals'; 7 | import '@valor/nativescript-websockets'; 8 | // Install @nativescript/angular specific polyfills 9 | import '@nativescript/angular/polyfills'; 10 | 11 | /** 12 | * Zone.js and patches 13 | */ 14 | // Add pre-zone.js patches needed for the NativeScript platform 15 | import '@nativescript/zone-js/dist/pre-zone-polyfills'; 16 | 17 | // Zone JS is required by default for Angular itself 18 | import 'zone.js'; 19 | 20 | // Add NativeScript specific Zone JS patches 21 | import '@nativescript/zone-js'; 22 | -------------------------------------------------------------------------------- /apps/demo-angular/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.base.json", 3 | "compilerOptions": { 4 | "paths": { 5 | "~/*": ["src/*"], 6 | "@demo/shared": ["tools/demo/index.ts"], 7 | "@valor/nativescript-ngrx-devtools": ["packages/nativescript-ngrx-devtools/src/index.ts"], 8 | "@valor/nativescript-websockets": ["packages/nativescript-websockets/index.ts"], 9 | "@valor/nativescript-barcodescanner": ["packages/nativescript-barcodescanner"], 10 | "@valor/nativescript-feedback": ["packages/nativescript-feedback"], 11 | "@valor/nativescript-in-app-review": ["packages/nativescript-in-app-review"], 12 | "@valor/nativescript-view-shot": ["packages/nativescript-view-shot"], 13 | "@valor/nativescript-view-shot/angular": ["packages/nativescript-view-shot/angular"] 14 | } 15 | }, 16 | "files": ["./references.d.ts", "./src/main.ts", "./src/polyfills.ts"], 17 | "include": ["../../packages/**/references.d.ts", "../../**/*.android.ts", "../../**/*.ios.ts"] 18 | } 19 | -------------------------------------------------------------------------------- /apps/demo-angular/webpack.config.js: -------------------------------------------------------------------------------- 1 | const webpack = require('@nativescript/webpack'); 2 | const { resolve } = require('path'); 3 | 4 | module.exports = (env) => { 5 | 6 | webpack.init(env); 7 | webpack.useConfig('angular'); 8 | 9 | webpack.chainWebpack((config) => { 10 | // shared demo code 11 | config.resolve.alias.set('@demo/shared', resolve(__dirname, '..', '..', 'tools', 'demo')); 12 | }); 13 | 14 | // Example if you need to share images across demo apps: 15 | // webpack.Utils.addCopyRule({ 16 | // from: '../../../tools/images', 17 | // to: 'images', 18 | // context: webpack.Utils.project.getProjectFilePath('node_modules') 19 | // }); 20 | 21 | return webpack.resolveConfig(); 22 | }; 23 | -------------------------------------------------------------------------------- /apps/demo/.gitignore: -------------------------------------------------------------------------------- 1 | # NativeScript 2 | hooks/ 3 | node_modules/ 4 | platforms/ 5 | 6 | # NativeScript Template 7 | *.js.map 8 | *.js 9 | !webpack.config.js 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | 18 | # General 19 | .DS_Store 20 | .AppleDouble 21 | .LSOverride 22 | .idea 23 | .cloud 24 | .project 25 | tmp/ 26 | typings/ 27 | 28 | # misc 29 | npm-debug.log 30 | 31 | # app 32 | !*.d.ts 33 | !src/assets/fontawesome.min.css 34 | /report/ 35 | .nsbuildinfo 36 | /temp/ 37 | /src/tns_modules/ 38 | 39 | # app uses platform specific scss which can inadvertently get renamed which will cause problems 40 | app/app.scss 41 | 42 | package-lock.json 43 | -------------------------------------------------------------------------------- /apps/demo/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import baseConfig from '../../eslint.config.mjs'; 2 | 3 | export default [ 4 | { 5 | ignores: ['**/dist'], 6 | }, 7 | ...baseConfig, 8 | { 9 | files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'], 10 | // Override or add rules here 11 | rules: {}, 12 | }, 13 | { 14 | files: ['**/*.ts', '**/*.tsx'], 15 | // Override or add rules here 16 | rules: {}, 17 | }, 18 | { 19 | files: ['**/*.js', '**/*.jsx'], 20 | // Override or add rules here 21 | rules: {}, 22 | }, 23 | { 24 | ignores: ['node_modules/**/*'], 25 | }, 26 | ]; 27 | -------------------------------------------------------------------------------- /apps/demo/nativescript.config.ts: -------------------------------------------------------------------------------- 1 | import { NativeScriptConfig } from '@nativescript/core'; 2 | 3 | export default { 4 | id: 'org.nativescript.plugindemo', 5 | appResourcesPath: '../../tools/assets/App_Resources', 6 | android: { 7 | v8Flags: '--expose_gc', 8 | markingMode: 'none', 9 | }, 10 | appPath: 'src', 11 | cli: { 12 | packageManager: 'npm' 13 | } 14 | } as NativeScriptConfig; 15 | -------------------------------------------------------------------------------- /apps/demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "./src/app.ts", 3 | "description": "NativeScript Application", 4 | "license": "SEE LICENSE IN ", 5 | "repository": "", 6 | "dependencies": { 7 | "@nativescript/core": "file:../../node_modules/@nativescript/core", 8 | "@valor/nativescript-websockets": "file:../../packages/nativescript-websockets", 9 | "@valor/nativescript-barcodescanner": "file:../../packages/nativescript-barcodescanner", 10 | "@valor/nativescript-feedback": "file:../../packages/nativescript-feedback", 11 | "@valor/nativescript-view-shot": "file:../../packages/nativescript-view-shot", 12 | "@valor/nativescript-in-app-review": "file:../../packages/nativescript-in-app-review" 13 | }, 14 | "devDependencies": { 15 | "@nativescript/android": "~8.8.0", 16 | "@nativescript/ios": "~8.8.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /apps/demo/project.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo", 3 | "$schema": "../../node_modules/nx/schemas/project-schema.json", 4 | "sourceRoot": "apps/demo/src", 5 | "projectType": "application", 6 | "prefix": "demo", 7 | "targets": { 8 | "build": { 9 | "executor": "@nativescript/nx:build", 10 | "options": { 11 | "noHmr": true, 12 | "production": true, 13 | "uglify": true, 14 | "release": true, 15 | "forDevice": true, 16 | "tsConfig": "apps/demo/tsconfig.json" 17 | }, 18 | "dependsOn": [ 19 | { 20 | "target": "build.all", 21 | "dependencies": true 22 | } 23 | ] 24 | }, 25 | "clean": { 26 | "executor": "@nativescript/nx:clean", 27 | "options": {} 28 | }, 29 | "lint": { 30 | "executor": "@nx/eslint:lint" 31 | }, 32 | "debug": { 33 | "executor": "@nativescript/nx:debug", 34 | "options": { 35 | "noHmr": true, 36 | "uglify": false, 37 | "release": false, 38 | "forDevice": false, 39 | "prepare": false 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /apps/demo/references.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /apps/demo/src/app-root.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /apps/demo/src/app.scss: -------------------------------------------------------------------------------- 1 | @import 'nativescript-theme-core/scss/light'; 2 | @import 'nativescript-theme-core/scss/index'; -------------------------------------------------------------------------------- /apps/demo/src/app.ts: -------------------------------------------------------------------------------- 1 | import { Application } from '@nativescript/core'; 2 | 3 | Application.run({ moduleName: 'app-root' }); 4 | -------------------------------------------------------------------------------- /apps/demo/src/fonts/._IndieFlower.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valor-software/nativescript-plugins/f3b15e7dbb78931556e8d49c5d2e39909638b144/apps/demo/src/fonts/._IndieFlower.ttf -------------------------------------------------------------------------------- /apps/demo/src/fonts/IndieFlower.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valor-software/nativescript-plugins/f3b15e7dbb78931556e8d49c5d2e39909638b144/apps/demo/src/fonts/IndieFlower.ttf -------------------------------------------------------------------------------- /apps/demo/src/fonts/SourceSansPro-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valor-software/nativescript-plugins/f3b15e7dbb78931556e8d49c5d2e39909638b144/apps/demo/src/fonts/SourceSansPro-Bold.otf -------------------------------------------------------------------------------- /apps/demo/src/fonts/SourceSansPro.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valor-software/nativescript-plugins/f3b15e7dbb78931556e8d49c5d2e39909638b144/apps/demo/src/fonts/SourceSansPro.otf -------------------------------------------------------------------------------- /apps/demo/src/main-page.ts: -------------------------------------------------------------------------------- 1 | import { EventData, Page } from '@nativescript/core'; 2 | import { MainViewModel } from "./main-view-model"; 3 | 4 | export function navigatingTo(args: EventData) { 5 | const page = args.object; 6 | page.bindingContext = new MainViewModel(); 7 | } 8 | -------------------------------------------------------------------------------- /apps/demo/src/main-page.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |