dom-render 1.0.98 → 1.0.99

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.
Files changed (202) hide show
  1. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  2. package/.idea/dom-render.iml +9 -0
  3. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  4. package/.idea/jpa-buddy.xml +6 -0
  5. package/.idea/misc.xml +8 -0
  6. package/.idea/modules.xml +8 -0
  7. package/.idea/vcs.xml +6 -0
  8. package/README.MD +6 -793
  9. package/package.json +1 -1
  10. package/DomRender.d.ts +0 -13
  11. package/DomRender.js +0 -72
  12. package/DomRenderProxy.d.ts +0 -30
  13. package/DomRenderProxy.js +0 -515
  14. package/components/ComponentSet.d.ts +0 -10
  15. package/components/ComponentSet.js +0 -13
  16. package/configs/Config.d.ts +0 -34
  17. package/configs/Config.js +0 -2
  18. package/configs/TargetAttr.d.ts +0 -6
  19. package/configs/TargetAttr.js +0 -2
  20. package/configs/TargetElement.d.ts +0 -14
  21. package/configs/TargetElement.js +0 -2
  22. package/css/parse/index.d.ts +0 -1
  23. package/css/parse/index.js +0 -512
  24. package/css/stringify/compiler.d.ts +0 -32
  25. package/css/stringify/compiler.js +0 -40
  26. package/css/stringify/compress.d.ts +0 -75
  27. package/css/stringify/compress.js +0 -156
  28. package/css/stringify/identity.d.ts +0 -85
  29. package/css/stringify/identity.js +0 -194
  30. package/css/stringify/index.d.ts +0 -14
  31. package/css/stringify/index.js +0 -44
  32. package/dist/bundle.js +0 -5442
  33. package/events/EventManager.d.ts +0 -49
  34. package/events/EventManager.js +0 -529
  35. package/iterators/Range.d.ts +0 -23
  36. package/iterators/Range.js +0 -80
  37. package/lifecycle/OnBeforeReturnGet.d.ts +0 -3
  38. package/lifecycle/OnBeforeReturnGet.js +0 -2
  39. package/lifecycle/OnBeforeReturnSet.d.ts +0 -3
  40. package/lifecycle/OnBeforeReturnSet.js +0 -2
  41. package/lifecycle/OnChangeAttrRender.d.ts +0 -3
  42. package/lifecycle/OnChangeAttrRender.js +0 -2
  43. package/lifecycle/OnCreateRender.d.ts +0 -3
  44. package/lifecycle/OnCreateRender.js +0 -2
  45. package/lifecycle/OnDestroyRender.d.ts +0 -4
  46. package/lifecycle/OnDestroyRender.js +0 -2
  47. package/lifecycle/OnInitRender.d.ts +0 -3
  48. package/lifecycle/OnInitRender.js +0 -2
  49. package/lifecycle/OnProxyDomRender.d.ts +0 -4
  50. package/lifecycle/OnProxyDomRender.js +0 -2
  51. package/managers/RenderManager.d.ts +0 -3
  52. package/managers/RenderManager.js +0 -18
  53. package/messenger/DefaultMessenger.d.ts +0 -3
  54. package/messenger/DefaultMessenger.js +0 -27
  55. package/messenger/Messenger.d.ts +0 -78
  56. package/messenger/Messenger.js +0 -201
  57. package/operators/Appender.d.ts +0 -10
  58. package/operators/Appender.js +0 -64
  59. package/operators/AttrExpresion.d.ts +0 -0
  60. package/operators/AttrExpresion.js +0 -44
  61. package/operators/Dr.d.ts +0 -8
  62. package/operators/Dr.js +0 -101
  63. package/operators/DrAppender.d.ts +0 -8
  64. package/operators/DrAppender.js +0 -105
  65. package/operators/DrFor.d.ts +0 -8
  66. package/operators/DrFor.js +0 -102
  67. package/operators/DrForOf.d.ts +0 -8
  68. package/operators/DrForOf.js +0 -105
  69. package/operators/DrForm.d.ts +0 -8
  70. package/operators/DrForm.js +0 -138
  71. package/operators/DrIf.d.ts +0 -8
  72. package/operators/DrIf.js +0 -106
  73. package/operators/DrInnerHTML.d.ts +0 -8
  74. package/operators/DrInnerHTML.js +0 -99
  75. package/operators/DrInnerText.d.ts +0 -8
  76. package/operators/DrInnerText.js +0 -97
  77. package/operators/DrPre.d.ts +0 -7
  78. package/operators/DrPre.js +0 -71
  79. package/operators/DrRepeat.d.ts +0 -8
  80. package/operators/DrRepeat.js +0 -103
  81. package/operators/DrTargetAttr.d.ts +0 -7
  82. package/operators/DrTargetAttr.js +0 -96
  83. package/operators/DrTargetElement.d.ts +0 -7
  84. package/operators/DrTargetElement.js +0 -112
  85. package/operators/DrThis.d.ts +0 -5
  86. package/operators/DrThis.js +0 -108
  87. package/operators/DrThisProperty.d.ts +0 -10
  88. package/operators/DrThisProperty.js +0 -141
  89. package/operators/OperatorExecuter.d.ts +0 -49
  90. package/operators/OperatorExecuter.js +0 -89
  91. package/operators/OperatorExecuterAttrRequire.d.ts +0 -8
  92. package/operators/OperatorExecuterAttrRequire.js +0 -79
  93. package/rawsets/AttrInitCallBack.d.ts +0 -5
  94. package/rawsets/AttrInitCallBack.js +0 -2
  95. package/rawsets/Attrs.d.ts +0 -24
  96. package/rawsets/Attrs.js +0 -2
  97. package/rawsets/CreatorMetaData.d.ts +0 -18
  98. package/rawsets/CreatorMetaData.js +0 -2
  99. package/rawsets/DestroyOptionType.d.ts +0 -4
  100. package/rawsets/DestroyOptionType.js +0 -8
  101. package/rawsets/ElementInitCallBack.d.ts +0 -8
  102. package/rawsets/ElementInitCallBack.js +0 -2
  103. package/rawsets/RawSet.d.ts +0 -118
  104. package/rawsets/RawSet.js +0 -1142
  105. package/rawsets/RawSetOperatorType.d.ts +0 -3
  106. package/rawsets/RawSetOperatorType.js +0 -7
  107. package/rawsets/RawSetType.d.ts +0 -7
  108. package/rawsets/RawSetType.js +0 -11
  109. package/rawsets/Render.d.ts +0 -17
  110. package/rawsets/Render.js +0 -2
  111. package/routers/HashRouter.d.ts +0 -9
  112. package/routers/HashRouter.js +0 -53
  113. package/routers/PathRouter.d.ts +0 -9
  114. package/routers/PathRouter.js +0 -52
  115. package/routers/Router.d.ts +0 -28
  116. package/routers/Router.js +0 -126
  117. package/types/Types.d.ts +0 -14
  118. package/types/Types.js +0 -36
  119. package/utils/clipboard/ClipBoardUtils.d.ts +0 -6
  120. package/utils/clipboard/ClipBoardUtils.js +0 -25
  121. package/utils/dom/DomUtils.d.ts +0 -13
  122. package/utils/dom/DomUtils.js +0 -47
  123. package/utils/location/LocationUtils.d.ts +0 -16
  124. package/utils/location/LocationUtils.js +0 -63
  125. package/utils/node/NodeUtils.d.ts +0 -10
  126. package/utils/node/NodeUtils.js +0 -27
  127. package/utils/random/RandomUtils.d.ts +0 -7
  128. package/utils/random/RandomUtils.js +0 -47
  129. package/utils/script/ScriptUtils.d.ts +0 -14
  130. package/utils/script/ScriptUtils.js +0 -89
  131. package/utils/storage/StorageUtils.d.ts +0 -16
  132. package/utils/storage/StorageUtils.js +0 -87
  133. package/utils/string/StringUtils.d.ts +0 -6
  134. package/utils/string/StringUtils.js +0 -58
  135. package/utils/valid/ValidUtils.d.ts +0 -10
  136. package/utils/valid/ValidUtils.js +0 -78
  137. package/validators/AllCheckedValidatorArray.d.ts +0 -6
  138. package/validators/AllCheckedValidatorArray.js +0 -32
  139. package/validators/AllUnCheckedValidatorArray.d.ts +0 -6
  140. package/validators/AllUnCheckedValidatorArray.js +0 -32
  141. package/validators/CheckedValidator.d.ts +0 -5
  142. package/validators/CheckedValidator.js +0 -32
  143. package/validators/CountEqualsCheckedValidatorArray.d.ts +0 -7
  144. package/validators/CountEqualsCheckedValidatorArray.js +0 -34
  145. package/validators/CountEqualsUnCheckedValidatorArray.d.ts +0 -7
  146. package/validators/CountEqualsUnCheckedValidatorArray.js +0 -34
  147. package/validators/CountGreaterThanCheckedValidatorArray.d.ts +0 -7
  148. package/validators/CountGreaterThanCheckedValidatorArray.js +0 -34
  149. package/validators/CountGreaterThanEqualsCheckedValidatorArray.d.ts +0 -7
  150. package/validators/CountGreaterThanEqualsCheckedValidatorArray.js +0 -34
  151. package/validators/CountGreaterThanEqualsUnCheckedValidatorArray.d.ts +0 -7
  152. package/validators/CountGreaterThanEqualsUnCheckedValidatorArray.js +0 -34
  153. package/validators/CountGreaterThanUnCheckedValidatorArray.d.ts +0 -7
  154. package/validators/CountGreaterThanUnCheckedValidatorArray.js +0 -34
  155. package/validators/CountLessThanCheckedValidatorArray.d.ts +0 -7
  156. package/validators/CountLessThanCheckedValidatorArray.js +0 -34
  157. package/validators/CountLessThanEqualsCheckedValidatorArray.d.ts +0 -7
  158. package/validators/CountLessThanEqualsCheckedValidatorArray.js +0 -34
  159. package/validators/CountLessThanEqualsUnCheckedValidatorArray.d.ts +0 -7
  160. package/validators/CountLessThanEqualsUnCheckedValidatorArray.js +0 -34
  161. package/validators/CountLessThanUnCheckedValidatorArray.d.ts +0 -7
  162. package/validators/CountLessThanUnCheckedValidatorArray.js +0 -34
  163. package/validators/CountUnCheckedValidatorArray.d.ts +0 -7
  164. package/validators/CountUnCheckedValidatorArray.js +0 -34
  165. package/validators/EmptyValidator.d.ts +0 -5
  166. package/validators/EmptyValidator.js +0 -33
  167. package/validators/ExcludeCheckedValidatorArray.d.ts +0 -8
  168. package/validators/ExcludeCheckedValidatorArray.js +0 -41
  169. package/validators/FormValidator.d.ts +0 -7
  170. package/validators/FormValidator.js +0 -37
  171. package/validators/IncludeCheckedValidatorArray.d.ts +0 -8
  172. package/validators/IncludeCheckedValidatorArray.js +0 -41
  173. package/validators/MultipleValidator.d.ts +0 -8
  174. package/validators/MultipleValidator.js +0 -48
  175. package/validators/NonPassValidator.d.ts +0 -5
  176. package/validators/NonPassValidator.js +0 -31
  177. package/validators/NotEmptyValidator.d.ts +0 -5
  178. package/validators/NotEmptyValidator.js +0 -34
  179. package/validators/NotRegExpTestValidator.d.ts +0 -6
  180. package/validators/NotRegExpTestValidator.js +0 -42
  181. package/validators/PassValidator.d.ts +0 -5
  182. package/validators/PassValidator.js +0 -31
  183. package/validators/RegExpTestValidator.d.ts +0 -6
  184. package/validators/RegExpTestValidator.js +0 -43
  185. package/validators/RequiredValidator.d.ts +0 -5
  186. package/validators/RequiredValidator.js +0 -33
  187. package/validators/UnCheckedValidator.d.ts +0 -5
  188. package/validators/UnCheckedValidator.js +0 -32
  189. package/validators/ValidMultipleValidator.d.ts +0 -9
  190. package/validators/ValidMultipleValidator.js +0 -34
  191. package/validators/ValidValidator.d.ts +0 -6
  192. package/validators/ValidValidator.js +0 -33
  193. package/validators/ValidValidatorArray.d.ts +0 -7
  194. package/validators/ValidValidatorArray.js +0 -33
  195. package/validators/Validator.d.ts +0 -57
  196. package/validators/Validator.js +0 -242
  197. package/validators/ValidatorArray.d.ts +0 -17
  198. package/validators/ValidatorArray.js +0 -99
  199. package/validators/ValueEqualsValidator.d.ts +0 -6
  200. package/validators/ValueEqualsValidator.js +0 -33
  201. package/validators/ValueNotEqualsValidator.d.ts +0 -6
  202. package/validators/ValueNotEqualsValidator.js +0 -33
