dom-render 1.0.76 → 1.0.79

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.
package/dist/bundle.js CHANGED
@@ -454,6 +454,7 @@ var EventManager = /** @class */ (function () {
454
454
  EventManager.valueAttrName,
455
455
  EventManager.valueLinkAttrName,
456
456
  EventManager.attrAttrName,
457
+ EventManager.normalAttrMapAttrName,
457
458
  EventManager.styleAttrName,
458
459
  EventManager.classAttrName,
459
460
  EventManager.attrPrefix + 'window-event-' + EventManager.WINDOW_EVENT_POPSTATE,
@@ -495,6 +496,7 @@ var EventManager = /** @class */ (function () {
495
496
  // (obj as any)._DomRender_isFinal = true;
496
497
  // return obj;
497
498
  // }
499
+ // 중요 이벤트에 대상이될 Elements를 찾는다.
498
500
  EventManager.prototype.findAttrElements = function (fragment, config) {
499
501
  var _a, _b;
500
502
  // const datas: {name: string, value: string | null, element: Element}[] = [];
@@ -507,6 +509,7 @@ var EventManager = /** @class */ (function () {
507
509
  });
508
510
  return elements;
509
511
  };
512
+ // 중요 처음 이벤트 처리
510
513
  // eslint-disable-next-line no-undef
511
514
  EventManager.prototype.applyEvent = function (obj, childNodes, config) {
512
515
  var _this = this;
@@ -532,6 +535,18 @@ var EventManager = /** @class */ (function () {
532
535
  }
533
536
  }
534
537
  });
538
+ // normal-attr-map
539
+ this.procAttr(childNodes, EventManager.normalAttrMapAttrName, function (it, attribute) {
540
+ var map = new Map(JSON.parse(attribute));
541
+ map.forEach(function (v, k) {
542
+ var data = ScriptUtils.eval("const $element = this.element; return ".concat(v, " "), Object.assign(obj, {
543
+ __render: Object.freeze({
544
+ element: it
545
+ })
546
+ }));
547
+ it.setAttribute(k, data);
548
+ });
549
+ });
535
550
  // window event
536
551
  EventManager.WINDOW_EVENTS.forEach(function (it) {
537
552
  _this.procAttr(childNodes, EventManager.attrPrefix + 'window-event-' + it, function (it, attribute) {
@@ -569,7 +584,7 @@ var EventManager = /** @class */ (function () {
569
584
  bindObj_1 = ScriptUtils.evalReturn(ownerVariablePathName, obj);
570
585
  }
571
586
  var getValue = _this.getValue(obj, varName, bindObj_1);
572
- // 아래 나중에 리팩토링 필요함
587
+ // TODO: 아래 나중에 리팩토링 필요함
573
588
  if (typeof getValue === 'function' && getValue) {
574
589
  var setValue = it.value;
575
590
  if (mapScript_1) {
@@ -665,7 +680,7 @@ var EventManager = /** @class */ (function () {
665
680
  if (script) {
666
681
  script = 'return ' + script;
667
682
  }
668
- if (_this.isUsingThisVar(script, varName) || varName === undefined) {
683
+ if (EventManager.isUsingThisVar(script, varName) || varName === undefined) {
669
684
  var data = ScriptUtils.eval("const $element = this.__render.element; ".concat(script, " "), Object.assign(obj, {
670
685
  __render: Object.freeze({
671
686
  element: it
@@ -716,7 +731,7 @@ var EventManager = /** @class */ (function () {
716
731
  if (script) {
717
732
  script = 'return ' + script;
718
733
  }
719
- if (_this.isUsingThisVar(script, varName) || varName === undefined) {
734
+ if (EventManager.isUsingThisVar(script, varName) || varName === undefined) {
720
735
  var data = ScriptUtils.eval("const $element = this.__render.element; ".concat(script, " "), Object.assign(obj, {
721
736
  __render: Object.freeze({
722
737
  element: it
@@ -744,7 +759,7 @@ var EventManager = /** @class */ (function () {
744
759
  if (script) {
745
760
  script = 'return ' + script;
746
761
  }
747
- if (_this.isUsingThisVar(script, varName) || varName === undefined) {
762
+ if (EventManager.isUsingThisVar(script, varName) || varName === undefined) {
748
763
  var data = ScriptUtils.eval("const $element = this.element; ".concat(script, " "), Object.assign(obj, {
749
764
  __render: Object.freeze({
750
765
  element: it
@@ -771,6 +786,23 @@ var EventManager = /** @class */ (function () {
771
786
  }
772
787
  }
773
788
  });
789
+ // 중요 변수값 바꼈을때 이벤트 타겟 찾는것 normal-attr-map
790
+ this.procAttr(elements, EventManager.normalAttrMapAttrName, function (it, attribute) {
791
+ var map = new Map(JSON.parse(attribute));
792
+ map.forEach(function (v, k) {
793
+ // console.log('--->', v, k)
794
+ var isUsing = EventManager.isUsingThisVar(v, varName);
795
+ // console.log('---isUsing--> varName:', varName, 'k:', k, 'v:', v, 'isUsing:', isUsing);
796
+ if (isUsing) {
797
+ var data = ScriptUtils.eval("const $element = this.element; return ".concat(v, " "), Object.assign(obj, {
798
+ __render: Object.freeze({
799
+ element: it
800
+ })
801
+ }));
802
+ it.setAttribute(k, data);
803
+ }
804
+ });
805
+ });
774
806
  };
775
807
  // eslint-disable-next-line no-undef
776
808
  EventManager.prototype.addDrEvents = function (obj, eventName, elements, config) {
@@ -802,6 +834,7 @@ var EventManager = /** @class */ (function () {
802
834
  });
803
835
  });
804
836
  };
837
+ // eslint-disable-next-line no-undef
805
838
  EventManager.prototype.addDrEventPram = function (obj, attr, elements, config) {
806
839
  var _this = this;
807
840
  this.procAttr(elements, attr, function (it, attribute, attributes) {
@@ -875,7 +908,7 @@ var EventManager = /** @class */ (function () {
875
908
  value: value
876
909
  });
877
910
  };
878
- EventManager.prototype.isUsingThisVar = function (raws, varName) {
911
+ EventManager.isUsingThisVar = function (raws, varName) {
879
912
  // console.log('isUsingV', raws)
880
913
  // console.log('isUsingV', raws, varName, ScriptUtils.getVariablePaths(raws ?? ''))
881
914
  if (varName && raws) {
@@ -911,6 +944,7 @@ var EventManager = /** @class */ (function () {
911
944
  EventManager.valueAttrName = EventManager.attrPrefix + 'value';
912
945
  EventManager.valueLinkAttrName = EventManager.attrPrefix + 'value-link';
913
946
  EventManager.attrAttrName = EventManager.attrPrefix + 'attr';
947
+ EventManager.normalAttrMapAttrName = EventManager.attrPrefix + 'normal-attr-map';
914
948
  EventManager.styleAttrName = EventManager.attrPrefix + 'style';
915
949
  EventManager.classAttrName = EventManager.attrPrefix + 'class';
916
950
  EventManager.VALUE_VARNAME = '$value';
@@ -1666,8 +1700,34 @@ var DrTargetElement = /** @class */ (function (_super) {
1666
1700
  if (targetElement) {
1667
1701
  var documentFragment = targetElement.callBack(this.elementSource.element, this.source.obj, this.rawSet, this.elementSource.attrs);
1668
1702
  if (documentFragment) {
1703
+ // const targetAttrMap = this.elementSource.element.getAttribute(EventManager.normalAttrMapAttrName);
1669
1704
  var detectAction_1 = this.elementSource.element.getAttribute(RawSet.DR_DETECT_NAME);
1670
1705
  var render_1 = documentFragment.render;
1706
+ // console.log('-------drTargetElement->', render, targetAttrMap);
1707
+ this.rawSet.fragment = documentFragment;
1708
+ this.rawSet.data = render_1.component;
1709
+ // const targetAttrs = this.elementSource.element.getAttributeNames()
1710
+ // .filter(it => RawSet.isExporesion(this.elementSource.element.getAttribute(it)))
1711
+ // .map(it => ({name: it, expresion: RawSet.exporesionGrouops(this.elementSource.element.getAttribute(it))[0][1]}))
1712
+ // .filter(it => it.name.length > 0 && it.expresion.length > 0)
1713
+ // .map(it => {
1714
+ // return `n.setAttribute('${it.name}', ${it.expresion})`;
1715
+ // });
1716
+ // if (targetAttrMap) {
1717
+ // ScriptUtils.eval(`
1718
+ // ${this.render.bindScript}
1719
+ // //const n = $element.cloneNode(true);
1720
+ // const n = $element;
1721
+ // ${targetAttrMap.join(';')};
1722
+ // // this.__render.fag.append(n);
1723
+ // `, Object.assign(this.source.obj, {
1724
+ // __render: Object.freeze({
1725
+ // fag: newTemp,
1726
+ // targetAttrs: targetAttrMap,
1727
+ // ...this.render
1728
+ // } as Render)
1729
+ // }));
1730
+ // }
1671
1731
  if (detectAction_1 && render_1) {
1672
1732
  this.rawSet.detect = {
1673
1733
  action: function () {
@@ -1732,55 +1792,27 @@ var DrTargetAttr = /** @class */ (function (_super) {
1732
1792
  return DrTargetAttr;
1733
1793
  }(OperatorRender));
1734
1794
 
1735
- var AttrExpresion = /** @class */ (function (_super) {
1736
- __extends(AttrExpresion, _super);
1737
- function AttrExpresion() {
1738
- return _super !== null && _super.apply(this, arguments) || this;
1739
- }
1740
- AttrExpresion.prototype.execRender = function () {
1741
- var _a;
1742
- var _this = this;
1743
- var _b;
1744
- var targetAttrs = this.elementSource.element.getAttributeNames()
1745
- .filter(function (it) { return RawSet.isExporesion(_this.elementSource.element.getAttribute(it)); })
1746
- .map(function (it) { return ({ name: it, expresion: RawSet.exporesionGrouops(_this.elementSource.element.getAttribute(it))[0][1] }); })
1747
- .filter(function (it) { return it.name.length > 0 && it.expresion.length > 0; })
1748
- .map(function (it) {
1749
- return "n.setAttribute('".concat(it.name, "', ").concat(it.expresion, ")");
1750
- });
1751
- // console.log('-----', targetAttrs)
1752
- if ((targetAttrs === null || targetAttrs === void 0 ? void 0 : targetAttrs.length) > 0) {
1753
- var newTemp = this.source.config.window.document.createElement('temp');
1754
- // console.log('------>', targetAttrs, targetAttrs.join(';'))
1755
- ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n const n = $element.cloneNode(true);\n ").concat(targetAttrs.join(';'), ";\n this.__render.fag.append(n);\n "), Object.assign(this.source.obj, {
1756
- __render: Object.freeze(__assign({ fag: newTemp, targetAttrs: targetAttrs }, this.render))
1757
- }));
1758
- var tempalte = this.source.config.window.document.createElement('template');
1759
- tempalte.innerHTML = newTemp.innerHTML;
1760
- this.returnContainer.fag.append(tempalte.content);
1761
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1762
- (_b = this.elementSource.element.parentNode) === null || _b === void 0 ? void 0 : _b.replaceChild(this.returnContainer.fag, this.elementSource.element);
1763
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1764
- return exports.ExecuteState.EXECUTE;
1765
- }
1766
- return exports.ExecuteState.NO_EXECUTE;
1767
- };
1768
- return AttrExpresion;
1769
- }(OperatorRender));
1770
-
1771
1795
  exports.DestroyOptionType = void 0;
1772
1796
  (function (DestroyOptionType) {
1773
1797
  DestroyOptionType["NO_DESTROY"] = "NO_DESTROY";
1774
1798
  DestroyOptionType["NO_MESSENGER_DESTROY"] = "NO_MESSENGER_DESTROY";
1775
1799
  })(exports.DestroyOptionType || (exports.DestroyOptionType = {}));
1800
+ exports.RawSetType = void 0;
1801
+ (function (RawSetType) {
1802
+ RawSetType["TEXT"] = "TEXT";
1803
+ RawSetType["TARGET_ELEMENT"] = "TARGET_ELEMENT";
1804
+ RawSetType["TARGET_ATTR"] = "TARGET_ATTR";
1805
+ RawSetType["UNKOWN"] = "UNKOWN";
1806
+ })(exports.RawSetType || (exports.RawSetType = {}));
1776
1807
  var RawSet = /** @class */ (function () {
1777
- function RawSet(uuid, point, fragment, detect, data) {
1778
- if (data === void 0) { data = {}; }
1808
+ function RawSet(uuid, type, point, fragment, detect, data) {
1779
1809
  this.uuid = uuid;
1810
+ this.type = type;
1780
1811
  this.point = point;
1781
1812
  this.fragment = fragment;
1782
1813
  this.detect = detect;
1783
1814
  this.data = data;
1815
+ // console.log('rawset constructor->', (this.point.node as Element).getAttributeNames());
1784
1816
  }
1785
1817
  Object.defineProperty(RawSet.prototype, "isConnected", {
1786
1818
  get: function () {
@@ -1801,19 +1833,24 @@ var RawSet = /** @class */ (function () {
1801
1833
  }
1802
1834
  else if (cNode.nodeType === Node.ELEMENT_NODE) {
1803
1835
  var element_1 = cNode;
1804
- var targetAttrNames_1 = ((_c = (_b = config === null || config === void 0 ? void 0 : config.targetAttrs) === null || _b === void 0 ? void 0 : _b.map(function (it) { return it.name; })) !== null && _c !== void 0 ? _c : []).concat(RawSet.DR_ATTRIBUTES);
1805
- script = targetAttrNames_1.map(function (it) {
1806
- // console.log('-?', element.getAttribute(it))
1807
- return element_1.getAttribute(it);
1808
- }).filter(function (it) { return it; }).join(';');
1836
+ var targetAttrNames = ((_c = (_b = config === null || config === void 0 ? void 0 : config.targetAttrs) === null || _b === void 0 ? void 0 : _b.map(function (it) { return it.name; })) !== null && _c !== void 0 ? _c : []).concat(RawSet.DR_ATTRIBUTES); // .concat(EventManager.normalAttrMapAttrName);
1837
+ var targetScripts_1 = targetAttrNames.map(function (it) { return element_1.getAttribute(it); }).filter(function (it) { return it; });
1838
+ var targetAttrMap = element_1.getAttribute(EventManager.normalAttrMapAttrName);
1839
+ if (targetAttrMap) {
1840
+ // console.log('----->', targetAttr);
1841
+ new Map(JSON.parse(targetAttrMap)).forEach(function (v, k) {
1842
+ targetScripts_1.push(v);
1843
+ });
1844
+ }
1845
+ script = targetScripts_1.join(';');
1846
+ // attribute쪽 체크하는거 추가
1809
1847
  // console.log('----!!!!!-->', targetAttrNames)
1810
- var otherAttrs = element_1.getAttributeNames()
1811
- .filter(function (it) { return !targetAttrNames_1.includes(it.toLowerCase()) && RawSet.isExporesion(element_1.getAttribute(it)); })
1812
- .map(function (it) {
1813
- var _a;
1814
- return "`".concat((_a = element_1.getAttribute(it)) !== null && _a !== void 0 ? _a : '', "`");
1815
- }).join(';');
1816
- script += ';' + otherAttrs;
1848
+ // const otherAttrs = element.getAttributeNames()
1849
+ // .filter(it => !targetAttrNames.includes(it.toLowerCase()) && RawSet.isExporesion(element.getAttribute(it)))
1850
+ // .map(it => {
1851
+ // return `\`${element.getAttribute(it) ?? ''}\``;
1852
+ // }).join(';');
1853
+ // script += ';' + otherAttrs
1817
1854
  }
1818
1855
  if (script) {
1819
1856
  // script = script.replace('}$','}');
@@ -1831,6 +1868,7 @@ var RawSet = /** @class */ (function () {
1831
1868
  // console.log('usingTriggerVariable----------->', usingTriggerVariables)
1832
1869
  return usingTriggerVariables;
1833
1870
  };
1871
+ // 중요 render
1834
1872
  RawSet.prototype.render = function (obj, config) {
1835
1873
  var _this = this;
1836
1874
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -1904,7 +1942,6 @@ var RawSet = /** @class */ (function () {
1904
1942
  new Dr(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1905
1943
  new DrIf(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1906
1944
  new DrThis(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1907
- new AttrExpresion(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1908
1945
  new DrForm(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1909
1946
  new DrInnerText(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1910
1947
  new DrInnerHTML(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
@@ -2015,8 +2052,9 @@ var RawSet = /** @class */ (function () {
2015
2052
  this.childAllRemove();
2016
2053
  (_a = this.point.start.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(genNode, this.point.start.nextSibling);
2017
2054
  };
2055
+ // 중요 important
2018
2056
  RawSet.checkPointCreates = function (element, config) {
2019
- var _a, _b, _c, _d;
2057
+ var _a, _b, _c, _d, _e, _f, _g, _h;
2020
2058
  var thisVariableName = element.__domrender_this_variable_name;
2021
2059
  // console.log('checkPointCreates thisVariableName', thisVariableName);
2022
2060
  var nodeIterator = config.window.document.createNodeIterator(element, NodeFilter.SHOW_ALL, {
@@ -2025,7 +2063,7 @@ var RawSet = /** @class */ (function () {
2025
2063
  if (node.nodeType === Node.TEXT_NODE) {
2026
2064
  // console.log('????????', node.parentElement, node.parentElement?.getAttribute('dr-pre'));
2027
2065
  // console.log('???????/',node.textContent, node.parentElement?.getAttribute('dr-pre'))
2028
- // 나중에
2066
+ // TODO: 나중에
2029
2067
  // const between = StringUtils.betweenRegexpStr('[$#]\\{', '\\}', StringUtils.deleteEnter((node as Text).data ?? ''))
2030
2068
  var between = RawSet.exporesionGrouops(StringUtils.deleteEnter((_a = node.data) !== null && _a !== void 0 ? _a : ''));
2031
2069
  // console.log('bbbb', between)
@@ -2037,13 +2075,21 @@ var RawSet = /** @class */ (function () {
2037
2075
  var element_2 = node;
2038
2076
  // console.log('------>', element);
2039
2077
  var isElement = ((_c = (_b = config.targetElements) === null || _b === void 0 ? void 0 : _b.map(function (it) { return it.name.toLowerCase(); })) !== null && _c !== void 0 ? _c : []).includes(element_2.tagName.toLowerCase());
2040
- var targetAttrNames_2 = ((_e = (_d = config.targetAttrs) === null || _d === void 0 ? void 0 : _d.map(function (it) { return it.name; })) !== null && _e !== void 0 ? _e : []).concat(RawSet.DR_ATTRIBUTES);
2078
+ var targetAttrNames_1 = ((_e = (_d = config.targetAttrs) === null || _d === void 0 ? void 0 : _d.map(function (it) { return it.name; })) !== null && _e !== void 0 ? _e : []).concat(RawSet.DR_ATTRIBUTES);
2079
+ var normalAttrs_1 = new Map();
2041
2080
  var isAttr = element_2.getAttributeNames().filter(function (it) {
2042
- var attrExpresion = RawSet.isExporesion(element_2.getAttribute(it));
2081
+ var value = element_2.getAttribute(it);
2082
+ if (value && RawSet.isExporesion(value)) {
2083
+ normalAttrs_1.set(it, RawSet.exporesionGrouops(value)[0][1]);
2084
+ }
2043
2085
  // console.log(element.getAttribute(it), attrExpresion);
2044
- var isTargetAttr = targetAttrNames_2.includes(it.toLowerCase());
2045
- return isTargetAttr || attrExpresion;
2086
+ var isTargetAttr = targetAttrNames_1.includes(it.toLowerCase());
2087
+ return isTargetAttr;
2046
2088
  }).length > 0;
2089
+ // 기본 attribute를 처리하기위해
2090
+ if (normalAttrs_1.size) {
2091
+ element_2.setAttribute(EventManager.normalAttrMapAttrName, JSON.stringify(Array.from(normalAttrs_1.entries())));
2092
+ }
2047
2093
  return (isAttr || isElement) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
2048
2094
  }
2049
2095
  return NodeFilter.FILTER_REJECT;
@@ -2054,52 +2100,53 @@ var RawSet = /** @class */ (function () {
2054
2100
  var _loop_1 = function () {
2055
2101
  if (currentNode.nodeType === Node.TEXT_NODE) {
2056
2102
  var text = (_a = currentNode.textContent) !== null && _a !== void 0 ? _a : '';
2057
- var template_1 = config.window.document.createElement('template');
2103
+ var template = config.window.document.createElement('template');
2058
2104
  // const a = StringUtils.regexExec(/\$\{.*?\}/g, text);
2059
2105
  // const a = StringUtils.regexExec(/[$#]\{.*?\}/g, text);
2060
- // const a = StringUtils.betweenRegexpStr('[$#]\\{', '\\}', text); // <--나중에..
2061
- var a = RawSet.exporesionGrouops(text); // <--나중에..
2062
- var map = a.map(function (it) {
2063
- return {
2064
- uuid: RandomUtils.uuid(),
2065
- content: it[0],
2066
- regexArr: it
2067
- };
2068
- });
2069
- var lasterIndex_1 = 0;
2070
- map.forEach(function (it) {
2071
- var regexArr = it.regexArr;
2072
- var preparedText = regexArr.input.substring(lasterIndex_1, regexArr.index);
2073
- var start = config.window.document.createComment("start text ".concat(it.uuid));
2074
- var end = config.window.document.createComment("end text ".concat(it.uuid));
2106
+ // const a = StringUtils.betweenRegexpStr('[$#]\\{', '\\}', text); // <--TODO: 나중에..
2107
+ var groups = RawSet.exporesionGrouops(text);
2108
+ var map = groups.map(function (it) { return ({ uuid: RandomUtils.uuid(), content: it[0], regexArr: it }); });
2109
+ var lasterIndex = 0;
2110
+ for (var i = 0; i < map.length; i++) {
2111
+ var it_4 = map[i];
2112
+ var regexArr = it_4.regexArr;
2113
+ var preparedText = regexArr.input.substring(lasterIndex, regexArr.index);
2114
+ var start = config.window.document.createComment("start text ".concat(it_4.uuid));
2115
+ var end = config.window.document.createComment("end text ".concat(it_4.uuid));
2075
2116
  // layout setting
2076
- template_1.content.append(document.createTextNode(preparedText)); // 사이사이값.
2077
- template_1.content.append(start);
2078
- template_1.content.append(end);
2117
+ template.content.append(document.createTextNode(preparedText)); // 사이사이값.
2118
+ template.content.append(start);
2119
+ template.content.append(end);
2079
2120
  // content
2080
2121
  var fragment = config.window.document.createDocumentFragment();
2081
- fragment.append(config.window.document.createTextNode(it.content));
2082
- pars.push(new RawSet(it.uuid, {
2122
+ fragment.append(config.window.document.createTextNode(it_4.content));
2123
+ pars.push(new RawSet(it_4.uuid, exports.RawSetType.TEXT, {
2083
2124
  start: start,
2125
+ node: currentNode,
2084
2126
  end: end,
2085
2127
  thisVariableName: thisVariableName
2086
2128
  }, fragment));
2087
- lasterIndex_1 = regexArr.index + it.content.length;
2088
- });
2089
- template_1.content.append(config.window.document.createTextNode(text.substring(lasterIndex_1, text.length)));
2090
- (_b = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _b === void 0 ? void 0 : _b.replaceChild(template_1.content, currentNode);
2129
+ lasterIndex = regexArr.index + it_4.content.length;
2130
+ }
2131
+ template.content.append(config.window.document.createTextNode(text.substring(lasterIndex, text.length)));
2132
+ (_b = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _b === void 0 ? void 0 : _b.replaceChild(template.content, currentNode);
2091
2133
  }
2092
- else {
2134
+ else if (currentNode.nodeType === Node.ELEMENT_NODE) {
2093
2135
  var uuid = RandomUtils.uuid();
2136
+ var element_3 = currentNode;
2094
2137
  var fragment = config.window.document.createDocumentFragment();
2095
2138
  var start = config.window.document.createComment("start ".concat(uuid));
2096
2139
  var end = config.window.document.createComment("end ".concat(uuid));
2097
2140
  // console.log('start--', uuid)
2098
- (_c = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _c === void 0 ? void 0 : _c.insertBefore(start, currentNode);
2099
- (_d = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _d === void 0 ? void 0 : _d.insertBefore(end, currentNode.nextSibling);
2141
+ 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());
2142
+ 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);
2143
+ var isAttr = element_3.getAttributeNames().filter(function (it) { return targetAttrNames_2.includes(it.toLowerCase()); }).length > 0;
2144
+ (_g = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _g === void 0 ? void 0 : _g.insertBefore(start, currentNode);
2145
+ (_h = currentNode === null || currentNode === void 0 ? void 0 : currentNode.parentNode) === null || _h === void 0 ? void 0 : _h.insertBefore(end, currentNode.nextSibling);
2100
2146
  fragment.append(currentNode);
2101
- pars.push(new RawSet(uuid, {
2147
+ pars.push(new RawSet(uuid, isElement ? exports.RawSetType.TARGET_ELEMENT : (isAttr ? exports.RawSetType.TARGET_ATTR : exports.RawSetType.UNKOWN), {
2102
2148
  start: start,
2149
+ node: currentNode,
2103
2150
  end: end,
2104
2151
  thisVariableName: thisVariableName
2105
2152
  }, fragment));
@@ -2177,8 +2224,8 @@ var RawSet = /** @class */ (function () {
2177
2224
  var nodeIterator = config.window.document.createNodeIterator(subElement, NodeFilter.SHOW_ELEMENT, {
2178
2225
  acceptNode: function (node) {
2179
2226
  if (node.nodeType === Node.ELEMENT_NODE) {
2180
- var element_3 = node;
2181
- return element_3.hasAttribute(as) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
2227
+ var element_4 = node;
2228
+ return element_4.hasAttribute(as) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT;
2182
2229
  }
2183
2230
  else {
2184
2231
  return NodeFilter.FILTER_REJECT;
@@ -2188,9 +2235,9 @@ var RawSet = /** @class */ (function () {
2188
2235
  var node;
2189
2236
  // eslint-disable-next-line no-cond-assign
2190
2237
  while (node = nodeIterator.nextNode()) {
2191
- var element_4 = node;
2192
- element_4.setAttribute(to, (_a = element_4.getAttribute(as)) !== null && _a !== void 0 ? _a : '');
2193
- element_4.removeAttribute(as);
2238
+ var element_5 = node;
2239
+ element_5.setAttribute(to, (_a = element_5.getAttribute(as)) !== null && _a !== void 0 ? _a : '');
2240
+ element_5.removeAttribute(as);
2194
2241
  }
2195
2242
  });
2196
2243
  };
@@ -2299,8 +2346,8 @@ var RawSet = /** @class */ (function () {
2299
2346
  styles: styles,
2300
2347
  template: template,
2301
2348
  callBack: function (element, obj, rawSet, attrs) {
2302
- var _a, _b, _c, _d;
2303
- // console.log('callback------->')
2349
+ var _a, _b, _c, _d, _e, _f;
2350
+ // console.log('callback------->', element)
2304
2351
  if (!obj.__domrender_components) {
2305
2352
  obj.__domrender_components = {};
2306
2353
  }
@@ -2309,6 +2356,7 @@ var RawSet = /** @class */ (function () {
2309
2356
  var attribute = DomUtils.getAttributeToObject(element);
2310
2357
  var renderScript = 'var $component = this.__render.component; var $element = this.__render.element; var $router = this.__render.router; var $innerHTML = this.__render.innerHTML; var $attribute = this.__render.attribute; var $creatorMetaData = this.__render.creatorMetaData;';
2311
2358
  var render = Object.freeze({
2359
+ renderScript: renderScript,
2312
2360
  element: element,
2313
2361
  innerHTML: element.innerHTML,
2314
2362
  attribute: attribute,
@@ -2344,6 +2392,16 @@ var RawSet = /** @class */ (function () {
2344
2392
  i.creator = new Proxy(rawSet.point.thisVariableName ? ScriptUtils.evalReturn(rawSet.point.thisVariableName, obj) : obj, new DomRenderFinalProxy());
2345
2393
  this.__creatorMetaData = i;
2346
2394
  render = __assign({ component: instance, creatorMetaData: i }, render);
2395
+ // 중요 dr-normal-attr-map
2396
+ var normalAttrMap = element.getAttribute(EventManager.normalAttrMapAttrName);
2397
+ if (instance.onChangeAttrRender && normalAttrMap) {
2398
+ new Map(JSON.parse(normalAttrMap)).forEach(function (value, key) {
2399
+ var script = "".concat(renderScript, " return ").concat(value, " ");
2400
+ var cval = ScriptUtils.eval(script, Object.assign(obj, { __render: render }));
2401
+ // element.setAttribute(key, cval);
2402
+ instance.onChangeAttrRender(key, cval);
2403
+ });
2404
+ }
2347
2405
  // dr-on-create onCreateRender
2348
2406
  var onCreate = element.getAttribute("".concat(EventManager.attrPrefix, "on-create"));
2349
2407
  this.__render = render;
@@ -2358,15 +2416,17 @@ var RawSet = /** @class */ (function () {
2358
2416
  (_d = instance === null || instance === void 0 ? void 0 : instance.onCreateRender) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArray([instance], createParam, false));
2359
2417
  var applayTemplate = element.innerHTML;
2360
2418
  var innerHTMLThisRandom;
2419
+ var componentName = (_e = element.getAttribute("".concat(EventManager.attrPrefix, "component-name"))) !== null && _e !== void 0 ? _e : 'component';
2420
+ var innerHTMLName = (_f = element.getAttribute("".concat(EventManager.attrPrefix, "component-inner-html-name"))) !== null && _f !== void 0 ? _f : 'innerHTML';
2361
2421
  if (applayTemplate) {
2362
2422
  // if (rawSet.point.thisVariableName) {
2363
2423
  // 넘어온 innerHTML에 this가 있으면 해당안되게 우선 치환.
2364
2424
  innerHTMLThisRandom = RandomUtils.uuid();
2365
2425
  applayTemplate = applayTemplate.replace(/this\./g, innerHTMLThisRandom);
2366
2426
  // }
2367
- applayTemplate = applayTemplate.replace(/#component#/g, 'this');
2427
+ applayTemplate = applayTemplate.replace(RegExp("#".concat(componentName, "#"), 'g'), 'this');
2368
2428
  }
2369
- applayTemplate = template.replace(/#innerHTML#/g, applayTemplate);
2429
+ applayTemplate = template.replace(RegExp("#".concat(innerHTMLName, "#"), 'g'), applayTemplate);
2370
2430
  // dr-on-component-init
2371
2431
  var oninit = element.getAttribute("".concat(EventManager.attrPrefix, "on-component-init")); // dr-on-component-init
2372
2432
  if (oninit) {
@@ -2381,10 +2441,10 @@ var RawSet = /** @class */ (function () {
2381
2441
  var data = RawSet.drThisCreate(element, "this.__domrender_components.".concat(componentKey), '', true, obj, config);
2382
2442
  // 넘어온 innerHTML에 this가 있는걸 다시 복호화해서 제대로 작동하도록한다.
2383
2443
  if (innerHTMLThisRandom) {
2384
- var template_2 = config.window.document.createElement('template');
2385
- template_2.content.append(data);
2386
- template_2.innerHTML = template_2.innerHTML.replace(RegExp(innerHTMLThisRandom, 'g'), 'this.');
2387
- data = template_2.content;
2444
+ var template_1 = config.window.document.createElement('template');
2445
+ template_1.content.append(data);
2446
+ template_1.innerHTML = template_1.innerHTML.replace(RegExp(innerHTMLThisRandom, 'g'), 'this.');
2447
+ data = template_1.content;
2388
2448
  }
2389
2449
  data.render = render;
2390
2450
  return data;
@@ -2539,8 +2599,8 @@ var DomRenderProxy = /** @class */ (function () {
2539
2599
  DomRenderProxy.prototype.initRender = function (target) {
2540
2600
  var _this = this;
2541
2601
  var _a, _b, _c, _d, _e, _f, _g;
2542
- var onCreate = (_b = (_a = target).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, 'dr-on-create');
2543
- var createParam = undefined;
2602
+ var onCreate = (_b = (_a = target).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, "".concat(EventManager.attrPrefix, "on-create"));
2603
+ var createParam;
2544
2604
  if (onCreate) {
2545
2605
  createParam = ScriptUtils.evalReturn(onCreate, this._domRender_proxy);
2546
2606
  }
@@ -2548,7 +2608,8 @@ var DomRenderProxy = /** @class */ (function () {
2548
2608
  var innerHTML = (_e = target.innerHTML) !== null && _e !== void 0 ? _e : '';
2549
2609
  this._targets.add(target);
2550
2610
  var rawSets = RawSet.checkPointCreates(target, this.config);
2551
- // console.log('-------rawSet', rawSets)
2611
+ // console.log('initRender -------rawSet', rawSets)
2612
+ // 중요 초기에 한번 튕겨줘야함.
2552
2613
  eventManager.applyEvent(this._domRender_proxy, eventManager.findAttrElements(target, this.config), this.config);
2553
2614
  rawSets.forEach(function (it) {
2554
2615
  var variables = it.getUsingTriggerVariables(_this.config);
@@ -2577,7 +2638,8 @@ var DomRenderProxy = /** @class */ (function () {
2577
2638
  });
2578
2639
  return Array.from(set);
2579
2640
  };
2580
- DomRenderProxy.prototype.render = function (raws) {
2641
+ // 중요 important
2642
+ DomRenderProxy.prototype.render = function (raws, fullPathStr) {
2581
2643
  var _this = this;
2582
2644
  if (typeof raws === 'string') {
2583
2645
  var iter = this._rawSets.get(raws);
@@ -2590,15 +2652,40 @@ var DomRenderProxy = /** @class */ (function () {
2590
2652
  }
2591
2653
  var removeRawSets = [];
2592
2654
  (raws !== null && raws !== void 0 ? raws : this.getRawSets()).forEach(function (it) {
2593
- var _a;
2655
+ var _a, _b, _c;
2594
2656
  it.getUsingTriggerVariables(_this.config).forEach(function (path) { return _this.addRawSet(path, it); });
2595
- // console.log('------->', it, it.isConnected)
2657
+ // console.log('------->', it, it.isConnected);
2596
2658
  if (it.isConnected) {
2597
- if ((_a = it.detect) === null || _a === void 0 ? void 0 : _a.action) {
2659
+ // 중요 render될때 targetAttribute 체크 해야함.
2660
+ var targetAttrMap = (_b = (_a = it.point.node) === null || _a === void 0 ? void 0 : _a.getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, EventManager.normalAttrMapAttrName);
2661
+ if ((_c = it.detect) === null || _c === void 0 ? void 0 : _c.action) {
2598
2662
  it.detect.action();
2599
2663
  }
2664
+ else if (it.type === exports.RawSetType.TARGET_ELEMENT && it.data && fullPathStr && targetAttrMap && it.fragment.render) {
2665
+ new Map(JSON.parse(targetAttrMap)).forEach(function (v, k) {
2666
+ // it?.data.onChangeAttrRender(k, null, v);
2667
+ var isUsing = EventManager.isUsingThisVar(v, "this.".concat(fullPathStr));
2668
+ if (isUsing) {
2669
+ var render = it.fragment.render;
2670
+ // console.log('render-->', (it.fragment as any).render)
2671
+ var script = "".concat(render.renderScript, " return ").concat(v, " ");
2672
+ var cval = ScriptUtils.eval(script, Object.assign(_this._domRender_proxy, { __render: render }));
2673
+ it.data.onChangeAttrRender(k, cval);
2674
+ }
2675
+ // console.log('---?', v, fullPathStr, isUsing);
2676
+ });
2677
+ // ------------------->
2678
+ }
2600
2679
  else {
2601
2680
  var rawSets = it.render(_this._domRender_proxy, _this.config);
2681
+ // 대상 attribute 있으면
2682
+ // const targetAttrs = (it.point.node as Element).getAttribute(EventManager.normalAttrMapAttrName);
2683
+ // if (it?.data.onChangeAttrRender && it.type === RawSetType.TARGET_ELEMENT && targetAttrs) {
2684
+ // new Map<string, string>(JSON.parse(targetAttrs)).forEach((v, k) => {
2685
+ // it?.data.onChangeAttrRender(k, null, v);
2686
+ // });
2687
+ // }
2688
+ // 그외 자식들 render
2602
2689
  if (rawSets && rawSets.length > 0) {
2603
2690
  _this.render(rawSets);
2604
2691
  }
@@ -2641,6 +2728,7 @@ var DomRenderProxy = /** @class */ (function () {
2641
2728
  var fullPathStr_1 = strings.map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('').slice(1);
2642
2729
  if (lastDoneExecute) {
2643
2730
  var iterable = this._rawSets.get(fullPathStr_1);
2731
+ // console.log('----->', iterable);
2644
2732
  // array check
2645
2733
  var front = strings.slice(0, strings.length - 1).map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('');
2646
2734
  var last = strings[strings.length - 1];
@@ -2652,12 +2740,14 @@ var DomRenderProxy = /** @class */ (function () {
2652
2740
  }
2653
2741
  }
2654
2742
  else if (iterable) {
2655
- // console.log('----->', iterable)
2656
- this.render(Array.from(iterable));
2743
+ this.render(Array.from(iterable), fullPathStr_1);
2657
2744
  }
2658
2745
  this._targets.forEach(function (it) {
2746
+ // console.log('target------->,', it)
2747
+ // return;
2659
2748
  if (it.nodeType === Node.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node.ELEMENT_NODE) {
2660
2749
  var targets = eventManager.findAttrElements(it, _this.config);
2750
+ // console.log('------>', targets);
2661
2751
  eventManager.changeVar(_this._domRender_proxy, targets, "this.".concat(fullPathStr_1), _this.config);
2662
2752
  }
2663
2753
  });
@@ -2764,7 +2854,7 @@ var DomRenderProxy = /** @class */ (function () {
2764
2854
  };
2765
2855
  DomRenderProxy.prototype.addRawSet = function (path, rawSet) {
2766
2856
  var _a;
2767
- // console.log('addRawSet-->', path, rawSet)
2857
+ // console.log('addRawSet--> path:', path, 'rawSet:', rawSet)
2768
2858
  if (!this._rawSets.get(path)) {
2769
2859
  this._rawSets.set(path, new Set());
2770
2860
  }
@@ -3312,21 +3402,6 @@ var DomRender = /** @class */ (function () {
3312
3402
  return DomRender;
3313
3403
  }());
3314
3404
 
3315
- var RenderManager = /** @class */ (function () {
3316
- function RenderManager() {
3317
- }
3318
- RenderManager.render = function (obj, target) {
3319
- if (target === void 0) { target = Object.keys(obj); }
3320
- var domRenderProxy = obj._DomRender_proxy;
3321
- if (domRenderProxy) {
3322
- target.forEach(function (it) {
3323
- domRenderProxy.root([it], obj[it]);
3324
- });
3325
- }
3326
- };
3327
- return RenderManager;
3328
- }());
3329
-
3330
3405
  var Appender = /** @class */ (function () {
3331
3406
  // [keys: string]: any;
3332
3407
  function Appender() {
@@ -3356,6 +3431,21 @@ var Appender = /** @class */ (function () {
3356
3431
  return Appender;
3357
3432
  }());
3358
3433
 
3434
+ var RenderManager = /** @class */ (function () {
3435
+ function RenderManager() {
3436
+ }
3437
+ RenderManager.render = function (obj, target) {
3438
+ if (target === void 0) { target = Object.keys(obj); }
3439
+ var domRenderProxy = obj._DomRender_proxy;
3440
+ if (domRenderProxy) {
3441
+ target.forEach(function (it) {
3442
+ domRenderProxy.root([it], obj[it]);
3443
+ });
3444
+ }
3445
+ };
3446
+ return RenderManager;
3447
+ }());
3448
+
3359
3449
  var AllCheckedValidatorArray = /** @class */ (function (_super) {
3360
3450
  __extends(AllCheckedValidatorArray, _super);
3361
3451
  function AllCheckedValidatorArray(value, target, event, autoValid) {
@@ -3369,18 +3459,18 @@ var AllCheckedValidatorArray = /** @class */ (function (_super) {
3369
3459
  return AllCheckedValidatorArray;
3370
3460
  }(ValidatorArray));
3371
3461
 
3372
- var CheckedValidator = /** @class */ (function (_super) {
3373
- __extends(CheckedValidator, _super);
3374
- function CheckedValidator(value, target, event, autoValid) {
3462
+ var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
3463
+ __extends(AllUnCheckedValidatorArray, _super);
3464
+ function AllUnCheckedValidatorArray(value, target, event, autoValid) {
3375
3465
  if (autoValid === void 0) { autoValid = true; }
3376
3466
  return _super.call(this, value, target, event, autoValid) || this;
3377
3467
  }
3378
- CheckedValidator.prototype.valid = function () {
3379
- var _a, _b;
3380
- return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
3468
+ AllUnCheckedValidatorArray.prototype.valid = function () {
3469
+ var _a;
3470
+ return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
3381
3471
  };
3382
- return CheckedValidator;
3383
- }(Validator));
3472
+ return AllUnCheckedValidatorArray;
3473
+ }(ValidatorArray));
3384
3474
 
3385
3475
  var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3386
3476
  __extends(CountEqualsCheckedValidatorArray, _super);
@@ -3397,17 +3487,62 @@ var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3397
3487
  return CountEqualsCheckedValidatorArray;
3398
3488
  }(ValidatorArray));
3399
3489
 
3400
- var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
3401
- __extends(AllUnCheckedValidatorArray, _super);
3402
- function AllUnCheckedValidatorArray(value, target, event, autoValid) {
3490
+ var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3491
+ __extends(CountEqualsUnCheckedValidatorArray, _super);
3492
+ function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3493
+ if (autoValid === void 0) { autoValid = true; }
3494
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3495
+ _this.count = count;
3496
+ return _this;
3497
+ }
3498
+ CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3499
+ var _a;
3500
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3501
+ };
3502
+ return CountEqualsUnCheckedValidatorArray;
3503
+ }(ValidatorArray));
3504
+
3505
+ var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3506
+ __extends(CountGreaterThanCheckedValidatorArray, _super);
3507
+ function CountGreaterThanCheckedValidatorArray(count, value, target, event, autoValid) {
3508
+ if (autoValid === void 0) { autoValid = true; }
3509
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3510
+ _this.count = count;
3511
+ return _this;
3512
+ }
3513
+ CountGreaterThanCheckedValidatorArray.prototype.valid = function () {
3514
+ var _a;
3515
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > this.count;
3516
+ };
3517
+ return CountGreaterThanCheckedValidatorArray;
3518
+ }(ValidatorArray));
3519
+
3520
+ var CheckedValidator = /** @class */ (function (_super) {
3521
+ __extends(CheckedValidator, _super);
3522
+ function CheckedValidator(value, target, event, autoValid) {
3403
3523
  if (autoValid === void 0) { autoValid = true; }
3404
3524
  return _super.call(this, value, target, event, autoValid) || this;
3405
3525
  }
3406
- AllUnCheckedValidatorArray.prototype.valid = function () {
3526
+ CheckedValidator.prototype.valid = function () {
3527
+ var _a, _b;
3528
+ return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
3529
+ };
3530
+ return CheckedValidator;
3531
+ }(Validator));
3532
+
3533
+ var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3534
+ __extends(CountGreaterThanEqualsUnCheckedValidatorArray, _super);
3535
+ function CountGreaterThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3536
+ if (autoValid === void 0) { autoValid = true; }
3537
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3538
+ _this.count = count;
3539
+ return _this;
3540
+ }
3541
+ CountGreaterThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3407
3542
  var _a;
3408
- return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
3543
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3409
3544
  };
3410
- return AllUnCheckedValidatorArray;
3545
+ return CountGreaterThanEqualsUnCheckedValidatorArray;
3411
3546
  }(ValidatorArray));
3412
3547
 
3413
3548
  var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3425,34 +3560,34 @@ var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_supe
3425
3560
  return CountGreaterThanEqualsCheckedValidatorArray;
3426
3561
  }(ValidatorArray));
3427
3562
 
3428
- var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3429
- __extends(CountEqualsUnCheckedValidatorArray, _super);
3430
- function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3563
+ var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3564
+ __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3565
+ function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3431
3566
  if (autoValid === void 0) { autoValid = true; }
3432
3567
  var _this = _super.call(this, value, target, event, autoValid) || this;
3433
3568
  _this.count = count;
3434
3569
  return _this;
3435
3570
  }
3436
- CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3571
+ CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3437
3572
  var _a;
3438
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3573
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
3439
3574
  };
3440
- return CountEqualsUnCheckedValidatorArray;
3575
+ return CountLessThanEqualsCheckedValidatorArray;
3441
3576
  }(ValidatorArray));
3442
3577
 
3443
- var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3444
- __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3445
- function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3578
+ var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3579
+ __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
3580
+ function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3446
3581
  if (autoValid === void 0) { autoValid = true; }
3447
3582
  var _this = _super.call(this, value, target, event, autoValid) || this;
3448
3583
  _this.count = count;
3449
3584
  return _this;
3450
3585
  }
3451
- CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3586
+ CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3452
3587
  var _a;
3453
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
3588
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length <= this.count;
3454
3589
  };
3455
- return CountLessThanEqualsCheckedValidatorArray;
3590
+ return CountLessThanEqualsUnCheckedValidatorArray;
3456
3591
  }(ValidatorArray));
3457
3592
 
3458
3593
  var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3470,19 +3605,19 @@ var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3470
3605
  return CountGreaterThanUnCheckedValidatorArray;
3471
3606
  }(ValidatorArray));
3472
3607
 
3473
- var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3474
- __extends(CountGreaterThanEqualsUnCheckedValidatorArray, _super);
3475
- function CountGreaterThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3608
+ var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3609
+ __extends(CountLessThanUnCheckedValidatorArray, _super);
3610
+ function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3476
3611
  if (autoValid === void 0) { autoValid = true; }
3477
3612
  var _this = _super.call(this, value, target, event, autoValid) || this;
3478
3613
  _this.count = count;
3479
3614
  return _this;
3480
3615
  }
3481
- CountGreaterThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3616
+ CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
3482
3617
  var _a;
3483
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3618
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
3484
3619
  };
3485
- return CountGreaterThanEqualsUnCheckedValidatorArray;
3620
+ return CountLessThanUnCheckedValidatorArray;
3486
3621
  }(ValidatorArray));
3487
3622
 
3488
3623
  var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3500,53 +3635,56 @@ var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
3500
3635
  return CountLessThanCheckedValidatorArray;
3501
3636
  }(ValidatorArray));
3502
3637
 
3503
- var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3504
- __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
3505
- function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3638
+ var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3639
+ __extends(CountUnCheckedValidatorArray, _super);
3640
+ function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
3506
3641
  if (autoValid === void 0) { autoValid = true; }
3507
3642
  var _this = _super.call(this, value, target, event, autoValid) || this;
3508
3643
  _this.count = count;
3509
3644
  return _this;
3510
3645
  }
3511
- CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3646
+ CountUnCheckedValidatorArray.prototype.valid = function () {
3512
3647
  var _a;
3513
- 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;
3514
3649
  };
3515
- return CountLessThanEqualsUnCheckedValidatorArray;
3650
+ return CountUnCheckedValidatorArray;
3516
3651
  }(ValidatorArray));
3517
3652
 
3518
- var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3519
- __extends(CountLessThanUnCheckedValidatorArray, _super);
3520
- function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3653
+ var EmptyValidator = /** @class */ (function (_super) {
3654
+ __extends(EmptyValidator, _super);
3655
+ function EmptyValidator(value, target, event, autoValid) {
3521
3656
  if (autoValid === void 0) { autoValid = true; }
3522
- var _this = _super.call(this, value, target, event, autoValid) || this;
3523
- _this.count = count;
3524
- return _this;
3657
+ return _super.call(this, value, target, event, autoValid) || this;
3525
3658
  }
3526
- CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
3527
- var _a;
3528
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
3659
+ EmptyValidator.prototype.valid = function () {
3660
+ var _a, _b;
3661
+ var value = this.value;
3662
+ return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
3529
3663
  };
3530
- return CountLessThanUnCheckedValidatorArray;
3531
- }(ValidatorArray));
3664
+ return EmptyValidator;
3665
+ }(Validator));
3532
3666
 
3533
- var FormValidator = /** @class */ (function (_super) {
3534
- __extends(FormValidator, _super);
3535
- function FormValidator(target, event, autoValid) {
3667
+ var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3668
+ __extends(IncludeCheckedValidatorArray, _super);
3669
+ function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3670
+ if (allRequired === void 0) { allRequired = false; }
3536
3671
  if (autoValid === void 0) { autoValid = true; }
3537
- return _super.call(this, undefined, target, event, autoValid) || this;
3672
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3673
+ _this.include = include;
3674
+ _this.allRequired = allRequired;
3675
+ return _this;
3538
3676
  }
3539
- FormValidator.prototype.validAction = function () {
3540
- return _super.prototype.childValidAction.call(this);
3541
- };
3542
- FormValidator.prototype.valid = function () {
3543
- return this.childValid();
3544
- };
3545
- FormValidator.prototype.reset = function () {
3546
- this.targetReset();
3677
+ IncludeCheckedValidatorArray.prototype.valid = function () {
3678
+ var _this = this;
3679
+ var _a;
3680
+ var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3681
+ var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
3682
+ return checkedValue.length > 0 &&
3683
+ (!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3684
+ (this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3547
3685
  };
3548
- return FormValidator;
3549
- }(Validator));
3686
+ return IncludeCheckedValidatorArray;
3687
+ }(ValidatorArray));
3550
3688
 
3551
3689
  var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3552
3690
  __extends(ExcludeCheckedValidatorArray, _super);
@@ -3570,33 +3708,37 @@ var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3570
3708
  return ExcludeCheckedValidatorArray;
3571
3709
  }(ValidatorArray));
3572
3710
 
3573
- var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3574
- __extends(CountUnCheckedValidatorArray, _super);
3575
- function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
3711
+ var NotEmptyValidator = /** @class */ (function (_super) {
3712
+ __extends(NotEmptyValidator, _super);
3713
+ function NotEmptyValidator(value, target, event, autoValid) {
3576
3714
  if (autoValid === void 0) { autoValid = true; }
3577
- var _this = _super.call(this, value, target, event, autoValid) || this;
3578
- _this.count = count;
3579
- return _this;
3715
+ return _super.call(this, value, target, event, autoValid) || this;
3580
3716
  }
3581
- CountUnCheckedValidatorArray.prototype.valid = function () {
3582
- var _a;
3583
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3717
+ NotEmptyValidator.prototype.valid = function () {
3718
+ var _a, _b;
3719
+ var value = this.value;
3720
+ // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3721
+ return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3584
3722
  };
3585
- return CountUnCheckedValidatorArray;
3586
- }(ValidatorArray));
3723
+ return NotEmptyValidator;
3724
+ }(Validator));
3587
3725
 
3588
- var EmptyValidator = /** @class */ (function (_super) {
3589
- __extends(EmptyValidator, _super);
3590
- function EmptyValidator(value, target, event, autoValid) {
3726
+ var FormValidator = /** @class */ (function (_super) {
3727
+ __extends(FormValidator, _super);
3728
+ function FormValidator(target, event, autoValid) {
3591
3729
  if (autoValid === void 0) { autoValid = true; }
3592
- return _super.call(this, value, target, event, autoValid) || this;
3730
+ return _super.call(this, undefined, target, event, autoValid) || this;
3593
3731
  }
3594
- EmptyValidator.prototype.valid = function () {
3595
- var _a, _b;
3596
- var value = this.value;
3597
- return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
3732
+ FormValidator.prototype.validAction = function () {
3733
+ return _super.prototype.childValidAction.call(this);
3598
3734
  };
3599
- return EmptyValidator;
3735
+ FormValidator.prototype.valid = function () {
3736
+ return this.childValid();
3737
+ };
3738
+ FormValidator.prototype.reset = function () {
3739
+ this.targetReset();
3740
+ };
3741
+ return FormValidator;
3600
3742
  }(Validator));
3601
3743
 
3602
3744
  var MultipleValidator = /** @class */ (function (_super) {
@@ -3628,21 +3770,6 @@ var MultipleValidator = /** @class */ (function (_super) {
3628
3770
  return MultipleValidator;
3629
3771
  }(Validator));
3630
3772
 
3631
- var NotEmptyValidator = /** @class */ (function (_super) {
3632
- __extends(NotEmptyValidator, _super);
3633
- function NotEmptyValidator(value, target, event, autoValid) {
3634
- if (autoValid === void 0) { autoValid = true; }
3635
- return _super.call(this, value, target, event, autoValid) || this;
3636
- }
3637
- NotEmptyValidator.prototype.valid = function () {
3638
- var _a, _b;
3639
- var value = this.value;
3640
- // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3641
- return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3642
- };
3643
- return NotEmptyValidator;
3644
- }(Validator));
3645
-
3646
3773
  var NotRegExpTestValidator = /** @class */ (function (_super) {
3647
3774
  __extends(NotRegExpTestValidator, _super);
3648
3775
  function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
@@ -3665,42 +3792,28 @@ var NotRegExpTestValidator = /** @class */ (function (_super) {
3665
3792
  return NotRegExpTestValidator;
3666
3793
  }(Validator));
3667
3794
 
3668
- var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3669
- __extends(IncludeCheckedValidatorArray, _super);
3670
- function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3671
- if (allRequired === void 0) { allRequired = false; }
3672
- if (autoValid === void 0) { autoValid = true; }
3673
- var _this = _super.call(this, value, target, event, autoValid) || this;
3674
- _this.include = include;
3675
- _this.allRequired = allRequired;
3676
- return _this;
3677
- }
3678
- IncludeCheckedValidatorArray.prototype.valid = function () {
3679
- var _this = this;
3680
- var _a;
3681
- var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3682
- var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
3683
- return checkedValue.length > 0 &&
3684
- (!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3685
- (this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3686
- };
3687
- return IncludeCheckedValidatorArray;
3688
- }(ValidatorArray));
3689
-
3690
- var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3691
- __extends(CountGreaterThanCheckedValidatorArray, _super);
3692
- function CountGreaterThanCheckedValidatorArray(count, value, target, event, autoValid) {
3795
+ var RegExpTestValidator = /** @class */ (function (_super) {
3796
+ __extends(RegExpTestValidator, _super);
3797
+ function RegExpTestValidator(regexp, value, target, event, autoValid) {
3693
3798
  if (autoValid === void 0) { autoValid = true; }
3694
3799
  var _this = _super.call(this, value, target, event, autoValid) || this;
3695
- _this.count = count;
3800
+ _this.regexp = DomRenderProxy.final(regexp);
3696
3801
  return _this;
3697
3802
  }
3698
- CountGreaterThanCheckedValidatorArray.prototype.valid = function () {
3803
+ RegExpTestValidator.prototype.valid = function () {
3699
3804
  var _a;
3700
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > this.count;
3805
+ var value = this.value;
3806
+ var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
3807
+ // console.log('regexp-->', value, this.regexp, regExp.test(value))
3808
+ if (value) {
3809
+ return regExp.test(value);
3810
+ }
3811
+ else {
3812
+ return false;
3813
+ }
3701
3814
  };
3702
- return CountGreaterThanCheckedValidatorArray;
3703
- }(ValidatorArray));
3815
+ return RegExpTestValidator;
3816
+ }(Validator));
3704
3817
 
3705
3818
  var UnCheckedValidator = /** @class */ (function (_super) {
3706
3819
  __extends(UnCheckedValidator, _super);
@@ -3715,6 +3828,33 @@ var UnCheckedValidator = /** @class */ (function (_super) {
3715
3828
  return UnCheckedValidator;
3716
3829
  }(Validator));
3717
3830
 
3831
+ var ValidMultipleValidator = /** @class */ (function (_super) {
3832
+ __extends(ValidMultipleValidator, _super);
3833
+ function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
3834
+ if (autoValid === void 0) { autoValid = true; }
3835
+ var _this = _super.call(this, validators, value, target, event, autoValid) || this;
3836
+ _this.validMultipleCallback = validMultipleCallback;
3837
+ _this.validators = validators;
3838
+ return _this;
3839
+ }
3840
+ ValidMultipleValidator.prototype.valid = function () {
3841
+ return this.validMultipleCallback(this.validators, this.value, this.getTarget(), this.getEvent());
3842
+ };
3843
+ return ValidMultipleValidator;
3844
+ }(MultipleValidator));
3845
+
3846
+ var PassValidator = /** @class */ (function (_super) {
3847
+ __extends(PassValidator, _super);
3848
+ function PassValidator(value, target, event, autoValid) {
3849
+ if (autoValid === void 0) { autoValid = true; }
3850
+ return _super.call(this, value, target, event, autoValid) || this;
3851
+ }
3852
+ PassValidator.prototype.valid = function () {
3853
+ return true;
3854
+ };
3855
+ return PassValidator;
3856
+ }(Validator));
3857
+
3718
3858
  var RequiredValidator = /** @class */ (function (_super) {
3719
3859
  __extends(RequiredValidator, _super);
3720
3860
  function RequiredValidator(value, target, event, autoValid) {
@@ -3743,21 +3883,6 @@ var ValidValidatorArray = /** @class */ (function (_super) {
3743
3883
  return ValidValidatorArray;
3744
3884
  }(ValidatorArray));
3745
3885
 
3746
- var ValidMultipleValidator = /** @class */ (function (_super) {
3747
- __extends(ValidMultipleValidator, _super);
3748
- function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
3749
- if (autoValid === void 0) { autoValid = true; }
3750
- var _this = _super.call(this, validators, value, target, event, autoValid) || this;
3751
- _this.validMultipleCallback = validMultipleCallback;
3752
- _this.validators = validators;
3753
- return _this;
3754
- }
3755
- ValidMultipleValidator.prototype.valid = function () {
3756
- return this.validMultipleCallback(this.validators, this.value, this.getTarget(), this.getEvent());
3757
- };
3758
- return ValidMultipleValidator;
3759
- }(MultipleValidator));
3760
-
3761
3886
  var ValidValidator = /** @class */ (function (_super) {
3762
3887
  __extends(ValidValidator, _super);
3763
3888
  function ValidValidator(validCallBack, value, target, event, autoValid) {
@@ -3772,32 +3897,6 @@ var ValidValidator = /** @class */ (function (_super) {
3772
3897
  return ValidValidator;
3773
3898
  }(Validator));
3774
3899
 
3775
- var ValueNotEqualsValidator = /** @class */ (function (_super) {
3776
- __extends(ValueNotEqualsValidator, _super);
3777
- function ValueNotEqualsValidator(equalsValue, value, target, event, autoValid) {
3778
- if (autoValid === void 0) { autoValid = true; }
3779
- var _this = _super.call(this, value, target, event, autoValid) || this;
3780
- _this.equalsValue = equalsValue;
3781
- return _this;
3782
- }
3783
- ValueNotEqualsValidator.prototype.valid = function () {
3784
- return this.value !== this.equalsValue;
3785
- };
3786
- return ValueNotEqualsValidator;
3787
- }(Validator));
3788
-
3789
- var PassValidator = /** @class */ (function (_super) {
3790
- __extends(PassValidator, _super);
3791
- function PassValidator(value, target, event, autoValid) {
3792
- if (autoValid === void 0) { autoValid = true; }
3793
- return _super.call(this, value, target, event, autoValid) || this;
3794
- }
3795
- PassValidator.prototype.valid = function () {
3796
- return true;
3797
- };
3798
- return PassValidator;
3799
- }(Validator));
3800
-
3801
3900
  var ValueEqualsValidator = /** @class */ (function (_super) {
3802
3901
  __extends(ValueEqualsValidator, _super);
3803
3902
  function ValueEqualsValidator(equalsValue, value, target, event, autoValid) {
@@ -3812,49 +3911,42 @@ var ValueEqualsValidator = /** @class */ (function (_super) {
3812
3911
  return ValueEqualsValidator;
3813
3912
  }(Validator));
3814
3913
 
3815
- var RegExpTestValidator = /** @class */ (function (_super) {
3816
- __extends(RegExpTestValidator, _super);
3817
- function RegExpTestValidator(regexp, value, target, event, autoValid) {
3914
+ var ValueNotEqualsValidator = /** @class */ (function (_super) {
3915
+ __extends(ValueNotEqualsValidator, _super);
3916
+ function ValueNotEqualsValidator(equalsValue, value, target, event, autoValid) {
3818
3917
  if (autoValid === void 0) { autoValid = true; }
3819
3918
  var _this = _super.call(this, value, target, event, autoValid) || this;
3820
- _this.regexp = DomRenderProxy.final(regexp);
3919
+ _this.equalsValue = equalsValue;
3821
3920
  return _this;
3822
3921
  }
3823
- RegExpTestValidator.prototype.valid = function () {
3824
- var _a;
3825
- var value = this.value;
3826
- var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
3827
- // console.log('regexp-->', value, this.regexp, regExp.test(value))
3828
- if (value) {
3829
- return regExp.test(value);
3830
- }
3831
- else {
3832
- return false;
3833
- }
3922
+ ValueNotEqualsValidator.prototype.valid = function () {
3923
+ return this.value !== this.equalsValue;
3834
3924
  };
3835
- return RegExpTestValidator;
3925
+ return ValueNotEqualsValidator;
3836
3926
  }(Validator));
3837
3927
 
3838
- var ClipBoardUtils = /** @class */ (function () {
3839
- function ClipBoardUtils() {
3928
+ var NodeUtils = /** @class */ (function () {
3929
+ function NodeUtils() {
3840
3930
  }
3841
- ClipBoardUtils.readText = function (clipboard) {
3842
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
3843
- return clipboard.readText();
3931
+ // https://stackoverflow.com/questions/3955229/remove-all-child-elements-of-a-dom-node-in-javascript
3932
+ NodeUtils.removeAllChildNode = function (node) {
3933
+ while (node === null || node === void 0 ? void 0 : node.firstChild) {
3934
+ node.firstChild.remove();
3935
+ }
3844
3936
  };
3845
- ClipBoardUtils.read = function (clipboard) {
3846
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
3847
- return clipboard.read();
3937
+ NodeUtils.appendChild = function (parentNode, childNode) {
3938
+ return parentNode.appendChild(childNode);
3848
3939
  };
3849
- ClipBoardUtils.writeText = function (data, clipboard) {
3850
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
3851
- return clipboard.writeText(data);
3940
+ NodeUtils.replaceNode = function (targetNode, newNode) {
3941
+ var _a;
3942
+ // console.log('repalceNode', targetNode, newNode, targetNode.parentNode)
3943
+ return (_a = targetNode.parentNode) === null || _a === void 0 ? void 0 : _a.replaceChild(newNode, targetNode);
3852
3944
  };
3853
- ClipBoardUtils.write = function (data, clipboard) {
3854
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
3855
- return clipboard.write(data);
3945
+ NodeUtils.addNode = function (targetNode, newNode) {
3946
+ var _a;
3947
+ return (_a = targetNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, targetNode.nextSibling);
3856
3948
  };
3857
- return ClipBoardUtils;
3949
+ return NodeUtils;
3858
3950
  }());
3859
3951
 
3860
3952
  var StorageUtils = /** @class */ (function () {
@@ -3902,34 +3994,31 @@ var StorageUtils = /** @class */ (function () {
3902
3994
  return StorageUtils;
3903
3995
  }());
3904
3996
 
3905
- var NodeUtils = /** @class */ (function () {
3906
- function NodeUtils() {
3997
+ var ClipBoardUtils = /** @class */ (function () {
3998
+ function ClipBoardUtils() {
3907
3999
  }
3908
- // https://stackoverflow.com/questions/3955229/remove-all-child-elements-of-a-dom-node-in-javascript
3909
- NodeUtils.removeAllChildNode = function (node) {
3910
- while (node === null || node === void 0 ? void 0 : node.firstChild) {
3911
- node.firstChild.remove();
3912
- }
4000
+ ClipBoardUtils.readText = function (clipboard) {
4001
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
4002
+ return clipboard.readText();
3913
4003
  };
3914
- NodeUtils.appendChild = function (parentNode, childNode) {
3915
- return parentNode.appendChild(childNode);
4004
+ ClipBoardUtils.read = function (clipboard) {
4005
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
4006
+ return clipboard.read();
3916
4007
  };
3917
- NodeUtils.replaceNode = function (targetNode, newNode) {
3918
- var _a;
3919
- // console.log('repalceNode', targetNode, newNode, targetNode.parentNode)
3920
- return (_a = targetNode.parentNode) === null || _a === void 0 ? void 0 : _a.replaceChild(newNode, targetNode);
4008
+ ClipBoardUtils.writeText = function (data, clipboard) {
4009
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
4010
+ return clipboard.writeText(data);
3921
4011
  };
3922
- NodeUtils.addNode = function (targetNode, newNode) {
3923
- var _a;
3924
- return (_a = targetNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, targetNode.nextSibling);
4012
+ ClipBoardUtils.write = function (data, clipboard) {
4013
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
4014
+ return clipboard.write(data);
3925
4015
  };
3926
- return NodeUtils;
4016
+ return ClipBoardUtils;
3927
4017
  }());
3928
4018
 
3929
4019
  exports.AllCheckedValidatorArray = AllCheckedValidatorArray;
3930
4020
  exports.AllUnCheckedValidatorArray = AllUnCheckedValidatorArray;
3931
4021
  exports.Appender = Appender;
3932
- exports.AttrExpresion = AttrExpresion;
3933
4022
  exports.Channel = Channel;
3934
4023
  exports.ChannelSubscriber = ChannelSubscriber;
3935
4024
  exports.ChannelSubscription = ChannelSubscription;