dom-render 1.0.74 → 1.0.77

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. package/Config.d.ts +38 -36
  2. package/Config.js +2 -2
  3. package/DomRender.d.ts +28 -27
  4. package/DomRender.js +90 -88
  5. package/DomRenderProxy.d.ts +29 -29
  6. package/DomRenderProxy.js +342 -327
  7. package/README.MD +638 -567
  8. package/RawSet.d.ts +140 -118
  9. package/RawSet.js +771 -905
  10. package/components/ComponentSet.d.ts +7 -0
  11. package/components/ComponentSet.js +14 -0
  12. package/dist/bundle.js +3789 -3214
  13. package/events/EventManager.d.ts +48 -47
  14. package/events/EventManager.js +530 -499
  15. package/iterators/Range.d.ts +22 -22
  16. package/iterators/Range.js +65 -65
  17. package/lifecycle/OnBeforeReturnGet.d.ts +3 -3
  18. package/lifecycle/OnBeforeReturnGet.js +2 -2
  19. package/lifecycle/OnBeforeReturnSet.d.ts +3 -3
  20. package/lifecycle/OnBeforeReturnSet.js +2 -2
  21. package/lifecycle/OnCreateRender.d.ts +3 -3
  22. package/lifecycle/OnCreateRender.js +2 -2
  23. package/lifecycle/OnDestroyRender.d.ts +4 -4
  24. package/lifecycle/OnDestroyRender.js +2 -2
  25. package/lifecycle/OnInitRender.d.ts +7 -7
  26. package/lifecycle/OnInitRender.js +2 -2
  27. package/lifecycle/OnProxyDomRender.d.ts +4 -0
  28. package/lifecycle/OnProxyDomRender.js +2 -0
  29. package/managers/RenderManager.d.ts +3 -3
  30. package/managers/RenderManager.js +18 -18
  31. package/messenger/DefaultMessenger.d.ts +3 -0
  32. package/messenger/DefaultMessenger.js +27 -0
  33. package/messenger/Messenger.d.ts +78 -0
  34. package/messenger/Messenger.js +201 -0
  35. package/operators/Appender.d.ts +7 -12
  36. package/operators/Appender.js +32 -39
  37. package/operators/AttrExpresion.d.ts +0 -0
  38. package/operators/AttrExpresion.js +44 -0
  39. package/operators/Dr.d.ts +4 -0
  40. package/operators/Dr.js +62 -0
  41. package/operators/DrAppender.d.ts +4 -0
  42. package/operators/DrAppender.js +65 -0
  43. package/operators/DrFor.d.ts +4 -0
  44. package/operators/DrFor.js +62 -0
  45. package/operators/DrForOf.d.ts +4 -0
  46. package/operators/DrForOf.js +65 -0
  47. package/operators/DrForm.d.ts +4 -0
  48. package/operators/DrForm.js +100 -0
  49. package/operators/DrIf.d.ts +4 -0
  50. package/operators/DrIf.js +72 -0
  51. package/operators/DrInnerHTML.d.ts +4 -0
  52. package/operators/DrInnerHTML.js +60 -0
  53. package/operators/DrInnerText.d.ts +4 -0
  54. package/operators/DrInnerText.js +58 -0
  55. package/operators/DrPre.d.ts +4 -0
  56. package/operators/DrPre.js +30 -0
  57. package/operators/DrRepeat.d.ts +4 -0
  58. package/operators/DrRepeat.js +63 -0
  59. package/operators/DrTargetAttr.d.ts +4 -0
  60. package/operators/DrTargetAttr.js +55 -0
  61. package/operators/DrTargetElement.d.ts +4 -0
  62. package/operators/DrTargetElement.js +65 -0
  63. package/operators/DrThis.d.ts +4 -0
  64. package/operators/DrThis.js +59 -0
  65. package/operators/OperatorRender.d.ts +41 -0
  66. package/operators/OperatorRender.js +21 -0
  67. package/package.json +94 -94
  68. package/routers/HashRouter.d.ts +9 -9
  69. package/routers/HashRouter.js +53 -53
  70. package/routers/PathRouter.d.ts +9 -9
  71. package/routers/PathRouter.js +52 -52
  72. package/routers/Router.d.ts +25 -25
  73. package/routers/Router.js +116 -116
  74. package/types/Types.d.ts +14 -14
  75. package/types/Types.js +36 -36
  76. package/utils/clipboard/ClipBoardUtils.d.ts +6 -6
  77. package/utils/clipboard/ClipBoardUtils.js +25 -25
  78. package/utils/dom/DomUtils.d.ts +13 -13
  79. package/utils/dom/DomUtils.js +47 -47
  80. package/utils/location/LocationUtils.d.ts +16 -16
  81. package/utils/location/LocationUtils.js +57 -57
  82. package/utils/node/NodeUtils.d.ts +10 -10
  83. package/utils/node/NodeUtils.js +27 -27
  84. package/utils/random/RandomUtils.d.ts +7 -7
  85. package/utils/random/RandomUtils.js +47 -47
  86. package/utils/script/ScriptUtils.d.ts +14 -14
  87. package/utils/script/ScriptUtils.js +89 -89
  88. package/utils/storage/StorageUtils.d.ts +9 -9
  89. package/utils/storage/StorageUtils.js +48 -48
  90. package/utils/string/StringUtils.d.ts +5 -5
  91. package/utils/string/StringUtils.js +41 -41
  92. package/utils/valid/ValidUtils.d.ts +10 -10
  93. package/utils/valid/ValidUtils.js +78 -78
  94. package/validators/AllCheckedValidatorArray.d.ts +6 -6
  95. package/validators/AllCheckedValidatorArray.js +32 -32
  96. package/validators/AllUnCheckedValidatorArray.d.ts +6 -6
  97. package/validators/AllUnCheckedValidatorArray.js +32 -32
  98. package/validators/CheckedValidator.d.ts +5 -5
  99. package/validators/CheckedValidator.js +32 -32
  100. package/validators/CountEqualsCheckedValidatorArray.d.ts +7 -7
  101. package/validators/CountEqualsCheckedValidatorArray.js +34 -34
  102. package/validators/CountEqualsUnCheckedValidatorArray.d.ts +7 -7
  103. package/validators/CountEqualsUnCheckedValidatorArray.js +34 -34
  104. package/validators/CountGreaterThanCheckedValidatorArray.d.ts +7 -7
  105. package/validators/CountGreaterThanCheckedValidatorArray.js +34 -34
  106. package/validators/CountGreaterThanEqualsCheckedValidatorArray.d.ts +7 -7
  107. package/validators/CountGreaterThanEqualsCheckedValidatorArray.js +34 -34
  108. package/validators/CountGreaterThanEqualsUnCheckedValidatorArray.d.ts +7 -7
  109. package/validators/CountGreaterThanEqualsUnCheckedValidatorArray.js +34 -34
  110. package/validators/CountGreaterThanUnCheckedValidatorArray.d.ts +7 -7
  111. package/validators/CountGreaterThanUnCheckedValidatorArray.js +34 -34
  112. package/validators/CountLessThanCheckedValidatorArray.d.ts +7 -7
  113. package/validators/CountLessThanCheckedValidatorArray.js +34 -34
  114. package/validators/CountLessThanEqualsCheckedValidatorArray.d.ts +7 -7
  115. package/validators/CountLessThanEqualsCheckedValidatorArray.js +34 -34
  116. package/validators/CountLessThanEqualsUnCheckedValidatorArray.d.ts +7 -7
  117. package/validators/CountLessThanEqualsUnCheckedValidatorArray.js +34 -34
  118. package/validators/CountLessThanUnCheckedValidatorArray.d.ts +7 -7
  119. package/validators/CountLessThanUnCheckedValidatorArray.js +34 -34
  120. package/validators/CountUnCheckedValidatorArray.d.ts +7 -7
  121. package/validators/CountUnCheckedValidatorArray.js +34 -34
  122. package/validators/EmptyValidator.d.ts +5 -5
  123. package/validators/EmptyValidator.js +33 -33
  124. package/validators/ExcludeCheckedValidatorArray.d.ts +8 -8
  125. package/validators/ExcludeCheckedValidatorArray.js +41 -41
  126. package/validators/FormValidator.d.ts +7 -7
  127. package/validators/FormValidator.js +37 -37
  128. package/validators/IncludeCheckedValidatorArray.d.ts +8 -8
  129. package/validators/IncludeCheckedValidatorArray.js +41 -41
  130. package/validators/MultipleValidator.d.ts +8 -8
  131. package/validators/MultipleValidator.js +48 -48
  132. package/validators/NonPassValidator.d.ts +5 -5
  133. package/validators/NonPassValidator.js +31 -31
  134. package/validators/NotEmptyValidator.d.ts +5 -5
  135. package/validators/NotEmptyValidator.js +34 -34
  136. package/validators/NotRegExpTestValidator.d.ts +6 -6
  137. package/validators/NotRegExpTestValidator.js +42 -42
  138. package/validators/PassValidator.d.ts +5 -5
  139. package/validators/PassValidator.js +31 -31
  140. package/validators/RegExpTestValidator.d.ts +6 -6
  141. package/validators/RegExpTestValidator.js +43 -43
  142. package/validators/RequiredValidator.d.ts +5 -5
  143. package/validators/RequiredValidator.js +33 -33
  144. package/validators/UnCheckedValidator.d.ts +5 -5
  145. package/validators/UnCheckedValidator.js +32 -32
  146. package/validators/ValidMultipleValidator.d.ts +9 -9
  147. package/validators/ValidMultipleValidator.js +34 -34
  148. package/validators/ValidValidator.d.ts +6 -6
  149. package/validators/ValidValidator.js +33 -33
  150. package/validators/ValidValidatorArray.d.ts +7 -7
  151. package/validators/ValidValidatorArray.js +33 -33
  152. package/validators/Validator.d.ts +57 -57
  153. package/validators/Validator.js +242 -242
  154. package/validators/ValidatorArray.d.ts +17 -17
  155. package/validators/ValidatorArray.js +99 -99
  156. package/validators/ValueEqualsValidator.d.ts +6 -6
  157. package/validators/ValueEqualsValidator.js +33 -33
  158. package/validators/ValueNotEqualsValidator.d.ts +6 -6
  159. package/validators/ValueNotEqualsValidator.js +33 -33