@@ -1,34 +0,0 @@
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.CountGreaterThanEqualsCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
22
- function CountGreaterThanEqualsCheckedValidatorArray(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
- CountGreaterThanEqualsCheckedValidatorArray.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 CountGreaterThanEqualsCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountGreaterThanEqualsCheckedValidatorArray = CountGreaterThanEqualsCheckedValidatorArray;
@@ -1,7 +0,0 @@
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
- }
@@ -1,34 +0,0 @@
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.CountGreaterThanEqualsUnCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountGreaterThanEqualsUnCheckedValidatorArray, _super);
22
- function CountGreaterThanEqualsUnCheckedValidatorArray(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
- CountGreaterThanEqualsUnCheckedValidatorArray.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 CountGreaterThanEqualsUnCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountGreaterThanEqualsUnCheckedValidatorArray = CountGreaterThanEqualsUnCheckedValidatorArray;
@@ -1,7 +0,0 @@
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
- }
@@ -1,34 +0,0 @@
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.CountGreaterThanUnCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountGreaterThanUnCheckedValidatorArray, _super);
22
- function CountGreaterThanUnCheckedValidatorArray(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
- CountGreaterThanUnCheckedValidatorArray.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 CountGreaterThanUnCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountGreaterThanUnCheckedValidatorArray = CountGreaterThanUnCheckedValidatorArray;
@@ -1,7 +0,0 @@
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
- }
@@ -1,34 +0,0 @@
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.CountLessThanCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountLessThanCheckedValidatorArray, _super);
22
- function CountLessThanCheckedValidatorArray(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
- CountLessThanCheckedValidatorArray.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 CountLessThanCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountLessThanCheckedValidatorArray = CountLessThanCheckedValidatorArray;
@@ -1,7 +0,0 @@
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
- }
@@ -1,34 +0,0 @@
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.CountLessThanEqualsCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountLessThanEqualsCheckedValidatorArray, _super);
22
- function CountLessThanEqualsCheckedValidatorArray(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
- CountLessThanEqualsCheckedValidatorArray.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 CountLessThanEqualsCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountLessThanEqualsCheckedValidatorArray = CountLessThanEqualsCheckedValidatorArray;
@@ -1,7 +0,0 @@
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
- }
@@ -1,34 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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;
28
- var value = this.value;
29
- return value === undefined || value === null || ((_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0) <= 0;
30
- };
31
- return EmptyValidator;
32
- }(Validator_1.Validator));
33
- exports.EmptyValidator = EmptyValidator;
@@ -1,8 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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 +0,0 @@
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,48 +0,0 @@
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.MultipleValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var MultipleValidator = /** @class */ (function (_super) {
21
- __extends(MultipleValidator, _super);
22
- function MultipleValidator(validators, value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- var _this = _super.call(this, value, target, event, autoValid) || this;
25
- _this.validators = validators.map(function (it) {
26
- it.setAutoValid(false);
27
- it.setAutoValidAction(false);
28
- return it;
29
- });
30
- _this.validators.forEach(function (it) {
31
- it.set(_this.value, _this.getTarget(), _this.getEvent());
32
- });
33
- return _this;
34
- }
35
- MultipleValidator.prototype.changeValue = function (value) {
36
- var _this = this;
37
- this.validators.forEach(function (it) { return it.set(_this.value, _this.getTarget(), _this.getEvent()); });
38
- };
39
- MultipleValidator.prototype.validAction = function () {
40
- return !(this.validators.filter(function (it) { return !it.validAction(); }).length > 0);
41
- };
42
- MultipleValidator.prototype.valid = function () {
43
- // console.log('mm', this.validators)
44
- return !(this.validators.filter(function (it) { return !it.valid(); }).length > 0);
45
- };
46
- return MultipleValidator;
47
- }(Validator_1.Validator));
48
- exports.MultipleValidator = MultipleValidator;
@@ -1,5 +0,0 @@
1
- import { Validator } from './Validator';
2
- export declare class NonPassValidator<T = any, E = Element> extends Validator<T, E> {
3
- constructor(value?: T, target?: E, event?: Event, autoValid?: boolean);
4
- valid(): boolean;
5
- }
@@ -1,31 +0,0 @@
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.NonPassValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var NonPassValidator = /** @class */ (function (_super) {
21
- __extends(NonPassValidator, _super);
22
- function NonPassValidator(value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, value, target, event, autoValid) || this;
25
- }
26
- NonPassValidator.prototype.valid = function () {
27
- return false;
28
- };
29
- return NonPassValidator;
30
- }(Validator_1.Validator));
31
- exports.NonPassValidator = NonPassValidator;
@@ -1,5 +0,0 @@
1
- import { Validator } from './Validator';
2
- export declare class NotEmptyValidator<T = any, E = Element> extends Validator<T, E> {
3
- constructor(value?: T, target?: E, event?: Event, autoValid?: boolean);
4
- valid(): boolean;
5
- }