dom-render 1.0.79 → 1.0.82

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
@@ -541,7 +541,8 @@ var EventManager = /** @class */ (function () {
541
541
  map.forEach(function (v, k) {
542
542
  var data = ScriptUtils.eval("const $element = this.element; return ".concat(v, " "), Object.assign(obj, {
543
543
  __render: Object.freeze({
544
- element: it
544
+ element: it,
545
+ attribute: DomUtils.getAttributeToObject(it)
545
546
  })
546
547
  }));
547
548
  it.setAttribute(k, data);
@@ -553,26 +554,6 @@ var EventManager = /** @class */ (function () {
553
554
  it.obj = obj;
554
555
  });
555
556
  });
556
- // on-init event
557
- this.procAttr(childNodes, EventManager.onInitAttrName, function (it, attribute) {
558
- var script = attribute;
559
- if (script) {
560
- script = 'return ' + script;
561
- }
562
- if (script) {
563
- ScriptUtils.eval("".concat(_this.bindScript, "; ").concat(script, " "), Object.assign(obj, {
564
- __render: Object.freeze({
565
- element: it
566
- })
567
- }));
568
- // console.log('onInit--->', obj, varName, it)
569
- // if (typeof this.getValue(obj, varName) === 'function') {
570
- // this.getValue(obj, varName)(it);
571
- // } else {
572
- // this.setValue(obj, varName, it);
573
- // }
574
- }
575
- });
576
557
  // value-link event
577
558
  this.procAttr(childNodes, EventManager.valueLinkAttrName, function (it, varName) {
578
559
  if (varName) {
@@ -621,6 +602,7 @@ var EventManager = /** @class */ (function () {
621
602
  __render: Object.freeze({
622
603
  event: event,
623
604
  element: it,
605
+ attribute: DomUtils.getAttributeToObject(it),
624
606
  target: event.target,
625
607
  range: Range.range,
626
608
  scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
@@ -636,6 +618,27 @@ var EventManager = /** @class */ (function () {
636
618
  });
637
619
  }
638
620
  });
621
+ // on-init event
622
+ this.procAttr(childNodes, EventManager.onInitAttrName, function (it, attribute) {
623
+ var script = attribute;
624
+ if (script) {
625
+ script = 'return ' + script;
626
+ }
627
+ if (script) {
628
+ ScriptUtils.eval("".concat(_this.bindScript, "; ").concat(script, " "), Object.assign(obj, {
629
+ __render: Object.freeze({
630
+ element: it,
631
+ attribute: DomUtils.getAttributeToObject(it)
632
+ })
633
+ }));
634
+ // console.log('onInit--->', obj, varName, it)
635
+ // if (typeof this.getValue(obj, varName) === 'function') {
636
+ // this.getValue(obj, varName)(it);
637
+ // } else {
638
+ // this.setValue(obj, varName, it);
639
+ // }
640
+ }
641
+ });
639
642
  this.changeVar(obj, childNodes, undefined, config);
640
643
  // console.log('eventManager-applyEvent-->', config?.applyEvents)
641
644
  var elements = Array.from(childNodes).filter(function (it) { return it.nodeType === 1; }).map(function (it) { return it; });
@@ -683,7 +686,8 @@ var EventManager = /** @class */ (function () {
683
686
  if (EventManager.isUsingThisVar(script, varName) || varName === undefined) {
684
687
  var data = ScriptUtils.eval("const $element = this.__render.element; ".concat(script, " "), Object.assign(obj, {
685
688
  __render: Object.freeze({
686
- element: it
689
+ element: it,
690
+ attribute: DomUtils.getAttributeToObject(it)
687
691
  })
688
692
  }));
689
693
  if (typeof data === 'string') {
@@ -734,7 +738,8 @@ var EventManager = /** @class */ (function () {
734
738
  if (EventManager.isUsingThisVar(script, varName) || varName === undefined) {
735
739
  var data = ScriptUtils.eval("const $element = this.__render.element; ".concat(script, " "), Object.assign(obj, {
736
740
  __render: Object.freeze({
737
- element: it
741
+ element: it,
742
+ attribute: DomUtils.getAttributeToObject(it)
738
743
  })
739
744
  }));
740
745
  if (typeof data === 'string') {
@@ -762,7 +767,8 @@ var EventManager = /** @class */ (function () {
762
767
  if (EventManager.isUsingThisVar(script, varName) || varName === undefined) {
763
768
  var data = ScriptUtils.eval("const $element = this.element; ".concat(script, " "), Object.assign(obj, {
764
769
  __render: Object.freeze({
765
- element: it
770
+ element: it,
771
+ attribute: DomUtils.getAttributeToObject(it)
766
772
  })
767
773
  }));
768
774
  if (typeof data === 'string') {
@@ -796,7 +802,8 @@ var EventManager = /** @class */ (function () {
796
802
  if (isUsing) {
797
803
  var data = ScriptUtils.eval("const $element = this.element; return ".concat(v, " "), Object.assign(obj, {
798
804
  __render: Object.freeze({
799
- element: it
805
+ element: it,
806
+ attribute: DomUtils.getAttributeToObject(it)
800
807
  })
801
808
  }));
802
809
  it.setAttribute(k, data);
@@ -813,14 +820,13 @@ var EventManager = /** @class */ (function () {
813
820
  it.addEventListener(eventName, function (event) {
814
821
  var filter = true;
815
822
  var filterScript = it.getAttribute("".concat(attr, ":filter"));
816
- var attribute = DomUtils.getAttributeToObject(it);
817
823
  var thisTarget = Object.assign(obj, {
818
824
  __render: Object.freeze({
819
825
  event: event,
820
826
  element: it,
821
827
  target: event.target,
822
828
  range: Range.range,
823
- attribute: attribute,
829
+ attribute: DomUtils.getAttributeToObject(it),
824
830
  router: config === null || config === void 0 ? void 0 : config.router,
825
831
  scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
826
832
  })
@@ -856,6 +862,7 @@ var EventManager = /** @class */ (function () {
856
862
  __render: Object.freeze({
857
863
  event: event,
858
864
  element: it,
865
+ attribute: DomUtils.getAttributeToObject(it),
859
866
  target: event.target,
860
867
  range: Range.range,
861
868
  scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj),
@@ -1016,7 +1023,7 @@ var Dr = /** @class */ (function (_super) {
1016
1023
  var tempalte = this.source.config.window.document.createElement('template');
1017
1024
  tempalte.innerHTML = newTemp.innerHTML;
1018
1025
  this.returnContainer.fag.append(tempalte.content);
1019
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1026
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1020
1027
  (_c = this.elementSource.element.parentNode) === null || _c === void 0 ? void 0 : _c.replaceChild(this.returnContainer.fag, this.elementSource.element);
1021
1028
  (_a = this.returnContainer.raws).push.apply(_a, rr);
1022
1029
  return exports.ExecuteState.EXECUTE;
@@ -1053,7 +1060,7 @@ var DrIf = /** @class */ (function (_super) {
1053
1060
  tempalte.innerHTML = newTemp.innerHTML;
1054
1061
  // console.log(tempalte.innerHTML)
1055
1062
  this.returnContainer.fag.append(tempalte.content);
1056
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1063
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1057
1064
  (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1058
1065
  (_a = this.returnContainer.raws).push.apply(_a, rr);
1059
1066
  // if (bypass) {
@@ -1100,7 +1107,7 @@ var DrThis = /** @class */ (function (_super) {
1100
1107
  else {
1101
1108
  this.returnContainer.fag.append(RawSet.drThisCreate(this.elementSource.element, this.elementSource.attrs.drThis, (_e = this.elementSource.attrs.drVarOption) !== null && _e !== void 0 ? _e : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config));
1102
1109
  }
1103
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1110
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1104
1111
  (_f = this.elementSource.element.parentNode) === null || _f === void 0 ? void 0 : _f.replaceChild(this.returnContainer.fag, this.elementSource.element);
1105
1112
  (_a = this.returnContainer.raws).push.apply(_a, rr);
1106
1113
  }
@@ -1206,7 +1213,7 @@ var Validator = /** @class */ (function () {
1206
1213
  target.value = this._value;
1207
1214
  }
1208
1215
  catch (e) {
1209
- console.log('set value function is blocked ');
1216
+ console.error('set value function is blocked ');
1210
1217
  }
1211
1218
  }
1212
1219
  if (this.getAutoValidAction()) {
@@ -1499,7 +1506,7 @@ var DrForm = /** @class */ (function (_super) {
1499
1506
  }
1500
1507
  });
1501
1508
  RawSet.drFormOtherMoveAttr(this.elementSource.element, 'temp-name', 'name', this.source.config);
1502
- (_a = this.returnContainer.raws).push.apply(_a, RawSet.checkPointCreates(this.elementSource.element, this.source.config));
1509
+ (_a = this.returnContainer.raws).push.apply(_a, RawSet.checkPointCreates(this.elementSource.element, this.source.obj, this.source.config));
1503
1510
  return exports.ExecuteState.EXECUTE;
1504
1511
  }
1505
1512
  return exports.ExecuteState.NO_EXECUTE;
@@ -1523,7 +1530,7 @@ var DrInnerText = /** @class */ (function (_super) {
1523
1530
  var tempalte = this.source.config.window.document.createElement('template');
1524
1531
  tempalte.innerHTML = newTemp.innerHTML;
1525
1532
  this.returnContainer.fag.append(tempalte.content);
1526
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1533
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1527
1534
  (_d = this.elementSource.element.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(this.returnContainer.fag, this.elementSource.element);
1528
1535
  (_a = this.returnContainer.raws).push.apply(_a, rr);
1529
1536
  return exports.ExecuteState.EXECUTE;
@@ -1551,7 +1558,7 @@ var DrInnerHTML = /** @class */ (function (_super) {
1551
1558
  var tempalte = this.source.config.window.document.createElement('template');
1552
1559
  tempalte.innerHTML = newTemp.innerHTML;
1553
1560
  this.returnContainer.fag.append(tempalte.content);
1554
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1561
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1555
1562
  (_d = this.elementSource.element.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(this.returnContainer.fag, this.elementSource.element);
1556
1563
  (_a = this.returnContainer.raws).push.apply(_a, rr);
1557
1564
  return exports.ExecuteState.EXECUTE;
@@ -1581,7 +1588,7 @@ var DrFor = /** @class */ (function (_super) {
1581
1588
  var tempalte = this.source.config.window.document.createElement('template');
1582
1589
  tempalte.innerHTML = newTemp.innerHTML;
1583
1590
  this.returnContainer.fag.append(tempalte.content);
1584
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1591
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1585
1592
  (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1586
1593
  (_a = this.returnContainer.raws).push.apply(_a, rr);
1587
1594
  return exports.ExecuteState.EXECUTE;
@@ -1613,7 +1620,7 @@ var DrForOf = /** @class */ (function (_super) {
1613
1620
  var tempalte = this.source.config.window.document.createElement('template');
1614
1621
  tempalte.innerHTML = newTemp.innerHTML;
1615
1622
  this.returnContainer.fag.append(tempalte.content);
1616
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1623
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1617
1624
  (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1618
1625
  // const rrr = rr.flatMap(it => it.render(obj, config));// .flat();
1619
1626
  (_a = this.returnContainer.raws).push.apply(_a, rr);
@@ -1646,7 +1653,7 @@ var DrAppender = /** @class */ (function (_super) {
1646
1653
  var tempalte = this.source.config.window.document.createElement('template');
1647
1654
  tempalte.innerHTML = newTemp.innerHTML;
1648
1655
  this.returnContainer.fag.append(tempalte.content);
1649
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1656
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1650
1657
  (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1651
1658
  // const rrr = rr.flatMap(it => it.render(obj, config));// .flat();
1652
1659
  (_a = this.returnContainer.raws).push.apply(_a, rr);
@@ -1677,7 +1684,7 @@ var DrRepeat = /** @class */ (function (_super) {
1677
1684
  var tempalte = this.source.config.window.document.createElement('template');
1678
1685
  tempalte.innerHTML = newTemp.innerHTML;
1679
1686
  this.returnContainer.fag.append(tempalte.content);
1680
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.config);
1687
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1681
1688
  (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1682
1689
  (_a = this.returnContainer.raws).push.apply(_a, rr);
1683
1690
  return exports.ExecuteState.EXECUTE;
@@ -1739,7 +1746,7 @@ var DrTargetElement = /** @class */ (function (_super) {
1739
1746
  };
1740
1747
  }
1741
1748
  // fag.append(documentFragment)
1742
- var rr = RawSet.checkPointCreates(documentFragment, this.source.config);
1749
+ var rr = RawSet.checkPointCreates(documentFragment, this.source.obj, this.source.config);
1743
1750
  (_d = this.elementSource.element.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(documentFragment, this.elementSource.element);
1744
1751
  (_a = this.returnContainer.raws).push.apply(_a, rr);
1745
1752
  this.afterCallBack.onElementInitCallBacks.push({
@@ -1748,6 +1755,7 @@ var DrTargetElement = /** @class */ (function (_super) {
1748
1755
  targetElement: targetElement,
1749
1756
  creatorMetaData: targetElement.__creatorMetaData
1750
1757
  });
1758
+ // console.log(document.body.innerHTML);
1751
1759
  (_e = targetElement === null || targetElement === void 0 ? void 0 : targetElement.complete) === null || _e === void 0 ? void 0 : _e.call(targetElement, this.elementSource.element, this.source.obj, this.rawSet);
1752
1760
  }
1753
1761
  return exports.ExecuteState.EXECUTE;
@@ -1774,7 +1782,7 @@ var DrTargetAttr = /** @class */ (function (_super) {
1774
1782
  if (attrValue && attrName && (!this.elementSource.attrs.drForOf && !this.elementSource.attrs.drFor && !this.elementSource.attrs.drRepeat)) {
1775
1783
  var documentFragment = targetAttr.callBack(this.elementSource.element, attrValue, this.source.obj, this.rawSet);
1776
1784
  if (documentFragment) {
1777
- var rr = RawSet.checkPointCreates(documentFragment, this.source.config);
1785
+ var rr = RawSet.checkPointCreates(documentFragment, this.source.obj, this.source.config);
1778
1786
  (_d = this.elementSource.element.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(documentFragment, this.elementSource.element);
1779
1787
  (_a = this.returnContainer.raws).push.apply(_a, rr);
1780
1788
  this.afterCallBack.onAttrInitCallBacks.push({
@@ -1868,7 +1876,7 @@ var RawSet = /** @class */ (function () {
1868
1876
  // console.log('usingTriggerVariable----------->', usingTriggerVariables)
1869
1877
  return usingTriggerVariables;
1870
1878
  };
1871
- // 중요 render
1879
+ // 중요 render 처리 부분
1872
1880
  RawSet.prototype.render = function (obj, config) {
1873
1881
  var _this = this;
1874
1882
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -1984,6 +1992,33 @@ var RawSet = /** @class */ (function () {
1984
1992
  }
1985
1993
  for (var _q = 0, onElementInitCallBacks_1 = onElementInitCallBacks; _q < onElementInitCallBacks_1.length; _q++) {
1986
1994
  var it_2 = onElementInitCallBacks_1[_q];
1995
+ // 중요 style isolation 나중에 :scope로 대체 가능할듯.
1996
+ 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) {
1997
+ var _a;
1998
+ var styleElement = it.ownerNode;
1999
+ var id = (_a = styleElement.getAttribute('id')) === null || _a === void 0 ? void 0 : _a.split('-')[0];
2000
+ if (id) {
2001
+ // console.log('------->', id)
2002
+ var start_1 = "#".concat(id, "-start");
2003
+ var end_1 = "#".concat(id, "-end");
2004
+ Array.from(it.cssRules).filter(function (it) { return it.constructor.name === 'CSSStyleRule'; }).forEach(function (it) {
2005
+ var rule = it;
2006
+ // rule.selectorText = `${start} ~ *:not(${start} ~ ${end} ~ *) ${rule.selectorText}`;
2007
+ // rule.selectorText = `${start} ~ *:not(${start} ~ ${end} ~ ${rule.selectorText})`;
2008
+ // console.log('-----', rule, rule.selectorText)
2009
+ if (!rule.selectorText.startsWith(':root')) {
2010
+ rule.selectorText = "".concat(start_1, " ~ ").concat(rule.selectorText, ":not(").concat(start_1, " ~ ").concat(end_1, " ~ *)");
2011
+ // if (rule.selectorText.startsWith('.')) {
2012
+ // rule.selectorText = `${start} ~ *:not(${start} ~ ${end} ~ *)${rule.selectorText}`;
2013
+ // } else {
2014
+ // rule.selectorText = `${rule.selectorText} ~ ${start} ~ *:not(${start} ~ ${end} ~ *)`;
2015
+ // }
2016
+ }
2017
+ // console.log(rule.selectorText);
2018
+ });
2019
+ }
2020
+ it.ownerNode.setAttribute('completed', 'true');
2021
+ });
1987
2022
  (_g = (_f = (_e = (_d = it_2.targetElement) === null || _d === void 0 ? void 0 : _d.__render) === null || _e === void 0 ? void 0 : _e.component) === null || _f === void 0 ? void 0 : _f.onInitRender) === null || _g === void 0 ? void 0 : _g.call(_f, Object.freeze({ render: (_h = it_2.targetElement) === null || _h === void 0 ? void 0 : _h.__render, creatorMetaData: (_j = it_2.targetElement) === null || _j === void 0 ? void 0 : _j.__creatorMetaData }));
1988
2023
  (_k = config === null || config === void 0 ? void 0 : config.onElementInit) === null || _k === void 0 ? void 0 : _k.call(config, it_2.name, obj, this, it_2.targetElement);
1989
2024
  }
@@ -2053,7 +2088,7 @@ var RawSet = /** @class */ (function () {
2053
2088
  (_a = this.point.start.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(genNode, this.point.start.nextSibling);
2054
2089
  };
2055
2090
  // 중요 important
2056
- RawSet.checkPointCreates = function (element, config) {
2091
+ RawSet.checkPointCreates = function (element, obj, config) {
2057
2092
  var _a, _b, _c, _d, _e, _f, _g, _h;
2058
2093
  var thisVariableName = element.__domrender_this_variable_name;
2059
2094
  // console.log('checkPointCreates thisVariableName', thisVariableName);
@@ -2280,7 +2315,10 @@ var RawSet = /** @class */ (function () {
2280
2315
  var n = element.cloneNode(true);
2281
2316
  if (set) {
2282
2317
  var id = RandomUtils.getRandomString(20);
2283
- n.innerHTML = RawSet.styleTransformLocal((_a = set.styles) !== null && _a !== void 0 ? _a : [], id, true, set.styleLocale) + ((_b = set.template) !== null && _b !== void 0 ? _b : '');
2318
+ var style = RawSet.styleTransformLocal((_a = set.styles) !== null && _a !== void 0 ? _a : [], id, true, set.styleLocale);
2319
+ var metaStart = RawSet.metaStart(id);
2320
+ var metaEnd = RawSet.metaEnd(id);
2321
+ n.innerHTML = metaStart + style + ((_b = set.template) !== null && _b !== void 0 ? _b : '') + metaEnd;
2284
2322
  // dr-on-create onCreateRender
2285
2323
  var onCreate = element.getAttribute("".concat(EventManager.attrPrefix, "on-create"));
2286
2324
  var renderScript = '';
@@ -2435,8 +2473,10 @@ var RawSet = /** @class */ (function () {
2435
2473
  __render: render
2436
2474
  }));
2437
2475
  }
2438
- var innerHTML = RawSet.styleTransformLocal(styles, componentKey, true, styleLocale) + (applayTemplate !== null && applayTemplate !== void 0 ? applayTemplate : '');
2439
- element.innerHTML = innerHTML;
2476
+ var style = RawSet.styleTransformLocal(styles, componentKey, true, styleLocale);
2477
+ var metaStart = RawSet.metaStart(componentKey);
2478
+ var metaEnd = RawSet.metaEnd(componentKey);
2479
+ element.innerHTML = metaStart + style + (applayTemplate !== null && applayTemplate !== void 0 ? applayTemplate : '') + metaEnd;
2440
2480
  // console.log('------>', element.innerHTML, obj)
2441
2481
  var data = RawSet.drThisCreate(element, "this.__domrender_components.".concat(componentKey), '', true, obj, config);
2442
2482
  // 넘어온 innerHTML에 this가 있는걸 다시 복호화해서 제대로 작동하도록한다.
@@ -2462,6 +2502,7 @@ var RawSet = /** @class */ (function () {
2462
2502
  var reg = /(?:[$#]\{(?:(([$#]\{)??[^$#]?[^{]*?)\}[$#]))/g;
2463
2503
  return StringUtils.regexExec(reg, data !== null && data !== void 0 ? data : '');
2464
2504
  };
2505
+ // 중요 스타일 적용 부분
2465
2506
  RawSet.styleTransformLocal = function (styleBody, id, styleTagWrap, locale) {
2466
2507
  if (styleTagWrap === void 0) { styleTagWrap = true; }
2467
2508
  if (locale === void 0) { locale = false; }
@@ -2483,10 +2524,16 @@ var RawSet = /** @class */ (function () {
2483
2524
  });
2484
2525
  }
2485
2526
  if (styleTagWrap) {
2486
- styleBody = "<style id='".concat(id, "' domstyle>").concat(styleBody, "</style>");
2527
+ styleBody = "<style id='".concat(id, "-style' domstyle>").concat(styleBody, "</style>");
2487
2528
  }
2488
2529
  return styleBody;
2489
2530
  };
2531
+ RawSet.metaStart = function (id) {
2532
+ return "<meta id='".concat(id, "-start' />");
2533
+ };
2534
+ RawSet.metaEnd = function (id) {
2535
+ return "<meta id='".concat(id, "-end' />");
2536
+ };
2490
2537
  RawSet.destroy = function (obj, parameter, config, destroyOptions) {
2491
2538
  var _a;
2492
2539
  if (destroyOptions === void 0) { destroyOptions = []; }
@@ -2607,7 +2654,7 @@ var DomRenderProxy = /** @class */ (function () {
2607
2654
  (_d = (_c = this._domRender_proxy) === null || _c === void 0 ? void 0 : _c.onCreateRender) === null || _d === void 0 ? void 0 : _d.call(_c, createParam);
2608
2655
  var innerHTML = (_e = target.innerHTML) !== null && _e !== void 0 ? _e : '';
2609
2656
  this._targets.add(target);
2610
- var rawSets = RawSet.checkPointCreates(target, this.config);
2657
+ var rawSets = RawSet.checkPointCreates(target, this._domRender_proxy, this.config);
2611
2658
  // console.log('initRender -------rawSet', rawSets)
2612
2659
  // 중요 초기에 한번 튕겨줘야함.
2613
2660
  eventManager.applyEvent(this._domRender_proxy, eventManager.findAttrElements(target, this.config), this.config);
@@ -2725,6 +2772,7 @@ var DomRenderProxy = /** @class */ (function () {
2725
2772
  }
2726
2773
  else {
2727
2774
  var strings = paths.reverse();
2775
+ // array같은경우도 키값으로 접근하기때문에 특정 인덱스를 찾아서 그부분만 바꿔줄수 있다.
2728
2776
  var fullPathStr_1 = strings.map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('').slice(1);
2729
2777
  if (lastDoneExecute) {
2730
2778
  var iterable = this._rawSets.get(fullPathStr_1);
@@ -3250,7 +3298,7 @@ var Messenger = /** @class */ (function () {
3250
3298
  this.config.window.addEventListener(Messenger.EVENT_PUBLISH_KEY, function (e) {
3251
3299
  var _a, _b;
3252
3300
  var detail = e.detail;
3253
- console.log('--->', detail);
3301
+ // console.log('--->', detail)
3254
3302
  var rtns = [];
3255
3303
  (_a = _this.getChannels(detail.key)) === null || _a === void 0 ? void 0 : _a.forEach(function (it) {
3256
3304
  try {
@@ -3267,7 +3315,7 @@ var Messenger = /** @class */ (function () {
3267
3315
  });
3268
3316
  this.config.window.addEventListener(Messenger.EVENT_SUBSCRIBE_KEY, function (e) {
3269
3317
  var detail = e.detail;
3270
- console.log('--->', detail);
3318
+ // console.log('--->', detail)
3271
3319
  var channel = _this.createChannel(detail.obj, detail.key);
3272
3320
  detail.init(channel, channel.subscribe(detail.subscribe));
3273
3321
  });
@@ -3293,7 +3341,7 @@ var Messenger = /** @class */ (function () {
3293
3341
  if (obj) {
3294
3342
  this.channels.forEach(function (it) {
3295
3343
  if (it.obj === obj) {
3296
- console.log('dddddddddddd', obj);
3344
+ // console.log('dddddddddddd', obj)
3297
3345
  _this.deleteChannel(it);
3298
3346
  }
3299
3347
  });
@@ -3360,54 +3408,66 @@ var DomRender = /** @class */ (function () {
3360
3408
  domRender.run(robj);
3361
3409
  return robj;
3362
3410
  };
3363
- DomRender.addComponent = function (config, _a, _b) {
3364
- var _c;
3365
- var type = _a.type, _d = _a.tagName, tagName = _d === void 0 ? type.name : _d;
3366
- var template = _b.template, _e = _b.styles, styles = _e === void 0 ? [] : _e, _f = _b.styleLocale, styleLocale = _f === void 0 ? false : _f;
3367
- var component = RawSet.createComponentTargetElement(tagName, function (e, o, r2, counstructorParam) {
3368
- return new (type.bind.apply(type, __spreadArray([void 0], counstructorParam, false)))();
3369
- }, template, styles, styleLocale, config);
3370
- config.targetElements = (_c = config.targetElements) !== null && _c !== void 0 ? _c : [];
3371
- config.targetElements.push(component);
3372
- return {
3373
- add: function (source, front) {
3374
- return DomRender.addComponent(config, source, front);
3375
- }
3376
- };
3411
+ DomRender.createComponent = function (param, config) {
3412
+ var _a, _b;
3413
+ var component = RawSet.createComponentTargetElement((_a = param.tagName) !== null && _a !== void 0 ? _a : param.type.name, function (e, o, r2, counstructorParam) {
3414
+ var _a;
3415
+ return new ((_a = param.type).bind.apply(_a, __spreadArray([void 0], counstructorParam, false)))();
3416
+ }, (_b = param.template) !== null && _b !== void 0 ? _b : '', Array.isArray(param.styles) ? param.styles : (param.styles ? [param.styles] : undefined), false, config);
3417
+ return component;
3377
3418
  };
3378
- DomRender.addAttribute = function (config, attrName, getThisObj, factory) {
3379
- var _a;
3419
+ DomRender.createAttribute = function (attrName, getThisObj, factory) {
3380
3420
  var targetAttribute = RawSet.createComponentTargetAttribute(attrName, getThisObj, factory);
3381
- config.targetAttrs = (_a = config.targetAttrs) !== null && _a !== void 0 ? _a : [];
3382
- config.targetAttrs.push(targetAttribute);
3383
- return {
3384
- add: function (attrName, getThisObj, factory) {
3385
- return DomRender.addAttribute(config, attrName, getThisObj, factory);
3386
- }
3387
- };
3388
- };
3389
- DomRender.addAttributeCallBack = function (config, attrName, callBack) {
3390
- var _a;
3391
- config.applyEvents = (_a = config.applyEvents) !== null && _a !== void 0 ? _a : [];
3392
- config.applyEvents.push({
3393
- attrName: attrName,
3394
- callBack: callBack
3395
- });
3396
- return {
3397
- add: function (attrName, callBack) {
3398
- return DomRender.addAttributeCallBack(config, attrName, callBack);
3399
- }
3400
- };
3421
+ return targetAttribute;
3401
3422
  };
3402
3423
  return DomRender;
3403
3424
  }());
3404
3425
 
3426
+ var RenderManager = /** @class */ (function () {
3427
+ function RenderManager() {
3428
+ }
3429
+ RenderManager.render = function (obj, target) {
3430
+ if (target === void 0) { target = Object.keys(obj); }
3431
+ var domRenderProxy = obj._DomRender_proxy;
3432
+ if (domRenderProxy) {
3433
+ target.forEach(function (it) {
3434
+ domRenderProxy.root([it], obj[it]);
3435
+ });
3436
+ }
3437
+ };
3438
+ return RenderManager;
3439
+ }());
3440
+
3405
3441
  var Appender = /** @class */ (function () {
3406
- // [keys: string]: any;
3407
- function Appender() {
3442
+ function Appender(defaultDatas) {
3408
3443
  this.length = 0;
3444
+ if (defaultDatas) {
3445
+ this.push.apply(this, defaultDatas);
3446
+ }
3409
3447
  // (this.childs as any).isAppender = true;
3410
3448
  }
3449
+ Appender.prototype[Symbol.iterator] = function () {
3450
+ var items = this.getAll();
3451
+ var idx = 0;
3452
+ return {
3453
+ next: function (value) {
3454
+ var r = { value: undefined, done: true };
3455
+ if (items.length > idx) {
3456
+ r = { value: items[idx], done: false };
3457
+ }
3458
+ idx++;
3459
+ return r;
3460
+ }
3461
+ };
3462
+ };
3463
+ Appender.prototype.getAll = function () {
3464
+ return this.getAlls().flat();
3465
+ };
3466
+ Appender.prototype.getAlls = function () {
3467
+ var _this = this;
3468
+ var map = Array.from({ length: this.length }).filter(function (it, idx) { return _this[idx]; }).map(function (it, idx) { return _this[idx]; });
3469
+ return map;
3470
+ };
3411
3471
  Appender.prototype.push = function () {
3412
3472
  var items = [];
3413
3473
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -3431,21 +3491,6 @@ var Appender = /** @class */ (function () {
3431
3491
  return Appender;
3432
3492
  }());
3433
3493
 
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
-
3449
3494
  var AllCheckedValidatorArray = /** @class */ (function (_super) {
3450
3495
  __extends(AllCheckedValidatorArray, _super);
3451
3496
  function AllCheckedValidatorArray(value, target, event, autoValid) {
@@ -3487,20 +3532,18 @@ var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3487
3532
  return CountEqualsCheckedValidatorArray;
3488
3533
  }(ValidatorArray));
3489
3534
 
3490
- var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3491
- __extends(CountEqualsUnCheckedValidatorArray, _super);
3492
- function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3535
+ var CheckedValidator = /** @class */ (function (_super) {
3536
+ __extends(CheckedValidator, _super);
3537
+ function CheckedValidator(value, target, event, autoValid) {
3493
3538
  if (autoValid === void 0) { autoValid = true; }
3494
- var _this = _super.call(this, value, target, event, autoValid) || this;
3495
- _this.count = count;
3496
- return _this;
3539
+ return _super.call(this, value, target, event, autoValid) || this;
3497
3540
  }
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;
3541
+ CheckedValidator.prototype.valid = function () {
3542
+ var _a, _b;
3543
+ return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
3501
3544
  };
3502
- return CountEqualsUnCheckedValidatorArray;
3503
- }(ValidatorArray));
3545
+ return CheckedValidator;
3546
+ }(Validator));
3504
3547
 
3505
3548
  var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3506
3549
  __extends(CountGreaterThanCheckedValidatorArray, _super);
@@ -3517,18 +3560,20 @@ var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3517
3560
  return CountGreaterThanCheckedValidatorArray;
3518
3561
  }(ValidatorArray));
3519
3562
 
3520
- var CheckedValidator = /** @class */ (function (_super) {
3521
- __extends(CheckedValidator, _super);
3522
- function CheckedValidator(value, target, event, autoValid) {
3563
+ var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3564
+ __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3565
+ function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3523
3566
  if (autoValid === void 0) { autoValid = true; }
3524
- return _super.call(this, value, target, event, autoValid) || this;
3567
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3568
+ _this.count = count;
3569
+ return _this;
3525
3570
  }
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;
3571
+ CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3572
+ var _a;
3573
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3529
3574
  };
3530
- return CheckedValidator;
3531
- }(Validator));
3575
+ return CountGreaterThanEqualsCheckedValidatorArray;
3576
+ }(ValidatorArray));
3532
3577
 
3533
3578
  var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3534
3579
  __extends(CountGreaterThanEqualsUnCheckedValidatorArray, _super);
@@ -3545,64 +3590,64 @@ var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_su
3545
3590
  return CountGreaterThanEqualsUnCheckedValidatorArray;
3546
3591
  }(ValidatorArray));
3547
3592
 
3548
- var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3549
- __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3550
- function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3593
+ var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
3594
+ __extends(CountLessThanCheckedValidatorArray, _super);
3595
+ function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
3551
3596
  if (autoValid === void 0) { autoValid = true; }
3552
3597
  var _this = _super.call(this, value, target, event, autoValid) || this;
3553
3598
  _this.count = count;
3554
3599
  return _this;
3555
3600
  }
3556
- CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3601
+ CountLessThanCheckedValidatorArray.prototype.valid = function () {
3557
3602
  var _a;
3558
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3603
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length < this.count;
3559
3604
  };
3560
- return CountGreaterThanEqualsCheckedValidatorArray;
3605
+ return CountLessThanCheckedValidatorArray;
3561
3606
  }(ValidatorArray));
3562
3607
 
3563
- var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3564
- __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3565
- function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3608
+ var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3609
+ __extends(CountGreaterThanUnCheckedValidatorArray, _super);
3610
+ function CountGreaterThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3566
3611
  if (autoValid === void 0) { autoValid = true; }
3567
3612
  var _this = _super.call(this, value, target, event, autoValid) || this;
3568
3613
  _this.count = count;
3569
3614
  return _this;
3570
3615
  }
3571
- CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3616
+ CountGreaterThanUnCheckedValidatorArray.prototype.valid = function () {
3572
3617
  var _a;
3573
- 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;
3574
3619
  };
3575
- return CountLessThanEqualsCheckedValidatorArray;
3620
+ return CountGreaterThanUnCheckedValidatorArray;
3576
3621
  }(ValidatorArray));
3577
3622
 
3578
- var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3579
- __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
3580
- function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3623
+ var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3624
+ __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3625
+ function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3581
3626
  if (autoValid === void 0) { autoValid = true; }
3582
3627
  var _this = _super.call(this, value, target, event, autoValid) || this;
3583
3628
  _this.count = count;
3584
3629
  return _this;
3585
3630
  }
3586
- CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3631
+ CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3587
3632
  var _a;
3588
- 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 <= this.count;
3589
3634
  };
3590
- return CountLessThanEqualsUnCheckedValidatorArray;
3635
+ return CountLessThanEqualsCheckedValidatorArray;
3591
3636
  }(ValidatorArray));
3592
3637
 
3593
- var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3594
- __extends(CountGreaterThanUnCheckedValidatorArray, _super);
3595
- function CountGreaterThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3638
+ var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3639
+ __extends(CountEqualsUnCheckedValidatorArray, _super);
3640
+ function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3596
3641
  if (autoValid === void 0) { autoValid = true; }
3597
3642
  var _this = _super.call(this, value, target, event, autoValid) || this;
3598
3643
  _this.count = count;
3599
3644
  return _this;
3600
3645
  }
3601
- CountGreaterThanUnCheckedValidatorArray.prototype.valid = function () {
3646
+ CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3602
3647
  var _a;
3603
- 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;
3604
3649
  };
3605
- return CountGreaterThanUnCheckedValidatorArray;
3650
+ return CountEqualsUnCheckedValidatorArray;
3606
3651
  }(ValidatorArray));
3607
3652
 
3608
3653
  var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3620,34 +3665,34 @@ var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3620
3665
  return CountLessThanUnCheckedValidatorArray;
3621
3666
  }(ValidatorArray));
3622
3667
 
3623
- var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
3624
- __extends(CountLessThanCheckedValidatorArray, _super);
3625
- function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
3668
+ var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3669
+ __extends(CountUnCheckedValidatorArray, _super);
3670
+ function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
3626
3671
  if (autoValid === void 0) { autoValid = true; }
3627
3672
  var _this = _super.call(this, value, target, event, autoValid) || this;
3628
3673
  _this.count = count;
3629
3674
  return _this;
3630
3675
  }
3631
- CountLessThanCheckedValidatorArray.prototype.valid = function () {
3676
+ CountUnCheckedValidatorArray.prototype.valid = function () {
3632
3677
  var _a;
3633
- 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;
3634
3679
  };
3635
- return CountLessThanCheckedValidatorArray;
3680
+ return CountUnCheckedValidatorArray;
3636
3681
  }(ValidatorArray));
3637
3682
 
3638
- var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3639
- __extends(CountUnCheckedValidatorArray, _super);
3640
- function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
3683
+ var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3684
+ __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
3685
+ function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3641
3686
  if (autoValid === void 0) { autoValid = true; }
3642
3687
  var _this = _super.call(this, value, target, event, autoValid) || this;
3643
3688
  _this.count = count;
3644
3689
  return _this;
3645
3690
  }
3646
- CountUnCheckedValidatorArray.prototype.valid = function () {
3691
+ CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3647
3692
  var _a;
3648
- 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;
3649
3694
  };
3650
- return CountUnCheckedValidatorArray;
3695
+ return CountLessThanEqualsUnCheckedValidatorArray;
3651
3696
  }(ValidatorArray));
3652
3697
 
3653
3698
  var EmptyValidator = /** @class */ (function (_super) {
@@ -3664,9 +3709,9 @@ var EmptyValidator = /** @class */ (function (_super) {
3664
3709
  return EmptyValidator;
3665
3710
  }(Validator));
3666
3711
 
3667
- var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3668
- __extends(IncludeCheckedValidatorArray, _super);
3669
- function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3712
+ var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3713
+ __extends(ExcludeCheckedValidatorArray, _super);
3714
+ function ExcludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3670
3715
  if (allRequired === void 0) { allRequired = false; }
3671
3716
  if (autoValid === void 0) { autoValid = true; }
3672
3717
  var _this = _super.call(this, value, target, event, autoValid) || this;
@@ -3674,21 +3719,21 @@ var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3674
3719
  _this.allRequired = allRequired;
3675
3720
  return _this;
3676
3721
  }
3677
- IncludeCheckedValidatorArray.prototype.valid = function () {
3722
+ ExcludeCheckedValidatorArray.prototype.valid = function () {
3678
3723
  var _this = this;
3679
3724
  var _a;
3680
3725
  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);
3726
+ var unCheckedValue = valus.filter(function (it) { return !it.checked; }).map(function (it) { return it.value; });
3727
+ return unCheckedValue.length > 0 &&
3728
+ (!(unCheckedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3729
+ (this.allRequired ? unCheckedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3685
3730
  };
3686
- return IncludeCheckedValidatorArray;
3731
+ return ExcludeCheckedValidatorArray;
3687
3732
  }(ValidatorArray));
3688
3733
 
3689
- var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3690
- __extends(ExcludeCheckedValidatorArray, _super);
3691
- function ExcludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3734
+ var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3735
+ __extends(IncludeCheckedValidatorArray, _super);
3736
+ function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3692
3737
  if (allRequired === void 0) { allRequired = false; }
3693
3738
  if (autoValid === void 0) { autoValid = true; }
3694
3739
  var _this = _super.call(this, value, target, event, autoValid) || this;
@@ -3696,31 +3741,28 @@ var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3696
3741
  _this.allRequired = allRequired;
3697
3742
  return _this;
3698
3743
  }
3699
- ExcludeCheckedValidatorArray.prototype.valid = function () {
3744
+ IncludeCheckedValidatorArray.prototype.valid = function () {
3700
3745
  var _this = this;
3701
3746
  var _a;
3702
3747
  var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3703
- var unCheckedValue = valus.filter(function (it) { return !it.checked; }).map(function (it) { return it.value; });
3704
- return unCheckedValue.length > 0 &&
3705
- (!(unCheckedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3706
- (this.allRequired ? unCheckedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3748
+ var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
3749
+ return checkedValue.length > 0 &&
3750
+ (!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3751
+ (this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3707
3752
  };
3708
- return ExcludeCheckedValidatorArray;
3753
+ return IncludeCheckedValidatorArray;
3709
3754
  }(ValidatorArray));
3710
3755
 
3711
- var NotEmptyValidator = /** @class */ (function (_super) {
3712
- __extends(NotEmptyValidator, _super);
3713
- function NotEmptyValidator(value, target, event, autoValid) {
3756
+ var PassValidator = /** @class */ (function (_super) {
3757
+ __extends(PassValidator, _super);
3758
+ function PassValidator(value, target, event, autoValid) {
3714
3759
  if (autoValid === void 0) { autoValid = true; }
3715
3760
  return _super.call(this, value, target, event, autoValid) || this;
3716
3761
  }
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;
3762
+ PassValidator.prototype.valid = function () {
3763
+ return true;
3722
3764
  };
3723
- return NotEmptyValidator;
3765
+ return PassValidator;
3724
3766
  }(Validator));
3725
3767
 
3726
3768
  var FormValidator = /** @class */ (function (_super) {
@@ -3741,6 +3783,20 @@ var FormValidator = /** @class */ (function (_super) {
3741
3783
  return FormValidator;
3742
3784
  }(Validator));
3743
3785
 
3786
+ var RequiredValidator = /** @class */ (function (_super) {
3787
+ __extends(RequiredValidator, _super);
3788
+ function RequiredValidator(value, target, event, autoValid) {
3789
+ if (autoValid === void 0) { autoValid = true; }
3790
+ return _super.call(this, value, target, event, autoValid) || this;
3791
+ }
3792
+ RequiredValidator.prototype.valid = function () {
3793
+ var value = this.value;
3794
+ // console.log('required', value, value !== undefined && value !== null)
3795
+ return value !== undefined && value !== null;
3796
+ };
3797
+ return RequiredValidator;
3798
+ }(Validator));
3799
+
3744
3800
  var MultipleValidator = /** @class */ (function (_super) {
3745
3801
  __extends(MultipleValidator, _super);
3746
3802
  function MultipleValidator(validators, value, target, event, autoValid) {
@@ -3770,28 +3826,6 @@ var MultipleValidator = /** @class */ (function (_super) {
3770
3826
  return MultipleValidator;
3771
3827
  }(Validator));
3772
3828
 
3773
- var NotRegExpTestValidator = /** @class */ (function (_super) {
3774
- __extends(NotRegExpTestValidator, _super);
3775
- function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
3776
- if (autoValid === void 0) { autoValid = true; }
3777
- var _this = _super.call(this, value, target, event, autoValid) || this;
3778
- _this.regexp = DomRenderProxy.final(regexp);
3779
- return _this;
3780
- }
3781
- NotRegExpTestValidator.prototype.valid = function () {
3782
- var _a;
3783
- var value = this.value;
3784
- var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
3785
- if (value) {
3786
- return !regExp.test(value);
3787
- }
3788
- else {
3789
- return true;
3790
- }
3791
- };
3792
- return NotRegExpTestValidator;
3793
- }(Validator));
3794
-
3795
3829
  var RegExpTestValidator = /** @class */ (function (_super) {
3796
3830
  __extends(RegExpTestValidator, _super);
3797
3831
  function RegExpTestValidator(regexp, value, target, event, autoValid) {
@@ -3828,6 +3862,28 @@ var UnCheckedValidator = /** @class */ (function (_super) {
3828
3862
  return UnCheckedValidator;
3829
3863
  }(Validator));
3830
3864
 
3865
+ var NotRegExpTestValidator = /** @class */ (function (_super) {
3866
+ __extends(NotRegExpTestValidator, _super);
3867
+ function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
3868
+ if (autoValid === void 0) { autoValid = true; }
3869
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3870
+ _this.regexp = DomRenderProxy.final(regexp);
3871
+ return _this;
3872
+ }
3873
+ NotRegExpTestValidator.prototype.valid = function () {
3874
+ var _a;
3875
+ var value = this.value;
3876
+ var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
3877
+ if (value) {
3878
+ return !regExp.test(value);
3879
+ }
3880
+ else {
3881
+ return true;
3882
+ }
3883
+ };
3884
+ return NotRegExpTestValidator;
3885
+ }(Validator));
3886
+
3831
3887
  var ValidMultipleValidator = /** @class */ (function (_super) {
3832
3888
  __extends(ValidMultipleValidator, _super);
3833
3889
  function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
@@ -3843,46 +3899,21 @@ var ValidMultipleValidator = /** @class */ (function (_super) {
3843
3899
  return ValidMultipleValidator;
3844
3900
  }(MultipleValidator));
3845
3901
 
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
-
3858
- var RequiredValidator = /** @class */ (function (_super) {
3859
- __extends(RequiredValidator, _super);
3860
- function RequiredValidator(value, target, event, autoValid) {
3902
+ var NotEmptyValidator = /** @class */ (function (_super) {
3903
+ __extends(NotEmptyValidator, _super);
3904
+ function NotEmptyValidator(value, target, event, autoValid) {
3861
3905
  if (autoValid === void 0) { autoValid = true; }
3862
3906
  return _super.call(this, value, target, event, autoValid) || this;
3863
3907
  }
3864
- RequiredValidator.prototype.valid = function () {
3908
+ NotEmptyValidator.prototype.valid = function () {
3909
+ var _a, _b;
3865
3910
  var value = this.value;
3866
- // console.log('required', value, value !== undefined && value !== null)
3867
- return value !== undefined && value !== null;
3911
+ // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3912
+ return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3868
3913
  };
3869
- return RequiredValidator;
3914
+ return NotEmptyValidator;
3870
3915
  }(Validator));
3871
3916
 
3872
- var ValidValidatorArray = /** @class */ (function (_super) {
3873
- __extends(ValidValidatorArray, _super);
3874
- function ValidValidatorArray(validCallBack, value, target, event, autoValid) {
3875
- if (autoValid === void 0) { autoValid = true; }
3876
- var _this = _super.call(this, value, target, event, autoValid) || this;
3877
- _this.validCallBack = validCallBack;
3878
- return _this;
3879
- }
3880
- ValidValidatorArray.prototype.valid = function () {
3881
- return this.validCallBack(this.value, this.getTarget(), this.getEvent());
3882
- };
3883
- return ValidValidatorArray;
3884
- }(ValidatorArray));
3885
-
3886
3917
  var ValidValidator = /** @class */ (function (_super) {
3887
3918
  __extends(ValidValidator, _super);
3888
3919
  function ValidValidator(validCallBack, value, target, event, autoValid) {
@@ -3911,6 +3942,20 @@ var ValueEqualsValidator = /** @class */ (function (_super) {
3911
3942
  return ValueEqualsValidator;
3912
3943
  }(Validator));
3913
3944
 
3945
+ var ValidValidatorArray = /** @class */ (function (_super) {
3946
+ __extends(ValidValidatorArray, _super);
3947
+ function ValidValidatorArray(validCallBack, value, target, event, autoValid) {
3948
+ if (autoValid === void 0) { autoValid = true; }
3949
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3950
+ _this.validCallBack = validCallBack;
3951
+ return _this;
3952
+ }
3953
+ ValidValidatorArray.prototype.valid = function () {
3954
+ return this.validCallBack(this.value, this.getTarget(), this.getEvent());
3955
+ };
3956
+ return ValidValidatorArray;
3957
+ }(ValidatorArray));
3958
+
3914
3959
  var ValueNotEqualsValidator = /** @class */ (function (_super) {
3915
3960
  __extends(ValueNotEqualsValidator, _super);
3916
3961
  function ValueNotEqualsValidator(equalsValue, value, target, event, autoValid) {
@@ -3925,6 +3970,28 @@ var ValueNotEqualsValidator = /** @class */ (function (_super) {
3925
3970
  return ValueNotEqualsValidator;
3926
3971
  }(Validator));
3927
3972
 
3973
+ var ClipBoardUtils = /** @class */ (function () {
3974
+ function ClipBoardUtils() {
3975
+ }
3976
+ ClipBoardUtils.readText = function (clipboard) {
3977
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
3978
+ return clipboard.readText();
3979
+ };
3980
+ ClipBoardUtils.read = function (clipboard) {
3981
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
3982
+ return clipboard.read();
3983
+ };
3984
+ ClipBoardUtils.writeText = function (data, clipboard) {
3985
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
3986
+ return clipboard.writeText(data);
3987
+ };
3988
+ ClipBoardUtils.write = function (data, clipboard) {
3989
+ if (clipboard === void 0) { clipboard = navigator.clipboard; }
3990
+ return clipboard.write(data);
3991
+ };
3992
+ return ClipBoardUtils;
3993
+ }());
3994
+
3928
3995
  var NodeUtils = /** @class */ (function () {
3929
3996
  function NodeUtils() {
3930
3997
  }
@@ -3994,28 +4061,6 @@ var StorageUtils = /** @class */ (function () {
3994
4061
  return StorageUtils;
3995
4062
  }());
3996
4063
 
3997
- var ClipBoardUtils = /** @class */ (function () {
3998
- function ClipBoardUtils() {
3999
- }
4000
- ClipBoardUtils.readText = function (clipboard) {
4001
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
4002
- return clipboard.readText();
4003
- };
4004
- ClipBoardUtils.read = function (clipboard) {
4005
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
4006
- return clipboard.read();
4007
- };
4008
- ClipBoardUtils.writeText = function (data, clipboard) {
4009
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
4010
- return clipboard.writeText(data);
4011
- };
4012
- ClipBoardUtils.write = function (data, clipboard) {
4013
- if (clipboard === void 0) { clipboard = navigator.clipboard; }
4014
- return clipboard.write(data);
4015
- };
4016
- return ClipBoardUtils;
4017
- }());
4018
-
4019
4064
  exports.AllCheckedValidatorArray = AllCheckedValidatorArray;
4020
4065
  exports.AllUnCheckedValidatorArray = AllUnCheckedValidatorArray;
4021
4066
  exports.Appender = Appender;