@@ -1,34 +1,34 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.CountLessThanEqualsUnCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
22
- function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- var _this = _super.call(this, value, target, event, autoValid) || this;
25
- _this.count = count;
26
- return _this;
27
- }
28
- CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
29
- var _a;
30
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length <= this.count;
31
- };
32
- return CountLessThanEqualsUnCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountLessThanEqualsUnCheckedValidatorArray = CountLessThanEqualsUnCheckedValidatorArray;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.CountLessThanEqualsUnCheckedValidatorArray = void 0;
19
+ var ValidatorArray_1 = require("./ValidatorArray");
20
+ var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
21
+ __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
22
+ function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
23
+ if (autoValid === void 0) { autoValid = true; }
24
+ var _this = _super.call(this, value, target, event, autoValid) || this;
25
+ _this.count = count;
26
+ return _this;
27
+ }
28
+ CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
29
+ var _a;
30
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length <= this.count;
31
+ };
32
+ return CountLessThanEqualsUnCheckedValidatorArray;
33
+ }(ValidatorArray_1.ValidatorArray));
34
+ exports.CountLessThanEqualsUnCheckedValidatorArray = CountLessThanEqualsUnCheckedValidatorArray;
@@ -1,7 +1,7 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class CountLessThanUnCheckedValidatorArray<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
- }
1
+ import { Validator } from './Validator';
2
+ import { ValidatorArray } from './ValidatorArray';
3
+ export declare class CountLessThanUnCheckedValidatorArray<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
+ }
@@ -1,34 +1,34 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.CountLessThanUnCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountLessThanUnCheckedValidatorArray, _super);
22
- function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- var _this = _super.call(this, value, target, event, autoValid) || this;
25
- _this.count = count;
26
- return _this;
27
- }
28
- CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
29
- var _a;
30
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
31
- };
32
- return CountLessThanUnCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountLessThanUnCheckedValidatorArray = CountLessThanUnCheckedValidatorArray;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.CountLessThanUnCheckedValidatorArray = void 0;
19
+ var ValidatorArray_1 = require("./ValidatorArray");
20
+ var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
21
+ __extends(CountLessThanUnCheckedValidatorArray, _super);
22
+ function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
23
+ if (autoValid === void 0) { autoValid = true; }
24
+ var _this = _super.call(this, value, target, event, autoValid) || this;
25
+ _this.count = count;
26
+ return _this;
27
+ }
28
+ CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
29
+ var _a;
30
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
31
+ };
32
+ return CountLessThanUnCheckedValidatorArray;
33
+ }(ValidatorArray_1.ValidatorArray));
34
+ exports.CountLessThanUnCheckedValidatorArray = CountLessThanUnCheckedValidatorArray;
@@ -1,7 +1,7 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class CountUnCheckedValidatorArray<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
- }
1
+ import { Validator } from './Validator';
2
+ import { ValidatorArray } from './ValidatorArray';
3
+ export declare class CountUnCheckedValidatorArray<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
+ }
@@ -1,34 +1,34 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.CountUnCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountUnCheckedValidatorArray, _super);
22
- function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- var _this = _super.call(this, value, target, event, autoValid) || this;
25
- _this.count = count;
26
- return _this;
27
- }
28
- CountUnCheckedValidatorArray.prototype.valid = function () {
29
- var _a;
30
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
31
- };
32
- return CountUnCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountUnCheckedValidatorArray = CountUnCheckedValidatorArray;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.CountUnCheckedValidatorArray = void 0;
19
+ var ValidatorArray_1 = require("./ValidatorArray");
20
+ var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
21
+ __extends(CountUnCheckedValidatorArray, _super);
22
+ function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
23
+ if (autoValid === void 0) { autoValid = true; }
24
+ var _this = _super.call(this, value, target, event, autoValid) || this;
25
+ _this.count = count;
26
+ return _this;
27
+ }
28
+ CountUnCheckedValidatorArray.prototype.valid = function () {
29
+ var _a;
30
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
31
+ };
32
+ return CountUnCheckedValidatorArray;
33
+ }(ValidatorArray_1.ValidatorArray));
34
+ exports.CountUnCheckedValidatorArray = CountUnCheckedValidatorArray;
@@ -1,5 +1,5 @@
1
- import { Validator } from './Validator';
2
- export declare class EmptyValidator<T = any, E = Element> extends Validator<T, E> {
3
- constructor(value?: T, target?: E, event?: Event, autoValid?: boolean);
4
- valid(): boolean;
5
- }
1
+ import { Validator } from './Validator';
2
+ export declare class EmptyValidator<T = any, E = Element> extends Validator<T, E> {
3
+ constructor(value?: T, target?: E, event?: Event, autoValid?: boolean);
4
+ valid(): boolean;
5
+ }
@@ -1,33 +1,33 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.EmptyValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var EmptyValidator = /** @class */ (function (_super) {
21
- __extends(EmptyValidator, _super);
22
- function EmptyValidator(value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, value, target, event, autoValid) || this;
25
- }
26
- EmptyValidator.prototype.valid = function () {
27
- var _a, _b;
28
- var value = this.value;
29
- return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
30
- };
31
- return EmptyValidator;
32
- }(Validator_1.Validator));
33
- exports.EmptyValidator = EmptyValidator;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.EmptyValidator = void 0;
19
+ var Validator_1 = require("./Validator");
20
+ var EmptyValidator = /** @class */ (function (_super) {
21
+ __extends(EmptyValidator, _super);
22
+ function EmptyValidator(value, target, event, autoValid) {
23
+ if (autoValid === void 0) { autoValid = true; }
24
+ return _super.call(this, value, target, event, autoValid) || this;
25
+ }
26
+ EmptyValidator.prototype.valid = function () {
27
+ var _a, _b;
28
+ var value = this.value;
29
+ return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
30
+ };
31
+ return EmptyValidator;
32
+ }(Validator_1.Validator));
33
+ exports.EmptyValidator = EmptyValidator;
@@ -1,8 +1,8 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class ExcludeCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
- include: any[];
5
- allRequired: boolean;
6
- constructor(include: any[], allRequired?: boolean, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
7
- valid(): boolean;
8
- }
1
+ import { Validator } from './Validator';
2
+ import { ValidatorArray } from './ValidatorArray';
3
+ export declare class ExcludeCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
+ include: any[];
5
+ allRequired: boolean;
6
+ constructor(include: any[], allRequired?: boolean, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
7
+ valid(): boolean;
8
+ }
@@ -1,41 +1,41 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ExcludeCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(ExcludeCheckedValidatorArray, _super);
22
- function ExcludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
23
- if (allRequired === void 0) { allRequired = false; }
24
- if (autoValid === void 0) { autoValid = true; }
25
- var _this = _super.call(this, value, target, event, autoValid) || this;
26
- _this.include = include;
27
- _this.allRequired = allRequired;
28
- return _this;
29
- }
30
- ExcludeCheckedValidatorArray.prototype.valid = function () {
31
- var _this = this;
32
- var _a;
33
- var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
34
- var unCheckedValue = valus.filter(function (it) { return !it.checked; }).map(function (it) { return it.value; });
35
- return unCheckedValue.length > 0 &&
36
- (!(unCheckedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
37
- (this.allRequired ? unCheckedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
38
- };
39
- return ExcludeCheckedValidatorArray;
40
- }(ValidatorArray_1.ValidatorArray));
41
- exports.ExcludeCheckedValidatorArray = ExcludeCheckedValidatorArray;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.ExcludeCheckedValidatorArray = void 0;
19
+ var ValidatorArray_1 = require("./ValidatorArray");
20
+ var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
21
+ __extends(ExcludeCheckedValidatorArray, _super);
22
+ function ExcludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
23
+ if (allRequired === void 0) { allRequired = false; }
24
+ if (autoValid === void 0) { autoValid = true; }
25
+ var _this = _super.call(this, value, target, event, autoValid) || this;
26
+ _this.include = include;
27
+ _this.allRequired = allRequired;
28
+ return _this;
29
+ }
30
+ ExcludeCheckedValidatorArray.prototype.valid = function () {
31
+ var _this = this;
32
+ var _a;
33
+ var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
34
+ var unCheckedValue = valus.filter(function (it) { return !it.checked; }).map(function (it) { return it.value; });
35
+ return unCheckedValue.length > 0 &&
36
+ (!(unCheckedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
37
+ (this.allRequired ? unCheckedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
38
+ };
39
+ return ExcludeCheckedValidatorArray;
40
+ }(ValidatorArray_1.ValidatorArray));
41
+ exports.ExcludeCheckedValidatorArray = ExcludeCheckedValidatorArray;
@@ -1,7 +1,7 @@
1
- import { Validator } from './Validator';
2
- export declare class FormValidator<E = HTMLFormElement> extends Validator<void, E> {
3
- constructor(target?: E, event?: Event, autoValid?: boolean);
4
- validAction(): boolean;
5
- valid(): boolean;
6
- reset(): void;
7
- }
1
+ import { Validator } from './Validator';
2
+ export declare class FormValidator<E = HTMLFormElement> extends Validator<void, E> {
3
+ constructor(target?: E, event?: Event, autoValid?: boolean);
4
+ validAction(): boolean;
5
+ valid(): boolean;
6
+ reset(): void;
7
+ }
@@ -1,37 +1,37 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.FormValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var FormValidator = /** @class */ (function (_super) {
21
- __extends(FormValidator, _super);
22
- function FormValidator(target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, undefined, target, event, autoValid) || this;
25
- }
26
- FormValidator.prototype.validAction = function () {
27
- return _super.prototype.childValidAction.call(this);
28
- };
29
- FormValidator.prototype.valid = function () {
30
- return this.childValid();
31
- };
32
- FormValidator.prototype.reset = function () {
33
- this.targetReset();
34
- };
35
- return FormValidator;
36
- }(Validator_1.Validator));
37
- exports.FormValidator = FormValidator;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.FormValidator = void 0;
19
+ var Validator_1 = require("./Validator");
20
+ var FormValidator = /** @class */ (function (_super) {
21
+ __extends(FormValidator, _super);
22
+ function FormValidator(target, event, autoValid) {
23
+ if (autoValid === void 0) { autoValid = true; }
24
+ return _super.call(this, undefined, target, event, autoValid) || this;
25
+ }
26
+ FormValidator.prototype.validAction = function () {
27
+ return _super.prototype.childValidAction.call(this);
28
+ };
29
+ FormValidator.prototype.valid = function () {
30
+ return this.childValid();
31
+ };
32
+ FormValidator.prototype.reset = function () {
33
+ this.targetReset();
34
+ };
35
+ return FormValidator;
36
+ }(Validator_1.Validator));
37
+ exports.FormValidator = FormValidator;
@@ -1,8 +1,8 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class IncludeCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
- include: any[];
5
- allRequired: boolean;
6
- constructor(include: any[], allRequired?: boolean, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
7
- valid(): boolean;
8
- }
1
+ import { Validator } from './Validator';
2
+ import { ValidatorArray } from './ValidatorArray';
3
+ export declare class IncludeCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
+ include: any[];
5
+ allRequired: boolean;
6
+ constructor(include: any[], allRequired?: boolean, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
7
+ valid(): boolean;
8
+ }
@@ -1,41 +1,41 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.IncludeCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(IncludeCheckedValidatorArray, _super);
22
- function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
23
- if (allRequired === void 0) { allRequired = false; }
24
- if (autoValid === void 0) { autoValid = true; }
25
- var _this = _super.call(this, value, target, event, autoValid) || this;
26
- _this.include = include;
27
- _this.allRequired = allRequired;
28
- return _this;
29
- }
30
- IncludeCheckedValidatorArray.prototype.valid = function () {
31
- var _this = this;
32
- var _a;
33
- var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
34
- var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
35
- return checkedValue.length > 0 &&
36
- (!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
37
- (this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
38
- };
39
- return IncludeCheckedValidatorArray;
40
- }(ValidatorArray_1.ValidatorArray));
41
- exports.IncludeCheckedValidatorArray = IncludeCheckedValidatorArray;
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.IncludeCheckedValidatorArray = void 0;
19
+ var ValidatorArray_1 = require("./ValidatorArray");
20
+ var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
21
+ __extends(IncludeCheckedValidatorArray, _super);
22
+ function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
23
+ if (allRequired === void 0) { allRequired = false; }
24
+ if (autoValid === void 0) { autoValid = true; }
25
+ var _this = _super.call(this, value, target, event, autoValid) || this;
26
+ _this.include = include;
27
+ _this.allRequired = allRequired;
28
+ return _this;
29
+ }
30
+ IncludeCheckedValidatorArray.prototype.valid = function () {
31
+ var _this = this;
32
+ var _a;
33
+ var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
34
+ var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
35
+ return checkedValue.length > 0 &&
36
+ (!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
37
+ (this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
38
+ };
39
+ return IncludeCheckedValidatorArray;
40
+ }(ValidatorArray_1.ValidatorArray));
41
+ exports.IncludeCheckedValidatorArray = IncludeCheckedValidatorArray;
@@ -1,8 +1,8 @@
1
- import { Validator } from './Validator';
2
- export declare class MultipleValidator<T = any, E = Element> extends Validator<T, E> {
3
- validators: Validator<T, E>[];
4
- constructor(validators: Validator<T, E>[], value?: T, target?: E, event?: Event, autoValid?: boolean);
5
- changeValue(value: T | undefined): void;
6
- validAction(): boolean;
7
- valid(): boolean;
8
- }
1
+ import { Validator } from './Validator';
2
+ export declare class MultipleValidator<T = any, E = Element> extends Validator<T, E> {
3
+ validators: Validator<T, E>[];
4
+ constructor(validators: Validator<T, E>[], value?: T, target?: E, event?: Event, autoValid?: boolean);
5
+ changeValue(value: T | undefined): void;
6
+ validAction(): boolean;
7
+ valid(): boolean;
8
+ }