dom-render 1.0.97 → 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 -510
  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 -5493
  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 -107
  65. package/operators/DrFor.d.ts +0 -8
  66. package/operators/DrFor.js +0 -104
  67. package/operators/DrForOf.d.ts +0 -8
  68. package/operators/DrForOf.js +0 -107
  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 -108
  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 -73
  79. package/operators/DrRepeat.d.ts +0 -8
  80. package/operators/DrRepeat.js +0 -105
  81. package/operators/DrTargetAttr.d.ts +0 -7
  82. package/operators/DrTargetAttr.js +0 -98
  83. package/operators/DrTargetElement.d.ts +0 -7
  84. package/operators/DrTargetElement.js +0 -114
  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 -143
  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 -1141
  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.NotEmptyValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var NotEmptyValidator = /** @class */ (function (_super) {
21
- __extends(NotEmptyValidator, _super);
22
- function NotEmptyValidator(value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, value, target, event, autoValid) || this;
25
- }
26
- NotEmptyValidator.prototype.valid = function () {
27
- var _a, _b;
28
- var value = this.value;
29
- // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
30
- return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
31
- };
32
- return NotEmptyValidator;
33
- }(Validator_1.Validator));
34
- exports.NotEmptyValidator = NotEmptyValidator;
@@ -1,6 +0,0 @@
1
- import { Validator } from './Validator';
2
- export declare class NotRegExpTestValidator<T = any, E = Element> extends Validator<T, E> {
3
- regexp: RegExp;
4
- constructor(regexp: RegExp, value?: T, target?: E, event?: Event, autoValid?: boolean);
5
- valid(): boolean;
6
- }
@@ -1,42 +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.NotRegExpTestValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var DomRenderProxy_1 = require("../DomRenderProxy");
21
- var NotRegExpTestValidator = /** @class */ (function (_super) {
22
- __extends(NotRegExpTestValidator, _super);
23
- function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
24
- if (autoValid === void 0) { autoValid = true; }
25
- var _this = _super.call(this, value, target, event, autoValid) || this;
26
- _this.regexp = DomRenderProxy_1.DomRenderProxy.final(regexp);
27
- return _this;
28
- }
29
- NotRegExpTestValidator.prototype.valid = function () {
30
- var _a;
31
- var value = this.value;
32
- var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
33
- if (value) {
34
- return !regExp.test(value);
35
- }
36
- else {
37
- return true;
38
- }
39
- };
40
- return NotRegExpTestValidator;
41
- }(Validator_1.Validator));
42
- exports.NotRegExpTestValidator = NotRegExpTestValidator;
@@ -1,5 +0,0 @@
1
- import { Validator } from './Validator';
2
- export declare class PassValidator<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.PassValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var PassValidator = /** @class */ (function (_super) {
21
- __extends(PassValidator, _super);
22
- function PassValidator(value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, value, target, event, autoValid) || this;
25
- }
26
- PassValidator.prototype.valid = function () {
27
- return true;
28
- };
29
- return PassValidator;
30
- }(Validator_1.Validator));
31
- exports.PassValidator = PassValidator;
@@ -1,6 +0,0 @@
1
- import { Validator } from './Validator';
2
- export declare class RegExpTestValidator<T = any, E = Element> extends Validator<T, E> {
3
- regexp: RegExp;
4
- constructor(regexp: RegExp, value?: T, target?: E, event?: Event, autoValid?: boolean);
5
- valid(): boolean;
6
- }
@@ -1,43 +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.RegExpTestValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var DomRenderProxy_1 = require("../DomRenderProxy");
21
- var RegExpTestValidator = /** @class */ (function (_super) {
22
- __extends(RegExpTestValidator, _super);
23
- function RegExpTestValidator(regexp, value, target, event, autoValid) {
24
- if (autoValid === void 0) { autoValid = true; }
25
- var _this = _super.call(this, value, target, event, autoValid) || this;
26
- _this.regexp = DomRenderProxy_1.DomRenderProxy.final(regexp);
27
- return _this;
28
- }
29
- RegExpTestValidator.prototype.valid = function () {
30
- var _a;
31
- var value = this.value;
32
- var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
33
- // console.log('regexp-->', value, this.regexp, regExp.test(value))
34
- if (value) {
35
- return regExp.test(value);
36
- }
37
- else {
38
- return false;
39
- }
40
- };
41
- return RegExpTestValidator;
42
- }(Validator_1.Validator));
43
- exports.RegExpTestValidator = RegExpTestValidator;
@@ -1,5 +0,0 @@
1
- import { Validator } from './Validator';
2
- export declare class RequiredValidator<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.RequiredValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var RequiredValidator = /** @class */ (function (_super) {
21
- __extends(RequiredValidator, _super);
22
- function RequiredValidator(value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, value, target, event, autoValid) || this;
25
- }
26
- RequiredValidator.prototype.valid = function () {
27
- var value = this.value;
28
- // console.log('required', value, value !== undefined && value !== null)
29
- return value !== undefined && value !== null;
30
- };
31
- return RequiredValidator;
32
- }(Validator_1.Validator));
33
- exports.RequiredValidator = RequiredValidator;
@@ -1,5 +0,0 @@
1
- import { Validator } from './Validator';
2
- export declare class UnCheckedValidator<T = any, E = HTMLElement> extends Validator<T, E> {
3
- constructor(value?: T, target?: E, event?: Event, autoValid?: boolean);
4
- valid(): boolean;
5
- }
@@ -1,32 +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.UnCheckedValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var UnCheckedValidator = /** @class */ (function (_super) {
21
- __extends(UnCheckedValidator, _super);
22
- function UnCheckedValidator(value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, value, target, event, autoValid) || this;
25
- }
26
- UnCheckedValidator.prototype.valid = function () {
27
- var _a, _b;
28
- return !((_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false);
29
- };
30
- return UnCheckedValidator;
31
- }(Validator_1.Validator));
32
- exports.UnCheckedValidator = UnCheckedValidator;
@@ -1,9 +0,0 @@
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
- }
@@ -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.ValidMultipleValidator = void 0;
19
- var MultipleValidator_1 = require("./MultipleValidator");
20
- var ValidMultipleValidator = /** @class */ (function (_super) {
21
- __extends(ValidMultipleValidator, _super);
22
- function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- var _this = _super.call(this, validators, value, target, event, autoValid) || this;
25
- _this.validMultipleCallback = validMultipleCallback;
26
- _this.validators = validators;
27
- return _this;
28
- }
29
- ValidMultipleValidator.prototype.valid = function () {
30
- return this.validMultipleCallback(this.validators, this.value, this.getTarget(), this.getEvent());
31
- };
32
- return ValidMultipleValidator;
33
- }(MultipleValidator_1.MultipleValidator));
34
- exports.ValidMultipleValidator = ValidMultipleValidator;
@@ -1,6 +0,0 @@
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
- }
@@ -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.ValidValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var ValidValidator = /** @class */ (function (_super) {
21
- __extends(ValidValidator, _super);
22
- function ValidValidator(validCallBack, value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- var _this = _super.call(this, value, target, event, autoValid) || this;
25
- _this.validCallBack = validCallBack;
26
- return _this;
27
- }
28
- ValidValidator.prototype.valid = function (value, target, event) {
29
- return this.validCallBack(value, target, event);
30
- };
31
- return ValidValidator;
32
- }(Validator_1.Validator));
33
- exports.ValidValidator = ValidValidator;
@@ -1,7 +0,0 @@
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
- }
@@ -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.ValidValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var ValidValidatorArray = /** @class */ (function (_super) {
21
- __extends(ValidValidatorArray, _super);
22
- function ValidValidatorArray(validCallBack, value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- var _this = _super.call(this, value, target, event, autoValid) || this;
25
- _this.validCallBack = validCallBack;
26
- return _this;
27
- }
28
- ValidValidatorArray.prototype.valid = function () {
29
- return this.validCallBack(this.value, this.getTarget(), this.getEvent());
30
- };
31
- return ValidValidatorArray;
32
- }(ValidatorArray_1.ValidatorArray));
33
- exports.ValidValidatorArray = ValidValidatorArray;
@@ -1,57 +0,0 @@
1
- export declare type Valid<T = any, E = Element> = (value?: T, target?: E, event?: Event) => boolean;
2
- export declare type ValidAction<T = any, E = Element> = (valid: boolean, value?: T, target?: E, event?: Event) => void;
3
- export declare abstract class Validator<T = any, E = Element> {
4
- protected _value?: T | undefined;
5
- private _target?;
6
- private _event?;
7
- private _autoValid;
8
- private _autoValidAction;
9
- private _validAction?;
10
- constructor(_value?: T | undefined, target?: E, event?: Event, autoValid?: boolean, autoValidAction?: boolean);
11
- getValidAction(): ValidAction<T, E> | undefined;
12
- setValidAction(value: ValidAction<T, E>): this;
13
- getAutoValid(): boolean;
14
- setAutoValid(autoValid: boolean): this;
15
- getAutoValidAction(): boolean;
16
- setAutoValidAction(autoValid: boolean): this;
17
- getEvent(): Event | undefined;
18
- setEvent(event: Event | undefined): this;
19
- getTarget(): E | undefined;
20
- targetFocus(): void;
21
- targetReset(): void;
22
- targetDispatchEvent(event: Event): any;
23
- setTarget(target: E | undefined): this;
24
- private domRenderFinal;
25
- get value(): T | undefined;
26
- set value(value: T | undefined);
27
- protected tickValue(value: T | undefined): void;
28
- set(value?: T, target?: E, event?: Event): void;
29
- changeValue(value: T | undefined): void;
30
- get checked(): boolean;
31
- set checked(checked: boolean);
32
- get selectedIndex(): number;
33
- set selectedIndex(selectedIndex: number);
34
- querySelector(selector: string): Element | null;
35
- querySelectorALL(selector: string): NodeListOf<Element>;
36
- validAction(): boolean;
37
- abstract valid(): boolean;
38
- inValid(): boolean;
39
- allValid(): boolean;
40
- allValidAction(): boolean;
41
- allInValid(): boolean;
42
- allInValidAction(): boolean;
43
- childValid(): boolean;
44
- childValue(): {
45
- [key: string]: any;
46
- };
47
- childValidAction(): boolean;
48
- childInValid(): boolean;
49
- childInValidValidator(): [string, Validator<any, Element>][];
50
- childInValidAction(): boolean;
51
- childValidator(name: string): Validator | undefined;
52
- childValidators(): [string, Validator][];
53
- childValidValidator(): [string, Validator][];
54
- syncValue(): void;
55
- allSyncValue(): void;
56
- get length(): any;
57
- }