Skip to content

Commit 0bc34eb

Browse files
committed
chore: additional plugins
1 parent 6a9cff7 commit 0bc34eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+4072
-104
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ Thumbs.db
4242

4343
*.tgz
4444
apps/**/webpack.config.js
45+
packages/**/angular/dist

apps/demo-angular/package.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,25 @@
88
"version": "6.5.3"
99
}
1010
},
11+
"scripts": {
12+
"ngcc": "ngcc --properties es2015 module main --first-only",
13+
"postinstall": "npm run ngcc"
14+
},
1115
"dependencies": {
12-
"@angular/animations": "~10.0.0",
13-
"@angular/common": "~10.0.0",
14-
"@angular/compiler": "~10.0.0",
15-
"@angular/core": "~10.0.0",
16-
"@angular/forms": "~10.0.0",
17-
"@angular/platform-browser": "~10.0.0",
18-
"@angular/platform-browser-dynamic": "~10.0.0",
19-
"@angular/router": "~10.0.0",
20-
"@nativescript/angular": "~10.0.0",
16+
"@angular/animations": "file:../../node_modules/@angular/animations",
17+
"@angular/common": "file:../../node_modules/@angular/common",
18+
"@angular/compiler": "file:../../node_modules/@angular/compiler",
19+
"@angular/core": "file:../../node_modules/@angular/core",
20+
"@angular/forms": "file:../../node_modules/@angular/forms",
21+
"@angular/platform-browser": "file:../../node_modules/@angular/platform-browser",
22+
"@angular/platform-browser-dynamic": "file:../../node_modules/@angular/platform-browser-dynamic",
23+
"@angular/router": "file:../../node_modules/@angular/router",
24+
"@nativescript/angular": "file:../../node_modules/@nativescript/angular",
2125
"@nativescript/core": "file:../../node_modules/@nativescript/core",
2226
"nativescript-theme-core": "^1.0.4",
2327
"nativescript-unit-test-runner": "0.7.0",
2428
"reflect-metadata": "~0.1.13",
25-
"rxjs": "^6.6.0",
29+
"rxjs": "file:../../node_modules/rxjs",
2630
"zone.js": "~0.10.3",
2731
"@nativescript/local-notifications": "file:../../dist/packages/local-notifications",
2832
"@nativescript/shared-notification-delegate": "file:../../dist/packages/shared-notification-delegate",
@@ -44,7 +48,7 @@
4448
"@nativescript/webpack": "^2.1.3",
4549
"typescript": "file:../../node_modules/typescript",
4650
"karma-webpack": "3.0.5",
47-
"@angular/compiler-cli": "~10.0.0",
51+
"@angular/compiler-cli": "file:../../node_modules/@angular/compiler-cli",
4852
"@ngtools/webpack": "~10.0.0"
4953
}
5054
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import { Routes } from "@angular/router";
33
import { NativeScriptRouterModule } from "@nativescript/angular";
44

55
import { HomeComponent } from "./home.component";
6-
import { ImagePickerComponent } from "./plugin-demos";
6+
import { ImagePickerComponent, DateTimePickerComponent } from "./plugin-demos";
77

88
const routes: Routes = [
99
{ path: "", redirectTo: "/home", pathMatch: "full" },
1010
{ path: "home", component: HomeComponent },
11+
{ path: "datetimepicker", component: DateTimePickerComponent },
1112
{ path: "imagepicker", component: ImagePickerComponent }
1213
];
1314

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import { AppComponent } from "./app.component";
55
import { AppRoutingModule } from "./app-routing.module";
66
import { HomeComponent } from "./home.component";
77
import { COMPONENTS } from "./plugin-demos";
8+
import { NativeScriptDateTimePickerModule } from "@nativescript/datetimepicker/angular";
89

