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,14 +0,0 @@
1
- export declare class ScriptUtils {
2
- static getVariablePaths(script: string): Set<string>;
3
- static evalReturn(script: string, thisTarget: any): any;
4
- static eval(script: string, thisTarget: any): any;
5
- static loadElement(name: string, attribute: {
6
- [key: string]: string;
7
- }, document: Document): Promise<unknown>;
8
- static loadStyleSheet(href: string, attribute: {
9
- [key: string]: string;
10
- } | undefined, document: Document): Promise<unknown>;
11
- static loadScript(src: string, attribute: {
12
- [key: string]: string;
13
- } | undefined, document: Document): Promise<unknown>;
14
- }
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ScriptUtils = void 0;
4
- var ScriptUtils = /** @class */ (function () {
5
- function ScriptUtils() {
6
- }
7
- ScriptUtils.getVariablePaths = function (script) {
8
- var usingVars = new Set();
9
- var GetDetectProxy = /** @class */ (function () {
10
- function GetDetectProxy(prefix) {
11
- this.prefix = prefix;
12
- this.usingVars = usingVars;
13
- }
14
- GetDetectProxy.prototype.set = function (target, p, value, receiver) {
15
- return true;
16
- };
17
- GetDetectProxy.prototype.get = function (target, p, receiver) {
18
- var items;
19
- if (typeof p === 'string' && isNaN(Number(p))) {
20
- items = this.prefix ? this.prefix + '.' + p : p;
21
- this.usingVars.add(items);
22
- }
23
- else if (typeof p === 'string' && !isNaN(Number(p))) {
24
- items = this.prefix ? this.prefix + '[' + p + ']' : p;
25
- this.usingVars.add(items);
26
- }
27
- return new Proxy(function () {
28
- }, new GetDetectProxy(items));
29
- };
30
- return GetDetectProxy;
31
- }());
32
- var destUser = new Proxy(function () {
33
- }, new GetDetectProxy());
34
- try {
35
- // eslint-disable-next-line no-new-func,no-unused-expressions
36
- Function("\"use strict\"; " + script + "; ").bind(destUser)();
37
- }
38
- catch (e) {
39
- console.error(e);
40
- }
41
- // console.log('------->', usingVars);
42
- return usingVars;
43
- };
44
- ScriptUtils.evalReturn = function (script, thisTarget) {
45
- // if (!script.startsWith('this.')) {
46
- // script = 'this.' + script;
47
- // }
48
- return this.eval('return ' + script + ';', thisTarget);
49
- };
50
- ScriptUtils.eval = function (script, thisTarget) {
51
- // eslint-disable-next-line no-new-func,no-unused-expressions
52
- return Function("\"use strict\"; " + script + " ").bind(thisTarget)();
53
- };
54
- ScriptUtils.loadElement = function (name, attribute, document) {
55
- return new Promise(function (resolve, reject) {
56
- var tag = document.createElement(name);
57
- tag.onload = resolve;
58
- tag.onerror = reject;
59
- for (var _i = 0, _a = Object.entries(attribute); _i < _a.length; _i++) {
60
- var _b = _a[_i], key = _b[0], value = _b[1];
61
- tag.setAttribute(key, value);
62
- }
63
- document.head.append(tag);
64
- });
65
- };
66
- ScriptUtils.loadStyleSheet = function (href, attribute, document) {
67
- if (attribute === void 0) { attribute = {}; }
68
- // const tag = document.createElement('link');
69
- // tag.type = 'text/css';
70
- // tag.setAttribute('rel', 'stylesheet');
71
- // tag.href = href;
72
- // for (const [key, value] of Object.entries(attribute)) {
73
- // tag.setAttribute(key, value);
74
- // }
75
- // target.append(tag)
76
- attribute.type = 'text/css';
77
- attribute.rel = 'stylesheet';
78
- attribute.href = href;
79
- return ScriptUtils.loadElement('link', attribute, document);
80
- };
81
- ScriptUtils.loadScript = function (src, attribute, document) {
82
- if (attribute === void 0) { attribute = {}; }
83
- attribute.type = 'text/javascript';
84
- attribute.src = src;
85
- return ScriptUtils.loadElement('script', attribute, document);
86
- };
87
- return ScriptUtils;
88
- }());
89
- exports.ScriptUtils = ScriptUtils;
@@ -1,16 +0,0 @@
1
- export declare class StorageUtils {
2
- static setLocalStorageItem(k: string, v: string | any, window: Window): void;
3
- static setSessionStorageItem(k: string, v: string | any, window: Window): void;
4
- static getLocalStorageItem(k: string, window: Window): string | null;
5
- static getSessionStorageItem(k: string, window: Window): string | null;
6
- static cutLocalStorageItem(k: string, window: Window): string | null;
7
- static cutSessionStorageItem(k: string, window: Window): string | null;
8
- static removeLocalStorageItem(k: string, window: Window): void;
9
- static removeSessionStorageItem(k: string, window: Window): void;
10
- static getLocalStorageJsonItem<T>(k: string, window: Window): T | undefined;
11
- static getSessionStorageJsonItem<T>(k: string, window: Window): T | undefined;
12
- static cutLocalStorageJsonItem<T>(k: string, window: Window): T | undefined;
13
- static cutSessionStorageJsonItem<T>(k: string, window: Window): T | undefined;
14
- static clearLocalStorage(window: Window): void;
15
- static clearSessionStorage(window: Window): void;
16
- }
@@ -1,87 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StorageUtils = void 0;
4
- var StorageUtils = /** @class */ (function () {
5
- function StorageUtils() {
6
- }
7
- StorageUtils.setLocalStorageItem = function (k, v, window) {
8
- if (typeof v === 'object') {
9
- v = JSON.stringify(v);
10
- }
11
- window.localStorage.setItem(k, v);
12
- };
13
- StorageUtils.setSessionStorageItem = function (k, v, window) {
14
- if (typeof v === 'object') {
15
- v = JSON.stringify(v);
16
- }
17
- window.sessionStorage.setItem(k, v);
18
- };
19
- StorageUtils.getLocalStorageItem = function (k, window) {
20
- return window.localStorage.getItem(k);
21
- };
22
- StorageUtils.getSessionStorageItem = function (k, window) {
23
- return window.sessionStorage.getItem(k);
24
- };
25
- StorageUtils.cutLocalStorageItem = function (k, window) {
26
- var data = StorageUtils.getLocalStorageItem(k, window);
27
- StorageUtils.removeLocalStorageItem(k, window);
28
- return data;
29
- };
30
- StorageUtils.cutSessionStorageItem = function (k, window) {
31
- var data = StorageUtils.getSessionStorageItem(k, window);
32
- StorageUtils.removeSessionStorageItem(k, window);
33
- return data;
34
- };
35
- StorageUtils.removeLocalStorageItem = function (k, window) {
36
- return window.localStorage.removeItem(k);
37
- };
38
- StorageUtils.removeSessionStorageItem = function (k, window) {
39
- return window.sessionStorage.removeItem(k);
40
- };
41
- StorageUtils.getLocalStorageJsonItem = function (k, window) {
42
- var item = window.localStorage.getItem(k);
43
- if (item) {
44
- try {
45
- return JSON.parse(item);
46
- }
47
- catch (e) {
48
- return undefined;
49
- }
50
- }
51
- else {
52
- return undefined;
53
- }
54
- };
55
- StorageUtils.getSessionStorageJsonItem = function (k, window) {
56
- var item = window.sessionStorage.getItem(k);
57
- if (item) {
58
- try {
59
- return JSON.parse(item);
60
- }
61
- catch (e) {
62
- return undefined;
63
- }
64
- }
65
- else {
66
- return undefined;
67
- }
68
- };
69
- StorageUtils.cutLocalStorageJsonItem = function (k, window) {
70
- var item = StorageUtils.getLocalStorageJsonItem(k, window);
71
- StorageUtils.removeLocalStorageItem(k, window);
72
- return item;
73
- };
74
- StorageUtils.cutSessionStorageJsonItem = function (k, window) {
75
- var item = StorageUtils.getSessionStorageJsonItem(k, window);
76
- StorageUtils.removeSessionStorageItem(k, window);
77
- return item;
78
- };
79
- StorageUtils.clearLocalStorage = function (window) {
80
- window.localStorage.clear();
81
- };
82
- StorageUtils.clearSessionStorage = function (window) {
83
- window.sessionStorage.clear();
84
- };
85
- return StorageUtils;
86
- }());
87
- exports.StorageUtils = StorageUtils;
@@ -1,6 +0,0 @@
1
- export declare class StringUtils {
2
- static deleteEnter(data: string): string;
3
- static regexExec(regex: RegExp, text: string): RegExpExecArray[];
4
- static regexExecArrayReplace(origin: string, regexpExecArrayOrRegex: RegExpExecArray[] | RegExp, replace: string | ((data: RegExpExecArray) => string)): string;
5
- static escapeSpecialCharacterRegExp(data: string): string;
6
- }
@@ -1,58 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StringUtils = void 0;
4
- var StringUtils = /** @class */ (function () {
5
- function StringUtils() {
6
- }
7
- StringUtils.deleteEnter = function (data) {
8
- return data.replace(/\r?\n/g, '');
9
- };
10
- StringUtils.regexExec = function (regex, text) {
11
- var varExec = regex.exec(text);
12
- var usingVars = [];
13
- while (varExec) {
14
- usingVars.push(varExec);
15
- varExec = regex.exec(varExec.input);
16
- }
17
- return usingVars;
18
- };
19
- StringUtils.regexExecArrayReplace = function (origin, regexpExecArrayOrRegex, replace) {
20
- var regexpExecArrays = Array.isArray(regexpExecArrayOrRegex) ? regexpExecArrayOrRegex : StringUtils.regexExec(regexpExecArrayOrRegex, origin);
21
- regexpExecArrays.reverse().forEach(function (it) {
22
- var r = typeof replace === 'string' ? replace : replace(it);
23
- origin = origin.substr(0, it.index) + origin.substr(it.index).replace(it[0], r);
24
- });
25
- return origin;
26
- };
27
- // public static regexGroups(regex: RegExp, text: string) {
28
- // const usingVars = [];
29
- // let varExec = regex.exec(text)
30
- // while (varExec) {
31
- // usingVars.push(varExec)
32
- // varExec = regex.exec(varExec.input)
33
- // }
34
- // return usingVars;
35
- // }
36
- // public static betweenRegexpStr(start: string, end: string, data: string, flag = 'gm') {
37
- // const startEspace = StringUtils.escapeSpecialCharacterRegExp(start);
38
- // const reg = RegExp(`(${start}(?:(${start})??[^${startEspace}]*?${end}))`,flag);
39
- // return StringUtils.regexExec(reg, data);
40
- // }
41
- // public static betweenRegexpStrGroup(start: string, end: string, data: string, flag = 'gm') {
42
- // const startEspace = StringUtils.escapeSpecialCharacterRegExp(start);
43
- // const reg = RegExp(`(?:${start}(?:((?:${start})??[^${startEspace}]*?)${end}))`,flag);
44
- // return StringUtils.regexExec(reg, data);
45
- // }
46
- // public static between(start: string, end: string, data: string, flag = 'gm') {
47
- // // (\$\{(?:\[??[^\[]*?\})), (\$\{(?:(\$\{)??[^\$\{]*?\}))
48
- // start = StringUtils.escapeSpecialCharacterRegExp(start);
49
- // end = StringUtils.escapeSpecialCharacterRegExp(end);
50
- // const reg = RegExp(`(${start}(?:(${start})??[^${start}]*?${end}))`,flag);
51
- // return StringUtils.regexExec(reg, data);
52
- // }
53
- StringUtils.escapeSpecialCharacterRegExp = function (data) {
54
- return data.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
55
- };
56
- return StringUtils;
57
- }());
58
- exports.StringUtils = StringUtils;
@@ -1,10 +0,0 @@
1
- export declare class ValidUtils {
2
- static isNullOrUndefined(data: any): boolean;
3
- static isNull(data: any): boolean;
4
- static isArray(object_o: any): boolean;
5
- static isNumber(object_o: any): boolean;
6
- static isString(object_o: any): boolean;
7
- static isFunction(object_o: any): boolean;
8
- static isObject(object_o: any): boolean;
9
- static isMap(object_o: any): boolean;
10
- }
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ValidUtils = void 0;
4
- var ValidUtils = /** @class */ (function () {
5
- function ValidUtils() {
6
- }
7
- ValidUtils.isNullOrUndefined = function (data) {
8
- if (data == null || undefined === data) {
9
- return true;
10
- }
11
- else {
12
- return false;
13
- }
14
- };
15
- ValidUtils.isNull = function (data) {
16
- if (data == null) {
17
- return true;
18
- }
19
- else {
20
- return false;
21
- }
22
- };
23
- ValidUtils.isArray = function (object_o) {
24
- if (ValidUtils.isNullOrUndefined(object_o)) {
25
- return false;
26
- }
27
- else {
28
- return Object.prototype.toString.call(object_o).trim() === '[object Array]';
29
- }
30
- };
31
- ValidUtils.isNumber = function (object_o) {
32
- if (ValidUtils.isNullOrUndefined(object_o)) {
33
- return false;
34
- }
35
- else {
36
- return Object.prototype.toString.call(object_o).trim() === '[object Number]';
37
- }
38
- };
39
- ValidUtils.isString = function (object_o) {
40
- if (ValidUtils.isNullOrUndefined(object_o)) {
41
- return false;
42
- }
43
- else {
44
- return Object.prototype.toString.call(object_o).trim() === '[object String]';
45
- }
46
- };
47
- ValidUtils.isFunction = function (object_o) {
48
- if (ValidUtils.isNullOrUndefined(object_o)) {
49
- return false;
50
- }
51
- else {
52
- return Object.prototype.toString.call(object_o).trim() === '[object Function]';
53
- }
54
- // if (typeof object_o === 'function') {
55
- // return true;
56
- // }else {
57
- // return false;
58
- // }
59
- };
60
- ValidUtils.isObject = function (object_o) {
61
- if (ValidUtils.isNullOrUndefined(object_o)) {
62
- return false;
63
- }
64
- else {
65
- return Object.prototype.toString.call(object_o).trim() === '[object Object]';
66
- }
67
- };
68
- ValidUtils.isMap = function (object_o) {
69
- if (ValidUtils.isNullOrUndefined(object_o)) {
70
- return false;
71
- }
72
- else {
73
- return Object.prototype.toString.call(object_o).trim() === '[object Map]';
74
- }
75
- };
76
- return ValidUtils;
77
- }());
78
- exports.ValidUtils = ValidUtils;
@@ -1,6 +0,0 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class AllCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
- constructor(value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
5
- valid(): boolean;
6
- }
@@ -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.AllCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var AllCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(AllCheckedValidatorArray, _super);
22
- function AllCheckedValidatorArray(value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, value, target, event, autoValid) || this;
25
- }
26
- AllCheckedValidatorArray.prototype.valid = function () {
27
- var _a;
28
- return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > 0);
29
- };
30
- return AllCheckedValidatorArray;
31
- }(ValidatorArray_1.ValidatorArray));
32
- exports.AllCheckedValidatorArray = AllCheckedValidatorArray;
@@ -1,6 +0,0 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class AllUnCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
- constructor(value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
5
- valid(): boolean;
6
- }
@@ -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.AllUnCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(AllUnCheckedValidatorArray, _super);
22
- function AllUnCheckedValidatorArray(value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, value, target, event, autoValid) || this;
25
- }
26
- AllUnCheckedValidatorArray.prototype.valid = function () {
27
- var _a;
28
- return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
29
- };
30
- return AllUnCheckedValidatorArray;
31
- }(ValidatorArray_1.ValidatorArray));
32
- exports.AllUnCheckedValidatorArray = AllUnCheckedValidatorArray;
@@ -1,5 +0,0 @@
1
- import { Validator } from './Validator';
2
- export declare class CheckedValidator<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.CheckedValidator = void 0;
19
- var Validator_1 = require("./Validator");
20
- var CheckedValidator = /** @class */ (function (_super) {
21
- __extends(CheckedValidator, _super);
22
- function CheckedValidator(value, target, event, autoValid) {
23
- if (autoValid === void 0) { autoValid = true; }
24
- return _super.call(this, value, target, event, autoValid) || this;
25
- }
26
- CheckedValidator.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 CheckedValidator;
31
- }(Validator_1.Validator));
32
- exports.CheckedValidator = CheckedValidator;
@@ -1,7 +0,0 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class CountEqualsCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
- count: number;
5
- constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
6
- valid(): boolean;
7
- }
@@ -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.CountEqualsCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountEqualsCheckedValidatorArray, _super);
22
- function CountEqualsCheckedValidatorArray(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
- CountEqualsCheckedValidatorArray.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 CountEqualsCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountEqualsCheckedValidatorArray = CountEqualsCheckedValidatorArray;
@@ -1,7 +0,0 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class CountEqualsUnCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
- count: number;
5
- constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
6
- valid(): boolean;
7
- }
@@ -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.CountEqualsUnCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountEqualsUnCheckedValidatorArray, _super);
22
- function CountEqualsUnCheckedValidatorArray(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
- CountEqualsUnCheckedValidatorArray.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 CountEqualsUnCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountEqualsUnCheckedValidatorArray = CountEqualsUnCheckedValidatorArray;
@@ -1,7 +0,0 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class CountGreaterThanCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
- count: number;
5
- constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
6
- valid(): boolean;
7
- }
@@ -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.CountGreaterThanCheckedValidatorArray = void 0;
19
- var ValidatorArray_1 = require("./ValidatorArray");
20
- var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
21
- __extends(CountGreaterThanCheckedValidatorArray, _super);
22
- function CountGreaterThanCheckedValidatorArray(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
- CountGreaterThanCheckedValidatorArray.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 CountGreaterThanCheckedValidatorArray;
33
- }(ValidatorArray_1.ValidatorArray));
34
- exports.CountGreaterThanCheckedValidatorArray = CountGreaterThanCheckedValidatorArray;
@@ -1,7 +0,0 @@
1
- import { Validator } from './Validator';
2
- import { ValidatorArray } from './ValidatorArray';
3
- export declare class CountGreaterThanEqualsCheckedValidatorArray<T = any, E = Element> extends ValidatorArray<T, E> {
4
- count: number;
5
- constructor(count: number, value?: Validator<T, E>[], target?: E, event?: Event, autoValid?: boolean);
6
- valid(): boolean;
7
- }