@nstudio/nativescript-checkbox 2.0.2 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -57
- package/angular/esm2020/index.mjs +81 -0
- package/angular/esm2020/nstudio-nativescript-checkbox-angular.mjs +5 -0
- package/angular/fesm2015/nstudio-nativescript-checkbox-angular.mjs +90 -0
- package/angular/fesm2015/nstudio-nativescript-checkbox-angular.mjs.map +1 -0
- package/angular/fesm2020/nstudio-nativescript-checkbox-angular.mjs +88 -0
- package/angular/fesm2020/nstudio-nativescript-checkbox-angular.mjs.map +1 -0
- package/angular/index.d.ts +16 -0
- package/angular/{dist/nativescript-checkbox-angular.d.ts → nstudio-nativescript-checkbox-angular.d.ts} +1 -0
- package/angular/package.json +22 -20
- package/common.d.ts +4 -0
- package/{checkbox-common.js → common.js} +1 -1
- package/common.js.map +1 -0
- package/index.android.d.ts +45 -0
- package/{checkbox.android.js → index.android.js} +33 -41
- package/index.android.js.map +1 -0
- package/index.ios.d.ts +41 -0
- package/{checkbox.ios.js → index.ios.js} +17 -12
- package/index.ios.js.map +1 -0
- package/package.json +15 -66
- package/LICENSE +0 -21
- package/angular/dist/bundles/nativescript-checkbox-angular.umd.js +0 -393
- package/angular/dist/bundles/nativescript-checkbox-angular.umd.min.js +0 -16
- package/angular/dist/esm2015/index.js +0 -72
- package/angular/dist/esm2015/nativescript-checkbox-angular.js +0 -5
- package/angular/dist/fesm2015/nativescript-checkbox-angular.js +0 -79
- package/angular/dist/index.d.ts +0 -24
- package/angular/dist/nativescript-checkbox-angular.metadata.json +0 -1
- package/angular/dist/package.json +0 -19
- package/angular/index.js +0 -70
- package/angular/index.metadata.json +0 -1
- package/references.d.ts +0 -2
- package/tsconfig.aot.json +0 -29
- package/typings/BEMCheckBox.d.ts +0 -191
@@ -1,60 +1,41 @@
|
|
1
|
-
import { Application, booleanConverter, Color, CssProperty, Device, Property, Style, View } from '@nativescript/core';
|
2
|
-
import { BoxType } from './
|
3
|
-
const AppCompatCheckBox_Namespace = useAndroidX()
|
4
|
-
|
5
|
-
: android.support.v7.widget;
|
6
|
-
const CompoundButtonCompat_Namespace = useAndroidX()
|
7
|
-
? androidx.core.widget
|
8
|
-
: android.support.v4.widget;
|
1
|
+
import { Application, booleanConverter, Color, CssProperty, Device, fontSizeProperty, Property, Style, View } from '@nativescript/core';
|
2
|
+
import { BoxType } from './common';
|
3
|
+
const AppCompatCheckBox_Namespace = useAndroidX() ? androidx.appcompat.widget : android.support.v7.widget;
|
4
|
+
const CompoundButtonCompat_Namespace = useAndroidX() ? androidx.core.widget : android.support.v4.widget;
|
9
5
|
function useAndroidX() {
|
10
|
-
return
|
11
|
-
com.google &&
|
12
|
-
com.google.android &&
|
13
|
-
com.google.android.material);
|
6
|
+
return androidx.appcompat && androidx.core;
|
14
7
|
}
|
15
8
|
export const checkedProperty = new Property({
|
16
9
|
name: 'checked',
|
17
10
|
defaultValue: false,
|
18
11
|
valueConverter: booleanConverter,
|
19
|
-
valueChanged: onCheckedPropertyChanged
|
12
|
+
valueChanged: onCheckedPropertyChanged,
|
20
13
|
});
|
21
14
|
export const textProperty = new Property({
|
22
15
|
name: 'text',
|
23
16
|
defaultValue: '',
|
24
|
-
valueChanged: onTextPropertyChanged
|
17
|
+
valueChanged: onTextPropertyChanged,
|
25
18
|
});
|
26
19
|
export const fillColorProperty = new CssProperty({
|
27
20
|
name: 'fillColor',
|
28
21
|
cssName: 'fill-color',
|
29
|
-
valueConverter: v => {
|
22
|
+
valueConverter: (v) => {
|
30
23
|
return String(v);
|
31
|
-
}
|
24
|
+
},
|
32
25
|
});
|
33
26
|
export const tintColorProperty = new CssProperty({
|
34
27
|
name: 'tintColor',
|
35
28
|
cssName: 'tint-color',
|
36
29
|
defaultValue: '#0075ff',
|
37
|
-
valueConverter: v => {
|
30
|
+
valueConverter: (v) => {
|
38
31
|
return String(v);
|
39
|
-
}
|
40
|
-
});
|
41
|
-
export const fontSizeProperty = new CssProperty({
|
42
|
-
name: 'fontSize',
|
43
|
-
cssName: 'font-size',
|
44
|
-
defaultValue: 14,
|
45
|
-
valueConverter: v => {
|
46
|
-
const x = parseFloat(v);
|
47
|
-
if (x < 0) {
|
48
|
-
throw new Error(`font-size accepts values greater than 0. Value: ${v}`);
|
49
|
-
}
|
50
|
-
return x;
|
51
|
-
}
|
32
|
+
},
|
52
33
|
});
|
53
|
-
fontSizeProperty.register(Style);
|
54
34
|
export class CheckBox extends View {
|
55
35
|
constructor() {
|
56
36
|
super();
|
57
37
|
}
|
38
|
+
// @ts-ignore
|
58
39
|
get android() {
|
59
40
|
return this._android;
|
60
41
|
}
|
@@ -113,10 +94,21 @@ export class CheckBox extends View {
|
|
113
94
|
this.nativeView.setText(java.lang.String.valueOf(value));
|
114
95
|
}
|
115
96
|
[fontSizeProperty.getDefault]() {
|
116
|
-
return
|
97
|
+
return { nativeSize: this.nativeView.getTextSize() };
|
117
98
|
}
|
118
99
|
[fontSizeProperty.setNative](value) {
|
119
|
-
|
100
|
+
if (typeof value === 'number') {
|
101
|
+
this.nativeView.setTextSize(value);
|
102
|
+
}
|
103
|
+
else {
|
104
|
+
this.nativeView.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PX, value.nativeSize);
|
105
|
+
}
|
106
|
+
}
|
107
|
+
get fontSize() {
|
108
|
+
return this.style.fontSizeProperty;
|
109
|
+
}
|
110
|
+
set fontSize(size) {
|
111
|
+
this.style.fontSize = size;
|
120
112
|
}
|
121
113
|
get fillColor() {
|
122
114
|
return this.style.fillColor;
|
@@ -124,9 +116,12 @@ export class CheckBox extends View {
|
|
124
116
|
set fillColor(color) {
|
125
117
|
this.style.fillColor = color;
|
126
118
|
if (this._android && Device.sdkVersion >= '21') {
|
119
|
+
// setButtonTintList is method on `android.widgeth.CompondButton`
|
120
|
+
// here: https://developer.android.com/reference/android/widget/CompoundButton.html#setButtonTintList(android.content.res.ColorStateList)
|
127
121
|
this._android.setButtonTintList(android.content.res.ColorStateList.valueOf(new Color(color).android));
|
128
122
|
}
|
129
123
|
}
|
124
|
+
// there is no difference between tint and fill on the android widget
|
130
125
|
get tintColor() {
|
131
126
|
return this.style.fillColor;
|
132
127
|
}
|
@@ -135,9 +130,8 @@ export class CheckBox extends View {
|
|
135
130
|
}
|
136
131
|
createNativeView() {
|
137
132
|
var _a;
|
138
|
-
this._android = new AppCompatCheckBox_Namespace[BoxType[this.boxType] === BoxType.circle
|
139
|
-
|
140
|
-
: 'AppCompatCheckBox'](this._context, null);
|
133
|
+
this._android = new AppCompatCheckBox_Namespace[BoxType[this.boxType] === BoxType.circle ? 'AppCompatRadioButton' : 'AppCompatCheckBox'](this._context, null);
|
134
|
+
// assign to the nativeView member
|
141
135
|
this.nativeView = this.android;
|
142
136
|
if (this.checkPaddingLeft) {
|
143
137
|
this._android.setPadding(parseInt(this.checkPaddingLeft), this._android.getPaddingTop(), this._android.getPaddingRight(), this._android.getPaddingBottom());
|
@@ -180,9 +174,7 @@ export class CheckBox extends View {
|
|
180
174
|
this._android.setTypeface(typeface);
|
181
175
|
}
|
182
176
|
if (this._checkStyle) {
|
183
|
-
const drawable = Application.android.context
|
184
|
-
.getResources()
|
185
|
-
.getIdentifier(this._checkStyle, 'drawable', Application.android.context.getPackageName());
|
177
|
+
const drawable = Application.android.context.getResources().getIdentifier(this._checkStyle, 'drawable', Application.android.context.getPackageName());
|
186
178
|
this._android.setButtonDrawable(drawable);
|
187
179
|
}
|
188
180
|
if (this._android) {
|
@@ -199,7 +191,7 @@ export class CheckBox extends View {
|
|
199
191
|
if (that.get()) {
|
200
192
|
checkedProperty.nativeValueChange(that.get(), isChecked);
|
201
193
|
}
|
202
|
-
}
|
194
|
+
},
|
203
195
|
}));
|
204
196
|
}
|
205
197
|
disposeNativeView() {
|
@@ -231,4 +223,4 @@ checkedProperty.register(CheckBox);
|
|
231
223
|
textProperty.register(CheckBox);
|
232
224
|
fillColorProperty.register(Style);
|
233
225
|
tintColorProperty.register(Style);
|
234
|
-
//# sourceMappingURL=
|
226
|
+
//# sourceMappingURL=index.android.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../packages/nativescript-checkbox/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AACxI,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAInC,MAAM,2BAA2B,GAAG,WAAW,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAE,OAAO,CAAC,OAAe,CAAC,EAAE,CAAC,MAAM,CAAC;AAEnH,MAAM,8BAA8B,GAAG,WAAW,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAE,OAAO,CAAC,OAAO,CAAC,EAAU,CAAC,MAAM,CAAC;AAEjH,SAAS,WAAW;IACnB,OAAO,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,IAAI,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,QAAQ,CAAoB;IAC9D,IAAI,EAAE,SAAS;IACf,YAAY,EAAE,KAAK;IACnB,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,wBAAwB;CACtC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,QAAQ,CAAmB;IAC1D,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,qBAAqB;CACnC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,WAAW,CAAgB;IAC/D,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,YAAY;IACrB,cAAc,EAAE,CAAC,CAAC,EAAE,EAAE;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2
|
+
import { CheckBoxInterface } from '.';
|
3
|
+
export declare class CheckBox extends Button implements CheckBoxInterface {
|
4
|
+
checked: boolean;
|
5
|
+
boxType: number;
|
6
|
+
_onCheckColor: string;
|
7
|
+
_checkBoxBackgroundColor: any;
|
8
|
+
_onTintColor: string;
|
9
|
+
_tintColor: string;
|
10
|
+
_onFillColor: string;
|
11
|
+
_fillColor: string;
|
12
|
+
private _iosCheckbox;
|
13
|
+
private _delegate;
|
14
|
+
private _lineWidth;
|
15
|
+
private _hideBox;
|
16
|
+
private _boxType;
|
17
|
+
private _tint;
|
18
|
+
private _animationDuration;
|
19
|
+
private _onAnimationType;
|
20
|
+
private _offAnimationType;
|
21
|
+
constructor();
|
22
|
+
set fillColor(color: string);
|
23
|
+
set onFillColor(color: string);
|
24
|
+
set tintColor(color: string);
|
25
|
+
set onTintColor(color: string);
|
26
|
+
set checkBoxBackgroundColor(color: any);
|
27
|
+
set onCheckColor(color: string);
|
28
|
+
set checkedAnimated(value: boolean);
|
29
|
+
set lineWidth(value: number);
|
30
|
+
set hideBox(value: boolean);
|
31
|
+
set animationDuration(value: number);
|
32
|
+
set onAnimationType(value: number);
|
33
|
+
set offAnimationType(value: number);
|
34
|
+
get nativeiOSCheckBox(): BEMCheckBox;
|
35
|
+
reload(value: boolean): void;
|
36
|
+
initNativeView(): void;
|
37
|
+
disposeNativeView(): void;
|
38
|
+
toggle(): void;
|
39
|
+
private _getAnimationType;
|
40
|
+
_onCheckedPropertyChanged(checkbox: CheckBox, oldValue: any, newValue: any): void;
|
41
|
+
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { booleanConverter, Button, Color, CssProperty, Property, Style } from '@nativescript/core';
|
2
|
-
import { BoxType } from './
|
2
|
+
import { BoxType } from './common';
|
3
3
|
const checkBoxBackgroundColorProperty = new CssProperty({
|
4
4
|
name: 'checkBoxBackgroundColor',
|
5
5
|
cssName: 'checkbox-background-color',
|
@@ -18,6 +18,7 @@ const onCheckColorProperty = new CssProperty({
|
|
18
18
|
const tintColorProperty = new CssProperty({
|
19
19
|
name: 'tintColor',
|
20
20
|
cssName: 'tint-color',
|
21
|
+
// defaultValue: "#0075ff",
|
21
22
|
valueConverter: v => {
|
22
23
|
return String(v);
|
23
24
|
}
|
@@ -46,14 +47,16 @@ const boxTypeProperty = new Property({
|
|
46
47
|
name: 'boxType',
|
47
48
|
valueConverter: v => {
|
48
49
|
return BoxType[v] === BoxType.circle
|
49
|
-
? 0
|
50
|
-
: 1
|
50
|
+
? 0 /* Circle */
|
51
|
+
: 1 /* Square */;
|
51
52
|
}
|
52
53
|
});
|
53
54
|
export class CheckBox extends Button {
|
54
55
|
constructor() {
|
55
56
|
super();
|
56
57
|
this._lineWidth = 1;
|
58
|
+
// just create with any width/height as XML view width/height is undefined at this point
|
59
|
+
// we modify width/height later below in onLoaded
|
57
60
|
this._iosCheckbox = BEMCheckBox.alloc().initWithFrame(CGRectMake(0, 0, 80, 80));
|
58
61
|
}
|
59
62
|
set fillColor(color) {
|
@@ -123,6 +126,7 @@ export class CheckBox extends Button {
|
|
123
126
|
this._iosCheckbox.reload();
|
124
127
|
}
|
125
128
|
initNativeView() {
|
129
|
+
// allow label click to change the textbox
|
126
130
|
this.addEventListener('tap', args => {
|
127
131
|
const checkbox = args.object;
|
128
132
|
checkbox.checked = !checkbox.checked;
|
@@ -138,6 +142,7 @@ export class CheckBox extends Button {
|
|
138
142
|
fontSize = this.style.fontSize;
|
139
143
|
}
|
140
144
|
this._iosCheckbox.delegate = this._delegate;
|
145
|
+
// positioning
|
141
146
|
this._iosCheckbox.frame = CGRectMake(0, 0, fontSize, fontSize);
|
142
147
|
this._iosCheckbox.center = CGPointMake(this._iosCheckbox.center.x, fontSize / 2 + 3);
|
143
148
|
this.style.paddingLeft = fontSize + (fontSize > 20 ? 10 : 5);
|
@@ -164,7 +169,7 @@ export class CheckBox extends Button {
|
|
164
169
|
if (typeof this._hideBox !== 'undefined') {
|
165
170
|
this.hideBox = this._hideBox;
|
166
171
|
}
|
167
|
-
this.boxType = this.boxType === 0 ? 0 : 1
|
172
|
+
this.boxType = this.boxType === 0 ? 0 /* Circle */ : 1 /* Square */;
|
168
173
|
if (typeof this._animationDuration !== 'undefined') {
|
169
174
|
this.animationDuration = this._animationDuration;
|
170
175
|
}
|
@@ -185,19 +190,19 @@ export class CheckBox extends Button {
|
|
185
190
|
_getAnimationType(value) {
|
186
191
|
switch (value) {
|
187
192
|
case 1:
|
188
|
-
return 0
|
193
|
+
return 0 /* Stroke */;
|
189
194
|
case 2:
|
190
|
-
return 1
|
195
|
+
return 1 /* Fill */;
|
191
196
|
case 3:
|
192
|
-
return 2
|
197
|
+
return 2 /* Bounce */;
|
193
198
|
case 4:
|
194
|
-
return 3
|
199
|
+
return 3 /* Flat */;
|
195
200
|
case 5:
|
196
|
-
return 0
|
201
|
+
return 0 /* Stroke */;
|
197
202
|
case 6:
|
198
|
-
return 5
|
203
|
+
return 5 /* Fade */;
|
199
204
|
default:
|
200
|
-
return 0
|
205
|
+
return 0 /* Stroke */;
|
201
206
|
}
|
202
207
|
}
|
203
208
|
_onCheckedPropertyChanged(checkbox, oldValue, newValue) {
|
@@ -242,4 +247,4 @@ onTintColorProperty.register(Style);
|
|
242
247
|
onCheckColorProperty.register(Style);
|
243
248
|
checkBoxBackgroundColorProperty.register(Style);
|
244
249
|
tintColorProperty.register(Style);
|
245
|
-
//# sourceMappingURL=
|
250
|
+
//# sourceMappingURL=index.ios.js.map
|
package/index.ios.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../packages/nativescript-checkbox/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,MAAM,EACN,KAAK,EACL,WAAW,EACX,QAAQ,EACR,KAAK,EACN,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,MAAM,+BAA+B,GAAG,IAAI,WAAW,CAAgB;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E;YACpB,OAAO;SACR;QACD,eAAe,CAAC,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACpD,CAAC;CACF;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BD,SAAS,wBAAwB,CAAC,QAAkB,EAAE,QAAQ,EAAE,QAAQ;IACtE,QAAQ,CAAC,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AACnE,CAAC;AAED,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACnC,eAAe,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACnC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAClC,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpC,oBAAoB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACrC,+BAA+B,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAChD,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC"}
|
package/package.json
CHANGED
@@ -1,46 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nstudio/nativescript-checkbox",
|
3
|
-
"version": "2.0.
|
3
|
+
"version": "2.0.5",
|
4
4
|
"description": "NativeScript plugin for checkbox.",
|
5
|
-
"main": "
|
5
|
+
"main": "index",
|
6
6
|
"typings": "index.d.ts",
|
7
7
|
"nativescript": {
|
8
8
|
"platforms": {
|
9
|
-
"
|
10
|
-
"
|
11
|
-
}
|
12
|
-
},
|
13
|
-
"scripts": {
|
14
|
-
"clean": "npx rimraf node_modules package-lock.json && npm i",
|
15
|
-
"build": "npm i && ts-patch install && tsc",
|
16
|
-
"prepublishOnly": "npm run build && npm run build.ng.module",
|
17
|
-
"publish": "npm run build.ng.module",
|
18
|
-
"build.ng.module": "npm run build && ng-packagr -p angular/package.json",
|
19
|
-
"tslint": "cd .. && tslint \"**/*.ts\" --config tslint.json --exclude \"**/node_modules/**\" --exclude \"*demo*/platforms/**\" --exclude \"**/typings/**\"",
|
20
|
-
"ci.tslint": "npm i && tslint '**/*.ts' --config '../tslint.json' --exclude '**/node_modules/**' --exclude \"**/typings/**\"",
|
21
|
-
"demo.ios": "npm run build && cd ../demo && ns run ios --no-hmr",
|
22
|
-
"demo.android": "npm run build && cd ../demo && ns run android --no-hmr",
|
23
|
-
"demo.ng.ios": "npm run build.ng.module && cd ../demo-ng && ns run ios --no-hmr --env.aot",
|
24
|
-
"demo.ng.android": "npm run build.ng.module && cd ../demo-ng && ns run android --no-hmr --env.aot",
|
25
|
-
"generate.typings.ios": "cd ../demo && TNS_DEBUG_METADATA_PATH=\"$(pwd)/metadata\" tns build ios && TNS_TYPESCRIPT_DECLARATIONS_PATH=\"$(pwd)/typings\" tns build ios && echo 'Now look for your library typings in demo/typings!'",
|
26
|
-
"make-changelog": "cd ../ && github_changelog_generator -u nstudio -p nativescript-checkbox",
|
27
|
-
"clean.all": "cd ../demo && rimraf hooks node_modules platforms && cd ../demo-ng && rimraf hooks node_modules platforms && cd ../src && rimraf hooks node_modules"
|
28
|
-
},
|
29
|
-
"lint-staged": {
|
30
|
-
"**/*.{js, css, ts, json, scss, html, xml, md}": [
|
31
|
-
"prettier --write",
|
32
|
-
"git add"
|
33
|
-
]
|
34
|
-
},
|
35
|
-
"husky": {
|
36
|
-
"hooks": {
|
37
|
-
"pre-commit": "lint-staged",
|
38
|
-
"pre-push": "npm run tslint"
|
9
|
+
"ios": "6.0.0",
|
10
|
+
"android": "6.0.0"
|
39
11
|
}
|
40
12
|
},
|
41
13
|
"repository": {
|
42
14
|
"type": "git",
|
43
|
-
"url": "https://github.com/nstudio/nativescript-
|
15
|
+
"url": "https://github.com/nstudio/nativescript-plugins.git"
|
44
16
|
},
|
45
17
|
"keywords": [
|
46
18
|
"NativeScript",
|
@@ -55,40 +27,17 @@
|
|
55
27
|
"name": "Brad Martin",
|
56
28
|
"email": "bradwaynemartin@gmail.com"
|
57
29
|
},
|
30
|
+
"contributors": [
|
31
|
+
{
|
32
|
+
"name": "NativeScript",
|
33
|
+
"email": "oss@nativescript.org"
|
34
|
+
}
|
35
|
+
],
|
58
36
|
"bugs": {
|
59
|
-
"url": "https://github.com/nstudio/nativescript-
|
37
|
+
"url": "https://github.com/nstudio/nativescript-plugins/issues"
|
60
38
|
},
|
61
|
-
"license": "
|
62
|
-
"homepage": "https://github.com/nstudio/nativescript-
|
39
|
+
"license": "Apache-2.0",
|
40
|
+
"homepage": "https://github.com/nstudio/nativescript-plugins",
|
63
41
|
"readmeFilename": "README.md",
|
64
|
-
"
|
65
|
-
"@angular/animations": "~10.0.0",
|
66
|
-
"@angular/common": "~10.0.0",
|
67
|
-
"@angular/compiler": "~10.0.0",
|
68
|
-
"@angular/compiler-cli": "~10.0.0",
|
69
|
-
"@angular/core": "~10.0.0",
|
70
|
-
"@angular/forms": "~10.0.0",
|
71
|
-
"@angular/platform-browser": "~10.0.0",
|
72
|
-
"@angular/platform-browser-dynamic": "~10.0.0",
|
73
|
-
"@angular/router": "~10.0.0",
|
74
|
-
"@nativescript/angular": "~10.1.5",
|
75
|
-
"@nativescript/core": "~7.0.3",
|
76
|
-
"@nativescript/types": "~7.0.3",
|
77
|
-
"@nativescript/webpack": "~3.0.4",
|
78
|
-
"husky": "^4.2.5",
|
79
|
-
"lint-staged": "^10.2.11",
|
80
|
-
"ng-packagr": "~10.1.0",
|
81
|
-
"prettier": "^2.0.5",
|
82
|
-
"prompt": "^1.0.0",
|
83
|
-
"rimraf": "^2.6.3",
|
84
|
-
"rxjs": "~6.6.0",
|
85
|
-
"tslint": "~6.0.0",
|
86
|
-
"ts-patch": "^1.3.0",
|
87
|
-
"ts-node": "~9.0.0",
|
88
|
-
"typescript": "~3.9.7",
|
89
|
-
"zone.js": "0.11.1"
|
90
|
-
},
|
91
|
-
"dependencies": {
|
92
|
-
"ng": "0.0.0"
|
93
|
-
}
|
42
|
+
"bootstrapper": "@nativescript/plugin-seed"
|
94
43
|
}
|
package/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
nativescript-checkbox
|
4
|
-
Copyright (c) 2019, nStudio LLC.
|
5
|
-
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
7
|
-
this software and associated documentation files (the "Software"), to deal in
|
8
|
-
the Software without restriction, including without limitation the rights to
|
9
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
10
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
11
|
-
subject to the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
14
|
-
copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
18
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
19
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
20
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
21
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|