910
@NgModule({
1011
schemas: [NO_ERRORS_SCHEMA],
1112
declarations: [AppComponent, HomeComponent, ...COMPONENTS],
1213
bootstrap: [AppComponent],
13-
imports: [NativeScriptModule, AppRoutingModule],
14+
imports: [NativeScriptModule, AppRoutingModule, NativeScriptDateTimePickerModule],
1415
})
1516
export class AppModule {}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import { Component } from '@angular/core';
66
})
77
export class HomeComponent {
88
demos = [
9+
{
10+
name: 'datetimepicker',
11+
},
912
{
1013
name: 'imagepicker',
1114
},
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<ActionBar class="action-bar">
2+
<Label class="action-bar-title" text="DateTimePicker Demo NG"></Label>
3+
</ActionBar>
4+
5+
<ScrollView #scrollView>
6+
<StackLayout class="p-20">
7+
<Label text="DatePickerField" id="date" class="header" (tap)="onHeaderTap($event)" [opacity]="dateOpacity"></Label>
8+
<StackLayout [visibility]="dateVisibility">
9+
<Label text="basic usage" class="content"></Label>
10+
<DatePickerField hint="select date"></DatePickerField>
11+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
12+
13+
<Label text="initial values" class="content"></Label>
14+
<DatePickerField date="2019/02/24"></DatePickerField>
15+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
16+
17+
<Label text="min and max date" class="content"></Label>
18+
<DatePickerField minDate="2020/02/02" maxDate="2021/02/02" hint="tap to select"></DatePickerField>
19+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
20+
21+
<Label text="modified picker texts" class="content"></Label>
22+
<DatePickerField hint="tap to choose" pickerOkText="Approve" pickerCancelText="Reject"
23+
pickerTitle="Confirm predefined date selection" pickerDefaultDate="2019/05/15"></DatePickerField>
24+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
25+
26+
<Label text="preferred locale: en_US" class="content"></Label>
27+
<DatePickerField locale="en_US" hint="select date" pickerOkText="OK"
28+
pickerCancelText="Cancel" pickerTitle="Select date"></DatePickerField>
29+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
30+
31+
<Label text="preferred locale: de_DE" class="content"></Label>
32+
<DatePickerField locale="de_DE" hint="datum auswählen" pickerOkText="Bestätigen"
33+
pickerCancelText="Stornieren" pickerTitle="Datum auswählen"></DatePickerField>
34+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
35+
36+
<Label text="custom format" class="content"></Label>
37+
<DatePickerField date="2019/02/24" dateFormat="'date': dd MMMM yyyy"></DatePickerField>
38+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
39+
40+
<Label text="css applied" class="content"></Label>
41+
<DatePickerField date="2019/02/24" pickerTitle="select date" class="apply-css"></DatePickerField>
42+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
43+
44+
<Label text="binding" class="content"></Label>
45+
<Label [text]="dateTime1" color="#CBCBCB"></Label>
46+
<DatePickerField [(ngModel)]="dateTime1"></DatePickerField>
47+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
48+
</StackLayout>
49+
50+
<Label text="TimePickerField" id="time" class="header" (tap)="onHeaderTap($event)" [opacity]="timeOpacity"></Label>
51+
<StackLayout [visibility]="timeVisibility">
52+
<Label text="basic usage" class="content"></Label>
53+
<TimePickerField hint="select time"></TimePickerField>
54+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
55+
56+
<Label text="initial values" class="content"></Label>
57+
<TimePickerField time="01:00"></TimePickerField>
58+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
59+
60+
<Label text="time format 12h" class="content"></Label>
61+
<TimePickerField time="16:00" timeFormat="h:mm a" locale="en_US"></TimePickerField>
62+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
63+
64+
<Label text="time format 24h" class="content"></Label>
65+
<TimePickerField time="16:00" timeFormat="HH:mm" locale="en_GB"></TimePickerField>
66+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
67+
68+
<Label text="modified picker texts" class="content"></Label>
69+
<TimePickerField hint="tap to choose" pickerOkText="Approve" pickerCancelText="Reject"
70+
pickerTitle="Confirm predefined time selection" pickerDefaultTime="22:00"></TimePickerField>
71+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
72+
73+
<Label text="preferred locale: en_US" class="content"></Label>
74+
<TimePickerField locale="en_US" hint="select time" pickerOkText="OK"
75+
pickerCancelText="Cancel" pickerTitle="Select time"></TimePickerField>
76+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
77+
78+
<Label text="preferred locale: de_DE" class="content"></Label>
79+
<TimePickerField locale="de_DE" hint="zeit wählen" pickerOkText="Bestätigen"
80+
timeFormat="HH:mm" pickerCancelText="Stornieren" pickerTitle="Zeit wählen"></TimePickerField>
81+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
82+
83+
<Label text="custom format" class="content"></Label>
84+
<TimePickerField time="01:00" timeFormat="'time': HH:mm"></TimePickerField>
85+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
86+
87+
<Label text="css applied" class="content"></Label>
88+
<TimePickerField time="01:00" pickerTitle="select time" class="apply-css"></TimePickerField>
89+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
90+
91+
<Label text="binding" class="content"></Label>
92+
<Label [text]="dateTime2" color="#CBCBCB"></Label>
93+
<TimePickerField [(ngModel)]="dateTime2"></TimePickerField>
94+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
95+
</StackLayout>
96+
97+
<Label text="DateTimePickerFields" id="dateTime" class="header" (tap)="onHeaderTap($event)" [opacity]="dateTimeOpacity"></Label>
98+
<StackLayout [visibility]="dateTimeVisibility">
99+
<Label text="basic usage" class="content"></Label>
100+
<DateTimePickerFields hintDate="select date" hintTime="select time"></DateTimePickerFields>
101+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
102+
103+
<Label text="initial values" class="content"></Label>
104+
<DateTimePickerFields date="2019/02/24 01:00"></DateTimePickerFields>
105+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
106+
107+
<Label text="min and max date" class="content"></Label>
108+
<DateTimePickerFields minDate="2020/02/02" maxDate="2021/02/02"
109+
hintDate="tap to select date" hintTime="tap to select time"></DateTimePickerFields>
110+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
111+
112+
<Label text="time format 12h" class="content"></Label>
113+
<DateTimePickerFields date="2019/02/24 16:00" timeFormat="h:mm a" locale="en_US"></DateTimePickerFields>
114+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
115+
116+
<Label text="time format 24h" class="content"></Label>
117+
<DateTimePickerFields date="2019/02/24 16:00" timeFormat="HH:mm" locale="en_GB"></DateTimePickerFields>
118+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
119+
120+
<Label text="modified picker texts" class="content"></Label>
121+
<DateTimePickerFields hintDate="tap to choose date" hintTime="tap to choose time"
122+
pickerOkText="Approve" pickerCancelText="Reject"
123+
pickerTitleDate="Confirm predefined date selection"
124+
pickerTitleTime="Confirm predefined time selection"
125+
pickerDefaultDate="2019/05/15 22:00" autoPickTime="true"></DateTimePickerFields>
126+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
127+
128+
<Label text="preferred locale: en_US" class="content"></Label>
129+
<DateTimePickerFields locale="en_US" hintDate="select date" hintTime="select time"
130+
pickerOkText="OK" pickerCancelText="Cancel" pickerTitleDate="Select date" pickerTitleTime="Select time"></DateTimePickerFields>
131+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
132+
133+
<Label text="preferred locale: de_DE" class="content"></Label>
134+
<DateTimePickerFields locale="de_DE" hintDate="datum auswählen" hintTime="zeit wählen"
135+
pickerOkText="Bestätigen" pickerCancelText="Stornieren"
136+
pickerTitleDate="Datum auswählen" pickerTitleTime="Zeit wählen"></DateTimePickerFields>
137+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
138+
139+
<Label text="custom format" class="content"></Label>
140+
<DateTimePickerFields date="2019/02/24 01:00"
141+
dateFormat="'d': dd MMMM yyyy" timeFormat="'t': HH:mm"></DateTimePickerFields>
142+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
143+
144+
<Label text="css applied" class="content"></Label>
145+
<DateTimePickerFields date="2019/02/24 01:00" class="apply-css"
146+
pickerTitleDate="select date" pickerTitleTime="select time"></DateTimePickerFields>
147+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
148+
149+
<Label text="binding" class="content"></Label>
150+
<Label [text]="dateTime3" color="#CBCBCB"></Label>
151+
<DateTimePickerFields [(ngModel)]="dateTime3"></DateTimePickerFields>
152+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
153+
154+
<Label text="vertical orientation" class="content"></Label>
155+
<DateTimePickerFields hintDate="select date" hintTime="select time"
156+
orientation="vertical"></DateTimePickerFields>
157+
<StackLayout class="hr-light m-10" android:visibility="collapse"></StackLayout>
158+
</StackLayout>
159+
160+
<Label text="Custom Buttons" id="custom" class="header" (tap)="onHeaderTap($event)" [opacity]="customOpacity"></Label>
161+
<StackLayout [visibility]="customVisibility">
162+
<TextField opacity="0"></TextField>
163+
<Button [text]="dateText" (tap)="onPickDateTap($event)"></Button>
164+
<Button [text]="timeText" (tap)="onPickTimeTap($event)"></Button>
165+
<Button [text]="dateTimeText" (tap)="onPickDateTimeTap($event)"></Button>
166+
</StackLayout>
167+
</StackLayout>
168+
</ScrollView>

0 commit comments

Comments
 (0)