dom-render 1.0.85 → 1.0.88

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 (48) hide show
  1. package/DomRender.d.ts +6 -6
  2. package/DomRender.js +11 -6
  3. package/DomRenderProxy.d.ts +3 -3
  4. package/DomRenderProxy.js +3 -2
  5. package/README.MD +46 -16
  6. package/configs/Config.d.ts +26 -0
  7. package/{Config.js → configs/Config.js} +0 -0
  8. package/configs/TargetAttr.d.ts +6 -0
  9. package/configs/TargetAttr.js +2 -0
  10. package/configs/TargetElement.d.ts +14 -0
  11. package/configs/TargetElement.js +2 -0
  12. package/dist/bundle.js +275 -255
  13. package/events/EventManager.d.ts +1 -1
  14. package/lifecycle/OnDestroyRender.d.ts +1 -1
  15. package/lifecycle/OnInitRender.d.ts +2 -1
  16. package/lifecycle/OnProxyDomRender.d.ts +1 -1
  17. package/messenger/Messenger.d.ts +1 -1
  18. package/operators/Dr.js +1 -1
  19. package/operators/DrAppender.js +1 -1
  20. package/operators/DrFor.js +1 -1
  21. package/operators/DrForOf.js +1 -1
  22. package/operators/DrForm.js +1 -1
  23. package/operators/DrIf.js +1 -1
  24. package/operators/DrInnerHTML.js +1 -1
  25. package/operators/DrInnerText.js +1 -1
  26. package/operators/DrRepeat.js +1 -1
  27. package/operators/DrTargetAttr.js +1 -1
  28. package/operators/DrTargetElement.js +2 -2
  29. package/operators/DrThis.js +5 -2
  30. package/operators/OperatorRender.d.ts +6 -2
  31. package/package.json +6 -2
  32. package/rawsets/AttrInitCallBack.d.ts +5 -0
  33. package/rawsets/AttrInitCallBack.js +2 -0
  34. package/rawsets/Attrs.d.ts +21 -0
  35. package/rawsets/Attrs.js +2 -0
  36. package/rawsets/CreatorMetaData.d.ts +18 -0
  37. package/rawsets/CreatorMetaData.js +2 -0
  38. package/rawsets/DestroyOptionType.d.ts +4 -0
  39. package/rawsets/DestroyOptionType.js +8 -0
  40. package/rawsets/ElementInitCallBack.d.ts +8 -0
  41. package/rawsets/ElementInitCallBack.js +2 -0
  42. package/{RawSet.d.ts → rawsets/RawSet.d.ts} +18 -73
  43. package/{RawSet.js → rawsets/RawSet.js} +108 -109
  44. package/rawsets/RawSetType.d.ts +7 -0
  45. package/rawsets/RawSetType.js +11 -0
  46. package/rawsets/Render.d.ts +17 -0
  47. package/rawsets/Render.js +2 -0
  48. package/Config.d.ts +0 -38
