dom-render 1.0.54 → 1.0.58
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/DomRenderProxy.d.ts +1 -0
- package/DomRenderProxy.js +6 -6
- package/README.MD +84 -159
- package/RawSet.js +15 -12
- package/dist/DomRenderProxy.d.ts +1 -0
- package/dist/bundle.js +190 -63
- package/dist/bundle.js.map +1 -1
- package/dist/iterators/Range.d.ts +1 -0
- package/dist/validators/AllCheckedValidatorArray.d.ts +6 -0
- package/dist/validators/AllUnCheckedValidatorArray.d.ts +6 -0
- package/dist/validators/CheckedValidator.d.ts +5 -0
- package/dist/validators/CountEqualsCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountEqualsUnCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountGreaterThanCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountGreaterThanEqualsCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountGreaterThanEqualsUnCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountGreaterThanUnCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountLessThanCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountLessThanEqualsCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountLessThanEqualsUnCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountLessThanUnCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/CountUnCheckedValidatorArray.d.ts +7 -0
- package/dist/validators/EmptyValidator.d.ts +5 -0
- package/dist/validators/ExcludeCheckedValidatorArray.d.ts +8 -0
- package/dist/validators/FormValidator.d.ts +5 -0
- package/dist/validators/IncludeCheckedValidatorArray.d.ts +8 -0
- package/dist/validators/MultipleValidator.d.ts +7 -0
- package/dist/validators/NonPassValidator.d.ts +5 -0
- package/dist/validators/NotEmptyValidator.d.ts +5 -0
- package/dist/validators/NotRegExpTestValidator.d.ts +6 -0
- package/dist/validators/PassValidator.d.ts +5 -0
- package/dist/validators/RegExpTestValidator.d.ts +6 -0
- package/dist/validators/RequiredValidator.d.ts +5 -0
- package/dist/validators/UnCheckedValidator.d.ts +5 -0
- package/dist/validators/ValidMultipleValidator.d.ts +9 -0
- package/dist/validators/ValidValidator.d.ts +6 -0
- package/dist/validators/ValidValidatorArray.d.ts +7 -0
- package/dist/validators/Validator.d.ts +31 -0
- package/dist/validators/ValidatorArray.d.ts +17 -0
- package/dist/validators/ValueEqualsValidator.d.ts +6 -0
- package/dist/validators/ValueNotEqualsValidator.d.ts +6 -0
- package/events/EventManager.js +0 -2
- package/iterators/Range.d.ts +1 -0
- package/iterators/Range.js +12 -0
- package/package.json +1 -1
- package/validators/AllCheckedValidatorArray.d.ts +6 -0
- package/validators/AllCheckedValidatorArray.js +29 -0
- package/validators/AllUnCheckedValidatorArray.d.ts +6 -0
- package/validators/AllUnCheckedValidatorArray.js +29 -0
- package/validators/CheckedValidator.d.ts +5 -0
- package/validators/CheckedValidator.js +29 -0
- package/validators/CountEqualsCheckedValidatorArray.d.ts +7 -0
- package/validators/CountEqualsCheckedValidatorArray.js +31 -0
- package/validators/CountEqualsUnCheckedValidatorArray.d.ts +7 -0
- package/validators/CountEqualsUnCheckedValidatorArray.js +31 -0
- package/validators/CountGreaterThanCheckedValidatorArray.d.ts +7 -0
- package/validators/CountGreaterThanCheckedValidatorArray.js +31 -0
- package/validators/CountGreaterThanEqualsCheckedValidatorArray.d.ts +7 -0
- package/validators/CountGreaterThanEqualsCheckedValidatorArray.js +31 -0
- package/validators/CountGreaterThanEqualsUnCheckedValidatorArray.d.ts +7 -0
- package/validators/CountGreaterThanEqualsUnCheckedValidatorArray.js +31 -0
- package/validators/CountGreaterThanUnCheckedValidatorArray.d.ts +7 -0
- package/validators/CountGreaterThanUnCheckedValidatorArray.js +31 -0
- package/validators/CountLessThanCheckedValidatorArray.d.ts +7 -0
- package/validators/CountLessThanCheckedValidatorArray.js +31 -0
- package/validators/CountLessThanEqualsCheckedValidatorArray.d.ts +7 -0
- package/validators/CountLessThanEqualsCheckedValidatorArray.js +31 -0
- package/validators/CountLessThanEqualsUnCheckedValidatorArray.d.ts +7 -0
- package/validators/CountLessThanEqualsUnCheckedValidatorArray.js +31 -0
- package/validators/CountLessThanUnCheckedValidatorArray.d.ts +7 -0
- package/validators/CountLessThanUnCheckedValidatorArray.js +31 -0
- package/validators/CountUnCheckedValidatorArray.d.ts +7 -0
- package/validators/CountUnCheckedValidatorArray.js +31 -0
- package/validators/EmptyValidator.d.ts +5 -0
- package/validators/EmptyValidator.js +30 -0
- package/validators/ExcludeCheckedValidatorArray.d.ts +8 -0
- package/validators/ExcludeCheckedValidatorArray.js +38 -0
- package/validators/FormValidator.d.ts +5 -0
- package/validators/FormValidator.js +28 -0
- package/validators/IncludeCheckedValidatorArray.d.ts +8 -0
- package/validators/IncludeCheckedValidatorArray.js +38 -0
- package/validators/MultipleValidator.d.ts +7 -0
- package/validators/MultipleValidator.js +35 -0
- package/validators/NonPassValidator.d.ts +5 -0
- package/validators/NonPassValidator.js +28 -0
- package/validators/NotEmptyValidator.d.ts +5 -0
- package/validators/NotEmptyValidator.js +30 -0
- package/validators/NotRegExpTestValidator.d.ts +6 -0
- package/validators/NotRegExpTestValidator.js +39 -0
- package/validators/PassValidator.d.ts +5 -0
- package/validators/PassValidator.js +28 -0
- package/validators/RegExpTestValidator.d.ts +6 -0
- package/validators/RegExpTestValidator.js +39 -0
- package/validators/RequiredValidator.d.ts +5 -0
- package/{validations/validators → validators}/RequiredValidator.js +7 -5
- package/validators/UnCheckedValidator.d.ts +5 -0
- package/validators/UnCheckedValidator.js +29 -0
- package/validators/ValidMultipleValidator.d.ts +9 -0
- package/validators/ValidMultipleValidator.js +31 -0
- package/validators/ValidValidator.d.ts +6 -0
- package/validators/ValidValidator.js +30 -0
- package/validators/ValidValidatorArray.d.ts +7 -0
- package/validators/ValidValidatorArray.js +30 -0
- package/validators/Validator.d.ts +31 -0
- package/validators/Validator.js +146 -0
- package/validators/ValidatorArray.d.ts +17 -0
- package/validators/ValidatorArray.js +94 -0
- package/validators/ValueEqualsValidator.d.ts +6 -0
- package/validators/ValueEqualsValidator.js +30 -0
- package/validators/ValueNotEqualsValidator.d.ts +6 -0
- package/validators/ValueNotEqualsValidator.js +30 -0
- package/dist/validations/Validation.d.ts +0 -13
- package/dist/validations/Validations.d.ts +0 -9
- package/dist/validations/validators/RequiredValidator.d.ts +0 -5
- package/validations/Validation.d.ts +0 -13
- package/validations/Validation.js +0 -53
- package/validations/Validations.d.ts +0 -9
- package/validations/Validations.js +0 -63
- package/validations/validators/RequiredValidator.d.ts +0 -5
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { MultipleValidator } from './MultipleValidator';
|
3
|
+
export declare type ValidMulltiple<T = any, E = Element> = (validators: Validator<T, E>[], value?: T, target?: E, event?: Event) => boolean;
|
4
|
+
export declare class ValidMultipleValidator<T = any, E = Element> extends MultipleValidator<T, E> {
|
5
|
+
validMultipleCallback: ValidMulltiple<T, E>;
|
6
|
+
validators: Validator<T, E>[];
|
7
|
+
constructor(validMultipleCallback: ValidMulltiple<T, E>, validators: Validator<T, E>[], value?: T, target?: E, event?: Event, autoValid?: boolean);
|
8
|
+
valid(): boolean;
|
9
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Valid, Validator } from './Validator';
|
2
|
+
export declare class ValidValidator<T = any, E = Element> extends Validator<T, E> {
|
3
|
+
validCallBack: Valid<T, E>;
|
4
|
+
constructor(validCallBack: Valid<T, E>, value?: T, target?: E, event?: Event, autoValid?: boolean);
|
5
|
+
valid(value?: T, target?: E, event?: Event): boolean;
|
6
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Valid, Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class ValidValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
validCallBack: Valid<Validator<T, E>[], E>;
|
5
|
+
constructor(validCallBack: Valid<Validator<T, E>[], E>, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
export declare type Valid<T = any, E = Element> = (value?: T, target?: E, event?: Event) => boolean;
|
2
|
+
export declare abstract class Validator<T = any, E = Element> {
|
3
|
+
protected _value?: T | undefined;
|
4
|
+
private _target?;
|
5
|
+
private _event?;
|
6
|
+
private _autoValid;
|
7
|
+
constructor(_value?: T | undefined, target?: E, event?: Event, autoValid?: boolean);
|
8
|
+
getAutoValid(): boolean;
|
9
|
+
setAutoValid(autoValid: boolean): this;
|
10
|
+
getEvent(): Event | undefined;
|
11
|
+
setEvent(event: Event | undefined): this;
|
12
|
+
getTarget(): E | undefined;
|
13
|
+
setTarget(target: E | undefined): this;
|
14
|
+
get value(): T | undefined;
|
15
|
+
set value(value: T | undefined);
|
16
|
+
set(value?: T, target?: E, event?: Event): void;
|
17
|
+
changeValue(value: T | undefined): void;
|
18
|
+
get checked(): boolean;
|
19
|
+
set checked(checked: boolean);
|
20
|
+
get selectedIndex(): number;
|
21
|
+
set selectedIndex(selectedIndex: number);
|
22
|
+
querySelector(selector: string): Element | null;
|
23
|
+
querySelectorALL(selector: string): NodeListOf<Element>;
|
24
|
+
abstract valid(): boolean;
|
25
|
+
inValid(): boolean;
|
26
|
+
allValid(): boolean;
|
27
|
+
allInValid(): boolean;
|
28
|
+
childValids(): boolean;
|
29
|
+
childInValids(): boolean;
|
30
|
+
get length(): any;
|
31
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
export declare type MakeValidator<T = any, E = Element> = (value: T, target: E, event?: Event) => Validator<T, E>;
|
3
|
+
export declare abstract class ValidatorArray<T = any, E = Element> extends Validator<Validator<T, E>[], E> {
|
4
|
+
private _makeValidatorFactory;
|
5
|
+
constructor(value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
getMakeValidatorFactory(): MakeValidator<T, E>;
|
7
|
+
setMakeValidatorFactory(value: MakeValidator<T, E>): this;
|
8
|
+
setArrayValue(target: E, value: T, event?: Event): void;
|
9
|
+
addValidator(value: T, target: E, event?: Event): void;
|
10
|
+
allChecked(checked: boolean): void;
|
11
|
+
getValidators(): Validator<T, E>[] | undefined;
|
12
|
+
getValidator(e: E): Validator<T, E> | undefined;
|
13
|
+
getValidatorByValue(value: T): Validator<T, E>;
|
14
|
+
getValidatorByValues(value: T): Validator<T, E>[];
|
15
|
+
removeElement(e: E): void;
|
16
|
+
makeValidator(value: T, target: E, event?: Event): Validator<T, E>;
|
17
|
+
}
|
package/events/EventManager.js
CHANGED
@@ -104,7 +104,6 @@ export var eventManager = new (function () {
|
|
104
104
|
});
|
105
105
|
this.procAttr(childNodes, this.attrPrefix + 'value-link', function (it, varName) {
|
106
106
|
if (varName) {
|
107
|
-
console.log('--value-link-->', _this.getValue(obj, varName), 'value->', it.value);
|
108
107
|
var value = _this.getValue(obj, varName);
|
109
108
|
if (typeof value === 'function' && value) {
|
110
109
|
value(it.value);
|
@@ -118,7 +117,6 @@ export var eventManager = new (function () {
|
|
118
117
|
}
|
119
118
|
}
|
120
119
|
it.addEventListener('input', function (eit) {
|
121
|
-
console.log('input change--->link', eit.target.value);
|
122
120
|
if (typeof _this.getValue(obj, varName) === 'function') {
|
123
121
|
_this.getValue(obj, varName)(it.value, eit);
|
124
122
|
}
|
package/iterators/Range.d.ts
CHANGED
package/iterators/Range.js
CHANGED
@@ -14,6 +14,15 @@ var __read = (this && this.__read) || function (o, n) {
|
|
14
14
|
}
|
15
15
|
return ar;
|
16
16
|
};
|
17
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
18
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
19
|
+
if (ar || !(i in from)) {
|
20
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
21
|
+
ar[i] = from[i];
|
22
|
+
}
|
23
|
+
}
|
24
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
25
|
+
};
|
17
26
|
var RangeResult = (function () {
|
18
27
|
function RangeResult(value, done) {
|
19
28
|
this.done = done;
|
@@ -71,6 +80,9 @@ var Range = (function () {
|
|
71
80
|
return new Range(first, last !== null && last !== void 0 ? last : 0, step);
|
72
81
|
}
|
73
82
|
};
|
83
|
+
Range.prototype.toArray = function () {
|
84
|
+
return __spreadArray([], __read(this), false);
|
85
|
+
};
|
74
86
|
return Range;
|
75
87
|
}());
|
76
88
|
export { Range };
|
package/package.json
CHANGED
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class AllCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
constructor(value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
5
|
+
valid(): boolean;
|
6
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var AllCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(AllCheckedValidatorArray, _super);
|
19
|
+
function AllCheckedValidatorArray(value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
return _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
}
|
23
|
+
AllCheckedValidatorArray.prototype.valid = function () {
|
24
|
+
var _a;
|
25
|
+
return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > 0);
|
26
|
+
};
|
27
|
+
return AllCheckedValidatorArray;
|
28
|
+
}(ValidatorArray));
|
29
|
+
export { AllCheckedValidatorArray };
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class AllUnCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
constructor(value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
5
|
+
valid(): boolean;
|
6
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var AllUnCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(AllUnCheckedValidatorArray, _super);
|
19
|
+
function AllUnCheckedValidatorArray(value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
return _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
}
|
23
|
+
AllUnCheckedValidatorArray.prototype.valid = function () {
|
24
|
+
var _a;
|
25
|
+
return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
|
26
|
+
};
|
27
|
+
return AllUnCheckedValidatorArray;
|
28
|
+
}(ValidatorArray));
|
29
|
+
export { AllUnCheckedValidatorArray };
|
@@ -0,0 +1,29 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { Validator } from './Validator';
|
17
|
+
var CheckedValidator = (function (_super) {
|
18
|
+
__extends(CheckedValidator, _super);
|
19
|
+
function CheckedValidator(value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
return _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
}
|
23
|
+
CheckedValidator.prototype.valid = function () {
|
24
|
+
var _a, _b;
|
25
|
+
return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
|
26
|
+
};
|
27
|
+
return CheckedValidator;
|
28
|
+
}(Validator));
|
29
|
+
export { CheckedValidator };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class CountEqualsCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
count: number;
|
5
|
+
constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var CountEqualsCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(CountEqualsCheckedValidatorArray, _super);
|
19
|
+
function CountEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
_this.count = count;
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
CountEqualsCheckedValidatorArray.prototype.valid = function () {
|
26
|
+
var _a;
|
27
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length === this.count;
|
28
|
+
};
|
29
|
+
return CountEqualsCheckedValidatorArray;
|
30
|
+
}(ValidatorArray));
|
31
|
+
export { CountEqualsCheckedValidatorArray };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class CountEqualsUnCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
count: number;
|
5
|
+
constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var CountEqualsUnCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(CountEqualsUnCheckedValidatorArray, _super);
|
19
|
+
function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
_this.count = count;
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
|
26
|
+
var _a;
|
27
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
|
28
|
+
};
|
29
|
+
return CountEqualsUnCheckedValidatorArray;
|
30
|
+
}(ValidatorArray));
|
31
|
+
export { CountEqualsUnCheckedValidatorArray };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class CountGreaterThanCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
count: number;
|
5
|
+
constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var CountGreaterThanCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(CountGreaterThanCheckedValidatorArray, _super);
|
19
|
+
function CountGreaterThanCheckedValidatorArray(count, value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
_this.count = count;
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
CountGreaterThanCheckedValidatorArray.prototype.valid = function () {
|
26
|
+
var _a;
|
27
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > this.count;
|
28
|
+
};
|
29
|
+
return CountGreaterThanCheckedValidatorArray;
|
30
|
+
}(ValidatorArray));
|
31
|
+
export { CountGreaterThanCheckedValidatorArray };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class CountGreaterThanEqualsCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
count: number;
|
5
|
+
constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var CountGreaterThanEqualsCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
|
19
|
+
function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
_this.count = count;
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
|
26
|
+
var _a;
|
27
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
|
28
|
+
};
|
29
|
+
return CountGreaterThanEqualsCheckedValidatorArray;
|
30
|
+
}(ValidatorArray));
|
31
|
+
export { CountGreaterThanEqualsCheckedValidatorArray };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class CountGreaterThanEqualsUnCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
count: number;
|
5
|
+
constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var CountGreaterThanEqualsUnCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(CountGreaterThanEqualsUnCheckedValidatorArray, _super);
|
19
|
+
function CountGreaterThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
_this.count = count;
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
CountGreaterThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
|
26
|
+
var _a;
|
27
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
|
28
|
+
};
|
29
|
+
return CountGreaterThanEqualsUnCheckedValidatorArray;
|
30
|
+
}(ValidatorArray));
|
31
|
+
export { CountGreaterThanEqualsUnCheckedValidatorArray };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class CountGreaterThanUnCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
count: number;
|
5
|
+
constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var CountGreaterThanUnCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(CountGreaterThanUnCheckedValidatorArray, _super);
|
19
|
+
function CountGreaterThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
_this.count = count;
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
CountGreaterThanUnCheckedValidatorArray.prototype.valid = function () {
|
26
|
+
var _a;
|
27
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > this.count;
|
28
|
+
};
|
29
|
+
return CountGreaterThanUnCheckedValidatorArray;
|
30
|
+
}(ValidatorArray));
|
31
|
+
export { CountGreaterThanUnCheckedValidatorArray };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class CountLessThanCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
count: number;
|
5
|
+
constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var CountLessThanCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(CountLessThanCheckedValidatorArray, _super);
|
19
|
+
function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
_this.count = count;
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
CountLessThanCheckedValidatorArray.prototype.valid = function () {
|
26
|
+
var _a;
|
27
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length < this.count;
|
28
|
+
};
|
29
|
+
return CountLessThanCheckedValidatorArray;
|
30
|
+
}(ValidatorArray));
|
31
|
+
export { CountLessThanCheckedValidatorArray };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class CountLessThanEqualsCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
count: number;
|
5
|
+
constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
2
|
+
var extendStatics = function (d, b) {
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
6
|
+
return extendStatics(d, b);
|
7
|
+
};
|
8
|
+
return function (d, b) {
|
9
|
+
if (typeof b !== "function" && b !== null)
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
11
|
+
extendStatics(d, b);
|
12
|
+
function __() { this.constructor = d; }
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
14
|
+
};
|
15
|
+
})();
|
16
|
+
import { ValidatorArray } from './ValidatorArray';
|
17
|
+
var CountLessThanEqualsCheckedValidatorArray = (function (_super) {
|
18
|
+
__extends(CountLessThanEqualsCheckedValidatorArray, _super);
|
19
|
+
function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
|
20
|
+
if (autoValid === void 0) { autoValid = true; }
|
21
|
+
var _this = _super.call(this, value, target, event, autoValid) || this;
|
22
|
+
_this.count = count;
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
|
26
|
+
var _a;
|
27
|
+
return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
|
28
|
+
};
|
29
|
+
return CountLessThanEqualsCheckedValidatorArray;
|
30
|
+
}(ValidatorArray));
|
31
|
+
export { CountLessThanEqualsCheckedValidatorArray };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Validator } from './Validator';
|
2
|
+
import { ValidatorArray } from './ValidatorArray';
|
3
|
+
export declare class CountLessThanEqualsUnCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
|
4
|
+
count: number;
|
5
|
+
constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
|
6
|
+
valid(): boolean;
|
7
|
+
}
|