dom-render 1.0.92 → 1.0.94

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 (40) hide show
  1. package/DomRenderProxy.js +29 -27
  2. package/components/ComponentSet.d.ts +1 -1
  3. package/configs/Config.d.ts +4 -1
  4. package/configs/TargetAttr.d.ts +1 -1
  5. package/configs/TargetElement.d.ts +1 -1
  6. package/dist/bundle.js +274 -340
  7. package/events/EventManager.d.ts +1 -0
  8. package/events/EventManager.js +43 -54
  9. package/messenger/Messenger.d.ts +4 -4
  10. package/operators/Dr.js +1 -1
  11. package/operators/DrAppender.js +2 -4
  12. package/operators/DrFor.js +2 -4
  13. package/operators/DrForOf.js +2 -4
  14. package/operators/DrForm.js +1 -1
  15. package/operators/DrIf.js +2 -4
  16. package/operators/DrInnerHTML.js +1 -1
  17. package/operators/DrInnerText.js +1 -1
  18. package/operators/DrPre.js +2 -4
  19. package/operators/DrRepeat.js +2 -4
  20. package/operators/DrTargetAttr.js +2 -4
  21. package/operators/DrTargetElement.js +2 -4
  22. package/operators/DrThis.js +1 -1
  23. package/operators/OperatorExecuter.d.ts +5 -5
  24. package/operators/OperatorExecuter.js +1 -1
  25. package/operators/OperatorExecuterAttrRequire.js +1 -1
  26. package/package.json +1 -1
  27. package/rawsets/AttrInitCallBack.d.ts +1 -1
  28. package/rawsets/Attrs.d.ts +1 -1
  29. package/rawsets/CreatorMetaData.d.ts +1 -1
  30. package/rawsets/ElementInitCallBack.d.ts +1 -1
  31. package/rawsets/RawSet.js +1 -1
  32. package/rawsets/Render.d.ts +1 -1
  33. package/routers/Router.d.ts +1 -1
  34. package/utils/dom/DomUtils.d.ts +1 -1
  35. package/utils/node/NodeUtils.d.ts +1 -1
  36. package/validators/EmptyValidator.js +2 -2
  37. package/validators/NotEmptyValidator.js +2 -2
  38. package/validators/ValidMultipleValidator.d.ts +1 -1
  39. package/validators/Validator.d.ts +2 -2
  40. package/validators/ValidatorArray.d.ts +1 -1
package/dist/bundle.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  try{if(!exports){exports = {};} }catch(e){var exports = {}};
4
4
 
5
- /*! *****************************************************************************
5
+ /******************************************************************************
6
6
  Copyright (c) Microsoft Corporation.
7
7
 
8
8
  Permission to use, copy, modify, and/or distribute this software for any
@@ -16,8 +16,8 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16
16
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17
17
  PERFORMANCE OF THIS SOFTWARE.
18
18
  ***************************************************************************** */
19
-
20
19
  /* global Reflect, Promise */
20
+
21
21
  var extendStatics = function (d, b) {
22
22
  extendStatics = Object.setPrototypeOf || {
23
23
  __proto__: []
@@ -26,31 +26,24 @@ var extendStatics = function (d, b) {
26
26
  } || function (d, b) {
27
27
  for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
28
28
  };
29
-
30
29
  return extendStatics(d, b);
31
30
  };
32
-
33
31
  function __extends(d, b) {
34
32
  if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
35
33
  extendStatics(d, b);
36
-
37
34
  function __() {
38
35
  this.constructor = d;
39
36
  }
40
-
41
37
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
42
38
  }
43
39
  var __assign = function () {
44
40
  __assign = Object.assign || function __assign(t) {
45
41
  for (var s, i = 1, n = arguments.length; i < n; i++) {
46
42
  s = arguments[i];
47
-
48
43
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
49
44
  }
50
-
51
45
  return t;
52
46
  };
53
-
54
47
  return __assign.apply(this, arguments);
55
48
  };
56
49
  function __awaiter(thisArg, _arguments, P, generator) {
@@ -59,7 +52,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
59
52
  resolve(value);
60
53
  });
61
54
  }
62
-
63
55
  return new (P || (P = Promise))(function (resolve, reject) {
64
56
  function fulfilled(value) {
65
57
  try {
@@ -68,7 +60,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
68
60
  reject(e);
69
61
  }
70
62
  }
71
-
72
63
  function rejected(value) {
73
64
  try {
74
65
  step(generator["throw"](value));
@@ -76,28 +67,26 @@ function __awaiter(thisArg, _arguments, P, generator) {
76
67
  reject(e);
77
68
  }
78
69
  }
79
-
80
70
  function step(result) {
81
71
  result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
82
72
  }
83
-
84
73
  step((generator = generator.apply(thisArg, _arguments || [])).next());
85
74
  });
86
75
  }
87
76
  function __generator(thisArg, body) {
88
77
  var _ = {
89
- label: 0,
90
- sent: function () {
91
- if (t[0] & 1) throw t[1];
92
- return t[1];
78
+ label: 0,
79
+ sent: function () {
80
+ if (t[0] & 1) throw t[1];
81
+ return t[1];
82
+ },
83
+ trys: [],
84
+ ops: []
93
85
  },
94
- trys: [],
95
- ops: []
96
- },
97
- f,
98
- y,
99
- t,
100
- g;
86
+ f,
87
+ y,
88
+ t,
89
+ g;
101
90
  return g = {
102
91
  next: verb(0),
103
92
  "throw": verb(1),
@@ -105,78 +94,59 @@ function __generator(thisArg, body) {
105
94
  }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
106
95
  return this;
107
96
  }), g;
108
-
109
97
  function verb(n) {
110
98
  return function (v) {
111
99
  return step([n, v]);
112
100
  };
113
101
  }
114
-
115
102
  function step(op) {
116
103
  if (f) throw new TypeError("Generator is already executing.");
117
-
118
- while (_) try {
104
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
119
105
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
120
106
  if (y = 0, t) op = [op[0] & 2, t.value];
121
-
122
107
  switch (op[0]) {
123
108
  case 0:
124
109
  case 1:
125
110
  t = op;
126
111
  break;
127
-
128
112
  case 4:
129
113
  _.label++;
130
114
  return {
131
115
  value: op[1],
132
116
  done: false
133
117
  };
134
-
135
118
  case 5:
136
119
  _.label++;
137
120
  y = op[1];
138
121
  op = [0];
139
122
  continue;
140
-
141
123
  case 7:
142
124
  op = _.ops.pop();
143
-
144
125
  _.trys.pop();
145
-
146
126
  continue;
147
-
148
127
  default:
149
128
  if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
150
129
  _ = 0;
151
130
  continue;
152
131
  }
153
-
154
132
  if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
155
133
  _.label = op[1];
156
134
  break;
157
135
  }
158
-
159
136
  if (op[0] === 6 && _.label < t[1]) {
160
137
  _.label = t[1];
161
138
  t = op;
162
139
  break;
163
140
  }
164
-
165
141
  if (t && _.label < t[2]) {
166
142
  _.label = t[2];
167
-
168
143
  _.ops.push(op);
169
-
170
144
  break;
171
145
  }
172
-
173
146
  if (t[2]) _.ops.pop();
174
-
175
147
  _.trys.pop();
176
-
177
148
  continue;
178
149
  }
