@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
package/angular/index.js
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
import { Directive, ElementRef, forwardRef, HostListener, Inject, NgModule } from '@angular/core';
|
2
|
-
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
3
|
-
import { registerElement, BaseValueAccessor } from '@nativescript/angular';
|
4
|
-
function convertToInt(value) {
|
5
|
-
var normalizedValue;
|
6
|
-
if (value === undefined || value === null) {
|
7
|
-
normalizedValue = 0;
|
8
|
-
}
|
9
|
-
else {
|
10
|
-
if (typeof value === 'number') {
|
11
|
-
normalizedValue = value;
|
12
|
-
}
|
13
|
-
else {
|
14
|
-
var parsedValue = parseInt(value.toString(), 10);
|
15
|
-
normalizedValue = isNaN(parsedValue) ? 0 : parsedValue;
|
16
|
-
}
|
17
|
-
}
|
18
|
-
return Math.round(normalizedValue);
|
19
|
-
}
|
20
|
-
registerElement('CheckBox', function () { return require('../checkbox').CheckBox; });
|
21
|
-
var CHECKED_VALUE_ACCESSOR = {
|
22
|
-
provide: NG_VALUE_ACCESSOR,
|
23
|
-
useExisting: forwardRef(function () { return CheckedValueAccessor; }),
|
24
|
-
multi: true
|
25
|
-
};
|
26
|
-
var CheckedValueAccessor = (function (_super) {
|
27
|
-
__extends(CheckedValueAccessor, _super);
|
28
|
-
function CheckedValueAccessor(elementRef) {
|
29
|
-
var _this = _super.call(this, elementRef.nativeElement) || this;
|
30
|
-
_this.onTouched = function () { };
|
31
|
-
return _this;
|
32
|
-
}
|
33
|
-
CheckedValueAccessor.prototype.checkedChangeListener = function (event) {
|
34
|
-
this.onChange(event.value);
|
35
|
-
};
|
36
|
-
CheckedValueAccessor.prototype.writeValue = function (value) {
|
37
|
-
this.view.checked = value;
|
38
|
-
};
|
39
|
-
CheckedValueAccessor.prototype.registerOnTouched = function (fn) {
|
40
|
-
this.onTouched = fn;
|
41
|
-
};
|
42
|
-
CheckedValueAccessor.decorators = [
|
43
|
-
{ type: Directive, args: [{
|
44
|
-
selector: 'CheckBox[ngModel], CheckBox[formControlName], CheckBox[formControl], checkBox[ngModel], checkBox[formControlName], checkBox[formControl], check-box[ngModel], check-box[formControlName], check-box[formControl]',
|
45
|
-
providers: [CHECKED_VALUE_ACCESSOR]
|
46
|
-
},] }
|
47
|
-
];
|
48
|
-
CheckedValueAccessor.ctorParameters = function () { return [
|
49
|
-
{ type: ElementRef, decorators: [{ type: Inject, args: [ElementRef,] }] }
|
50
|
-
]; };
|
51
|
-
CheckedValueAccessor.propDecorators = {
|
52
|
-
checkedChangeListener: [{ type: HostListener, args: ['checkedChange', ['$event'],] }]
|
53
|
-
};
|
54
|
-
return CheckedValueAccessor;
|
55
|
-
}(BaseValueAccessor));
|
56
|
-
export { CheckedValueAccessor };
|
57
|
-
var TNSCheckBoxModule = (function () {
|
58
|
-
function TNSCheckBoxModule() {
|
59
|
-
}
|
60
|
-
TNSCheckBoxModule.decorators = [
|
61
|
-
{ type: NgModule, args: [{
|
62
|
-
declarations: [CheckedValueAccessor],
|
63
|
-
providers: [],
|
64
|
-
imports: [FormsModule],
|
65
|
-
exports: [FormsModule, CheckedValueAccessor]
|
66
|
-
},] }
|
67
|
-
];
|
68
|
-
return TNSCheckBoxModule;
|
69
|
-
}());
|
70
|
-
export { TNSCheckBoxModule };
|
@@ -1 +0,0 @@
|
|
1
|
-
[{"__symbolic":"module","version":4,"metadata":{"CheckableView":{"__symbolic":"interface"},"CheckedValueAccessor":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@nativescript/angular","name":"BaseValueAccessor","line":51,"character":42},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":46,"character":1},"arguments":[{"selector":"CheckBox[ngModel], CheckBox[formControlName], CheckBox[formControl], checkBox[ngModel], checkBox[formControlName], checkBox[formControl], check-box[ngModel], check-box[formControlName], check-box[formControl]","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":30,"character":11},"useExisting":{"__symbolic":"reference","name":"CheckedValueAccessor"},"multi":true}]}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":52,"character":15},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":52,"character":22}]}]],"parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":52,"character":46}]}],"checkedChangeListener":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":56,"character":3},"arguments":["checkedChange",["$event"]]}]}],"writeValue":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}]}},"TNSCheckBoxModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":72,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"CheckedValueAccessor"}],"providers":[],"imports":[{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":75,"character":12}],"exports":[{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":76,"character":12},{"__symbolic":"reference","name":"CheckedValueAccessor"}]}]}]}}}]
|
package/references.d.ts
DELETED
package/tsconfig.aot.json
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"compilerOptions": {
|
3
|
-
"noEmitOnError": true,
|
4
|
-
"noEmitHelpers": true,
|
5
|
-
"sourceMap": false,
|
6
|
-
"removeComments": true,
|
7
|
-
"declaration": true,
|
8
|
-
"experimentalDecorators": true,
|
9
|
-
"target": "es5",
|
10
|
-
"module": "esnext",
|
11
|
-
"outDir": "bin/dist",
|
12
|
-
"lib": ["es6", "dom", "es2015.iterable"],
|
13
|
-
"rootDir": ".",
|
14
|
-
"baseUrl": ".",
|
15
|
-
"paths": {
|
16
|
-
"*": ["./node_modules/@nativescript/*", "./node_modules/*"]
|
17
|
-
},
|
18
|
-
"emitDecoratorMetadata": true,
|
19
|
-
"moduleResolution": "node"
|
20
|
-
},
|
21
|
-
"files": ["angular/index.ts"],
|
22
|
-
"angularCompilerOptions": {
|
23
|
-
"genDir": ".",
|
24
|
-
"skipMetadataEmit": false,
|
25
|
-
"skipTemplateCodegen": true,
|
26
|
-
"strictMetadataEmit": true,
|
27
|
-
"enableIvy": false
|
28
|
-
}
|
29
|
-
}
|
package/typings/BEMCheckBox.d.ts
DELETED
@@ -1,191 +0,0 @@
|
|
1
|
-
|
2
|
-
declare class BEMAnimationManager extends NSObject {
|
3
|
-
|
4
|
-
static alloc(): BEMAnimationManager; // inherited from NSObject
|
5
|
-
|
6
|
-
static new(): BEMAnimationManager; // inherited from NSObject
|
7
|
-
|
8
|
-
animationDuration: number;
|
9
|
-
|
10
|
-
constructor(o: { animationDuration: number; });
|
11
|
-
|
12
|
-
fillAnimationWithBouncesAmplitudeReverse(bounces: number, amplitude: number, reverse: boolean): CAKeyframeAnimation;
|
13
|
-
|
14
|
-
initWithAnimationDuration(animationDuration: number): this;
|
15
|
-
|
16
|
-
morphAnimationFromPathToPath(fromPath: UIBezierPath, toPath: UIBezierPath): CABasicAnimation;
|
17
|
-
|
18
|
-
opacityAnimationReverse(reverse: boolean): CABasicAnimation;
|
19
|
-
|
20
|
-
strokeAnimationReverse(reverse: boolean): CABasicAnimation;
|
21
|
-
}
|
22
|
-
|
23
|
-
declare const enum BEMAnimationType {
|
24
|
-
|
25
|
-
Stroke = 0,
|
26
|
-
|
27
|
-
Fill = 1,
|
28
|
-
|
29
|
-
Bounce = 2,
|
30
|
-
|
31
|
-
Flat = 3,
|
32
|
-
|
33
|
-
OneStroke = 4,
|
34
|
-
|
35
|
-
Fade = 5
|
36
|
-
}
|
37
|
-
|
38
|
-
declare const enum BEMBoxType {
|
39
|
-
|
40
|
-
Circle = 0,
|
41
|
-
|
42
|
-
Square = 1
|
43
|
-
}
|
44
|
-
|
45
|
-
declare class BEMCheckBox extends UIControl implements CAAnimationDelegate {
|
46
|
-
|
47
|
-
static alloc(): BEMCheckBox; // inherited from NSObject
|
48
|
-
|
49
|
-
static appearance(): BEMCheckBox; // inherited from UIAppearance
|
50
|
-
|
51
|
-
static appearanceForTraitCollection(trait: UITraitCollection): BEMCheckBox; // inherited from UIAppearance
|
52
|
-
|
53
|
-
static appearanceForTraitCollectionWhenContainedIn(trait: UITraitCollection, ContainerClass: typeof NSObject): BEMCheckBox; // inherited from UIAppearance
|
54
|
-
|
55
|
-
static appearanceForTraitCollectionWhenContainedInInstancesOfClasses(trait: UITraitCollection, containerTypes: NSArray<typeof NSObject> | typeof NSObject[]): BEMCheckBox; // inherited from UIAppearance
|
56
|
-
|
57
|
-
static appearanceWhenContainedIn(ContainerClass: typeof NSObject): BEMCheckBox; // inherited from UIAppearance
|
58
|
-
|
59
|
-
static appearanceWhenContainedInInstancesOfClasses(containerTypes: NSArray<typeof NSObject> | typeof NSObject[]): BEMCheckBox; // inherited from UIAppearance
|
60
|
-
|
61
|
-
static new(): BEMCheckBox; // inherited from NSObject
|
62
|
-
|
63
|
-
animationDuration: number;
|
64
|
-
|
65
|
-
boxType: BEMBoxType;
|
66
|
-
|
67
|
-
cornerRadius: number;
|
68
|
-
|
69
|
-
delegate: BEMCheckBoxDelegate;
|
70
|
-
|
71
|
-
readonly group: BEMCheckBoxGroup;
|
72
|
-
|
73
|
-
hideBox: boolean;
|
74
|
-
|
75
|
-
lineWidth: number;
|
76
|
-
|
77
|
-
minimumTouchSize: CGSize;
|
78
|
-
|
79
|
-
offAnimationType: BEMAnimationType;
|
80
|
-
|
81
|
-
offFillColor: UIColor;
|
82
|
-
|
83
|
-
on: boolean;
|
84
|
-
|
85
|
-
onAnimationType: BEMAnimationType;
|
86
|
-
|
87
|
-
onCheckColor: UIColor;
|
88
|
-
|
89
|
-
onFillColor: UIColor;
|
90
|
-
|
91
|
-
onTintColor: UIColor;
|
92
|
-
|
93
|
-
readonly debugDescription: string; // inherited from NSObjectProtocol
|
94
|
-
|
95
|
-
readonly description: string; // inherited from NSObjectProtocol
|
96
|
-
|
97
|
-
readonly hash: number; // inherited from NSObjectProtocol
|
98
|
-
|
99
|
-
readonly isProxy: boolean; // inherited from NSObjectProtocol
|
100
|
-
|
101
|
-
readonly superclass: typeof NSObject; // inherited from NSObjectProtocol
|
102
|
-
|
103
|
-
readonly // inherited from NSObjectProtocol
|
104
|
-
|
105
|
-
animationDidStart(anim: CAAnimation): void;
|
106
|
-
|
107
|
-
animationDidStopFinished(anim: CAAnimation, flag: boolean): void;
|
108
|
-
|
109
|
-
class(): typeof NSObject;
|
110
|
-
|
111
|
-
conformsToProtocol(aProtocol: any /* Protocol */): boolean;
|
112
|
-
|
113
|
-
isEqual(object: any): boolean;
|
114
|
-
|
115
|
-
isKindOfClass(aClass: typeof NSObject): boolean;
|
116
|
-
|
117
|
-
isMemberOfClass(aClass: typeof NSObject): boolean;
|
118
|
-
|
119
|
-
performSelector(aSelector: string): any;
|
120
|
-
|
121
|
-
performSelectorWithObject(aSelector: string, object: any): any;
|
122
|
-
|
123
|
-
performSelectorWithObjectWithObject(aSelector: string, object1: any, object2: any): any;
|
124
|
-
|
125
|
-
reload(): void;
|
126
|
-
|
127
|
-
respondsToSelector(aSelector: string): boolean;
|
128
|
-
|
129
|
-
retainCount(): number;
|
130
|
-
|
131
|
-
self(): this;
|
132
|
-
|
133
|
-
setOnAnimated(on: boolean, animated: boolean): void;
|
134
|
-
}
|
135
|
-
|
136
|
-
interface BEMCheckBoxDelegate extends NSObjectProtocol {
|
137
|
-
|
138
|
-
animationDidStopForCheckBox?(checkBox: BEMCheckBox): void;
|
139
|
-
|
140
|
-
didTapCheckBox?(checkBox: BEMCheckBox): void;
|
141
|
-
}
|
142
|
-
declare var BEMCheckBoxDelegate: {
|
143
|
-
|
144
|
-
prototype: BEMCheckBoxDelegate;
|
145
|
-
};
|
146
|
-
|
147
|
-
declare class BEMCheckBoxGroup extends NSObject {
|
148
|
-
|
149
|
-
static alloc(): BEMCheckBoxGroup; // inherited from NSObject
|
150
|
-
|
151
|
-
static groupWithCheckBoxes(checkBoxes: NSArray<BEMCheckBox> | BEMCheckBox[]): BEMCheckBoxGroup;
|
152
|
-
|
153
|
-
static new(): BEMCheckBoxGroup; // inherited from NSObject
|
154
|
-
|
155
|
-
readonly checkBoxes: NSHashTable<any>;
|
156
|
-
|
157
|
-
mustHaveSelection: boolean;
|
158
|
-
|
159
|
-
selectedCheckBox: BEMCheckBox;
|
160
|
-
|
161
|
-
addCheckBoxToGroup(checkBox: BEMCheckBox): void;
|
162
|
-
|
163
|
-
removeCheckBoxFromGroup(checkBox: BEMCheckBox): void;
|
164
|
-
}
|
165
|
-
|
166
|
-
declare var BEMCheckBoxVersionNumber: number;
|
167
|
-
|
168
|
-
declare var BEMCheckBoxVersionString: interop.Reference<number>;
|
169
|
-
|
170
|
-
declare class BEMPathManager extends NSObject {
|
171
|
-
|
172
|
-
static alloc(): BEMPathManager; // inherited from NSObject
|
173
|
-
|
174
|
-
static new(): BEMPathManager; // inherited from NSObject
|
175
|
-
|
176
|
-
boxType: BEMBoxType;
|
177
|
-
|
178
|
-
cornerRadius: number;
|
179
|
-
|
180
|
-
lineWidth: number;
|
181
|
-
|
182
|
-
size: number;
|
183
|
-
|
184
|
-
pathForBox(): UIBezierPath;
|
185
|
-
|
186
|
-
pathForCheckMark(): UIBezierPath;
|
187
|
-
|
188
|
-
pathForFlatCheckMark(): UIBezierPath;
|
189
|
-
|
190
|
-
pathForLongCheckMark(): UIBezierPath;
|
191
|
-
}
|