Skip to content

Commit f75438f

Browse files
committed
chore: latest
1 parent c9c18d2 commit f75438f

26 files changed

+226
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [@nativescript/fingerprint-auth](/packages/fingerprint-auth/README.md)
1414
- [@nativescript/geolocation](/packages/geolocation/README.md)
1515
- [@nativescript/imagepicker](/packages/imagepicker/README.md)
16+
- [@nativescript/ios-debug-flex](/packages/ios-debug-flex/README.md)
1617
- [@nativescript/iqkeyboardmanager](/packages/iqkeyboardmanager/README.md)
1718
- [@nativescript/local-notifications](/packages/local-notifications/README.md)
1819
- [@nativescript/localize](/packages/localize/README.md)

apps/demo-angular/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"@nativescript/localize": "file:../../dist/packages/localize",
3535
"@nativescript/shared-notification-delegate": "file:../../dist/packages/shared-notification-delegate",
3636
"@nativescript/zip": "file:../../dist/packages/zip",
37-
"@nativescript/picker": "file:../../dist/packages/picker"
37+
"@nativescript/picker": "file:../../dist/packages/picker",
38+
"@nativescript/ios-debug-flex": "file:../../dist/packages/ios-debug-flex"
3839
},
3940
"devDependencies": {
4041
"@angular/compiler-cli": "file:../../node_modules/@angular/compiler-cli",

apps/demo-angular/src/app-routing.module.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const routes: Routes = [
2020
{ path: 'fingerprint-auth', loadChildren: () => import('./plugin-demos/fingerprint-auth.module').then((m) => m.FingerprintAuthModule) },
2121
{ path: 'geolocation', loadChildren: () => import('./plugin-demos/geolocation.module').then((m) => m.GeolocationModule) },
2222
{ path: 'imagepicker', loadChildren: () => import('./plugin-demos/imagepicker.module').then((m) => m.ImagepickerModule) },
23+
{ path: 'ios-debug-flex', loadChildren: () => import('./plugin-demos/ios-debug-flex.module').then((m) => m.IosDebugFlexModule) },
2324
{ path: 'iqkeyboardmanager', loadChildren: () => import('./plugin-demos/iqkeyboardmanager.module').then((m) => m.IqkeyboardmanagerModule) },
2425
{ path: 'local-notifications', loadChildren: () => import('./plugin-demos/local-notifications.module').then((m) => m.LocalNotificationsModule) },
2526
{ path: 'localize', loadChildren: () => import('./plugin-demos/localize.module').then((m) => m.LocalizeModule) },

apps/demo-angular/src/home.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ export class HomeComponent {
4545
{
4646
name: 'imagepicker',
4747
},
48+
{
49+
name: 'ios-debug-flex',
50+
},
4851
{
4952
name: 'iqkeyboardmanager',
5053
},
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<ActionBar title="ios-debug-flex" class="action-bar"> </ActionBar>
2+
<StackLayout class="p-20">
3+
<ScrollView class="h-full">
4+
<StackLayout>
5+
<Button text="Test ios-debug-flex" (tap)="demoShared.testIt()" class="btn btn-primary"></Button>
6+
</StackLayout>
7+
</ScrollView>
8+
</StackLayout>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Component, NgZone } from '@angular/core';
2+
import { DemoSharedIosDebugFlex } from '@demo/shared';
3+
import {} from '@nativescript/ios-debug-flex';
4+
5+
@Component({
6+
selector: 'demo-ios-debug-flex',
7+
templateUrl: 'ios-debug-flex.component.html',
8+
})
9+
export class IosDebugFlexComponent {
10+
demoShared: DemoSharedIosDebugFlex;
11+
12+
constructor(private _ngZone: NgZone) {}
13+
14+
ngOnInit() {
15+
this.demoShared = new DemoSharedIosDebugFlex();
16+
}
17+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core';
2+
import { NativeScriptCommonModule, NativeScriptRouterModule } from '@nativescript/angular';
3+
import { IosDebugFlexComponent } from './ios-debug-flex.component';
4+
5+
@NgModule({
6+
imports: [NativeScriptCommonModule, NativeScriptRouterModule.forChild([{ path: '', component: IosDebugFlexComponent }])],
7+
declarations: [IosDebugFlexComponent],
8+
schemas: [NO_ERRORS_SCHEMA],
9+
})
10+
export class IosDebugFlexModule {}

apps/demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"@nativescript/localize": "file:../../dist/packages/localize",
2626
"@nativescript/shared-notification-delegate": "file:../../packages/shared-notification-delegate",
2727
"@nativescript/zip": "file:../../packages/zip",
28-
"@nativescript/picker": "file:../../packages/picker"
28+
"@nativescript/picker": "file:../../packages/picker",
29+
"@nativescript/ios-debug-flex": "file:../../packages/ios-debug-flex"
2930
},
3031
"devDependencies": {
3132
"@nativescript/android": "7.0.1",

apps/demo/src/main-page.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
<Button text="fingerprint-auth" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
1919
<Button text="geolocation" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2020
<Button text="imagepicker" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
21+
<Button text="ios-debug-flex" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2122
<Button text="iqkeyboardmanager" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2223
<Button text="local-notifications" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2324
<Button text="localize" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2425
<Button text="picker" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2526
<Button text="shared-notification-delegate" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2627
<Button text="social-share" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
2728
<Button text="zip" tap="{{ viewDemo }}" class="btn btn-primary view-demo"/>
29+
2830
</StackLayout>
2931
</ScrollView>
3032
</StackLayout>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { Observable, EventData, Page } from '@nativescript/core';
2+
import { DemoSharedIosDebugFlex } from '@demo/shared';
3+
import {} from '@nativescript/ios-debug-flex';
4+
5+
export function navigatingTo(args: EventData) {
6+
const page = <Page>args.object;
7+
page.bindingContext = new DemoModel();
8+
}
9+
10+
export class DemoModel extends DemoSharedIosDebugFlex {}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
2+
<Page.actionBar>
3+
<ActionBar title="iOS Interactive Debug Tools" icon="" class="action-bar">
4+
</ActionBar>
5+
</Page.actionBar>
6+
<StackLayout class="p-20">
7+
<ScrollView class="h-full">
8+
<StackLayout>
9+
<GridLayout rows="auto,auto,auto" columns="*,auto,auto,auto,*">
10+
<Label colSpan="5" text="iOS Debugging with Flex" class="text-center m-b-20"></Label>
11+
<Label colSpan="5" row="1" text="Only enabled in debug - auto disabled in production builds." class="text-center m-b-20" textWrap="true"></Label>
12+
<Label row="2" col="1" text="🛑" class="m-x-4"></Label>
13+
<Label row="2" col="2" text="🐛" class="m-x-4"></Label>
14+
<Label row="2" col="3" text="🔥" class="m-x-4"></Label>
15+
</GridLayout>
16+
<Button text="Open Debug Tools" tap="{{ testIt }}" class="btn btn-primary m-t-20"/>
17+
18+
</StackLayout>
19+
</ScrollView>
20+
</StackLayout>
21+
</Page>

nx.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@
8282
},
8383
"picker": {
8484
"tags": []
85+
},
86+
"ios-debug-flex": {
87+
"tags": []
8588
}
8689
},
8790
"workspaceLayout": {

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
"@angular/platform-browser-dynamic": "~11.2.0",
2525
"@angular/router": "~11.2.0",
2626
"@nativescript/angular": "~11.0.0",
27-
"@nativescript/core": "~7.2.0",
27+
"@nativescript/core": "~7.3.0",
2828
"@nativescript/plugin-tools": "1.1.0",
29-
"@nativescript/types": "~7.2.0",
29+
"@nativescript/types": "~7.3.0",
3030
"@nativescript/webpack": "~4.1.0",
3131
"@ngtools/webpack": "~11.2.0",
3232
"@types/mkdirp": "^1.0.1",

packages/ios-debug-flex/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# @nativescript/ios-debug-flex
2+
3+
```javascript
4+
ns plugin add @nativescript/ios-debug-flex
5+
```
6+
7+
## Usage
8+
9+
// TODO
10+
11+
## License
12+
13+
Apache License Version 2.0

packages/ios-debug-flex/common.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { Observable } from '@nativescript/core';
2+
3+
export class IOSDebugFlexCommon extends Observable {
4+
static show() {}
5+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { IOSDebugFlexCommon } from './common';
2+
3+
export class IOSDebugFlex extends IOSDebugFlexCommon {
4+
static show() {
5+
console.log('NOTE: ios-debug-flex is IOS only.');
6+
}
7+
}

packages/ios-debug-flex/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { IOSDebugFlex } from './common';
2+
3+
export declare class IOSDebugFlex extends IOSDebugFlex {
4+
static show(): void;
5+
}

packages/ios-debug-flex/index.ios.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { IOSDebugFlexCommon } from './common';
2+
declare var FLEXManager;
3+
export class IOSDebugFlex extends IOSDebugFlexCommon {
4+
static show() {
5+
FLEXManager.sharedManager.showExplorer();
6+
}
7+
}

packages/ios-debug-flex/package.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "@nativescript/ios-debug-flex",
3+
"version": "1.0.0",
4+
"description": "NativeScript iOS Debugging tools with Flex.",
5+
"main": "index",
6+
"typings": "index.d.ts",
7+
"nativescript": {
8+
"platforms": {
9+
"ios": "6.0.0",
10+
"android": "6.0.0"
11+
}
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/NativeScript/plugins.git"
16+
},
17+
"keywords": [
18+
"NativeScript",
19+
"JavaScript",
20+
"TypeScript",
21+
"iOS",
22+
"Android"
23+
],
24+
"author": {
25+
"name": "NativeScript",
26+
"email": "oss@nativescript.org"
27+
},
28+
"bugs": {
29+
"url": "https://github.com/NativeScript/plugins/issues"
30+
},
31+
"license": "Apache-2.0",
32+
"homepage": "https://github.com/NativeScript/plugins",
33+
"readmeFilename": "README.md",
34+
"bootstrapper": "@nativescript/plugin-seed"
35+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pod 'FLEX', :configurations => ['Debug']
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference path="../../references.d.ts" />

packages/ios-debug-flex/tsconfig.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "../../tsconfig.base.json",
3+
"compilerOptions": {
4+
"outDir": "../../dist/out-tsc",
5+
"rootDir": "."
6+
},
7+
"exclude": ["**/*.spec.ts", "angular"],
8+
"include": ["**/*.ts", "references.d.ts"]
9+
}

tools/demo/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export * from './email';
1212
export * from './fingerprint-auth';
1313
export * from './geolocation';
1414
export * from './imagepicker';
15+
export * from './ios-debug-flex';
1516
export * from './iqkeyboardmanager';
1617
export * from './local-notifications';
1718
export * from './localize';

tools/demo/ios-debug-flex/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { DemoSharedBase } from '../utils';
2+
import { IOSDebugFlex } from '@nativescript/ios-debug-flex';
3+
4+
export class DemoSharedIosDebugFlex extends DemoSharedBase {
5+
testIt() {
6+
IOSDebugFlex.show();
7+
}
8+
}

tools/workspace-scripts.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ module.exports = {
203203
description: '@nativescript/picker: Build',
204204
},
205205
},
206+
// @nativescript/ios-debug-flex
207+
'ios-debug-flex': {
208+
build: {
209+
script: 'nx run ios-debug-flex:build.all',
210+
description: '@nativescript/ios-debug-flex: Build',
211+
},
212+
},
206213
'build-all': {
207214
script: 'nx run all:build',
208215
description: 'Build all packages',
@@ -293,6 +300,10 @@ module.exports = {
293300
script: 'nx run picker:focus',
294301
description: 'Focus on @nativescript/picker',
295302
},
303+
'ios-debug-flex': {
304+
script: 'nx run ios-debug-flex:focus',
305+
description: 'Focus on @nativescript/ios-debug-flex',
306+
},
296307
reset: {
297308
script: 'nx run all:focus',
298309
description: 'Reset Focus',

workspace.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,47 @@
927927
}
928928
}
929929
},
930+
"ios-debug-flex": {
931+
"projectType": "library",
932+
"schematics": {},
933+
"root": "packages/ios-debug-flex",
934+
"sourceRoot": "packages/ios-debug-flex",
935+
"architect": {
936+
"build": {
937+
"builder": "@nrwl/node:package",
938+
"options": {
939+
"outputPath": "dist/packages/ios-debug-flex",
940+
"tsConfig": "packages/ios-debug-flex/tsconfig.json",
941+
"packageJson": "packages/ios-debug-flex/package.json",
942+
"main": "packages/ios-debug-flex/index.ts",
943+
"assets": [
944+
"packages/ios-debug-flex/*.md",
945+
"packages/ios-debug-flex/index.d.ts",
946+
"LICENSE",
947+
{
948+
"glob": "**/*",
949+
"input": "packages/ios-debug-flex/platforms/",
950+
"output": "./platforms/"
951+
}
952+
]
953+
}
954+
},
955+
"build.all": {
956+
"builder": "@nrwl/workspace:run-commands",
957+
"options": {
958+
"commands": ["nx run ios-debug-flex:build", "node tools/scripts/build-finish.ts ios-debug-flex"],
959+
"parallel": false
960+
}
961+
},
962+
"focus": {
963+
"builder": "@nrwl/workspace:run-commands",
964+
"options": {
965+
"commands": ["nx g @nativescript/plugin-tools:focus-packages ios-debug-flex"],
966+
"parallel": false
967+
}
968+
}
969+
}
970+
},
930971
"picker": {
931972
"projectType": "library",
932973
"schematics": {},

0 commit comments

Comments
 (0)