179
-
180
150
  op = body.call(thisArg, _);
181
151
  } catch (e) {
182
152
  op = [6, e];
@@ -184,7 +154,6 @@ function __generator(thisArg, body) {
184
154
  } finally {
185
155
  f = t = 0;
186
156
  }
187
-
188
157
  if (op[0] & 5) throw op[1];
189
158
  return {
190
159
  value: op[0] ? op[1] : void 0,
@@ -621,7 +590,8 @@ var EventManager = /** @class */ (function () {
621
590
  element: it,
622
591
  event: event,
623
592
  range: Range.range,
624
- scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
593
+ scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj),
594
+ // ...EventManager.eventVariables
625
595
  })
626
596
  }));
627
597
  }
@@ -708,7 +678,7 @@ var EventManager = /** @class */ (function () {
708
678
  if (typeof getValue === 'function' && getValue) {
709
679
  var setValue = it.value;
710
680
  if (mapScript_1) {
711
- setValue = ScriptUtils.eval("".concat(_this.bindScript, " return ").concat(mapScript_1), Object.assign(bindObj_1, { __render: Object.freeze({ element: it, target: bindObj_1, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }) }));
681
+ setValue = ScriptUtils.eval("".concat(_this.getBindScript(config), " return ").concat(mapScript_1), Object.assign(bindObj_1, { __render: Object.freeze(__assign({ element: it, target: bindObj_1, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }, config === null || config === void 0 ? void 0 : config.eventVariables)) }));
712
682
  }
713
683
  getValue(setValue);
714
684
  // 여기서 value가 먼저냐 value-link가 먼저냐 선을 정해야되는거네...
@@ -716,36 +686,15 @@ var EventManager = /** @class */ (function () {
716
686
  else if (getValue) {
717
687
  var setValue = getValue;
718
688
  if (mapScript_1) {
719
- setValue = ScriptUtils.eval("".concat(_this.bindScript, " return ").concat(mapScript_1), Object.assign(bindObj_1, { __render: Object.freeze({ element: it, target: bindObj_1, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }) }));
689
+ setValue = ScriptUtils.eval("".concat(_this.getBindScript(config), " return ").concat(mapScript_1), Object.assign(bindObj_1, { __render: Object.freeze(__assign({ element: it, target: bindObj_1, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }, config === null || config === void 0 ? void 0 : config.eventVariables)) }));
720
690
  }
721
691
  it.value = setValue;
722
- // this.setValue(obj, varName, setValue)
723
692
  }
724
- // } else if (getValue) { // 이구분이 있어야되나?? 없어도될것같은데..
725
- // let setValue = getValue;
726
- // if (inMapScript) {
727
- // setValue = ScriptUtils.eval(`${this.bindScript} return ${inMapScript}`, Object.assign(bindObj, {__render: Object.freeze({element: it, target: bindObj, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config?.scripts, obj)})}));
728
- // }
729
- // this.setValue(obj, varName, setValue)
730
- // } else {
731
- // let setValue = it.value;
732
- // if (mapScript) {
733
- // setValue = ScriptUtils.eval(`${this.bindScript} return ${mapScript}`, Object.assign(bindObj, {__render: Object.freeze({element: it, target: bindObj, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config?.scripts, obj)})}));
734
- // }
735
- // this.setValue(obj, varName, setValue)
736
- // }
737
693
  it.addEventListener('input', function (event) {
738
694
  var value = it.value;
739
695
  if (mapScript_1) {
740
- value = ScriptUtils.eval("".concat(_this.bindScript, " return ").concat(mapScript_1), Object.assign(bindObj_1, {
741
- __render: Object.freeze({
742
- event: event,
743
- element: it,
744
- attribute: DomUtils.getAttributeToObject(it),
745
- target: event.target,
746
- range: Range.range,
747
- scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
748
- })
696
+ value = ScriptUtils.eval("".concat(_this.getBindScript(config), " return ").concat(mapScript_1), Object.assign(bindObj_1, {
697
+ __render: Object.freeze(__assign({ event: event, element: it, attribute: DomUtils.getAttributeToObject(it), target: event.target, range: Range.range, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }, config === null || config === void 0 ? void 0 : config.eventVariables))
749
698
  }));
750
699
  }
751
700
  if (typeof _this.getValue(obj, varName, bindObj_1) === 'function') {
@@ -764,11 +713,8 @@ var EventManager = /** @class */ (function () {
764
713
  script = 'return ' + script;
765
714
  }
766
715
  if (script) {
767
- ScriptUtils.eval("".concat(_this.bindScript, "; ").concat(script, " "), Object.assign(obj, {
768
- __render: Object.freeze({
769
- element: it,
770
- attribute: DomUtils.getAttributeToObject(it)
771
- })
716
+ ScriptUtils.eval("".concat(_this.getBindScript(config), "; ").concat(script, " "), Object.assign(obj, {
717
+ __render: Object.freeze(__assign({ element: it, attribute: DomUtils.getAttributeToObject(it) }, config === null || config === void 0 ? void 0 : config.eventVariables))
772
718
  }));
773
719
  // console.log('onInit--->', obj, varName, it)
774
720
  // if (typeof this.getValue(obj, varName) === 'function') {
@@ -790,6 +736,7 @@ var EventManager = /** @class */ (function () {
790
736
  EventManager.prototype.changeVar = function (obj, elements, varName, config) {
791
737
  var _this = this;
792
738
  // console.log('-changeVar-->', obj, elements, varName);
739
+ // forEach elements
793
740
  // value-link event
794
741
  this.procAttr(elements, EventManager.valueLinkAttrName, function (it, attribute) {
795
742
  var ownerVariablePathName = it.getAttribute(EventManager.ownerVariablePathAttrName);
@@ -803,14 +750,14 @@ var EventManager = /** @class */ (function () {
803
750
  if (typeof getValue === 'function' && getValue) {
804
751
  var setValue = it.value;
805
752
  if (mapScript) {
806
- setValue = ScriptUtils.eval("".concat(_this.bindScript, " return ").concat(mapScript), Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }) }));
753
+ setValue = ScriptUtils.eval("".concat(_this.getBindScript(config), " return ").concat(mapScript), Object.assign(bindObj, { __render: Object.freeze(__assign({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }, config === null || config === void 0 ? void 0 : config.eventVariables)) }));
807
754
  }
808
755
  getValue(setValue);
809
756
  }
810
757
  else { // if (getValue !== undefined && getValue !== null)
811
758
  var setValue = getValue;
812
759
  if (mapScript) {
813
- setValue = ScriptUtils.eval("".concat(_this.bindScript, " return ").concat(mapScript), Object.assign(bindObj, { __render: Object.freeze({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }) }));
760
+ setValue = ScriptUtils.eval("".concat(_this.getBindScript(config), " return ").concat(mapScript), Object.assign(bindObj, { __render: Object.freeze(__assign({ element: it, target: bindObj, range: Range.range, value: setValue, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }, config === null || config === void 0 ? void 0 : config.eventVariables)) }));
814
761
  }
815
762
  it.value = setValue;
816
763
  }
@@ -961,21 +908,13 @@ var EventManager = /** @class */ (function () {
961
908
  var filter = true;
962
909
  var filterScript = it.getAttribute("".concat(attr, ":filter"));
963
910
  var thisTarget = Object.assign(obj, {
964
- __render: Object.freeze({
965
- event: event,
966
- element: it,
967
- target: event.target,
968
- range: Range.range,
969
- attribute: DomUtils.getAttributeToObject(it),
970
- router: config === null || config === void 0 ? void 0 : config.router,
971
- scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
972
- })
911
+ __render: Object.freeze(__assign({ event: event, element: it, target: event.target, range: Range.range, attribute: DomUtils.getAttributeToObject(it), router: config === null || config === void 0 ? void 0 : config.router, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj) }, config === null || config === void 0 ? void 0 : config.eventVariables))
973
912
  });
974
913
  if (filterScript) {
975
- filter = ScriptUtils.eval("".concat(_this.bindScript, " return ").concat(filterScript), thisTarget);
914
+ filter = ScriptUtils.eval("".concat(_this.getBindScript(config), " return ").concat(filterScript), thisTarget);
976
915
  }
977
916
  if (filter) {
978
- ScriptUtils.eval("".concat(_this.bindScript, " ").concat(script, " "), thisTarget);
917
+ ScriptUtils.eval("".concat(_this.getBindScript(config), " ").concat(script, " "), thisTarget);
979
918
  }
980
919
  });
981
920
  });
@@ -998,16 +937,8 @@ var EventManager = /** @class */ (function () {
998
937
  });
999
938
  bind.split(',').forEach(function (eventName) {
1000
939
  it.addEventListener(eventName.trim(), function (event) {
1001
- ScriptUtils.eval("const $params = this.__render.params; ".concat(_this.bindScript, " ").concat(script_1, " "), Object.assign(obj, {
1002
- __render: Object.freeze({
1003
- event: event,
1004
- element: it,
1005
- attribute: DomUtils.getAttributeToObject(it),
1006
- target: event.target,
1007
- range: Range.range,
1008
- scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj),
1009
- params: params_1
1010
- })
940
+ ScriptUtils.eval("const $params = this.__render.params; ".concat(_this.getBindScript(config), " ").concat(script_1, " "), Object.assign(obj, {
941
+ __render: Object.freeze(__assign({ event: event, element: it, attribute: DomUtils.getAttributeToObject(it), target: event.target, range: Range.range, scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj), params: params_1 }, config === null || config === void 0 ? void 0 : config.eventVariables))
1011
942
  }));
1012
943
  });
1013
944
  });
@@ -1084,6 +1015,22 @@ var EventManager = /** @class */ (function () {
1084
1015
  return newScripts;
1085
1016
  }
1086
1017
  };
1018
+ EventManager.prototype.getBindScript = function (config) {
1019
+ var _this = this;
1020
+ if (config === null || config === void 0 ? void 0 : config.eventVariables) {
1021
+ var bindScript = Object.entries(config.eventVariables).filter(function (_a) {
1022
+ var key = _a[0]; _a[1];
1023
+ return !_this.bindScript.includes("const ".concat(key));
1024
+ }).map(function (_a) {
1025
+ var key = _a[0]; _a[1];
1026
+ return "const ".concat(key, " = this.__render.").concat(key, ";");
1027
+ }).join(';');
1028
+ return this.bindScript + '' + bindScript;
1029
+ }
1030
+ else {
1031
+ return this.bindScript;
1032
+ }
1033
+ };
1087
1034
  EventManager.ownerVariablePathAttrName = 'dr-owner-variable-path';
1088
1035
  EventManager.attrPrefix = 'dr-';
1089
1036
  EventManager.onInitAttrName = EventManager.attrPrefix + 'on-init';
@@ -1163,10 +1110,8 @@ var OperatorExecuter = /** @class */ (function () {
1163
1110
  var DrPre = /** @class */ (function (_super) {
1164
1111
  __extends(DrPre, _super);
1165
1112
  function DrPre(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1166
- var _this = this;
1167
1113
  source.operatorAround = undefined;
1168
- _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack) || this;
1169
- return _this;
1114
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack) || this;
1170
1115
  }
1171
1116
  DrPre.prototype.execute = function (value) {
1172
1117
  return __awaiter(this, void 0, void 0, function () {
@@ -1236,10 +1181,8 @@ var Dr = /** @class */ (function (_super) {
1236
1181
  var DrIf = /** @class */ (function (_super) {
1237
1182
  __extends(DrIf, _super);
1238
1183
  function DrIf(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1239
- var _this = this;
1240
1184
  source.operatorAround = undefined;
1241
- _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1242
- return _this;
1185
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1243
1186
  }
1244
1187
  DrIf.prototype.executeAttrRequire = function (attr) {
1245
1188
  var _a, _b, _c, _d;
@@ -1785,10 +1728,8 @@ var DrInnerHTML = /** @class */ (function (_super) {
1785
1728
  var DrFor = /** @class */ (function (_super) {
1786
1729
  __extends(DrFor, _super);
1787
1730
  function DrFor(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1788
- var _this = this;
1789
1731
  source.operatorAround = undefined;
1790
- _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1791
- return _this;
1732
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1792
1733
  }
1793
1734
  DrFor.prototype.executeAttrRequire = function (attr) {
1794
1735
  var _a, _b, _c, _d;
@@ -1820,10 +1761,8 @@ var DrFor = /** @class */ (function (_super) {
1820
1761
  var DrForOf = /** @class */ (function (_super) {
1821
1762
  __extends(DrForOf, _super);
1822
1763
  function DrForOf(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1823
- var _this = this;
1824
1764
  source.operatorAround = undefined;
1825
- _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1826
- return _this;
1765
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1827
1766
  }
1828
1767
  DrForOf.prototype.executeAttrRequire = function (attr) {
1829
1768
  var _a, _b, _c, _d;
@@ -1858,10 +1797,8 @@ var DrForOf = /** @class */ (function (_super) {
1858
1797
  var DrAppender = /** @class */ (function (_super) {
1859
1798
  __extends(DrAppender, _super);
1860
1799
  function DrAppender(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1861
- var _this = this;
1862
1800
  source.operatorAround = undefined;
1863
- _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1864
- return _this;
1801
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1865
1802
  }
1866
1803
  DrAppender.prototype.executeAttrRequire = function (attr) {
1867
1804
  var _a, _b, _c, _d;
@@ -1896,10 +1833,8 @@ var DrAppender = /** @class */ (function (_super) {
1896
1833
  var DrRepeat = /** @class */ (function (_super) {
1897
1834
  __extends(DrRepeat, _super);
1898
1835
  function DrRepeat(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1899
- var _this = this;
1900
1836
  source.operatorAround = undefined;
1901
- _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1902
- return _this;
1837
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1903
1838
  }
1904
1839
  DrRepeat.prototype.executeAttrRequire = function (attr) {
1905
1840
  var _a, _b, _c, _d;
@@ -1931,10 +1866,8 @@ var DrRepeat = /** @class */ (function (_super) {
1931
1866
  var DrTargetElement = /** @class */ (function (_super) {
1932
1867
  __extends(DrTargetElement, _super);
1933
1868
  function DrTargetElement(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1934
- var _this = this;
1935
1869
  source.operatorAround = undefined;
1936
- _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1937
- return _this;
1870
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1938
1871
  }
1939
1872
  DrTargetElement.prototype.execute = function () {
1940
1873
  var _a, _b, _c, _d;
@@ -1988,10 +1921,8 @@ var DrTargetElement = /** @class */ (function (_super) {
1988
1921
  var DrTargetAttr = /** @class */ (function (_super) {
1989
1922
  __extends(DrTargetAttr, _super);
1990
1923
  function DrTargetAttr(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1991
- var _this = this;
1992
1924
  source.operatorAround = undefined;
1993
- _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1994
- return _this;
1925
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1995
1926
  }
1996
1927
  DrTargetAttr.prototype.execute = function () {
1997
1928
  var _a, _b, _c, _d;
@@ -3035,9 +2966,9 @@ var DomRenderProxy = /** @class */ (function () {
3035
2966
  };
3036
2967
  DomRenderProxy.prototype.run = function (objProxy) {
3037
2968
  var _this = this;
3038
- var _a, _b;
2969
+ var _a;
3039
2970
  this._domRender_proxy = objProxy;
3040
- (_b = (_a = objProxy) === null || _a === void 0 ? void 0 : _a.onProxyDomRender) === null || _b === void 0 ? void 0 : _b.call(_a, this.config);
2971
+ (_a = objProxy === null || objProxy === void 0 ? void 0 : objProxy.onProxyDomRender) === null || _a === void 0 ? void 0 : _a.call(objProxy, this.config);
3041
2972
  var obj = objProxy._DomRender_origin;
3042
2973
  if (obj) {
3043
2974
  Object.keys(obj).forEach(function (it) {
@@ -3063,7 +2994,7 @@ var DomRenderProxy = /** @class */ (function () {
3063
2994
  };
3064
2995
  DomRenderProxy.prototype.initRender = function (target) {
3065
2996
  var _this = this;
3066
- var _a, _b, _c, _d, _f, _g, _h, _j;
2997
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
3067
2998
  var onCreate = (_b = (_a = target).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
3068
2999
  var createParam = [];
3069
3000
  if (onCreate) {
@@ -3073,6 +3004,7 @@ var DomRenderProxy = /** @class */ (function () {
3073
3004
  }
3074
3005
  }
3075
3006
  (_d = (_c = this._domRender_proxy) === null || _c === void 0 ? void 0 : _c.onCreateRender) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArray([_c], createParam, false));
3007
+ (_e = target.innerHTML) !== null && _e !== void 0 ? _e : '';
3076
3008
  this._targets.add(target);
3077
3009
  var rawSets = RawSet.checkPointCreates(target, this._domRender_proxy, this.config);
3078
3010
  // console.log('initRender -------rawSet', rawSets)
@@ -3226,29 +3158,31 @@ var DomRenderProxy = /** @class */ (function () {
3226
3158
  // array같은경우도 키값으로 접근하기때문에 특정 인덱스를 찾아서 그부분만 바꿔줄수 있다.
3227
3159
  var fullPathStr_1 = strings.map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('').slice(1);
3228
3160
  if (lastDoneExecute) {
3229
- var iterable = this._rawSets.get(fullPathStr_1);
3230
- // console.log('----->', iterable);
3161
+ var iterable_1 = this._rawSets.get(fullPathStr_1);
3231
3162
  // array check
3232
- var front = strings.slice(0, strings.length - 1).map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('');
3233
- var last = strings[strings.length - 1];
3234
- var data = ScriptUtils.evalReturn('this' + front, this._domRender_proxy);
3235
- if (last === 'length' && Array.isArray(data)) {
3236
- var aIterable = this._rawSets.get(front.slice(1));
3237
- if (aIterable) {
3238
- this.render(Array.from(aIterable));
3163
+ var front_1 = strings.slice(0, strings.length - 1).map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('');
3164
+ var last_1 = strings[strings.length - 1];
3165
+ var data_1 = ScriptUtils.evalReturn('this' + front_1, this._domRender_proxy);
3166
+ new Promise(function (resolve) {
3167
+ if (last_1 === 'length' && Array.isArray(data_1)) {
3168
+ var aIterable = _this._rawSets.get(front_1.slice(1));
3169
+ if (aIterable) {
3170
+ return _this.render(Array.from(aIterable));
3171
+ }
3239
3172
  }
3240
- }
3241
- else if (iterable) {
3242
- this.render(Array.from(iterable), fullPathStr_1);
3243
- }
3244
- this._targets.forEach(function (it) {
3245
- // console.log('target------->,', it)
3246
- // return;
3247
- if (it.nodeType === Node.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node.ELEMENT_NODE) {
3248
- var targets = eventManager.findAttrElements(it, _this.config);
3249
- // console.log('------>', targets);
3250
- eventManager.changeVar(_this._domRender_proxy, targets, "this.".concat(fullPathStr_1), _this.config);
3173
+ else if (iterable_1) {
3174
+ return _this.render(Array.from(iterable_1), fullPathStr_1);
3251
3175
  }
3176
+ }).then(function (it) {
3177
+ _this._targets.forEach(function (it) {
3178
+ // console.log('target------->,', it)
3179
+ // return;
3180
+ if (it.nodeType === Node.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node.ELEMENT_NODE) {
3181
+ var targets = eventManager.findAttrElements(it, _this.config);
3182
+ // console.log('------>', targets);
3183
+ eventManager.changeVar(_this._domRender_proxy, targets, "this.".concat(fullPathStr_1), _this.config);
3184
+ }
3185
+ });
3252
3186
  });
3253
3187
  }
3254
3188
  fullPaths.push(fullPathStr_1);
@@ -3256,7 +3190,7 @@ var DomRenderProxy = /** @class */ (function () {
3256
3190
  return fullPaths;
3257
3191
  };
3258
3192
  DomRenderProxy.prototype.set = function (target, p, value, receiver) {
3259
- var _a, _b, _c;
3193
+ var _a, _b;
3260
3194
  if (typeof p === 'string' && p !== '__domrender_components' && excludeGetSetPropertys.includes(p)) {
3261
3195
  target[p] = value;
3262
3196
  return true;
@@ -3277,12 +3211,12 @@ var DomRenderProxy = /** @class */ (function () {
3277
3211
  }
3278
3212
  // console.log('full path:', fullPath);
3279
3213
  if (('onBeforeReturnSet' in receiver) && typeof p === 'string' && !((_a = this.config.proxyExcludeOnBeforeReturnSets) !== null && _a !== void 0 ? _a : []).concat(excludeGetSetPropertys).includes(p)) {
3280
- (_c = (_b = receiver) === null || _b === void 0 ? void 0 : _b.onBeforeReturnSet) === null || _c === void 0 ? void 0 : _c.call(_b, p, value, fullPath);
3214
+ (_b = receiver === null || receiver === void 0 ? void 0 : receiver.onBeforeReturnSet) === null || _b === void 0 ? void 0 : _b.call(receiver, p, value, fullPath);
3281
3215
  }
3282
3216
  return true;
3283
3217
  };
3284
3218
  DomRenderProxy.prototype.get = function (target, p, receiver) {
3285
- var _a, _b, _c;
3219
+ var _a, _b;
3286
3220
  // console.log('get-->', target, p, receiver);
3287
3221
  if (p === '_DomRender_origin') {
3288
3222
  return this._domRender_origin;
@@ -3313,7 +3247,7 @@ var DomRenderProxy = /** @class */ (function () {
3313
3247
  it_2 = it_2._DomRender_origin;
3314
3248
  }
3315
3249
  if (('onBeforeReturnGet' in receiver) && typeof p === 'string' && !((_a = this.config.proxyExcludeOnBeforeReturnGets) !== null && _a !== void 0 ? _a : []).concat(excludeGetSetPropertys).includes(p)) {
3316
- (_c = (_b = receiver) === null || _b === void 0 ? void 0 : _b.onBeforeReturnGet) === null || _c === void 0 ? void 0 : _c.call(_b, p, it_2, this.root([p], it_2, false));
3250
+ (_b = receiver === null || receiver === void 0 ? void 0 : receiver.onBeforeReturnGet) === null || _b === void 0 ? void 0 : _b.call(receiver, p, it_2, this.root([p], it_2, false));
3317
3251
  }
3318
3252
  return it_2;
3319
3253
  }
@@ -3899,21 +3833,6 @@ var DomRender = /** @class */ (function () {
3899
3833
  return DomRender;
3900
3834
  }());
3901
3835
 
3902
- var RenderManager = /** @class */ (function () {
3903
- function RenderManager() {
3904
- }
3905
- RenderManager.render = function (obj, target) {
3906
- if (target === void 0) { target = Object.keys(obj); }
3907
- var domRenderProxy = obj._DomRender_proxy;
3908
- if (domRenderProxy) {
3909
- target.forEach(function (it) {
3910
- domRenderProxy.root([it], obj[it]);
3911
- });
3912
- }
3913
- };
3914
- return RenderManager;
3915
- }());
3916
-
3917
3836
  var Appender = /** @class */ (function () {
3918
3837
  function Appender(defaultDatas) {
3919
3838
  this.length = 0;
@@ -3967,6 +3886,21 @@ var Appender = /** @class */ (function () {
3967
3886
  return Appender;
3968
3887
  }());
3969
3888
 
3889
+ var RenderManager = /** @class */ (function () {
3890
+ function RenderManager() {
3891
+ }
3892
+ RenderManager.render = function (obj, target) {
3893
+ if (target === void 0) { target = Object.keys(obj); }
3894
+ var domRenderProxy = obj._DomRender_proxy;
3895
+ if (domRenderProxy) {
3896
+ target.forEach(function (it) {
3897
+ domRenderProxy.root([it], obj[it]);
3898
+ });
3899
+ }
3900
+ };
3901
+ return RenderManager;
3902
+ }());
3903
+
3970
3904
  var AllCheckedValidatorArray = /** @class */ (function (_super) {
3971
3905
  __extends(AllCheckedValidatorArray, _super);
3972
3906
  function AllCheckedValidatorArray(value, target, event, autoValid) {
@@ -4021,36 +3955,6 @@ var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
4021
3955
  return CountEqualsCheckedValidatorArray;
4022
3956
  }(ValidatorArray));
4023
3957
 
4024
- var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
4025
- __extends(CountGreaterThanCheckedValidatorArray, _super);
4026
- function CountGreaterThanCheckedValidatorArray(count, value, target, event, autoValid) {
4027
- if (autoValid === void 0) { autoValid = true; }
4028
- var _this = _super.call(this, value, target, event, autoValid) || this;
4029
- _this.count = count;
4030
- return _this;
4031
- }
4032
- CountGreaterThanCheckedValidatorArray.prototype.valid = function () {
4033
- var _a;
4034
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > this.count;
4035
- };
4036
- return CountGreaterThanCheckedValidatorArray;
4037
- }(ValidatorArray));
4038
-
4039
- var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
4040
- __extends(CountEqualsUnCheckedValidatorArray, _super);
4041
- function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
4042
- if (autoValid === void 0) { autoValid = true; }
4043
- var _this = _super.call(this, value, target, event, autoValid) || this;
4044
- _this.count = count;
4045
- return _this;
4046
- }
4047
- CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
4048
- var _a;
4049
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
4050
- };
4051
- return CountEqualsUnCheckedValidatorArray;
4052
- }(ValidatorArray));
4053
-
4054
3958
  var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
4055
3959
  __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
4056
3960
  function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
@@ -4081,21 +3985,6 @@ var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_su
4081
3985
  return CountGreaterThanEqualsUnCheckedValidatorArray;
4082
3986
  }(ValidatorArray));
4083
3987
 
4084
- var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
4085
- __extends(CountLessThanCheckedValidatorArray, _super);
4086
- function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
4087
- if (autoValid === void 0) { autoValid = true; }
4088
- var _this = _super.call(this, value, target, event, autoValid) || this;
4089
- _this.count = count;
4090
- return _this;
4091
- }
4092
- CountLessThanCheckedValidatorArray.prototype.valid = function () {
4093
- var _a;
4094
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length < this.count;
4095
- };
4096
- return CountLessThanCheckedValidatorArray;
4097
- }(ValidatorArray));
4098
-
4099
3988
  var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
4100
3989
  __extends(CountGreaterThanUnCheckedValidatorArray, _super);
4101
3990
  function CountGreaterThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
@@ -4111,19 +4000,19 @@ var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
4111
4000
  return CountGreaterThanUnCheckedValidatorArray;
4112
4001
  }(ValidatorArray));
4113
4002
 
4114
- var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
4115
- __extends(CountLessThanEqualsCheckedValidatorArray, _super);
4116
- function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
4003
+ var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
4004
+ __extends(CountLessThanCheckedValidatorArray, _super);
4005
+ function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
4117
4006
  if (autoValid === void 0) { autoValid = true; }
4118
4007
  var _this = _super.call(this, value, target, event, autoValid) || this;
4119
4008
  _this.count = count;
4120
4009
  return _this;
4121
4010
  }
4122
- CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
4011
+ CountLessThanCheckedValidatorArray.prototype.valid = function () {
4123
4012
  var _a;
4124
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
4013
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length < this.count;
4125
4014
  };
4126
- return CountLessThanEqualsCheckedValidatorArray;
4015
+ return CountLessThanCheckedValidatorArray;
4127
4016
  }(ValidatorArray));
4128
4017
 
4129
4018
  var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
@@ -4156,37 +4045,20 @@ var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
4156
4045
  return CountUnCheckedValidatorArray;
4157
4046
  }(ValidatorArray));
4158
4047
 
4159
- var EmptyValidator = /** @class */ (function (_super) {
4160
- __extends(EmptyValidator, _super);
4161
- function EmptyValidator(value, target, event, autoValid) {
4162
- if (autoValid === void 0) { autoValid = true; }
4163
- return _super.call(this, value, target, event, autoValid) || this;
4164
- }
4165
- EmptyValidator.prototype.valid = function () {
4166
- var _a, _b;
4167
- var value = this.value;
4168
- return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
4169
- };
4170
- return EmptyValidator;
4171
- }(Validator));
4172
-
4173
- var FormValidator = /** @class */ (function (_super) {
4174
- __extends(FormValidator, _super);
4175
- function FormValidator(target, event, autoValid) {
4048
+ var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
4049
+ __extends(CountGreaterThanCheckedValidatorArray, _super);
4050
+ function CountGreaterThanCheckedValidatorArray(count, value, target, event, autoValid) {
4176
4051
  if (autoValid === void 0) { autoValid = true; }
4177
- return _super.call(this, undefined, target, event, autoValid) || this;
4052
+ var _this = _super.call(this, value, target, event, autoValid) || this;
4053
+ _this.count = count;
4054
+ return _this;
4178
4055
  }
4179
- FormValidator.prototype.validAction = function () {
4180
- return _super.prototype.childValidAction.call(this);
4181
- };
4182
- FormValidator.prototype.valid = function () {
4183
- return this.childValid();
4184
- };
4185
- FormValidator.prototype.reset = function () {
4186
- this.targetReset();
4056
+ CountGreaterThanCheckedValidatorArray.prototype.valid = function () {
4057
+ var _a;
4058
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > this.count;
4187
4059
  };
4188
- return FormValidator;
4189
- }(Validator));
4060
+ return CountGreaterThanCheckedValidatorArray;
4061
+ }(ValidatorArray));
4190
4062
 
4191
4063
  var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
4192
4064
  __extends(ExcludeCheckedValidatorArray, _super);
@@ -4210,48 +4082,36 @@ var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
4210
4082
  return ExcludeCheckedValidatorArray;
4211
4083
  }(ValidatorArray));
4212
4084
 
4213
- var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
4214
- __extends(CountLessThanUnCheckedValidatorArray, _super);
4215
- function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
4085
+ var EmptyValidator = /** @class */ (function (_super) {
4086
+ __extends(EmptyValidator, _super);
4087
+ function EmptyValidator(value, target, event, autoValid) {
4216
4088
  if (autoValid === void 0) { autoValid = true; }
4217
- var _this = _super.call(this, value, target, event, autoValid) || this;
4218
- _this.count = count;
4219
- return _this;
4089
+ return _super.call(this, value, target, event, autoValid) || this;
4220
4090
  }
4221
- CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
4091
+ EmptyValidator.prototype.valid = function () {
4222
4092
  var _a;
4223
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
4093
+ var value = this.value;
4094
+ return value === undefined || value === null || ((_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0) <= 0;
4224
4095
  };
4225
- return CountLessThanUnCheckedValidatorArray;
4226
- }(ValidatorArray));
4096
+ return EmptyValidator;
4097
+ }(Validator));
4227
4098
 
4228
- var MultipleValidator = /** @class */ (function (_super) {
4229
- __extends(MultipleValidator, _super);
4230
- function MultipleValidator(validators, value, target, event, autoValid) {
4099
+ var FormValidator = /** @class */ (function (_super) {
4100
+ __extends(FormValidator, _super);
4101
+ function FormValidator(target, event, autoValid) {
4231
4102
  if (autoValid === void 0) { autoValid = true; }
4232
- var _this = _super.call(this, value, target, event, autoValid) || this;
4233
- _this.validators = validators.map(function (it) {
4234
- it.setAutoValid(false);
4235
- it.setAutoValidAction(false);
4236
- return it;
4237
- });
4238
- _this.validators.forEach(function (it) {
4239
- it.set(_this.value, _this.getTarget(), _this.getEvent());
4240
- });
4241
- return _this;
4103
+ return _super.call(this, undefined, target, event, autoValid) || this;
4242
4104
  }
4243
- MultipleValidator.prototype.changeValue = function (value) {
4244
- var _this = this;
4245
- this.validators.forEach(function (it) { return it.set(_this.value, _this.getTarget(), _this.getEvent()); });
4105
+ FormValidator.prototype.validAction = function () {
4106
+ return _super.prototype.childValidAction.call(this);
4246
4107
  };
4247
- MultipleValidator.prototype.validAction = function () {
4248
- return !(this.validators.filter(function (it) { return !it.validAction(); }).length > 0);
4108
+ FormValidator.prototype.valid = function () {
4109
+ return this.childValid();
4249
4110
  };
4250
- MultipleValidator.prototype.valid = function () {
4251
- // console.log('mm', this.validators)
4252
- return !(this.validators.filter(function (it) { return !it.valid(); }).length > 0);
4111
+ FormValidator.prototype.reset = function () {
4112
+ this.targetReset();
4253
4113
  };
4254
- return MultipleValidator;
4114
+ return FormValidator;
4255
4115
  }(Validator));
4256
4116
 
4257
4117
  var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
@@ -4276,20 +4136,20 @@ var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
4276
4136
  return IncludeCheckedValidatorArray;
4277
4137
  }(ValidatorArray));
4278
4138
 
4279
- var NotEmptyValidator = /** @class */ (function (_super) {
4280
- __extends(NotEmptyValidator, _super);
4281
- function NotEmptyValidator(value, target, event, autoValid) {
4139
+ var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
4140
+ __extends(CountEqualsUnCheckedValidatorArray, _super);
4141
+ function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
4282
4142
  if (autoValid === void 0) { autoValid = true; }
4283
- return _super.call(this, value, target, event, autoValid) || this;
4143
+ var _this = _super.call(this, value, target, event, autoValid) || this;
4144
+ _this.count = count;
4145
+ return _this;
4284
4146
  }
4285
- NotEmptyValidator.prototype.valid = function () {
4286
- var _a, _b;
4287
- var value = this.value;
4288
- // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
4289
- return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
4147
+ CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
4148
+ var _a;
4149
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
4290
4150
  };
4291
- return NotEmptyValidator;
4292
- }(Validator));
4151
+ return CountEqualsUnCheckedValidatorArray;
4152
+ }(ValidatorArray));
4293
4153
 
4294
4154
  var NotRegExpTestValidator = /** @class */ (function (_super) {
4295
4155
  __extends(NotRegExpTestValidator, _super);
@@ -4313,16 +4173,19 @@ var NotRegExpTestValidator = /** @class */ (function (_super) {
4313
4173
  return NotRegExpTestValidator;
4314
4174
  }(Validator));
4315
4175
 
4316
- var PassValidator = /** @class */ (function (_super) {
4317
- __extends(PassValidator, _super);
4318
- function PassValidator(value, target, event, autoValid) {
4176
+ var NotEmptyValidator = /** @class */ (function (_super) {
4177
+ __extends(NotEmptyValidator, _super);
4178
+ function NotEmptyValidator(value, target, event, autoValid) {
4319
4179
  if (autoValid === void 0) { autoValid = true; }
4320
4180
  return _super.call(this, value, target, event, autoValid) || this;
4321
4181
  }
4322
- PassValidator.prototype.valid = function () {
4323
- return true;
4182
+ NotEmptyValidator.prototype.valid = function () {
4183
+ var _a;
4184
+ var value = this.value;
4185
+ // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
4186
+ return value !== undefined && value !== null && ((_a = value === null || value === void 0 ? void 0 : value.length) !== null && _a !== void 0 ? _a : 0) > 0;
4324
4187
  };
4325
- return PassValidator;
4188
+ return NotEmptyValidator;
4326
4189
  }(Validator));
4327
4190
 
4328
4191
  var RegExpTestValidator = /** @class */ (function (_super) {
@@ -4348,18 +4211,61 @@ var RegExpTestValidator = /** @class */ (function (_super) {
4348
4211
  return RegExpTestValidator;
4349
4212
  }(Validator));
4350
4213
 
4351
- var RequiredValidator = /** @class */ (function (_super) {
4352
- __extends(RequiredValidator, _super);
4353
- function RequiredValidator(value, target, event, autoValid) {
4214
+ var UnCheckedValidator = /** @class */ (function (_super) {
4215
+ __extends(UnCheckedValidator, _super);
4216
+ function UnCheckedValidator(value, target, event, autoValid) {
4354
4217
  if (autoValid === void 0) { autoValid = true; }
4355
4218
  return _super.call(this, value, target, event, autoValid) || this;
4356
4219
  }
4357
- RequiredValidator.prototype.valid = function () {
4358
- var value = this.value;
4359
- // console.log('required', value, value !== undefined && value !== null)
4360
- return value !== undefined && value !== null;
4220
+ UnCheckedValidator.prototype.valid = function () {
4221
+ var _a, _b;
4222
+ return !((_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false);
4361
4223
  };
4362
- return RequiredValidator;
4224
+ return UnCheckedValidator;
4225
+ }(Validator));
4226
+
4227
+ var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
4228
+ __extends(CountLessThanEqualsCheckedValidatorArray, _super);
4229
+ function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
4230
+ if (autoValid === void 0) { autoValid = true; }
4231
+ var _this = _super.call(this, value, target, event, autoValid) || this;
4232
+ _this.count = count;
4233
+ return _this;
4234
+ }
4235
+ CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
4236
+ var _a;
4237
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
4238
+ };
4239
+ return CountLessThanEqualsCheckedValidatorArray;
4240
+ }(ValidatorArray));
4241
+
4242
+ var MultipleValidator = /** @class */ (function (_super) {
4243
+ __extends(MultipleValidator, _super);
4244
+ function MultipleValidator(validators, value, target, event, autoValid) {
4245
+ if (autoValid === void 0) { autoValid = true; }
4246
+ var _this = _super.call(this, value, target, event, autoValid) || this;
4247
+ _this.validators = validators.map(function (it) {
4248
+ it.setAutoValid(false);
4249
+ it.setAutoValidAction(false);
4250
+ return it;
4251
+ });
4252
+ _this.validators.forEach(function (it) {
4253
+ it.set(_this.value, _this.getTarget(), _this.getEvent());
4254
+ });
4255
+ return _this;
4256
+ }
4257
+ MultipleValidator.prototype.changeValue = function (value) {
4258
+ var _this = this;
4259
+ this.validators.forEach(function (it) { return it.set(_this.value, _this.getTarget(), _this.getEvent()); });
4260
+ };
4261
+ MultipleValidator.prototype.validAction = function () {
4262
+ return !(this.validators.filter(function (it) { return !it.validAction(); }).length > 0);
4263
+ };
4264
+ MultipleValidator.prototype.valid = function () {
4265
+ // console.log('mm', this.validators)
4266
+ return !(this.validators.filter(function (it) { return !it.valid(); }).length > 0);
4267
+ };
4268
+ return MultipleValidator;
4363
4269
  }(Validator));
4364
4270
 
4365
4271
  var ValidMultipleValidator = /** @class */ (function (_super) {
@@ -4377,19 +4283,6 @@ var ValidMultipleValidator = /** @class */ (function (_super) {
4377
4283
  return ValidMultipleValidator;
4378
4284
  }(MultipleValidator));
4379
4285
 
4380
- var UnCheckedValidator = /** @class */ (function (_super) {
4381
- __extends(UnCheckedValidator, _super);
4382
- function UnCheckedValidator(value, target, event, autoValid) {
4383
- if (autoValid === void 0) { autoValid = true; }
4384
- return _super.call(this, value, target, event, autoValid) || this;
4385
- }
4386
- UnCheckedValidator.prototype.valid = function () {
4387
- var _a, _b;
4388
- return !((_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false);
4389
- };
4390
- return UnCheckedValidator;
4391
- }(Validator));
4392
-
4393
4286
  var ValidValidator = /** @class */ (function (_super) {
4394
4287
  __extends(ValidValidator, _super);
4395
4288
  function ValidValidator(validCallBack, value, target, event, autoValid) {
@@ -4418,6 +4311,20 @@ var ValidValidatorArray = /** @class */ (function (_super) {
4418
4311
  return ValidValidatorArray;
4419
4312
  }(ValidatorArray));
4420
4313
 
4314
+ var ValueNotEqualsValidator = /** @class */ (function (_super) {
4315
+ __extends(ValueNotEqualsValidator, _super);
4316
+ function ValueNotEqualsValidator(equalsValue, value, target, event, autoValid) {
4317
+ if (autoValid === void 0) { autoValid = true; }
4318
+ var _this = _super.call(this, value, target, event, autoValid) || this;
4319
+ _this.equalsValue = equalsValue;
4320
+ return _this;
4321
+ }
4322
+ ValueNotEqualsValidator.prototype.valid = function () {
4323
+ return this.value !== this.equalsValue;
4324
+ };
4325
+ return ValueNotEqualsValidator;
4326
+ }(Validator));
4327
+
4421
4328
  var ValueEqualsValidator = /** @class */ (function (_super) {
4422
4329
  __extends(ValueEqualsValidator, _super);
4423
4330
  function ValueEqualsValidator(equalsValue, value, target, event, autoValid) {
@@ -4432,41 +4339,46 @@ var ValueEqualsValidator = /** @class */ (function (_super) {
4432
4339
  return ValueEqualsValidator;
4433
4340
  }(Validator));
4434
4341
 
4435
- var ValueNotEqualsValidator = /** @class */ (function (_super) {
4436
- __extends(ValueNotEqualsValidator, _super);
4437
- function ValueNotEqualsValidator(equalsValue, value, target, event, autoValid) {
4342
+ var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
4343
+ __extends(CountLessThanUnCheckedValidatorArray, _super);
4344
+ function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
4438
4345
  if (autoValid === void 0) { autoValid = true; }
4439
4346
  var _this = _super.call(this, value, target, event, autoValid) || this;
4440
- _this.equalsValue = equalsValue;
4347
+ _this.count = count;
4441
4348
  return _this;
4442
4349
  }
4443
- ValueNotEqualsValidator.prototype.valid = function () {
4444
- return this.value !== this.equalsValue;
4350
+ CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
4351
+ var _a;
4352
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
4445
4353
  };
4446
- return ValueNotEqualsValidator;
4447
- }(Validator));
4354
+ return CountLessThanUnCheckedValidatorArray;
4355
+ }(ValidatorArray));
4448
4356
 
4449
- var ClipBoardUtils = /** @class */ (function () {
4450
- function ClipBoardUtils() {
4357
+ var RequiredValidator = /** @class */ (function (_super) {
4358
+ __extends(RequiredValidator, _super);
4359
+ function RequiredValidator(value, target, event, autoValid) {
4360
+ if (autoValid === void 0) { autoValid = true; }
4361
+ return _super.call(this, value, target, event, autoValid) || this;
4451
4362
  }
4452
- ClipBoardUtils.readText = function (clipboard) {
4453
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
4454
- return clipboard.readText();
4455
- };
4456
- ClipBoardUtils.read = function (clipboard) {
4457
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
4458
- return clipboard.read();
4459
- };
4460
- ClipBoardUtils.writeText = function (data, clipboard) {
4461
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
4462
- return clipboard.writeText(data);
4363
+ RequiredValidator.prototype.valid = function () {
4364
+ var value = this.value;
4365
+ // console.log('required', value, value !== undefined && value !== null)
4366
+ return value !== undefined && value !== null;
4463
4367
  };
4464
- ClipBoardUtils.write = function (data, clipboard) {
4465
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
4466
- return clipboard.write(data);
4368
+ return RequiredValidator;
4369
+ }(Validator));
4370
+
4371
+ var PassValidator = /** @class */ (function (_super) {
4372
+ __extends(PassValidator, _super);
4373
+ function PassValidator(value, target, event, autoValid) {
4374
+ if (autoValid === void 0) { autoValid = true; }
4375
+ return _super.call(this, value, target, event, autoValid) || this;
4376
+ }
4377
+ PassValidator.prototype.valid = function () {
4378
+ return true;
4467
4379
  };
4468
- return ClipBoardUtils;
4469
- }());
4380
+ return PassValidator;
4381
+ }(Validator));
4470
4382
 
4471
4383
  var NodeUtils = /** @class */ (function () {
4472
4384
  function NodeUtils() {
@@ -4537,6 +4449,28 @@ var StorageUtils = /** @class */ (function () {
4537
4449
  return StorageUtils;
4538
4450
  }());
4539
4451
 
4452
+ var ClipBoardUtils = /** @class */ (function () {
4453
+ function ClipBoardUtils() {
4454
+ }
4455
+ ClipBoardUtils.readText = function (clipboard) {
4456
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
4457
+ return clipboard.readText();
4458
+ };
4459
+ ClipBoardUtils.read = function (clipboard) {
4460
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
4461
+ return clipboard.read();
4462
+ };
4463
+ ClipBoardUtils.writeText = function (data, clipboard) {
4464
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
4465
+ return clipboard.writeText(data);
4466
+ };
4467
+ ClipBoardUtils.write = function (data, clipboard) {
4468
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
4469
+ return clipboard.write(data);
4470
+ };
4471
+ return ClipBoardUtils;
4472
+ }());
4473
+
4540
4474
  exports.AllCheckedValidatorArray = AllCheckedValidatorArray;
4541
4475
  exports.AllUnCheckedValidatorArray = AllUnCheckedValidatorArray;
4542
4476
  exports.Appender = Appender;