package/dist/bundle.js CHANGED
@@ -1094,6 +1094,8 @@ var DrThis = /** @class */ (function (_super) {
1094
1094
  var _b, _c, _d, _e, _f;
1095
1095
  if (this.elementSource.attrs.drThis) {
1096
1096
  var r = ScriptUtils.evalReturn(this.elementSource.attrs.drThis, this.source.obj);
1097
+ // const isStrip = ScriptUtils.eval(`if (${this.elementSource.attrs.drStripOption ?? 'false'}) { return true; } else { return false; }`, this.source.obj);
1098
+ // console.log('isStrip', isStrip)
1097
1099
  if (r) {
1098
1100
  if (r instanceof ComponentSet) {
1099
1101
  if (this.rawSet.data) {
@@ -1101,7 +1103,8 @@ var DrThis = /** @class */ (function (_super) {
1101
1103
  RawSet.destroy(this.rawSet.data.obj, [], this.source.config, destroyOptions);
1102
1104
  }
1103
1105
  this.rawSet.data = r;
1104
- this.returnContainer.fag.append(RawSet.drThisCreate(this.rawSet, this.elementSource.element, "".concat(this.elementSource.attrs.drThis, ".obj"), (_d = this.elementSource.attrs.drVarOption) !== null && _d !== void 0 ? _d : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config, r));
1106
+ var componentBody = RawSet.drThisCreate(this.rawSet, this.elementSource.element, "".concat(this.elementSource.attrs.drThis, ".obj"), (_d = this.elementSource.attrs.drVarOption) !== null && _d !== void 0 ? _d : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config, r);
1107
+ this.returnContainer.fag.append(componentBody);
1105
1108
  this.afterCallBack.onThisComponentSetCallBacks.push(r);
1106
1109
  }
1107
1110
  else {
@@ -1705,7 +1708,7 @@ var DrTargetElement = /** @class */ (function (_super) {
1705
1708
  var _b, _c, _d, _e;
1706
1709
  var targetElement = (_c = (_b = this.source.config) === null || _b === void 0 ? void 0 : _b.targetElements) === null || _c === void 0 ? void 0 : _c.find(function (it) { return it.name.toLowerCase() === _this.elementSource.element.tagName.toLowerCase(); });
1707
1710
  if (targetElement) {
1708
- var documentFragment = targetElement.callBack(this.elementSource.element, this.source.obj, this.rawSet, this.elementSource.attrs);
1711
+ var documentFragment = targetElement.callBack(this.elementSource.element, this.source.obj, this.rawSet, this.elementSource.attrs, this.source.config);
1709
1712
  if (documentFragment) {
1710
1713
  // const targetAttrMap = this.elementSource.element.getAttribute(EventManager.normalAttrMapAttrName);
1711
1714
  var detectAction_1 = this.elementSource.element.getAttribute(RawSet.DR_DETECT_NAME);
@@ -1805,6 +1808,7 @@ exports.DestroyOptionType = void 0;
1805
1808
  DestroyOptionType["NO_DESTROY"] = "NO_DESTROY";
1806
1809
  DestroyOptionType["NO_MESSENGER_DESTROY"] = "NO_MESSENGER_DESTROY";
1807
1810
  })(exports.DestroyOptionType || (exports.DestroyOptionType = {}));
1811
+
1808
1812
  exports.RawSetType = void 0;
1809
1813
  (function (RawSetType) {
1810
1814
  RawSetType["TEXT"] = "TEXT";
@@ -1813,6 +1817,7 @@ exports.RawSetType = void 0;
1813
1817
  RawSetType["TARGET_ATTR"] = "TARGET_ATTR";
1814
1818
  RawSetType["UNKOWN"] = "UNKOWN";
1815
1819
  })(exports.RawSetType || (exports.RawSetType = {}));
1820
+
1816
1821
  var RawSet = /** @class */ (function () {
1817
1822
  function RawSet(uuid, type, point, fragment, detect, data) {
1818
1823
  this.uuid = uuid;
@@ -1985,28 +1990,18 @@ var RawSet = /** @class */ (function () {
1985
1990
  drAttrs.forEach(function (it) {
1986
1991
  if (it.drCompleteOption) {
1987
1992
  // genNode.childNodes
1988
- ScriptUtils.eval("\n const ".concat(EventManager.FAG_VARNAME, " = this.__render.fag;\n const ").concat(EventManager.SCRIPTS_VARNAME, " = this.__render.scripts;\n const ").concat(EventManager.RAWSET_VARNAME, " = this.__render.rawset;\n ").concat(it.drCompleteOption, "\n "), Object.assign(obj, {
1989
- __render: Object.freeze({
1990
- rawset: _this,
1991
- fag: genNode,
1992
- scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
1993
- })
1994
- }));
1995
- }
1996
- });
1997
- // 중요 style isolation 나중에 :scope로 대체 가능할듯.
1998
- Array.from(window.document.styleSheets).filter(function (it) { return it.ownerNode && it.ownerNode instanceof Element && it.ownerNode.getAttribute('id') && !it.ownerNode.getAttribute('completed'); }).forEach(function (it) {
1999
- var _a;
2000
- var styleElement = it.ownerNode;
2001
- var id = (_a = styleElement.getAttribute('id')) === null || _a === void 0 ? void 0 : _a.split('-')[0];
2002
- if (id) {
2003
- // console.log('------->', id)
2004
- Array.from(it.cssRules).forEach(function (it) {
2005
- _this.generateCSS(id, it);
1993
+ var render = Object.freeze({
1994
+ rawset: _this,
1995
+ fag: genNode,
1996
+ scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
2006
1997
  });
1998
+ ScriptUtils.eval("\n const ".concat(EventManager.FAG_VARNAME, " = this.__render.fag;\n const ").concat(EventManager.SCRIPTS_VARNAME, " = this.__render.scripts;\n const ").concat(EventManager.RAWSET_VARNAME, " = this.__render.rawset;\n ").concat(it.drCompleteOption), Object.assign(obj, { __render: render }));
2007
1999
  }
2008
- it.ownerNode.setAttribute('completed', 'true');
2009
2000
  });
2001
+ // 중요 style isolation 나중에 :scope로 대체 가능할듯.
2002
+ RawSet.generateStyleSheetsLocal();
2003
+ // console.log('-22222-')
2004
+ // alert(1);
2010
2005
  for (var _p = 0, onThisComponentSetCallBacks_1 = onThisComponentSetCallBacks; _p < onThisComponentSetCallBacks_1.length; _p++) {
2011
2006
  var it_1 = onThisComponentSetCallBacks_1[_p];
2012
2007
  (_c = (_b = it_1.obj).onInitRender) === null || _c === void 0 ? void 0 : _c.call(_b);
@@ -2039,7 +2034,23 @@ var RawSet = /** @class */ (function () {
2039
2034
  }
2040
2035
  return raws;
2041
2036
  };
2042
- RawSet.prototype.generateCSS = function (id, cssRule) {
2037
+ RawSet.generateStyleSheetsLocal = function () {
2038
+ Array.from(window.document.styleSheets).filter(function (it) { return it.ownerNode && it.ownerNode instanceof Element && it.ownerNode.hasAttribute('domstyle') && it.ownerNode.getAttribute('id') && !it.ownerNode.getAttribute('completed'); }).forEach(function (it) {
2039
+ var _a;
2040
+ var styleElement = it.ownerNode;
2041
+ var split = (_a = styleElement.getAttribute('id')) === null || _a === void 0 ? void 0 : _a.split('-');
2042
+ split === null || split === void 0 ? void 0 : split.pop();
2043
+ var id = split === null || split === void 0 ? void 0 : split.join('-');
2044
+ if (id) {
2045
+ // console.log('------->', id)
2046
+ Array.from(it.cssRules).forEach(function (it) {
2047
+ RawSet.generateCSS(id, it);
2048
+ });
2049
+ }
2050
+ it.ownerNode.setAttribute('completed', 'true');
2051
+ });
2052
+ };
2053
+ RawSet.generateCSS = function (id, cssRule) {
2043
2054
  var _this = this;
2044
2055
  var start = "#".concat(id, "-start");
2045
2056
  var end = "#".concat(id, "-end");
@@ -2072,6 +2083,17 @@ var RawSet = /** @class */ (function () {
2072
2083
  });
2073
2084
  }
2074
2085
  };
2086
+ // 중요 스타일 적용 부분
2087
+ RawSet.generateStyleTransform = function (styleBody, id, styleTagWrap) {
2088
+ if (styleTagWrap === void 0) { styleTagWrap = true; }
2089
+ if (Array.isArray(styleBody)) {
2090
+ styleBody = styleBody.join('\n');
2091
+ }
2092
+ if (styleTagWrap) {
2093
+ styleBody = "<style id='".concat(id, "-style' domstyle>").concat(styleBody, "</style>");
2094
+ }
2095
+ return styleBody;
2096
+ };
2075
2097
  RawSet.prototype.applyEvent = function (obj, fragment, config) {
2076
2098
  if (fragment === void 0) { fragment = this.fragment; }
2077
2099
  eventManager.applyEvent(obj, eventManager.findAttrElements(fragment, config), config);
@@ -2179,30 +2201,25 @@ var RawSet = /** @class */ (function () {
2179
2201
  // start.setAttribute('id', `${it.uuid}-start`);
2180
2202
  // const end = config.window.document.createElement('meta');
2181
2203
  // end.setAttribute('id', `${it.uuid}-end`);
2182
- var start = void 0;
2183
- var end = void 0;
2184
2204
  var type = void 0;
2185
2205
  if (currentNode.parentNode && currentNode.parentNode.nodeName.toUpperCase() === 'STYLE') {
2186
2206
  type = exports.RawSetType.STYLE_TEXT;
2187
- start = config.window.document.createTextNode("/*start text ".concat(it_4.uuid, "*/"));
2188
- end = config.window.document.createTextNode("/*end text ".concat(it_4.uuid, "*/"));
2189
2207
  }
2190
2208
  else {
2191
2209
  type = exports.RawSetType.TEXT;
2192
- start = config.window.document.createComment("start text ".concat(it_4.uuid));
2193
- end = config.window.document.createComment("end text ".concat(it_4.uuid));
2194
2210
  }
2211
+ var startEndPoint = RawSet.createStartEndPoint(it_4.uuid, type, config);
2195
2212
  // layout setting
2196
2213
  template.content.append(document.createTextNode(preparedText)); // 앞 부분 넣고
2197
- template.content.append(start); // add start checkpoint
2198
- template.content.append(end); // add end checkpoint
2214
+ template.content.append(startEndPoint.start); // add start checkpoint
2215
+ template.content.append(startEndPoint.end); // add end checkpoint
2199
2216
  // content 안쪽 RawSet render 할때 start 와 end 사이에 fragment 연산해서 들어간다.
2200
2217
  var fragment = config.window.document.createDocumentFragment();
2201
2218
  fragment.append(config.window.document.createTextNode(it_4.content));
2202
2219
  pars.push(new RawSet(it_4.uuid, type, {
2203
- start: start,
2220
+ start: startEndPoint.start,
2204
2221
  node: currentNode,
2205
- end: end,
2222
+ end: startEndPoint.end,
2206
2223
  parent: currentNode.parentNode,
2207
2224
  thisVariableName: thisVariableName
2208
2225
  }, fragment));
@@ -2215,21 +2232,18 @@ var RawSet = /** @class */ (function () {
2215
2232
  var uuid = RandomUtils.getRandomString(40);
2216
2233
  var element_3 = currentNode;
2217
2234
  var fragment = config.window.document.createDocumentFragment();
2218
- var start = config.window.document.createElement('meta');
2219
- var end = config.window.document.createElement('meta');
2220
- start.setAttribute('id', "".concat(uuid, "-start"));
2221
- end.setAttribute('id', "".concat(uuid, "-end"));
2222
2235
  var type = exports.RawSetType.TARGET_ELEMENT;
2236
+ var startEndPoint = RawSet.createStartEndPoint(uuid, type, config);
2223
2237
  var isElement = ((_d = (_c = config.targetElements) === null || _c === void 0 ? void 0 : _c.map(function (it) { return it.name.toLowerCase(); })) !== null && _d !== void 0 ? _d : []).includes(element_3.tagName.toLowerCase());
2224
2238
  var targetAttrNames_2 = ((_f = (_e = config.targetAttrs) === null || _e === void 0 ? void 0 : _e.map(function (it) { return it.name; })) !== null && _f !== void 0 ? _f : []).concat(RawSet.DR_ATTRIBUTES);
2225
2239
  var isAttr = element_3.getAttributeNames().filter(function (it) { return targetAttrNames_2.includes(it.toLowerCase()); }).length > 0;
2226
- (_g = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _g === void 0 ? void 0 : _g.insertBefore(start, currentNode);
2227
- (_h = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _h === void 0 ? void 0 : _h.insertBefore(end, currentNode.nextSibling);
2240
+ (_g = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _g === void 0 ? void 0 : _g.insertBefore(startEndPoint.start, currentNode);
2241
+ (_h = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _h === void 0 ? void 0 : _h.insertBefore(startEndPoint.end, currentNode.nextSibling);
2228
2242
  fragment.append(currentNode);
2229
2243
  pars.push(new RawSet(uuid, isElement ? type : (isAttr ? exports.RawSetType.TARGET_ATTR : exports.RawSetType.UNKOWN), {
2230
- start: start,
2244
+ start: startEndPoint.start,
2231
2245
  node: currentNode,
2232
- end: end,
2246
+ end: startEndPoint.end,
2233
2247
  parent: currentNode.parentNode,
2234
2248
  thisVariableName: thisVariableName
2235
2249
  }, fragment));
@@ -2242,6 +2256,30 @@ var RawSet = /** @class */ (function () {
2242
2256
  // console.log('check-->', pars)
2243
2257
  return pars;
2244
2258
  };
2259
+ RawSet.createStartEndPoint = function (id, type, config) {
2260
+ if (type === exports.RawSetType.TARGET_ELEMENT) {
2261
+ var start = config.window.document.createElement('meta');
2262
+ var end = config.window.document.createElement('meta');
2263
+ start.setAttribute('id', "".concat(id, "-start"));
2264
+ end.setAttribute('id', "".concat(id, "-end"));
2265
+ return {
2266
+ start: start,
2267
+ end: end
2268
+ };
2269
+ }
2270
+ else if (type === exports.RawSetType.STYLE_TEXT) {
2271
+ return {
2272
+ start: config.window.document.createTextNode("/*start text ".concat(id, "*/")),
2273
+ end: config.window.document.createTextNode("/*end text ".concat(id, "*/"))
2274
+ };
2275
+ }
2276
+ else { // text
2277
+ return {
2278
+ start: config.window.document.createComment("start text ".concat(id)),
2279
+ end: config.window.document.createComment("end text ".concat(id))
2280
+ };
2281
+ }
2282
+ };
2245
2283
  RawSet.prototype.childAllRemove = function () {
2246
2284
  var next = this.point.start.nextSibling;
2247
2285
  while (next) {
@@ -2364,7 +2402,7 @@ var RawSet = /** @class */ (function () {
2364
2402
  // console.log('--------',n, n.innerHTML)
2365
2403
  if (set) {
2366
2404
  // const id = RandomUtils.getRandomString(20);
2367
- var style = RawSet.styleTransformLocal((_a = set.styles) !== null && _a !== void 0 ? _a : [], rawSet.uuid, true);
2405
+ var style = RawSet.generateStyleTransform((_a = set.styles) !== null && _a !== void 0 ? _a : [], rawSet.uuid, true);
2368
2406
  n.innerHTML = style + ((_b = set.template) !== null && _b !== void 0 ? _b : '');
2369
2407
  // const metaStart = RawSet.metaStart(id);
2370
2408
  // const metaEnd = RawSet.metaEnd(id);
@@ -2427,14 +2465,14 @@ var RawSet = /** @class */ (function () {
2427
2465
  };
2428
2466
  return targetAttribute;
2429
2467
  };
2430
- RawSet.createComponentTargetElement = function (name, objFactory, template, styles, config) {
2468
+ RawSet.createComponentTargetElement = function (name, objFactory, template, styles) {
2431
2469
  if (template === void 0) { template = ''; }
2432
2470
  if (styles === void 0) { styles = []; }
2433
2471
  var targetElement = {
2434
2472
  name: name,
2435
2473
  styles: styles,
2436
2474
  template: template,
2437
- callBack: function (element, obj, rawSet, attrs) {
2475
+ callBack: function (element, obj, rawSet, attrs, config) {
2438
2476
  var _a, _b, _c, _d, _e, _f;
2439
2477
  // console.log('callback------->', element)
2440
2478
  if (!obj.__domrender_components) {
@@ -2476,6 +2514,8 @@ var RawSet = /** @class */ (function () {
2476
2514
  i.componentKey = componentKey;
2477
2515
  i.rawSet = rawSet;
2478
2516
  i.attribute = attribute;
2517
+ i.router = config.router;
2518
+ i.scripts = render.scripts;
2479
2519
  i.drAttrs = attrs;
2480
2520
  i.innerHTML = element.innerHTML;
2481
2521
  i.rootCreator = new Proxy(obj, new DomRenderFinalProxy());
@@ -2525,7 +2565,7 @@ var RawSet = /** @class */ (function () {
2525
2565
  __render: render
2526
2566
  }));
2527
2567
  }
2528
- var style = RawSet.styleTransformLocal(styles, componentKey, true);
2568
+ var style = RawSet.generateStyleTransform(styles, componentKey, true);
2529
2569
  element.innerHTML = style + (applayTemplate !== null && applayTemplate !== void 0 ? applayTemplate : '');
2530
2570
  // const metaStart = RawSet.metaStart(componentKey);
2531
2571
  // const metaEnd = RawSet.metaEnd(componentKey);
@@ -2555,31 +2595,6 @@ var RawSet = /** @class */ (function () {
2555
2595
  var reg = /(?:[$#]\{(?:(([$#]\{)??[^$#]?[^{]*?)\}[$#]))/g;
2556
2596
  return StringUtils.regexExec(reg, data !== null && data !== void 0 ? data : '');
2557
2597
  };
2558
- // 중요 스타일 적용 부분
2559
- RawSet.styleTransformLocal = function (styleBody, id, styleTagWrap) {
2560
- if (styleTagWrap === void 0) { styleTagWrap = true; }
2561
- // <style id="first">
2562
- // #first ~ *:not(#first ~ style[domstyle] ~ *) {
2563
- // font-size: 30px;
2564
- // color: blue;
2565
- // }
2566
- // </style>
2567
- if (Array.isArray(styleBody)) {
2568
- styleBody = styleBody.join('\n');
2569
- }
2570
- // if (locale) {
2571
- // styleBody = styleBody.replace(/([^}]+){/gm, function (a, b) {
2572
- // if (typeof b === 'string') {
2573
- // b = b.trim();
2574
- // }
2575
- // return `#${id} ~ ${b}:not(#${id} ~ style[domstyle] ~ *), #${id} ~ * ${b} {`;
2576
- // });
2577
- // }
2578
- if (styleTagWrap) {
2579
- styleBody = "<style id='".concat(id, "-style' domstyle>").concat(styleBody, "</style>");
2580
- }
2581
- return styleBody;
2582
- };
2583
2598
  // public static metaStart(id: string) {
2584
2599
  // return `<meta id='${id}-start' />`;
2585
2600
  // }
@@ -3436,7 +3451,7 @@ var DefaultMessenger = /** @class */ (function (_super) {
3436
3451
  var DomRender = /** @class */ (function () {
3437
3452
  function DomRender() {
3438
3453
  }
3439
- DomRender.run = function (obj, target, config) {
3454
+ DomRender.run = function (obj, target, oConfig) {
3440
3455
  var _a, _b, _c;
3441
3456
  var robj = obj;
3442
3457
  if ('_DomRender_isProxy' in obj) {
@@ -3446,9 +3461,13 @@ var DomRender = /** @class */ (function () {
3446
3461
  robj = obj;
3447
3462
  return robj;
3448
3463
  }
3464
+ var config = oConfig;
3449
3465
  if (!config) {
3450
3466
  config = { window: window };
3451
3467
  }
3468
+ if (config && !config.window) {
3469
+ config.window = window;
3470
+ }
3452
3471
  config.routerType = config.routerType || 'none';
3453
3472
  config.messenger = DomRenderFinalProxy.final((_a = config.messenger) !== null && _a !== void 0 ? _a : new DefaultMessenger(config));
3454
3473
  var domRender = new DomRenderProxy(obj, target, config);
@@ -3463,12 +3482,13 @@ var DomRender = /** @class */ (function () {
3463
3482
  domRender.run(robj);
3464
3483
  return robj;
3465
3484
  };
3466
- DomRender.createComponent = function (param, config) {
3485
+ DomRender.createComponent = function (param) {
3467
3486
  var _a, _b;
3468
- var component = RawSet.createComponentTargetElement((_a = param.tagName) !== null && _a !== void 0 ? _a : param.type.name, function (e, o, r2, counstructorParam) {
3487
+ // console.log('===>', typeof param.type, param.type.name, param.type.constructor.name)
3488
+ var component = RawSet.createComponentTargetElement((_a = param.tagName) !== null && _a !== void 0 ? _a : (typeof param.type === 'function' ? param.type.name : param.type.constructor.name), function (e, o, r2, counstructorParam) {
3469
3489
  var _a;
3470
- return new ((_a = param.type).bind.apply(_a, __spreadArray([void 0], counstructorParam, false)))();
3471
- }, (_b = param.template) !== null && _b !== void 0 ? _b : '', Array.isArray(param.styles) ? param.styles : (param.styles ? [param.styles] : undefined), config);
3490
+ return typeof param.type === 'function' ? new ((_a = param.type).bind.apply(_a, __spreadArray([void 0], counstructorParam, false)))() : param.type;
3491
+ }, (_b = param.template) !== null && _b !== void 0 ? _b : '', Array.isArray(param.styles) ? param.styles : (param.styles ? [param.styles] : undefined));
3472
3492
  return component;
3473
3493
  };
3474
3494
  DomRender.createAttribute = function (attrName, getThisObj, factory) {
@@ -3478,6 +3498,21 @@ var DomRender = /** @class */ (function () {
3478
3498
  return DomRender;
3479
3499
  }());
3480
3500
 
3501
+ var RenderManager = /** @class */ (function () {
3502
+ function RenderManager() {
3503
+ }
3504
+ RenderManager.render = function (obj, target) {
3505
+ if (target === void 0) { target = Object.keys(obj); }
3506
+ var domRenderProxy = obj._DomRender_proxy;
3507
+ if (domRenderProxy) {
3508
+ target.forEach(function (it) {
3509
+ domRenderProxy.root([it], obj[it]);
3510
+ });
3511
+ }
3512
+ };
3513
+ return RenderManager;
3514
+ }());
3515
+
3481
3516
  var Appender = /** @class */ (function () {
3482
3517
  function Appender(defaultDatas) {
3483
3518
  this.length = 0;
@@ -3531,34 +3566,6 @@ var Appender = /** @class */ (function () {
3531
3566
  return Appender;
3532
3567
  }());
3533
3568
 
3534
- var AllCheckedValidatorArray = /** @class */ (function (_super) {
3535
- __extends(AllCheckedValidatorArray, _super);
3536
- function AllCheckedValidatorArray(value, target, event, autoValid) {
3537
- if (autoValid === void 0) { autoValid = true; }
3538
- return _super.call(this, value, target, event, autoValid) || this;
3539
- }
3540
- AllCheckedValidatorArray.prototype.valid = function () {
3541
- var _a;
3542
- return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > 0);
3543
- };
3544
- return AllCheckedValidatorArray;
3545
- }(ValidatorArray));
3546
-
3547
- var RenderManager = /** @class */ (function () {
3548
- function RenderManager() {
3549
- }
3550
- RenderManager.render = function (obj, target) {
3551
- if (target === void 0) { target = Object.keys(obj); }
3552
- var domRenderProxy = obj._DomRender_proxy;
3553
- if (domRenderProxy) {
3554
- target.forEach(function (it) {
3555
- domRenderProxy.root([it], obj[it]);
3556
- });
3557
- }
3558
- };
3559
- return RenderManager;
3560
- }());
3561
-
3562
3569
  var CheckedValidator = /** @class */ (function (_super) {
3563
3570
  __extends(CheckedValidator, _super);
3564
3571
  function CheckedValidator(value, target, event, autoValid) {
@@ -3572,17 +3579,19 @@ var CheckedValidator = /** @class */ (function (_super) {
3572
3579
  return CheckedValidator;
3573
3580
  }(Validator));
3574
3581
 
3575
- var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
3576
- __extends(AllUnCheckedValidatorArray, _super);
3577
- function AllUnCheckedValidatorArray(value, target, event, autoValid) {
3582
+ var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3583
+ __extends(CountEqualsUnCheckedValidatorArray, _super);
3584
+ function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3578
3585
  if (autoValid === void 0) { autoValid = true; }
3579
- return _super.call(this, value, target, event, autoValid) || this;
3586
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3587
+ _this.count = count;
3588
+ return _this;
3580
3589
  }
3581
- AllUnCheckedValidatorArray.prototype.valid = function () {
3590
+ CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3582
3591
  var _a;
3583
- return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
3592
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3584
3593
  };
3585
- return AllUnCheckedValidatorArray;
3594
+ return CountEqualsUnCheckedValidatorArray;
3586
3595
  }(ValidatorArray));
3587
3596
 
3588
3597
  var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3600,94 +3609,90 @@ var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3600
3609
  return CountGreaterThanCheckedValidatorArray;
3601
3610
  }(ValidatorArray));
3602
3611
 
3603
- var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3604
- __extends(CountGreaterThanEqualsUnCheckedValidatorArray, _super);
3605
- function CountGreaterThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3612
+ var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
3613
+ __extends(AllUnCheckedValidatorArray, _super);
3614
+ function AllUnCheckedValidatorArray(value, target, event, autoValid) {
3606
3615
  if (autoValid === void 0) { autoValid = true; }
3607
- var _this = _super.call(this, value, target, event, autoValid) || this;
3608
- _this.count = count;
3609
- return _this;
3616
+ return _super.call(this, value, target, event, autoValid) || this;
3610
3617
  }
3611
- CountGreaterThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3618
+ AllUnCheckedValidatorArray.prototype.valid = function () {
3612
3619
  var _a;
3613
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3620
+ return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
3614
3621
  };
3615
- return CountGreaterThanEqualsUnCheckedValidatorArray;
3622
+ return AllUnCheckedValidatorArray;
3616
3623
  }(ValidatorArray));
3617
3624
 
3618
- var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3619
- __extends(CountEqualsUnCheckedValidatorArray, _super);
3620
- function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3625
+ var AllCheckedValidatorArray = /** @class */ (function (_super) {
3626
+ __extends(AllCheckedValidatorArray, _super);
3627
+ function AllCheckedValidatorArray(value, target, event, autoValid) {
3621
3628
  if (autoValid === void 0) { autoValid = true; }
3622
- var _this = _super.call(this, value, target, event, autoValid) || this;
3623
- _this.count = count;
3624
- return _this;
3629
+ return _super.call(this, value, target, event, autoValid) || this;
3625
3630
  }
3626
- CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3631
+ AllCheckedValidatorArray.prototype.valid = function () {
3627
3632
  var _a;
3628
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3633
+ return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > 0);
3629
3634
  };
3630
- return CountEqualsUnCheckedValidatorArray;
3635
+ return AllCheckedValidatorArray;
3631
3636
  }(ValidatorArray));
3632
3637
 
3633
- var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3634
- __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3635
- function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3638
+ var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3639
+ __extends(CountEqualsCheckedValidatorArray, _super);
3640
+ function CountEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3636
3641
  if (autoValid === void 0) { autoValid = true; }
3637
3642
  var _this = _super.call(this, value, target, event, autoValid) || this;
3638
3643
  _this.count = count;
3639
3644
  return _this;
3640
3645
  }
3641
- CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3646
+ CountEqualsCheckedValidatorArray.prototype.valid = function () {
3642
3647
  var _a;
3643
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3648
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length === this.count;
3644
3649
  };
3645
- return CountGreaterThanEqualsCheckedValidatorArray;
3650
+ return CountEqualsCheckedValidatorArray;
3646
3651
  }(ValidatorArray));
3647
3652
 
3648
- var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3649
- __extends(CountGreaterThanUnCheckedValidatorArray, _super);
3650
- function CountGreaterThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3653
+ var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3654
+ __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3655
+ function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3651
3656
  if (autoValid === void 0) { autoValid = true; }
3652
3657
  var _this = _super.call(this, value, target, event, autoValid) || this;
3653
3658
  _this.count = count;
3654
3659
  return _this;
3655
3660
  }
3656
- CountGreaterThanUnCheckedValidatorArray.prototype.valid = function () {
3661
+ CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3657
3662
  var _a;
3658
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > this.count;
3663
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3659
3664
  };
3660
- return CountGreaterThanUnCheckedValidatorArray;
3665
+ return CountGreaterThanEqualsCheckedValidatorArray;
3661
3666
  }(ValidatorArray));
3662
3667
 
3663
- var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3664
- __extends(CountEqualsCheckedValidatorArray, _super);
3665
- function CountEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3668
+ var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3669
+ __extends(CountGreaterThanEqualsUnCheckedValidatorArray, _super);
3670
+ function CountGreaterThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3666
3671
  if (autoValid === void 0) { autoValid = true; }
3667
3672
  var _this = _super.call(this, value, target, event, autoValid) || this;
3668
3673
  _this.count = count;
3669
3674
  return _this;
3670
3675
  }
3671
- CountEqualsCheckedValidatorArray.prototype.valid = function () {
3676
+ CountGreaterThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3672
3677
  var _a;
3673
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length === this.count;
3678
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3674
3679
  };
3675
- return CountEqualsCheckedValidatorArray;
3680
+ return CountGreaterThanEqualsUnCheckedValidatorArray;
3676
3681
  }(ValidatorArray));
3677
3682
 
3678
- var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3679
- __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
3680
- function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3683
+ var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3684
+ __extends(CountGreaterThanUnCheckedValidatorArray, _super);
3685
+ function CountGreaterThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3681
3686
  if (autoValid === void 0) { autoValid = true; }
3682
3687
  var _this = _super.call(this, value, target, event, autoValid) || this;
3683
3688
  _this.count = count;
3684
3689
  return _this;
3685
3690
  }
3686
- CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3691
+ CountGreaterThanUnCheckedValidatorArray.prototype.valid = function () {
3687
3692
  var _a;
3688
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length <= this.count;
3693
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > this.count;
3689
3694
  };
3690
- return CountLessThanEqualsUnCheckedValidatorArray;
3695
+ return CountGreaterThanUnCheckedValidatorArray;
3691
3696
  }(ValidatorArray));
3692
3697
 
3693
3698
  var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3720,6 +3725,35 @@ var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
3720
3725
  return CountLessThanCheckedValidatorArray;
3721
3726
  }(ValidatorArray));
3722
3727
 
3728
+ var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3729
+ __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
3730
+ function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3731
+ if (autoValid === void 0) { autoValid = true; }
3732
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3733
+ _this.count = count;
3734
+ return _this;
3735
+ }
3736
+ CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3737
+ var _a;
3738
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length <= this.count;
3739
+ };
3740
+ return CountLessThanEqualsUnCheckedValidatorArray;
3741
+ }(ValidatorArray));
3742
+
3743
+ var EmptyValidator = /** @class */ (function (_super) {
3744
+ __extends(EmptyValidator, _super);
3745
+ function EmptyValidator(value, target, event, autoValid) {
3746
+ if (autoValid === void 0) { autoValid = true; }
3747
+ return _super.call(this, value, target, event, autoValid) || this;
3748
+ }
3749
+ EmptyValidator.prototype.valid = function () {
3750
+ var _a, _b;
3751
+ var value = this.value;
3752
+ return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
3753
+ };
3754
+ return EmptyValidator;
3755
+ }(Validator));
3756
+
3723
3757
  var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3724
3758
  __extends(CountUnCheckedValidatorArray, _super);
3725
3759
  function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
@@ -3735,26 +3769,19 @@ var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3735
3769
  return CountUnCheckedValidatorArray;
3736
3770
  }(ValidatorArray));
3737
3771
 
3738
- var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3739
- __extends(ExcludeCheckedValidatorArray, _super);
3740
- function ExcludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3741
- if (allRequired === void 0) { allRequired = false; }
3772
+ var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3773
+ __extends(CountLessThanUnCheckedValidatorArray, _super);
3774
+ function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3742
3775
  if (autoValid === void 0) { autoValid = true; }
3743
3776
  var _this = _super.call(this, value, target, event, autoValid) || this;
3744
- _this.include = include;
3745
- _this.allRequired = allRequired;
3777
+ _this.count = count;
3746
3778
  return _this;
3747
3779
  }
3748
- ExcludeCheckedValidatorArray.prototype.valid = function () {
3749
- var _this = this;
3780
+ CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
3750
3781
  var _a;
3751
- var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3752
- var unCheckedValue = valus.filter(function (it) { return !it.checked; }).map(function (it) { return it.value; });
3753
- return unCheckedValue.length > 0 &&
3754
- (!(unCheckedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3755
- (this.allRequired ? unCheckedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3782
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
3756
3783
  };
3757
- return ExcludeCheckedValidatorArray;
3784
+ return CountLessThanUnCheckedValidatorArray;
3758
3785
  }(ValidatorArray));
3759
3786
 
3760
3787
  var FormValidator = /** @class */ (function (_super) {
@@ -3826,40 +3853,41 @@ var MultipleValidator = /** @class */ (function (_super) {
3826
3853
  return MultipleValidator;
3827
3854
  }(Validator));
3828
3855
 
3829
- var EmptyValidator = /** @class */ (function (_super) {
3830
- __extends(EmptyValidator, _super);
3831
- function EmptyValidator(value, target, event, autoValid) {
3856
+ var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3857
+ __extends(ExcludeCheckedValidatorArray, _super);
3858
+ function ExcludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3859
+ if (allRequired === void 0) { allRequired = false; }
3832
3860
  if (autoValid === void 0) { autoValid = true; }
3833
- return _super.call(this, value, target, event, autoValid) || this;
3861
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3862
+ _this.include = include;
3863
+ _this.allRequired = allRequired;
3864
+ return _this;
3834
3865
  }
3835
- EmptyValidator.prototype.valid = function () {
3836
- var _a, _b;
3837
- var value = this.value;
3838
- return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
3866
+ ExcludeCheckedValidatorArray.prototype.valid = function () {
3867
+ var _this = this;
3868
+ var _a;
3869
+ var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3870
+ var unCheckedValue = valus.filter(function (it) { return !it.checked; }).map(function (it) { return it.value; });
3871
+ return unCheckedValue.length > 0 &&
3872
+ (!(unCheckedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3873
+ (this.allRequired ? unCheckedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3839
3874
  };
3840
- return EmptyValidator;
3841
- }(Validator));
3875
+ return ExcludeCheckedValidatorArray;
3876
+ }(ValidatorArray));
3842
3877
 
3843
- var NotRegExpTestValidator = /** @class */ (function (_super) {
3844
- __extends(NotRegExpTestValidator, _super);
3845
- function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
3878
+ var NotEmptyValidator = /** @class */ (function (_super) {
3879
+ __extends(NotEmptyValidator, _super);
3880
+ function NotEmptyValidator(value, target, event, autoValid) {
3846
3881
  if (autoValid === void 0) { autoValid = true; }
3847
- var _this = _super.call(this, value, target, event, autoValid) || this;
3848
- _this.regexp = DomRenderProxy.final(regexp);
3849
- return _this;
3882
+ return _super.call(this, value, target, event, autoValid) || this;
3850
3883
  }
3851
- NotRegExpTestValidator.prototype.valid = function () {
3852
- var _a;
3884
+ NotEmptyValidator.prototype.valid = function () {
3885
+ var _a, _b;
3853
3886
  var value = this.value;
3854
- var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
3855
- if (value) {
3856
- return !regExp.test(value);
3857
- }
3858
- else {
3859
- return true;
3860
- }
3887
+ // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3888
+ return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3861
3889
  };
3862
- return NotRegExpTestValidator;
3890
+ return NotEmptyValidator;
3863
3891
  }(Validator));
3864
3892
 
3865
3893
  var PassValidator = /** @class */ (function (_super) {
@@ -3897,34 +3925,6 @@ var RegExpTestValidator = /** @class */ (function (_super) {
3897
3925
  return RegExpTestValidator;
3898
3926
  }(Validator));
3899
3927
 
3900
- var UnCheckedValidator = /** @class */ (function (_super) {
3901
- __extends(UnCheckedValidator, _super);
3902
- function UnCheckedValidator(value, target, event, autoValid) {
3903
- if (autoValid === void 0) { autoValid = true; }
3904
- return _super.call(this, value, target, event, autoValid) || this;
3905
- }
3906
- UnCheckedValidator.prototype.valid = function () {
3907
- var _a, _b;
3908
- return !((_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false);
3909
- };
3910
- return UnCheckedValidator;
3911
- }(Validator));
3912
-
3913
- var NotEmptyValidator = /** @class */ (function (_super) {
3914
- __extends(NotEmptyValidator, _super);
3915
- function NotEmptyValidator(value, target, event, autoValid) {
3916
- if (autoValid === void 0) { autoValid = true; }
3917
- return _super.call(this, value, target, event, autoValid) || this;
3918
- }
3919
- NotEmptyValidator.prototype.valid = function () {
3920
- var _a, _b;
3921
- var value = this.value;
3922
- // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3923
- return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3924
- };
3925
- return NotEmptyValidator;
3926
- }(Validator));
3927
-
3928
3928
  var ValidMultipleValidator = /** @class */ (function (_super) {
3929
3929
  __extends(ValidMultipleValidator, _super);
3930
3930
  function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
@@ -3940,35 +3940,6 @@ var ValidMultipleValidator = /** @class */ (function (_super) {
3940
3940
  return ValidMultipleValidator;
3941
3941
  }(MultipleValidator));
3942
3942
 
3943
- var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3944
- __extends(CountLessThanUnCheckedValidatorArray, _super);
3945
- function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3946
- if (autoValid === void 0) { autoValid = true; }
3947
- var _this = _super.call(this, value, target, event, autoValid) || this;
3948
- _this.count = count;
3949
- return _this;
3950
- }
3951
- CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
3952
- var _a;
3953
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
3954
- };
3955
- return CountLessThanUnCheckedValidatorArray;
3956
- }(ValidatorArray));
3957
-
3958
- var ValidValidator = /** @class */ (function (_super) {
3959
- __extends(ValidValidator, _super);
3960
- function ValidValidator(validCallBack, value, target, event, autoValid) {
3961
- if (autoValid === void 0) { autoValid = true; }
3962
- var _this = _super.call(this, value, target, event, autoValid) || this;
3963
- _this.validCallBack = validCallBack;
3964
- return _this;
3965
- }
3966
- ValidValidator.prototype.valid = function (value, target, event) {
3967
- return this.validCallBack(value, target, event);
3968
- };
3969
- return ValidValidator;
3970
- }(Validator));
3971
-
3972
3943
  var RequiredValidator = /** @class */ (function (_super) {
3973
3944
  __extends(RequiredValidator, _super);
3974
3945
  function RequiredValidator(value, target, event, autoValid) {
@@ -3983,6 +3954,19 @@ var RequiredValidator = /** @class */ (function (_super) {
3983
3954
  return RequiredValidator;
3984
3955
  }(Validator));
3985
3956
 
3957
+ var UnCheckedValidator = /** @class */ (function (_super) {
3958
+ __extends(UnCheckedValidator, _super);
3959
+ function UnCheckedValidator(value, target, event, autoValid) {
3960
+ if (autoValid === void 0) { autoValid = true; }
3961
+ return _super.call(this, value, target, event, autoValid) || this;
3962
+ }
3963
+ UnCheckedValidator.prototype.valid = function () {
3964
+ var _a, _b;
3965
+ return !((_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false);
3966
+ };
3967
+ return UnCheckedValidator;
3968
+ }(Validator));
3969
+
3986
3970
  var ValidValidatorArray = /** @class */ (function (_super) {
3987
3971
  __extends(ValidValidatorArray, _super);
3988
3972
  function ValidValidatorArray(validCallBack, value, target, event, autoValid) {
@@ -3997,18 +3981,40 @@ var ValidValidatorArray = /** @class */ (function (_super) {
3997
3981
  return ValidValidatorArray;
3998
3982
  }(ValidatorArray));
3999
3983
 
4000
- var ValueNotEqualsValidator = /** @class */ (function (_super) {
4001
- __extends(ValueNotEqualsValidator, _super);
4002
- function ValueNotEqualsValidator(equalsValue, value, target, event, autoValid) {
3984
+ var ValidValidator = /** @class */ (function (_super) {
3985
+ __extends(ValidValidator, _super);
3986
+ function ValidValidator(validCallBack, value, target, event, autoValid) {
4003
3987
  if (autoValid === void 0) { autoValid = true; }
4004
3988
  var _this = _super.call(this, value, target, event, autoValid) || this;
4005
- _this.equalsValue = equalsValue;
3989
+ _this.validCallBack = validCallBack;
4006
3990
  return _this;
4007
3991
  }
4008
- ValueNotEqualsValidator.prototype.valid = function () {
4009
- return this.value !== this.equalsValue;
3992
+ ValidValidator.prototype.valid = function (value, target, event) {
3993
+ return this.validCallBack(value, target, event);
4010
3994
  };
4011
- return ValueNotEqualsValidator;
3995
+ return ValidValidator;
3996
+ }(Validator));
3997
+
3998
+ var NotRegExpTestValidator = /** @class */ (function (_super) {
3999
+ __extends(NotRegExpTestValidator, _super);
4000
+ function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
4001
+ if (autoValid === void 0) { autoValid = true; }
4002
+ var _this = _super.call(this, value, target, event, autoValid) || this;
4003
+ _this.regexp = DomRenderProxy.final(regexp);
4004
+ return _this;
4005
+ }
4006
+ NotRegExpTestValidator.prototype.valid = function () {
4007
+ var _a;
4008
+ var value = this.value;
4009
+ var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
4010
+ if (value) {
4011
+ return !regExp.test(value);
4012
+ }
4013
+ else {
4014
+ return true;
4015
+ }
4016
+ };
4017
+ return NotRegExpTestValidator;
4012
4018
  }(Validator));
4013
4019
 
4014
4020
  var ValueEqualsValidator = /** @class */ (function (_super) {
@@ -4025,6 +4031,20 @@ var ValueEqualsValidator = /** @class */ (function (_super) {
4025
4031
  return ValueEqualsValidator;
4026
4032
  }(Validator));
4027
4033
 
4034
+ var ValueNotEqualsValidator = /** @class */ (function (_super) {
4035
+ __extends(ValueNotEqualsValidator, _super);
4036
+ function ValueNotEqualsValidator(equalsValue, value, target, event, autoValid) {
4037
+ if (autoValid === void 0) { autoValid = true; }
4038
+ var _this = _super.call(this, value, target, event, autoValid) || this;
4039
+ _this.equalsValue = equalsValue;
4040
+ return _this;
4041
+ }
4042
+ ValueNotEqualsValidator.prototype.valid = function () {
4043
+ return this.value !== this.equalsValue;
4044
+ };
4045
+ return ValueNotEqualsValidator;
4046
+ }(Validator));
4047
+
4028
4048
  var ClipBoardUtils = /** @class */ (function () {
4029
4049
  function ClipBoardUtils() {
4030
4050
  }