@nativescript-community/ui-checkbox 2.0.17 → 2.0.18
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/CHANGELOG.md +4 -0
- package/angular/index.d.ts +5 -9
- package/angular/package.json +1 -1
- package/index.d.ts +80 -0
- package/package.json +6 -6
- package/references.d.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/typings/BEMCheckBox.d.ts +191 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [2.0.18](https://github.com/nativescript-community/ui-checkbox/compare/v2.0.17...v2.0.18) (2026-01-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nativescript-community/ui-checkbox
|
|
9
|
+
|
|
6
10
|
## [2.0.17](https://github.com/nativescript-community/ui-checkbox/compare/v2.0.16...v2.0.17) (2026-01-06)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @nativescript-community/ui-checkbox
|
package/angular/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
1
|
import { ElementRef } from '@angular/core';
|
|
3
2
|
import { BaseValueAccessor } from '@nativescript/angular';
|
|
4
3
|
import { View } from '@nativescript/core';
|
|
5
|
-
import * as
|
|
6
|
-
|
|
7
|
-
type CheckableView = {
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
export type CheckableView = {
|
|
8
7
|
checked: boolean;
|
|
9
8
|
} & View;
|
|
10
9
|
/**
|
|
@@ -16,7 +15,7 @@ type CheckableView = {
|
|
|
16
15
|
* <CheckBox [(ngModel)]="model.test">
|
|
17
16
|
* ```
|
|
18
17
|
*/
|
|
19
|
-
declare class CheckedValueAccessor extends BaseValueAccessor<CheckableView> {
|
|
18
|
+
export declare class CheckedValueAccessor extends BaseValueAccessor<CheckableView> {
|
|
20
19
|
constructor(elementRef: ElementRef);
|
|
21
20
|
checkedChangeListener(event: any): void;
|
|
22
21
|
onTouched: () => void;
|
|
@@ -25,11 +24,8 @@ declare class CheckedValueAccessor extends BaseValueAccessor<CheckableView> {
|
|
|
25
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckedValueAccessor, never>;
|
|
26
25
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckedValueAccessor, "CheckBox[ngModel], CheckBox[formControlName], CheckBox[formControl], checkBox[ngModel], checkBox[formControlName], checkBox[formControl], check-box[ngModel], check-box[formControlName], check-box[formControl]", never, {}, {}, never, never, true, never>;
|
|
27
26
|
}
|
|
28
|
-
declare class CheckBoxModule {
|
|
27
|
+
export declare class CheckBoxModule {
|
|
29
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<CheckBoxModule, never>;
|
|
30
29
|
static ɵmod: i0.ɵɵNgModuleDeclaration<CheckBoxModule, never, [typeof CheckedValueAccessor, typeof i1.FormsModule], [typeof i1.FormsModule, typeof CheckedValueAccessor]>;
|
|
31
30
|
static ɵinj: i0.ɵɵInjectorDeclaration<CheckBoxModule>;
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
export { CheckBoxModule, CheckedValueAccessor };
|
|
35
|
-
export type { CheckableView };
|
package/angular/package.json
CHANGED
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"tslib": "^2.3.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled in full compilation mode. This is not allowed.\\nPlease delete and rebuild the package with partial compilation mode, before attempting to publish.\\n')\" && exit 1"
|
|
20
|
+
"prepublishOnly": "node --eval \"console.error('ERROR: Trying to publish a package that has been compiled by Ivy in full compilation mode. This is not allowed.\\nPlease delete and rebuild the package with Ivy partial compilation mode, before attempting to publish.\\n')\" && exit 1"
|
|
21
21
|
}
|
|
22
22
|
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { View } from '@nativescript/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Represents a CheckBox component.
|
|
5
|
+
*/
|
|
6
|
+
export class CheckBox extends View {
|
|
7
|
+
/**
|
|
8
|
+
* Gets the native [android widget](https://developer.android.com/reference/android/widget/CheckBox.html) that represents the user interface for this component. Valid only when running on Android OS.
|
|
9
|
+
*/
|
|
10
|
+
android: any /* android.widget.CheckBox */;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Gets the ios Label with the checkbox as a subview
|
|
14
|
+
*/
|
|
15
|
+
ios: any /* Label */;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Gets or sets if a switch is checked or not.
|
|
19
|
+
*/
|
|
20
|
+
checked: boolean;
|
|
21
|
+
|
|
22
|
+
fillColor: Color;
|
|
23
|
+
tintColor: Color;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* iOS only
|
|
27
|
+
*/
|
|
28
|
+
onCheckColor: Color;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* iOS only
|
|
32
|
+
*/
|
|
33
|
+
onTintColor: Color;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* iOS only
|
|
37
|
+
*/
|
|
38
|
+
onFillColor: Color;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* iOS only
|
|
42
|
+
*/
|
|
43
|
+
boxType: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* iOS only
|
|
47
|
+
*/
|
|
48
|
+
lineWidth: number;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* iOS only
|
|
52
|
+
*/
|
|
53
|
+
onAnimationType: number;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* iOS only
|
|
57
|
+
*/
|
|
58
|
+
offAnimationType: number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* iOS only
|
|
62
|
+
*/
|
|
63
|
+
animationDuration: number;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* iOS only
|
|
67
|
+
*/
|
|
68
|
+
hideBox: boolean;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Change the checked state of the view to the inverse of its current state.
|
|
72
|
+
*/
|
|
73
|
+
toggle(): void;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface CheckBoxInterface {
|
|
77
|
+
text?: string;
|
|
78
|
+
checked: boolean;
|
|
79
|
+
toggle(): void;
|
|
80
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript-community/ui-checkbox",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
4
4
|
"description": "NativeScript plugin for checkbox.",
|
|
5
5
|
"main": "./index",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "npm run tsc && npm run readme",
|
|
10
10
|
"build.all": "npm run build && npm run build.angular",
|
|
11
|
-
"build.angular": "
|
|
12
|
-
"readme": "
|
|
13
|
-
"tsc": "
|
|
14
|
-
"clean": "
|
|
11
|
+
"build.angular": "ng-packagr -p ../../src/checkbox/angular/ng-package.json -c ../../src/checkbox/angular/tsconfig.json && rm angular/.npmignore",
|
|
12
|
+
"readme": "readme generate -c ../../tools/readme/blueprint.json",
|
|
13
|
+
"tsc": "cpy '**/*.d.ts' '../../packages/checkbox' --parents --cwd=../../src/checkbox && tsc --build",
|
|
14
|
+
"clean": "bin/rimraf ./*.d.ts ./*.js ./*.js.map ./*.tsbuildinfo ./*.mjs ./*.mjs.map ./angular ./svelte ./vue* ./react"
|
|
15
15
|
},
|
|
16
16
|
"nativescript": {
|
|
17
17
|
"platforms": {
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
},
|
|
57
57
|
"license": "ISC",
|
|
58
58
|
"readmeFilename": "README.md",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "7370b6b9a6098ea914683ef2df60a342d9b8ac23"
|
|
60
60
|
}
|
package/references.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference path="./typings/BEMCheckBox.d.ts" />
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../../src/checkbox/common.ts","../../src/checkbox/index.android.ts","../../src/checkbox/index.d.ts","../../src/checkbox/index.ios.ts","../../src/checkbox/references.d.ts","../../src/checkbox/typings/BEMCheckBox.d.ts","../../src/checkbox/vue/index.ts","../../tools/references.d.ts"],"version":"5.8.3"}
|
|
@@ -0,0 +1,191 @@
|
|
|
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
|
+
}
|