dom-render 1.0.88 → 1.0.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/DomRenderProxy.js +31 -11
  2. package/README.MD +18 -11
  3. package/components/ComponentSet.d.ts +5 -2
  4. package/components/ComponentSet.js +2 -3
  5. package/configs/Config.d.ts +5 -0
  6. package/dist/bundle.js +582 -534
  7. package/events/EventManager.js +0 -1
  8. package/lifecycle/OnInitRender.d.ts +1 -6
  9. package/operators/Dr.d.ts +7 -3
  10. package/operators/Dr.js +21 -23
  11. package/operators/DrAppender.d.ts +7 -3
  12. package/operators/DrAppender.js +28 -26
  13. package/operators/DrFor.d.ts +7 -3
  14. package/operators/DrFor.js +24 -23
  15. package/operators/DrForOf.d.ts +7 -3
  16. package/operators/DrForOf.js +27 -26
  17. package/operators/DrForm.d.ts +7 -3
  18. package/operators/DrForm.js +51 -54
  19. package/operators/DrIf.d.ts +7 -3
  20. package/operators/DrIf.js +29 -32
  21. package/operators/DrInnerHTML.d.ts +7 -3
  22. package/operators/DrInnerHTML.js +19 -21
  23. package/operators/DrInnerText.d.ts +7 -3
  24. package/operators/DrInnerText.js +17 -19
  25. package/operators/DrPre.d.ts +6 -3
  26. package/operators/DrPre.js +9 -6
  27. package/operators/DrRepeat.d.ts +7 -3
  28. package/operators/DrRepeat.js +24 -23
  29. package/operators/DrTargetAttr.d.ts +6 -3
  30. package/operators/DrTargetAttr.js +10 -8
  31. package/operators/DrTargetElement.d.ts +6 -3
  32. package/operators/DrTargetElement.js +10 -32
  33. package/operators/DrThis.d.ts +4 -3
  34. package/operators/DrThis.js +21 -27
  35. package/operators/OperatorExecuter.d.ts +48 -0
  36. package/operators/OperatorExecuter.js +43 -0
  37. package/operators/OperatorExecuterAttrRequire.d.ts +8 -0
  38. package/operators/OperatorExecuterAttrRequire.js +55 -0
  39. package/package.json +1 -1
  40. package/rawsets/RawSet.d.ts +7 -1
  41. package/rawsets/RawSet.js +60 -42
  42. package/utils/location/LocationUtils.js +7 -1
  43. package/operators/OperatorRender.d.ts +0 -45
  44. package/operators/OperatorRender.js +0 -21
package/dist/bundle.js CHANGED
@@ -947,7 +947,6 @@ var EventManager = /** @class */ (function () {
947
947
  EventManager.ownerVariablePathAttrName = 'dr-owner-variable-path';
948
948
  EventManager.attrPrefix = 'dr-';
949
949
  EventManager.onInitAttrName = EventManager.attrPrefix + 'on-init';
950
- // public static readonly onComponentInitAttrName = EventManager.attrPrefix + 'on-component-init';
951
950
  EventManager.valueAttrName = EventManager.attrPrefix + 'value';
952
951
  EventManager.valueLinkAttrName = EventManager.attrPrefix + 'value-link';
953
952
  EventManager.attrAttrName = EventManager.attrPrefix + 'attr';
@@ -980,106 +979,155 @@ exports.ExecuteState = void 0;
980
979
  ExecuteState[ExecuteState["NO_EXECUTE"] = 1] = "NO_EXECUTE";
981
980
  ExecuteState[ExecuteState["STOP"] = 2] = "STOP";
982
981
  })(exports.ExecuteState || (exports.ExecuteState = {}));
983
- var OperatorRender = /** @class */ (function () {
984
- function OperatorRender(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
982
+ var OperatorExecuter = /** @class */ (function () {
983
+ function OperatorExecuter(rawSet, render, returnContainer, elementSource, source, afterCallBack, startingExecute) {
984
+ if (startingExecute === void 0) { startingExecute = true; }
985
985
  this.rawSet = rawSet;
986
986
  this.render = render;
987
987
  this.returnContainer = returnContainer;
988
988
  this.elementSource = elementSource;
989
989
  this.source = source;
990
990
  this.afterCallBack = afterCallBack;
991
+ this.startingExecute = startingExecute;
991
992
  }
992
- return OperatorRender;
993
+ OperatorExecuter.prototype.start = function () {
994
+ var _a, _b, _c, _d, _e, _f;
995
+ var attrValue = this.elementSource.attr;
996
+ if ((_a = this.source.operatorAround) === null || _a === void 0 ? void 0 : _a.beforeAttr) {
997
+ attrValue = (_b = this.source.operatorAround.beforeAttr(attrValue, this)) !== null && _b !== void 0 ? _b : '';
998
+ }
999
+ var r = attrValue;
1000
+ if (r && this.startingExecute) {
1001
+ r = ScriptUtils.eval(" ".concat(this.render.bindScript, "; return ").concat(attrValue), Object.assign(this.source.obj, { __render: this.render }));
1002
+ }
1003
+ if ((_c = this.source.operatorAround) === null || _c === void 0 ? void 0 : _c.before) {
1004
+ r = (_d = this.source.operatorAround) === null || _d === void 0 ? void 0 : _d.before(r, this);
1005
+ }
1006
+ var state = this.execute(r);
1007
+ (_f = (_e = this.source.operatorAround) === null || _e === void 0 ? void 0 : _e.after) === null || _f === void 0 ? void 0 : _f.call(_e, r, this);
1008
+ return state;
1009
+ };
1010
+ return OperatorExecuter;
993
1011
  }());
994
1012
 
995
1013
  var DrPre = /** @class */ (function (_super) {
996
1014
  __extends(DrPre, _super);
997
- function DrPre() {
998
- return _super !== null && _super.apply(this, arguments) || this;
1015
+ function DrPre(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1016
+ var _this = this;
1017
+ source.operatorAround = undefined;
1018
+ _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack) || this;
1019
+ return _this;
999
1020
  }
1000
- DrPre.prototype.execRender = function () {
1001
- return (this.elementSource.attrs.drPre != null) ? exports.ExecuteState.EXECUTE : exports.ExecuteState.NO_EXECUTE;
1021
+ DrPre.prototype.execute = function (value) {
1022
+ return (value != null) ? exports.ExecuteState.EXECUTE : exports.ExecuteState.NO_EXECUTE;
1002
1023
  };
1003
1024
  return DrPre;
1004
- }(OperatorRender));
1025
+ }(OperatorExecuter));
1026
+
1027
+ // export type OperatorAround = {
1028
+ // beforeAttr?: (value: string, obj: any) => string,
1029
+ // before?: (data: any, obj: any) => any,
1030
+ // after?: (data: any, obj: any) => void,
1031
+ // }
1032
+ //
1033
+ // export enum ExecuteState {
1034
+ // EXECUTE,
1035
+ // NO_EXECUTE,
1036
+ // STOP
1037
+ // }
1038
+ //
1039
+ // export type AfterCallBack = {
1040
+ // onAttrInitCallBacks: AttrInitCallBack[],
1041
+ // onElementInitCallBacks: ElementInitCallBack[],
1042
+ // onThisComponentSetCallBacks: ComponentSet[]
1043
+ // }
1044
+ var OperatorExecuterAttrRequire = /** @class */ (function (_super) {
1045
+ __extends(OperatorExecuterAttrRequire, _super);
1046
+ function OperatorExecuterAttrRequire(rawSet, render, returnContainer, elementSource, source, afterCallBack, startingExecute) {
1047
+ if (startingExecute === void 0) { startingExecute = true; }
1048
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, startingExecute) || this;
1049
+ }
1050
+ // executes(): ExecuteState {
1051
+ // return ExecuteState.EXECUTE;
1052
+ // }
1053
+ OperatorExecuterAttrRequire.prototype.execute = function (data) {
1054
+ if (!this.elementSource.attr) {
1055
+ return exports.ExecuteState.NO_EXECUTE;
1056
+ }
1057
+ return this.executeAttrRequire(data);
1058
+ };
1059
+ return OperatorExecuterAttrRequire;
1060
+ }(OperatorExecuter));
1005
1061
 
1006
1062
  var Dr = /** @class */ (function (_super) {
1007
1063
  __extends(Dr, _super);
1008
- function Dr() {
1009
- return _super !== null && _super.apply(this, arguments) || this;
1064
+ function Dr(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1065
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack) || this;
1010
1066
  }
1011
- Dr.prototype.execRender = function () {
1067
+ Dr.prototype.executeAttrRequire = function (data) {
1012
1068
  var _a;
1013
1069
  var _b, _c;
1014
- if (this.elementSource.attrs.dr !== null && this.elementSource.attrs.dr.length >= 0) {
1015
- var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1016
- var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1017
- var newTemp = this.source.config.window.document.createElement('temp');
1018
- ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n const n = $element.cloneNode(true);\n var destIt = ").concat(this.elementSource.attrs.drItOption, ";\n if (destIt !== undefined) {\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt)))\n // console.log('----', n.innerHTML);\n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt);\n // console.log('----', n.innerHTML);\n }\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__fag.append(it));\n } else {\n this.__render.fag.append(n);\n }"), Object.assign(this.source.obj, {
1019
- __render: Object.freeze(__assign({ fag: newTemp, drStripOption: this.elementSource.attrs.drStripOption }, this.render))
1020
- }));
1021
- RawSet.drVarDecoding(newTemp, vars);
1022
- RawSet.drItOtherDecoding(newTemp, itRandom);
1023
- var tempalte = this.source.config.window.document.createElement('template');
1024
- tempalte.innerHTML = newTemp.innerHTML;
1025
- this.returnContainer.fag.append(tempalte.content);
1026
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1027
- (_c = this.elementSource.element.parentNode) === null || _c === void 0 ? void 0 : _c.replaceChild(this.returnContainer.fag, this.elementSource.element);
1028
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1029
- return exports.ExecuteState.EXECUTE;
1030
- }
1031
- return exports.ExecuteState.NO_EXECUTE;
1070
+ var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1071
+ var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1072
+ var newTemp = this.source.config.window.document.createElement('temp');
1073
+ ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n const n = $element.cloneNode(true);\n var destIt = ").concat(this.elementSource.attrs.drItOption, ";\n if (destIt !== undefined) {\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt)))\n // console.log('----', n.innerHTML);\n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt);\n // console.log('----', n.innerHTML);\n }\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__fag.append(it));\n } else {\n this.__render.fag.append(n);\n }"), Object.assign(this.source.obj, {
1074
+ __render: Object.freeze(__assign({ fag: newTemp, drStripOption: this.elementSource.attrs.drStripOption }, this.render))
1075
+ }));
1076
+ RawSet.drVarDecoding(newTemp, vars);
1077
+ RawSet.drItOtherDecoding(newTemp, itRandom);
1078
+ var tempalte = this.source.config.window.document.createElement('template');
1079
+ tempalte.innerHTML = newTemp.innerHTML;
1080
+ this.returnContainer.fag.append(tempalte.content);
1081
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1082
+ (_c = this.elementSource.element.parentNode) === null || _c === void 0 ? void 0 : _c.replaceChild(this.returnContainer.fag, this.elementSource.element);
1083
+ (_a = this.returnContainer.raws).push.apply(_a, rr);
1084
+ return exports.ExecuteState.EXECUTE;
1032
1085
  };
1033
1086
  return Dr;
1034
- }(OperatorRender));
1087
+ }(OperatorExecuterAttrRequire));
1035
1088
 
1036
1089
  var DrIf = /** @class */ (function (_super) {
1037
1090
  __extends(DrIf, _super);
1038
- function DrIf() {
1039
- return _super !== null && _super.apply(this, arguments) || this;
1091
+ function DrIf(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1092
+ var _this = this;
1093
+ source.operatorAround = undefined;
1094
+ _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1095
+ return _this;
1040
1096
  }
1041
- DrIf.prototype.execRender = function () {
1097
+ DrIf.prototype.executeAttrRequire = function (attr) {
1042
1098
  var _a;
1043
1099
  var _b, _c, _d, _e;
1044
- if (this.elementSource.attrs.drIf) {
1045
- var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1046
- var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1047
- var newTemp = this.source.config.window.document.createElement('temp');
1048
- // Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drIf' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v)); <-- 이부분은 다른 attr에도 적용을 할지말지 생각해야됨 엘리먼트 존재유무에 따라서 적용을 할지말지 결정해야됨
1049
- var keepgoing = ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n if ($rawset.data === (").concat(this.elementSource.attrs.drIf, ")) {\n return false;\n }\n $rawset.data = ").concat(this.elementSource.attrs.drIf, "\n if($rawset.data) {\n const n = $element.cloneNode(true);\n Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drIf' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));\n var destIt = ").concat(this.elementSource.attrs.drItOption, ";\n if (destIt !== undefined) {\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt)))\n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt);\n }\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n }\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', ";\n return true;\n "), Object.assign(this.source.obj, {
1050
- __render: Object.freeze(__assign({ fag: newTemp, drAttr: this.elementSource.attrs, drAttrsOriginName: RawSet.drAttrsOriginName, drStripOption: this.elementSource.attrs.drStripOption }, this.render))
1051
- }));
1052
- // console.log('keepgoing', keepgoing);
1053
- if (keepgoing === false) {
1054
- return exports.ExecuteState.STOP;
1055
- }
1056
- RawSet.drVarDecoding(newTemp, vars);
1057
- RawSet.drItOtherDecoding(newTemp, itRandom);
1058
- // const bypass = (newTemp.innerHTML ?? '').trim().length <= 0;
1059
- var tempalte = this.source.config.window.document.createElement('template');
1060
- tempalte.innerHTML = newTemp.innerHTML;
1061
- // console.log(tempalte.innerHTML)
1062
- this.returnContainer.fag.append(tempalte.content);
1063
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1064
- (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1065
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1066
- // if (bypass) {
1067
- // continue;
1068
- // }
1069
- return exports.ExecuteState.EXECUTE;
1070
- }
1071
- return exports.ExecuteState.NO_EXECUTE;
1100
+ var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1101
+ var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1102
+ var newTemp = this.source.config.window.document.createElement('temp');
1103
+ // Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drIf' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v)); <-- 이부분은 다른 attr에도 적용을 할지말지 생각해야됨 엘리먼트 존재유무에 따라서 적용을 할지말지 결정해야됨
1104
+ var keepgoing = ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n if ($rawset.data === (").concat(attr, ")) {\n return false;\n }\n $rawset.data = ").concat(attr, ";\n if($rawset.data) {\n const n = $element.cloneNode(true);\n Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drIf' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));\n var destIt = ").concat(this.elementSource.attrs.drItOption, ";\n if (destIt !== undefined) {\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt)))\n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt);\n }\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n }\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', ";\n return true;\n "), Object.assign(this.source.obj, {
1105
+ __render: Object.freeze(__assign({ fag: newTemp, drAttr: this.elementSource.attrs, drAttrsOriginName: RawSet.drAttrsOriginName, drStripOption: this.elementSource.attrs.drStripOption }, this.render))
1106
+ }));
1107
+ // TODO: 뭐지?? 지워야되는거 아닌가?
1108
+ if (keepgoing === false) {
1109
+ return exports.ExecuteState.STOP;
1110
+ }
1111
+ RawSet.drVarDecoding(newTemp, vars);
1112
+ RawSet.drItOtherDecoding(newTemp, itRandom);
1113
+ // const bypass = (newTemp.innerHTML ?? '').trim().length <= 0;
1114
+ var tempalte = this.source.config.window.document.createElement('template');
1115
+ tempalte.innerHTML = newTemp.innerHTML;
1116
+ this.returnContainer.fag.append(tempalte.content);
1117
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1118
+ (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1119
+ (_a = this.returnContainer.raws).push.apply(_a, rr);
1120
+ return exports.ExecuteState.EXECUTE;
1072
1121
  };
1073
1122
  return DrIf;
1074
- }(OperatorRender));
1123
+ }(OperatorExecuterAttrRequire));
1075
1124
 
1076
1125
  var ComponentSet = /** @class */ (function () {
1077
- function ComponentSet(obj, template, styles, styleLocale) {
1078
- if (styleLocale === void 0) { styleLocale = false; }
1126
+ function ComponentSet(obj, template, styles, config) {
1079
1127
  this.obj = obj;
1080
1128
  this.template = template;
1081
1129
  this.styles = styles;
1082
- this.styleLocale = styleLocale;
1130
+ this.config = Object.assign({ objPath: 'obj' }, config);
1083
1131
  }
1084
1132
  return ComponentSet;
1085
1133
  }());
@@ -1089,40 +1137,34 @@ var DrThis = /** @class */ (function (_super) {
1089
1137
  function DrThis() {
1090
1138
  return _super !== null && _super.apply(this, arguments) || this;
1091
1139
  }
1092
- DrThis.prototype.execRender = function () {
1140
+ DrThis.prototype.executeAttrRequire = function (attr) {
1093
1141
  var _a;
1094
1142
  var _b, _c, _d, _e, _f;
1095
- if (this.elementSource.attrs.drThis) {
1096
- var r = ScriptUtils.evalReturn(this.elementSource.attrs.drThis, this.source.obj);
1097
- // const isStrip = ScriptUtils.eval(`if (${this.elementSource.attrs.drStripOption ?? 'false'}) { return true; } else { return false; }`, this.source.obj);
1098
- // console.log('isStrip', isStrip)
1099
- if (r) {
1100
- if (r instanceof ComponentSet) {
1101
- if (this.rawSet.data) {
1102
- var destroyOptions = (_c = (_b = this.elementSource.attrs.drDestroyOption) === null || _b === void 0 ? void 0 : _b.split(',')) !== null && _c !== void 0 ? _c : [];
1103
- RawSet.destroy(this.rawSet.data.obj, [], this.source.config, destroyOptions);
1104
- }
1105
- this.rawSet.data = r;
1106
- var componentBody = RawSet.drThisCreate(this.rawSet, this.elementSource.element, "".concat(this.elementSource.attrs.drThis, ".obj"), (_d = this.elementSource.attrs.drVarOption) !== null && _d !== void 0 ? _d : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config, r);
1107
- this.returnContainer.fag.append(componentBody);
1108
- this.afterCallBack.onThisComponentSetCallBacks.push(r);
1109
- }
1110
- else {
1111
- this.returnContainer.fag.append(RawSet.drThisCreate(this.rawSet, 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));
1143
+ if (attr && this.elementSource.attrs.drThis) {
1144
+ if (attr instanceof ComponentSet) {
1145
+ if (this.rawSet.data) {
1146
+ var destroyOptions = (_c = (_b = this.elementSource.attrs.drDestroyOption) === null || _b === void 0 ? void 0 : _b.split(',')) !== null && _c !== void 0 ? _c : [];
1147
+ RawSet.destroy(this.rawSet.data.obj, [], this.source.config, destroyOptions);
1112
1148
  }
1113
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1114
- (_f = this.elementSource.element.parentNode) === null || _f === void 0 ? void 0 : _f.replaceChild(this.returnContainer.fag, this.elementSource.element);
1115
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1149
+ this.rawSet.data = attr;
1150
+ var componentBody = RawSet.drThisCreate(this.rawSet, this.elementSource.element, "".concat(this.elementSource.attrs.drThis).concat(attr.config.objPath ? ('.' + attr.config.objPath) : ''), (_d = this.elementSource.attrs.drVarOption) !== null && _d !== void 0 ? _d : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config, attr);
1151
+ this.returnContainer.fag.append(componentBody);
1152
+ this.afterCallBack.onThisComponentSetCallBacks.push(attr);
1116
1153
  }
1117
1154
  else {
1118
- this.elementSource.element.remove();
1155
+ this.returnContainer.fag.append(RawSet.drThisCreate(this.rawSet, 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));
1119
1156
  }
1120
- return exports.ExecuteState.EXECUTE;
1157
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1158
+ (_f = this.elementSource.element.parentNode) === null || _f === void 0 ? void 0 : _f.replaceChild(this.returnContainer.fag, this.elementSource.element);
1159
+ (_a = this.returnContainer.raws).push.apply(_a, rr);
1121
1160
  }
1122
- return exports.ExecuteState.NO_EXECUTE;
1161
+ else {
1162
+ this.elementSource.element.remove();
1163
+ }
1164
+ return exports.ExecuteState.EXECUTE;
1123
1165
  };
1124
1166
  return DrThis;
1125
- }(OperatorRender));
1167
+ }(OperatorExecuterAttrRequire));
1126
1168
 
1127
1169
  // export interface Valid<T = any, E = Element> {
1128
1170
  // valid(value?: T, target?: E, event?: Event): boolean;
@@ -1454,255 +1496,249 @@ var ValidatorArray = /** @class */ (function (_super) {
1454
1496
 
1455
1497
  var DrForm = /** @class */ (function (_super) {
1456
1498
  __extends(DrForm, _super);
1457
- function DrForm() {
1458
- return _super !== null && _super.apply(this, arguments) || this;
1499
+ function DrForm(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1500
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1459
1501
  }
1460
- DrForm.prototype.execRender = function () {
1502
+ DrForm.prototype.executeAttrRequire = function (attr) {
1461
1503
  var _a;
1462
1504
  var _this = this;
1463
1505
  var _b;
1464
- if (this.elementSource.attrs.drForm) {
1465
- RawSet.drFormOtherMoveAttr(this.elementSource.element, 'name', 'temp-name', this.source.config);
1466
- var data = ScriptUtils.evalReturn("".concat(this.elementSource.attrs.drForm), this.source.obj);
1467
- var childs = Array.from(this.elementSource.element.querySelectorAll('[name]'));
1468
- var fromName = ScriptUtils.evalReturn((_b = this.elementSource.element.getAttribute('dr-form:name')) !== null && _b !== void 0 ? _b : '', this.source.obj);
1469
- var thisName = fromName !== null && fromName !== void 0 ? fromName : this.elementSource.element.getAttribute('name');
1470
- // console.log('dr-form:name', thisName, element.getAttribute('dr-form:name'), obj, element);
1471
- // // 자기자신이 Input 대상일때
1472
- if (childs.length <= 0 && thisName) {
1473
- childs.push(this.elementSource.element);
1506
+ RawSet.drFormOtherMoveAttr(this.elementSource.element, 'name', 'temp-name', this.source.config);
1507
+ var data = ScriptUtils.evalReturn("".concat(attr), this.source.obj);
1508
+ var childs = Array.from(this.elementSource.element.querySelectorAll('[name]'));
1509
+ var fromName = ScriptUtils.evalReturn((_b = this.elementSource.element.getAttribute("".concat(RawSet.DR_FORM_NAME, ":name"))) !== null && _b !== void 0 ? _b : '', this.source.obj);
1510
+ var thisName = fromName !== null && fromName !== void 0 ? fromName : this.elementSource.element.getAttribute('name');
1511
+ // // 자기자신이 Input 대상일때
1512
+ if (childs.length <= 0 && thisName) {
1513
+ childs.push(this.elementSource.element);
1514
+ }
1515
+ else {
1516
+ if (data instanceof Validator) {
1517
+ data.setTarget(this.elementSource.element);
1474
1518
  }
1475
- else {
1476
- if (data instanceof Validator) {
1477
- data.setTarget(this.elementSource.element);
1519
+ }
1520
+ childs.forEach(function (it) {
1521
+ var _a, _b, _c, _d, _e;
1522
+ var eventName = (_a = it.getAttribute("".concat(RawSet.DR_FORM_NAME, ":event"))) !== null && _a !== void 0 ? _a : 'change';
1523
+ var validatorName = it.getAttribute("".concat(RawSet.DR_FORM_NAME, ":validator"));
1524
+ var attrEventName = EventManager.attrPrefix + 'event-' + eventName;
1525
+ var varpath = (_c = ScriptUtils.evalReturn((_b = _this.elementSource.element.getAttribute("".concat(RawSet.DR_FORM_NAME, ":name"))) !== null && _b !== void 0 ? _b : '', _this.source.obj)) !== null && _c !== void 0 ? _c : it.getAttribute('name');
1526
+ if (varpath != null) {
1527
+ if (validatorName) {
1528
+ ScriptUtils.eval("\n ".concat(_this.render.bindScript, "\n const validator = typeof ").concat(validatorName, " ==='function' ? new ").concat(validatorName, "() : ").concat(validatorName, ";\n ").concat(attr, "['").concat(varpath, "'] = validator;\n "), Object.assign(_this.source.obj, {
1529
+ __render: Object.freeze(__assign({ drStripOption: _this.elementSource.attrs.drStripOption }, _this.render))
1530
+ }));
1478
1531
  }
1479
- }
1480
- childs.forEach(function (it) {
1481
- var _a, _b, _c, _d, _e;
1482
- var eventName = (_a = it.getAttribute('dr-form:event')) !== null && _a !== void 0 ? _a : 'change';
1483
- var validatorName = it.getAttribute('dr-form:validator');
1484
- var attrEventName = EventManager.attrPrefix + 'event-' + eventName;
1485
- var varpath = (_c = ScriptUtils.evalReturn((_b = _this.elementSource.element.getAttribute('dr-form:name')) !== null && _b !== void 0 ? _b : '', _this.source.obj)) !== null && _c !== void 0 ? _c : it.getAttribute('name');
1486
- if (varpath != null) {
1487
- if (validatorName) {
1488
- ScriptUtils.eval("\n ".concat(_this.render.bindScript, "\n const validator = typeof ").concat(validatorName, " ==='function' ? new ").concat(validatorName, "() : ").concat(validatorName, ";\n ").concat(_this.elementSource.attrs.drForm, "['").concat(varpath, "'] = validator;\n "), Object.assign(_this.source.obj, {
1489
- __render: Object.freeze(__assign({ drStripOption: _this.elementSource.attrs.drStripOption }, _this.render))
1490
- }));
1491
- }
1492
- varpath = "".concat(_this.elementSource.attrs.drForm, "['").concat(varpath, "']");
1493
- var data_1 = ScriptUtils.evalReturn("".concat(varpath), _this.source.obj);
1494
- if (data_1 instanceof ValidatorArray) {
1495
- it.setAttribute(attrEventName, "".concat(varpath, ".setArrayValue($target, $target.value, $event); ").concat((_d = it.getAttribute(attrEventName)) !== null && _d !== void 0 ? _d : '', ";"));
1496
- data_1.addValidator(it.value, it);
1497
- }
1498
- else if (data_1 instanceof Validator) {
1499
- // varpath += (varpath ? '.value' : 'value');
1500
- // varpath = drAttr.drForm + '.' + varpath;
1501
- // it.setAttribute(attrEventName, `${varpath} = $target.value; ${target}=$target; ${event}=$event;`);
1502
- it.setAttribute(attrEventName, "".concat(varpath, ".set($target.value, $target, $event); ").concat((_e = it.getAttribute(attrEventName)) !== null && _e !== void 0 ? _e : '', ";"));
1503
- data_1.setTarget(it);
1504
- data_1.value = it.value;
1505
- }
1506
- else {
1507
- it.setAttribute(attrEventName, "".concat(varpath, " = $target.value;"));
1508
- }
1532
+ varpath = "".concat(attr, "['").concat(varpath, "']");
1533
+ var data_1 = ScriptUtils.evalReturn("".concat(varpath), _this.source.obj);
1534
+ if (data_1 instanceof ValidatorArray) {
1535
+ it.setAttribute(attrEventName, "".concat(varpath, ".setArrayValue($target, $target.value, $event); ").concat((_d = it.getAttribute(attrEventName)) !== null && _d !== void 0 ? _d : '', ";"));
1536
+ data_1.addValidator(it.value, it);
1509
1537
  }
1510
- });
1511
- RawSet.drFormOtherMoveAttr(this.elementSource.element, 'temp-name', 'name', this.source.config);
1512
- (_a = this.returnContainer.raws).push.apply(_a, RawSet.checkPointCreates(this.elementSource.element, this.source.obj, this.source.config));
1513
- return exports.ExecuteState.EXECUTE;
1514
- }
1515
- return exports.ExecuteState.NO_EXECUTE;
1538
+ else if (data_1 instanceof Validator) {
1539
+ // varpath += (varpath ? '.value' : 'value');
1540
+ // varpath = drAttr.drForm + '.' + varpath;
1541
+ // it.setAttribute(attrEventName, `${varpath} = $target.value; ${target}=$target; ${event}=$event;`);
1542
+ it.setAttribute(attrEventName, "".concat(varpath, ".set($target.value, $target, $event); ").concat((_e = it.getAttribute(attrEventName)) !== null && _e !== void 0 ? _e : '', ";"));
1543
+ data_1.setTarget(it);
1544
+ data_1.value = it.value;
1545
+ }
1546
+ else {
1547
+ it.setAttribute(attrEventName, "".concat(varpath, " = $target.value;"));
1548
+ }
1549
+ }
1550
+ });
1551
+ RawSet.drFormOtherMoveAttr(this.elementSource.element, 'temp-name', 'name', this.source.config);
1552
+ (_a = this.returnContainer.raws).push.apply(_a, RawSet.checkPointCreates(this.elementSource.element, this.source.obj, this.source.config));
1553
+ return exports.ExecuteState.EXECUTE;
1516
1554
  };
1517
1555
  return DrForm;
1518
- }(OperatorRender));
1556
+ }(OperatorExecuterAttrRequire));
1519
1557
 
1520
1558
  var DrInnerText = /** @class */ (function (_super) {
1521
1559
  __extends(DrInnerText, _super);
1522
- function DrInnerText() {
1523
- return _super !== null && _super.apply(this, arguments) || this;
1560
+ function DrInnerText(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1561
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1524
1562
  }
1525
- DrInnerText.prototype.execRender = function () {
1563
+ DrInnerText.prototype.executeAttrRequire = function (attr) {
1526
1564
  var _a;
1527
1565
  var _b, _c, _d;
1528
- if (this.elementSource.attrs.drInnerText) {
1529
- var newTemp = this.source.config.window.document.createElement('temp');
1530
- ScriptUtils.eval(" \n ".concat(this.render.bindScript, "\n const n = $element.cloneNode(true); \n ").concat((_b = this.elementSource.attrs.drBeforeOption) !== null && _b !== void 0 ? _b : '', "\n n.innerText = ").concat(this.elementSource.attrs.drInnerText, ";\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n ").concat((_c = this.elementSource.attrs.drAfterOption) !== null && _c !== void 0 ? _c : '', "\n "), Object.assign(this.source.obj, {
1531
- __render: Object.freeze(__assign({ drStripOption: this.elementSource.attrs.drStripOption, fag: newTemp }, this.render))
1532
- }));
1533
- var tempalte = this.source.config.window.document.createElement('template');
1534
- tempalte.innerHTML = newTemp.innerHTML;
1535
- this.returnContainer.fag.append(tempalte.content);
1536
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1537
- (_d = this.elementSource.element.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(this.returnContainer.fag, this.elementSource.element);
1538
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1539
- return exports.ExecuteState.EXECUTE;
1540
- }
1541
- return exports.ExecuteState.NO_EXECUTE;
1566
+ var newTemp = this.source.config.window.document.createElement('temp');
1567
+ ScriptUtils.eval(" \n ".concat(this.render.bindScript, "\n const n = $element.cloneNode(true); \n ").concat((_b = this.elementSource.attrs.drBeforeOption) !== null && _b !== void 0 ? _b : '', "\n n.innerText = ").concat(attr, ";\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n ").concat((_c = this.elementSource.attrs.drAfterOption) !== null && _c !== void 0 ? _c : '', "\n "), Object.assign(this.source.obj, {
1568
+ __render: Object.freeze(__assign({ drStripOption: this.elementSource.attrs.drStripOption, fag: newTemp }, this.render))
1569
+ }));
1570
+ var tempalte = this.source.config.window.document.createElement('template');
1571
+ tempalte.innerHTML = newTemp.innerHTML;
1572
+ this.returnContainer.fag.append(tempalte.content);
1573
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1574
+ (_d = this.elementSource.element.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(this.returnContainer.fag, this.elementSource.element);
1575
+ (_a = this.returnContainer.raws).push.apply(_a, rr);
1576
+ return exports.ExecuteState.EXECUTE;
1542
1577
  };
1543
1578
  return DrInnerText;
1544
- }(OperatorRender));
1579
+ }(OperatorExecuterAttrRequire));
1545
1580
 
1546
1581
  var DrInnerHTML = /** @class */ (function (_super) {
1547
1582
  __extends(DrInnerHTML, _super);
1548
- function DrInnerHTML() {
1549
- return _super !== null && _super.apply(this, arguments) || this;
1583
+ function DrInnerHTML(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1584
+ return _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1550
1585
  }
1551
- DrInnerHTML.prototype.execRender = function () {
1586
+ DrInnerHTML.prototype.executeAttrRequire = function (attr) {
1552
1587
  var _a;
1553
1588
  var _b, _c, _d;
1554
- if (this.elementSource.attrs.drInnerHTML) {
1555
- var newTemp = this.source.config.window.document.createElement('temp');
1556
- ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n const n = $element.cloneNode(true);\n ").concat((_b = this.elementSource.attrs.drBeforeOption) !== null && _b !== void 0 ? _b : '', "\n n.innerHTML = ").concat(this.elementSource.attrs.drInnerHTML, ";\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n ").concat((_c = this.elementSource.attrs.drAfterOption) !== null && _c !== void 0 ? _c : '', "\n "), Object.assign(this.source.obj, {
1557
- __render: Object.freeze(__assign({ drStripOption: this.elementSource.attrs.drStripOption, fag: newTemp }, this.render
1558
- // eslint-disable-next-line no-use-before-define
1559
- ))
1560
- }));
1561
- var tempalte = this.source.config.window.document.createElement('template');
1562
- tempalte.innerHTML = newTemp.innerHTML;
1563
- this.returnContainer.fag.append(tempalte.content);
1564
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1565
- (_d = this.elementSource.element.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(this.returnContainer.fag, this.elementSource.element);
1566
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1567
- return exports.ExecuteState.EXECUTE;
1568
- }
1569
- return exports.ExecuteState.NO_EXECUTE;
1589
+ var newTemp = this.source.config.window.document.createElement('temp');
1590
+ ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n const n = $element.cloneNode(true);\n ").concat((_b = this.elementSource.attrs.drBeforeOption) !== null && _b !== void 0 ? _b : '', "\n n.innerHTML = ").concat(attr, ";\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n ").concat((_c = this.elementSource.attrs.drAfterOption) !== null && _c !== void 0 ? _c : '', "\n "), Object.assign(this.source.obj, {
1591
+ __render: Object.freeze(__assign({ drStripOption: this.elementSource.attrs.drStripOption, fag: newTemp }, this.render
1592
+ // eslint-disable-next-line no-use-before-define
1593
+ ))
1594
+ }));
1595
+ var tempalte = this.source.config.window.document.createElement('template');
1596
+ tempalte.innerHTML = newTemp.innerHTML;
1597
+ this.returnContainer.fag.append(tempalte.content);
1598
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1599
+ (_d = this.elementSource.element.parentNode) === null || _d === void 0 ? void 0 : _d.replaceChild(this.returnContainer.fag, this.elementSource.element);
1600
+ (_a = this.returnContainer.raws).push.apply(_a, rr);
1601
+ return exports.ExecuteState.EXECUTE;
1570
1602
  };
1571
1603
  return DrInnerHTML;
1572
- }(OperatorRender));
1604
+ }(OperatorExecuterAttrRequire));
1573
1605
 
1574
1606
  var DrFor = /** @class */ (function (_super) {
1575
1607
  __extends(DrFor, _super);
1576
- function DrFor() {
1577
- return _super !== null && _super.apply(this, arguments) || this;
1608
+ function DrFor(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1609
+ var _this = this;
1610
+ source.operatorAround = undefined;
1611
+ _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1612
+ return _this;
1578
1613
  }
1579
- DrFor.prototype.execRender = function () {
1614
+ DrFor.prototype.executeAttrRequire = function (attr) {
1580
1615
  var _a;
1581
1616
  var _b, _c, _d, _e;
1582
- if (this.elementSource.attrs.drFor) {
1583
- var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1584
- var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1585
- var newTemp = this.source.config.window.document.createElement('temp');
1586
- ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n for(").concat(this.elementSource.attrs.drFor, ") {\n const n = this.__render.element.cloneNode(true);\n var destIt = ").concat(this.elementSource.attrs.drItOption, ";\n if (destIt !== undefined) {\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearForIt\\#/g, destIt).replace(/\\#nearForIndex\\#/g, destIt))) \n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, destIt);\n }\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n }\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', "\n "), Object.assign(this.source.obj, {
1587
- __render: Object.freeze(__assign({ fag: newTemp, drStripOption: this.elementSource.attrs.drStripOption }, this.render))
1588
- }));
1589
- RawSet.drVarDecoding(newTemp, vars);
1590
- RawSet.drItOtherDecoding(newTemp, itRandom);
1591
- var tempalte = this.source.config.window.document.createElement('template');
1592
- tempalte.innerHTML = newTemp.innerHTML;
1593
- this.returnContainer.fag.append(tempalte.content);
1594
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1595
- (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1596
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1597
- return exports.ExecuteState.EXECUTE;
1598
- }
1599
- return exports.ExecuteState.NO_EXECUTE;
1617
+ var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1618
+ var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1619
+ var newTemp = this.source.config.window.document.createElement('temp');
1620
+ ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n for(").concat(attr, ") {\n const n = this.__render.element.cloneNode(true);\n var destIt = ").concat(this.elementSource.attrs.drItOption, ";\n if (destIt !== undefined) {\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearForIt\\#/g, destIt).replace(/\\#nearForIndex\\#/g, destIt))) \n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, destIt);\n }\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n }\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', "\n "), Object.assign(this.source.obj, {
1621
+ __render: Object.freeze(__assign({ fag: newTemp, drStripOption: this.elementSource.attrs.drStripOption }, this.render))
1622
+ }));
1623
+ RawSet.drVarDecoding(newTemp, vars);
1624
+ RawSet.drItOtherDecoding(newTemp, itRandom);
1625
+ var tempalte = this.source.config.window.document.createElement('template');
1626
+ tempalte.innerHTML = newTemp.innerHTML;
1627
+ this.returnContainer.fag.append(tempalte.content);
1628
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1629
+ (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1630
+ (_a = this.returnContainer.raws).push.apply(_a, rr);
1631
+ return exports.ExecuteState.EXECUTE;
1600
1632
  };
1601
1633
  return DrFor;
1602
- }(OperatorRender));
1634
+ }(OperatorExecuterAttrRequire));
1603
1635
 
1604
1636
  var DrForOf = /** @class */ (function (_super) {
1605
1637
  __extends(DrForOf, _super);
1606
- function DrForOf() {
1607
- return _super !== null && _super.apply(this, arguments) || this;
1638
+ function DrForOf(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1639
+ var _this = this;
1640
+ source.operatorAround = undefined;
1641
+ _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1642
+ return _this;
1608
1643
  }
1609
- DrForOf.prototype.execRender = function () {
1644
+ DrForOf.prototype.executeAttrRequire = function (attr) {
1610
1645
  var _a;
1611
1646
  var _b, _c, _d, _e;
1612
- if (this.elementSource.attrs.drForOf) {
1613
- var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1614
- var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1615
- var newTemp = this.source.config.window.document.createElement('temp');
1616
- ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n var i = 0; \n const forOf = ").concat(this.elementSource.attrs.drForOf, ";\n const forOfStr = `").concat(this.elementSource.attrs.drForOf, "`.trim();\n if (forOf) {\n for(const it of forOf) {\n var destIt = it;\n if (/\\[(.*,?)\\],/g.test(forOfStr)) {\n if (typeof it === 'string') {\n destIt = it;\n } else {\n destIt = forOfStr.substring(1, forOfStr.length-1).split(',')[i];\n }\n } else if (forOf.isRange) {\n destIt = it;\n } else {\n destIt = forOfStr + '[' + i +']'\n }\n const n = this.__render.element.cloneNode(true);\n Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drForOf' && k !== 'drNextOption' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIt\\#/g, destIt).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIndex\\#/g, i)))\n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, i);\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n i++;\n }\n \n if('").concat(this.elementSource.attrs.drNextOption, "' !== 'null') {\n const n = this.__render.element.cloneNode(true);\n Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drForOf' && k !== 'drNextOption' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));\n const [name, idx] = '").concat(this.elementSource.attrs.drNextOption, "'.split(',');\n n.setAttribute('dr-for-of', name + '[' + idx + ']');\n n.setAttribute('dr-next', name + ',' + (Number(idx) + 1));\n this.__render.fag.append(n);\n }\n }\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', "\n "), Object.assign(this.source.obj, {
1617
- __render: Object.freeze(__assign({ drStripOption: this.elementSource.attrs.drStripOption, drAttr: this.elementSource.attrs, drAttrsOriginName: RawSet.drAttrsOriginName, fag: newTemp }, this.render
1618
- // eslint-disable-next-line no-use-before-define
1619
- ))
1620
- }));
1621
- RawSet.drVarDecoding(newTemp, vars);
1622
- RawSet.drItOtherDecoding(newTemp, itRandom);
1623
- var tempalte = this.source.config.window.document.createElement('template');
1624
- tempalte.innerHTML = newTemp.innerHTML;
1625
- this.returnContainer.fag.append(tempalte.content);
1626
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1627
- (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1628
- // const rrr = rr.flatMap(it => it.render(obj, config));// .flat();
1629
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1630
- return exports.ExecuteState.EXECUTE;
1631
- }
1632
- return exports.ExecuteState.NO_EXECUTE;
1647
+ var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1648
+ var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1649
+ var newTemp = this.source.config.window.document.createElement('temp');
1650
+ ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n var i = 0; \n const forOf = ").concat(attr, ";\n const forOfStr = `").concat(attr, "`.trim();\n if (forOf) {\n for(const it of forOf) {\n var destIt = it;\n if (/\\[(.*,?)\\],/g.test(forOfStr)) {\n if (typeof it === 'string') {\n destIt = it;\n } else {\n destIt = forOfStr.substring(1, forOfStr.length-1).split(',')[i];\n }\n } else if (forOf.isRange) {\n destIt = it;\n } else {\n destIt = forOfStr + '[' + i +']'\n }\n const n = this.__render.element.cloneNode(true);\n Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drForOf' && k !== 'drNextOption' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIt\\#/g, destIt).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIndex\\#/g, i)))\n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, i);\n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n i++;\n }\n \n if('").concat(this.elementSource.attrs.drNextOption, "' !== 'null') {\n const n = this.__render.element.cloneNode(true);\n Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drForOf' && k !== 'drNextOption' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));\n const [name, idx] = '").concat(this.elementSource.attrs.drNextOption, "'.split(',');\n n.setAttribute('dr-for-of', name + '[' + idx + ']');\n n.setAttribute('dr-next', name + ',' + (Number(idx) + 1));\n this.__render.fag.append(n);\n }\n }\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', "\n "), Object.assign(this.source.obj, {
1651
+ __render: Object.freeze(__assign({ drStripOption: this.elementSource.attrs.drStripOption, drAttr: this.elementSource.attrs, drAttrsOriginName: RawSet.drAttrsOriginName, fag: newTemp }, this.render
1652
+ // eslint-disable-next-line no-use-before-define
1653
+ ))
1654
+ }));
1655
+ RawSet.drVarDecoding(newTemp, vars);
1656
+ RawSet.drItOtherDecoding(newTemp, itRandom);
1657
+ var tempalte = this.source.config.window.document.createElement('template');
1658
+ tempalte.innerHTML = newTemp.innerHTML;
1659
+ this.returnContainer.fag.append(tempalte.content);
1660
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1661
+ (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1662
+ // const rrr = rr.flatMap(it => it.render(obj, config));// .flat();
1663
+ (_a = this.returnContainer.raws).push.apply(_a, rr);
1664
+ return exports.ExecuteState.EXECUTE;
1633
1665
  };
1634
1666
  return DrForOf;
1635
- }(OperatorRender));
1667
+ }(OperatorExecuterAttrRequire));
1636
1668
 
1637
1669
  var DrAppender = /** @class */ (function (_super) {
1638
1670
  __extends(DrAppender, _super);
1639
- function DrAppender() {
1640
- return _super !== null && _super.apply(this, arguments) || this;
1671
+ function DrAppender(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1672
+ var _this = this;
1673
+ source.operatorAround = undefined;
1674
+ _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1675
+ return _this;
1641
1676
  }
1642
- DrAppender.prototype.execRender = function () {
1677
+ DrAppender.prototype.executeAttrRequire = function (attr) {
1643
1678
  var _a;
1644
1679
  var _b, _c, _d, _e;
1645
- if (this.elementSource.attrs.drAppender) {
1646
- var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1647
- var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1648
- var newTemp = this.source.config.window.document.createElement('temp');
1649
- ScriptUtils.eval("\n try{\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n const ifWrap = document.createElement('div');\n ifWrap.setAttribute('dr-strip', 'true');\n ifWrap.setAttribute('dr-if', '").concat(this.elementSource.attrs.drAppender, " && ").concat(this.elementSource.attrs.drAppender, ".length > 0');\n const n = this.__render.element.cloneNode(true);\n Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drAppender' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));\n n.setAttribute('dr-for-of', '").concat(this.elementSource.attrs.drAppender, "[' + (").concat(this.elementSource.attrs.drAppender, ".length-1) + ']');\n n.setAttribute('dr-next', '").concat(this.elementSource.attrs.drAppender, ",' + ").concat(this.elementSource.attrs.drAppender, ".length);\n ifWrap.append(n);\n \n // n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIt\\#/g, destIt).replace(/\\#it\\#/g, destIt).replace(/\\#nearForOfIndex\\#/g, i)))\n // n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, i);\n // if (this.__render.drStripOption === 'true') {\n // Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n // } else {\n // this.__render.fag.append(n);\n // }\n this.__render.fag.append(ifWrap);\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', "\n }catch(e){}\n "), Object.assign(this.source.obj, {
1650
- __render: Object.freeze(__assign({ drStripOption: this.elementSource.attrs.drStripOption, drAttr: this.elementSource.attrs, drAttrsOriginName: RawSet.drAttrsOriginName, fag: newTemp }, this.render
1651
- // eslint-disable-next-line no-use-before-define
1652
- ))
1653
- }));
1654
- RawSet.drVarDecoding(newTemp, vars);
1655
- RawSet.drItOtherDecoding(newTemp, itRandom);
1656
- var tempalte = this.source.config.window.document.createElement('template');
1657
- tempalte.innerHTML = newTemp.innerHTML;
1658
- this.returnContainer.fag.append(tempalte.content);
1659
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1660
- (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1661
- // const rrr = rr.flatMap(it => it.render(obj, config));// .flat();
1662
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1663
- return exports.ExecuteState.EXECUTE;
1664
- }
1665
- return exports.ExecuteState.NO_EXECUTE;
1680
+ console.log('appender-->', attr);
1681
+ var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1682
+ var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1683
+ var newTemp = this.source.config.window.document.createElement('temp');
1684
+ ScriptUtils.eval("\n try{\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n const ifWrap = document.createElement('div');\n ifWrap.setAttribute('dr-strip', 'true');\n ifWrap.setAttribute('dr-if', '").concat(this.elementSource.attrs.drAppender, " && ").concat(this.elementSource.attrs.drAppender, ".length > 0');\n const n = this.__render.element.cloneNode(true);\n Object.entries(this.__render.drAttr).filter(([k,v]) => k !== 'drAppender' && v).forEach(([k, v]) => n.setAttribute(this.__render.drAttrsOriginName[k], v));\n n.setAttribute('dr-for-of', '").concat(this.elementSource.attrs.drAppender, "[' + (").concat(this.elementSource.attrs.drAppender, ".length-1) + ']');\n n.setAttribute('dr-next', '").concat(this.elementSource.attrs.drAppender, ",' + ").concat(this.elementSource.attrs.drAppender, ".length);\n ifWrap.append(n);\n this.__render.fag.append(ifWrap);\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', "\n }catch(e){}\n "), Object.assign(this.source.obj, {
1685
+ __render: Object.freeze(__assign({ drStripOption: this.elementSource.attrs.drStripOption, drAttr: this.elementSource.attrs, drAttrsOriginName: RawSet.drAttrsOriginName, fag: newTemp }, this.render
1686
+ // eslint-disable-next-line no-use-before-define
1687
+ ))
1688
+ }));
1689
+ RawSet.drVarDecoding(newTemp, vars);
1690
+ RawSet.drItOtherDecoding(newTemp, itRandom);
1691
+ var tempalte = this.source.config.window.document.createElement('template');
1692
+ tempalte.innerHTML = newTemp.innerHTML;
1693
+ this.returnContainer.fag.append(tempalte.content);
1694
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1695
+ (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1696
+ // const rrr = rr.flatMap(it => it.render(obj, config));// .flat();
1697
+ (_a = this.returnContainer.raws).push.apply(_a, rr);
1698
+ return exports.ExecuteState.EXECUTE;
1666
1699
  };
1667
1700
  return DrAppender;
1668
- }(OperatorRender));
1701
+ }(OperatorExecuterAttrRequire));
1669
1702
 
1670
1703
  var DrRepeat = /** @class */ (function (_super) {
1671
1704
  __extends(DrRepeat, _super);
1672
- function DrRepeat() {
1673
- return _super !== null && _super.apply(this, arguments) || this;
1705
+ function DrRepeat(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1706
+ var _this = this;
1707
+ source.operatorAround = undefined;
1708
+ _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1709
+ return _this;
1674
1710
  }
1675
- DrRepeat.prototype.execRender = function () {
1711
+ DrRepeat.prototype.executeAttrRequire = function (attr) {
1676
1712
  var _a;
1677
1713
  var _b, _c, _d, _e;
1678
- if (this.elementSource.attrs.drRepeat) {
1679
- var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1680
- var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1681
- var newTemp = this.source.config.window.document.createElement('temp');
1682
- ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n var i = 0; \n const repeat = ").concat(this.elementSource.attrs.drRepeat, ";\n const repeatStr = `").concat(this.elementSource.attrs.drRepeat, "`;\n let range = repeat;\n if (typeof repeat === 'number') {\n range = ").concat(EventManager.RANGE_VARNAME, "(repeat);\n } \n for(const it of range) {\n var destIt = it;\n if (range.isRange) {\n destIt = it;\n } else {\n destIt = repeatStr + '[' + i +']'\n }\n const n = this.__render.element.cloneNode(true);\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearRangeIt\\#/g, destIt).replace(/\\#nearRangeIndex\\#/g, destIt)))\n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, destIt);\n \n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n i++;\n }\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', "\n "), Object.assign(this.source.obj, {
1683
- __render: Object.freeze(__assign({ fag: newTemp, drStripOption: this.elementSource.attrs.drStripOption }, this.render))
1684
- }));
1685
- RawSet.drVarDecoding(newTemp, vars);
1686
- RawSet.drItOtherDecoding(newTemp, itRandom);
1687
- var tempalte = this.source.config.window.document.createElement('template');
1688
- tempalte.innerHTML = newTemp.innerHTML;
1689
- this.returnContainer.fag.append(tempalte.content);
1690
- var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1691
- (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1692
- (_a = this.returnContainer.raws).push.apply(_a, rr);
1693
- return exports.ExecuteState.EXECUTE;
1694
- }
1695
- return exports.ExecuteState.NO_EXECUTE;
1714
+ var itRandom = RawSet.drItOtherEncoding(this.elementSource.element);
1715
+ var vars = RawSet.drVarEncoding(this.elementSource.element, (_b = this.elementSource.attrs.drVarOption) !== null && _b !== void 0 ? _b : '');
1716
+ var newTemp = this.source.config.window.document.createElement('temp');
1717
+ ScriptUtils.eval("\n ".concat(this.render.bindScript, "\n ").concat((_c = this.elementSource.attrs.drBeforeOption) !== null && _c !== void 0 ? _c : '', "\n var i = 0; \n const repeat = ").concat(attr, ";\n const repeatStr = `").concat(attr, "`;\n let range = repeat;\n if (typeof repeat === 'number') {\n range = ").concat(EventManager.RANGE_VARNAME, "(repeat);\n } \n for(const it of range) {\n var destIt = it;\n if (range.isRange) {\n destIt = it;\n } else {\n destIt = repeatStr + '[' + i +']'\n }\n const n = this.__render.element.cloneNode(true);\n n.getAttributeNames().forEach(it => n.setAttribute(it, n.getAttribute(it).replace(/\\#it\\#/g, destIt).replace(/\\#nearRangeIt\\#/g, destIt).replace(/\\#nearRangeIndex\\#/g, destIt)))\n n.innerHTML = n.innerHTML.replace(/\\#it\\#/g, destIt).replace(/\\#index\\#/g, destIt);\n \n if (this.__render.drStripOption === 'true') {\n Array.from(n.childNodes).forEach(it => this.__render.fag.append(it));\n } else {\n this.__render.fag.append(n);\n }\n i++;\n }\n ").concat((_d = this.elementSource.attrs.drAfterOption) !== null && _d !== void 0 ? _d : '', "\n "), Object.assign(this.source.obj, {
1718
+ __render: Object.freeze(__assign({ fag: newTemp, drStripOption: this.elementSource.attrs.drStripOption }, this.render))
1719
+ }));
1720
+ RawSet.drVarDecoding(newTemp, vars);
1721
+ RawSet.drItOtherDecoding(newTemp, itRandom);
1722
+ var tempalte = this.source.config.window.document.createElement('template');
1723
+ tempalte.innerHTML = newTemp.innerHTML;
1724
+ this.returnContainer.fag.append(tempalte.content);
1725
+ var rr = RawSet.checkPointCreates(this.returnContainer.fag, this.source.obj, this.source.config);
1726
+ (_e = this.elementSource.element.parentNode) === null || _e === void 0 ? void 0 : _e.replaceChild(this.returnContainer.fag, this.elementSource.element);
1727
+ (_a = this.returnContainer.raws).push.apply(_a, rr);
1728
+ return exports.ExecuteState.EXECUTE;
1696
1729
  };
1697
1730
  return DrRepeat;
1698
- }(OperatorRender));
1731
+ }(OperatorExecuterAttrRequire));
1699
1732
 
1700
1733
  var DrTargetElement = /** @class */ (function (_super) {
1701
1734
  __extends(DrTargetElement, _super);
1702
- function DrTargetElement() {
1703
- return _super !== null && _super.apply(this, arguments) || this;
1735
+ function DrTargetElement(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1736
+ var _this = this;
1737
+ source.operatorAround = undefined;
1738
+ _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1739
+ return _this;
1704
1740
  }
1705
- DrTargetElement.prototype.execRender = function () {
1741
+ DrTargetElement.prototype.execute = function () {
1706
1742
  var _a;
1707
1743
  var _this = this;
1708
1744
  var _b, _c, _d, _e;
@@ -1710,34 +1746,10 @@ var DrTargetElement = /** @class */ (function (_super) {
1710
1746
  if (targetElement) {
1711
1747
  var documentFragment = targetElement.callBack(this.elementSource.element, this.source.obj, this.rawSet, this.elementSource.attrs, this.source.config);
1712
1748
  if (documentFragment) {
1713
- // const targetAttrMap = this.elementSource.element.getAttribute(EventManager.normalAttrMapAttrName);
1714
1749
  var detectAction_1 = this.elementSource.element.getAttribute(RawSet.DR_DETECT_NAME);
1715
1750
  var render_1 = documentFragment.render;
1716
- // console.log('-------drTargetElement->', render, targetAttrMap);
1717
1751
  this.rawSet.fragment = documentFragment;
1718
1752
  this.rawSet.data = render_1.component;
1719
- // const targetAttrs = this.elementSource.element.getAttributeNames()
1720
- // .filter(it => RawSet.isExporesion(this.elementSource.element.getAttribute(it)))
1721
- // .map(it => ({name: it, expresion: RawSet.exporesionGrouops(this.elementSource.element.getAttribute(it))[0][1]}))
1722
- // .filter(it => it.name.length > 0 && it.expresion.length > 0)
1723
- // .map(it => {
1724
- // return `n.setAttribute('${it.name}', ${it.expresion})`;
1725
- // });
1726
- // if (targetAttrMap) {
1727
- // ScriptUtils.eval(`
1728
- // ${this.render.bindScript}
1729
- // //const n = $element.cloneNode(true);
1730
- // const n = $element;
1731
- // ${targetAttrMap.join(';')};
1732
- // // this.__render.fag.append(n);
1733
- // `, Object.assign(this.source.obj, {
1734
- // __render: Object.freeze({
1735
- // fag: newTemp,
1736
- // targetAttrs: targetAttrMap,
1737
- // ...this.render
1738
- // } as Render)
1739
- // }));
1740
- // }
1741
1753
  if (detectAction_1 && render_1) {
1742
1754
  this.rawSet.detect = {
1743
1755
  action: function () {
@@ -1758,7 +1770,6 @@ var DrTargetElement = /** @class */ (function (_super) {
1758
1770
  targetElement: targetElement,
1759
1771
  creatorMetaData: targetElement.__creatorMetaData
1760
1772
  });
1761
- // console.log(document.body.innerHTML);
1762
1773
  (_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);
1763
1774
  }
1764
1775
  return exports.ExecuteState.EXECUTE;
@@ -1766,18 +1777,20 @@ var DrTargetElement = /** @class */ (function (_super) {
1766
1777
  return exports.ExecuteState.NO_EXECUTE;
1767
1778
  };
1768
1779
  return DrTargetElement;
1769
- }(OperatorRender));
1780
+ }(OperatorExecuter));
1770
1781
 
1771
1782
  var DrTargetAttr = /** @class */ (function (_super) {
1772
1783
  __extends(DrTargetAttr, _super);
1773
- function DrTargetAttr() {
1774
- return _super !== null && _super.apply(this, arguments) || this;
1784
+ function DrTargetAttr(rawSet, render, returnContainer, elementSource, source, afterCallBack) {
1785
+ var _this = this;
1786
+ source.operatorAround = undefined;
1787
+ _this = _super.call(this, rawSet, render, returnContainer, elementSource, source, afterCallBack, false) || this;
1788
+ return _this;
1775
1789
  }
1776
- DrTargetAttr.prototype.execRender = function () {
1790
+ DrTargetAttr.prototype.execute = function () {
1777
1791
  var _a;
1778
1792
  var _b, _c, _d, _e;
1779
1793
  var attributeNames = this.elementSource.element.getAttributeNames();
1780
- // const targetAttr = config?.targetAttrs?.find(it => (!drAttr.drForOf && !drAttr.drFor && !drAttr.drRepeat) && attributeNames.includes(it.name));
1781
1794
  var targetAttr = (_c = (_b = this.source.config) === null || _b === void 0 ? void 0 : _b.targetAttrs) === null || _c === void 0 ? void 0 : _c.find(function (it) { return attributeNames.includes(it.name); });
1782
1795
  if (targetAttr) {
1783
1796
  var attrName = targetAttr.name;
@@ -1801,7 +1814,7 @@ var DrTargetAttr = /** @class */ (function (_super) {
1801
1814
  return exports.ExecuteState.NO_EXECUTE;
1802
1815
  };
1803
1816
  return DrTargetAttr;
1804
- }(OperatorRender));
1817
+ }(OperatorExecuter));
1805
1818
 
1806
1819
  exports.DestroyOptionType = void 0;
1807
1820
  (function (DestroyOptionType) {
@@ -1851,7 +1864,6 @@ var RawSet = /** @class */ (function () {
1851
1864
  var targetScripts_1 = targetAttrNames.map(function (it) { return element_1.getAttribute(it); }).filter(function (it) { return it; });
1852
1865
  var targetAttrMap = element_1.getAttribute(EventManager.normalAttrMapAttrName);
1853
1866
  if (targetAttrMap) {
1854
- // console.log('----->', targetAttr);
1855
1867
  new Map(JSON.parse(targetAttrMap)).forEach(function (v, k) {
1856
1868
  targetScripts_1.push(v);
1857
1869
  });
@@ -1885,15 +1897,15 @@ var RawSet = /** @class */ (function () {
1885
1897
  // 중요 render 처리 부분
1886
1898
  RawSet.prototype.render = function (obj, config) {
1887
1899
  var _this = this;
1888
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1900
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1889
1901
  var genNode = config.window.document.importNode(this.fragment, true);
1890
1902
  var raws = [];
1891
1903
  var onAttrInitCallBacks = [];
1892
1904
  var onElementInitCallBacks = [];
1893
1905
  var onThisComponentSetCallBacks = [];
1894
1906
  var drAttrs = [];
1895
- for (var _i = 0, _m = Array.from(genNode.childNodes.values()); _i < _m.length; _i++) {
1896
- var cNode = _m[_i];
1907
+ for (var _i = 0, _y = Array.from(genNode.childNodes.values()); _i < _y.length; _i++) {
1908
+ var cNode = _y[_i];
1897
1909
  var attribute = {};
1898
1910
  if (cNode.nodeType === Node.ELEMENT_NODE) {
1899
1911
  attribute = DomUtils.getAttributeToObject(cNode);
@@ -1959,23 +1971,23 @@ var RawSet = /** @class */ (function () {
1959
1971
  };
1960
1972
  drAttrs.push(drAttr);
1961
1973
  var operators = [
1962
- new DrPre(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1963
- new Dr(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1964
- new DrIf(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1965
- new DrThis(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1966
- new DrForm(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1967
- new DrInnerText(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1968
- new DrInnerHTML(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1969
- new DrFor(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1970
- new DrForOf(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1971
- new DrAppender(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1972
- new DrRepeat(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1974
+ new DrPre(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drPre, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_b = config.operatorAround) === null || _b === void 0 ? void 0 : _b.drPre }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1975
+ new Dr(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.dr, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_c = config.operatorAround) === null || _c === void 0 ? void 0 : _c.dr }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1976
+ new DrIf(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drIf, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_d = config.operatorAround) === null || _d === void 0 ? void 0 : _d.drIf }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1977
+ new DrThis(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drThis, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_e = config.operatorAround) === null || _e === void 0 ? void 0 : _e.drThis }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1978
+ new DrForm(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drForm, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_f = config.operatorAround) === null || _f === void 0 ? void 0 : _f.drForm }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1979
+ new DrInnerText(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drInnerText, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_g = config.operatorAround) === null || _g === void 0 ? void 0 : _g.drInnerText }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1980
+ new DrInnerHTML(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drInnerHTML, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_h = config.operatorAround) === null || _h === void 0 ? void 0 : _h.drInnerHTML }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1981
+ new DrFor(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drFor, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_j = config.operatorAround) === null || _j === void 0 ? void 0 : _j.drFor }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1982
+ new DrForOf(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drForOf, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_k = config.operatorAround) === null || _k === void 0 ? void 0 : _k.drForOf }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1983
+ new DrAppender(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drAppender, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_l = config.operatorAround) === null || _l === void 0 ? void 0 : _l.drAppender }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1984
+ new DrRepeat(this, __render, { raws: raws, fag: fag }, { element: element, attr: drAttr.drRepeat, attrs: drAttr }, { config: config, obj: obj, operatorAround: (_m = config.operatorAround) === null || _m === void 0 ? void 0 : _m.drRepeat }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1973
1985
  new DrTargetElement(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks }),
1974
1986
  new DrTargetAttr(this, __render, { raws: raws, fag: fag }, { element: element, attrs: drAttr }, { config: config, obj: obj }, { onAttrInitCallBacks: onAttrInitCallBacks, onElementInitCallBacks: onElementInitCallBacks, onThisComponentSetCallBacks: onThisComponentSetCallBacks })
1975
1987
  ];
1976
- for (var _o = 0, operators_1 = operators; _o < operators_1.length; _o++) {
1977
- var operator = operators_1[_o];
1978
- var state = operator.execRender();
1988
+ for (var _z = 0, operators_1 = operators; _z < operators_1.length; _z++) {
1989
+ var operator = operators_1[_z];
1990
+ var state = operator.start();
1979
1991
  if (state === exports.ExecuteState.EXECUTE) {
1980
1992
  break;
1981
1993
  }
@@ -2000,20 +2012,32 @@ var RawSet = /** @class */ (function () {
2000
2012
  });
2001
2013
  // 중요 style isolation 나중에 :scope로 대체 가능할듯.
2002
2014
  RawSet.generateStyleSheetsLocal();
2003
- // console.log('-22222-')
2004
- // alert(1);
2005
- for (var _p = 0, onThisComponentSetCallBacks_1 = onThisComponentSetCallBacks; _p < onThisComponentSetCallBacks_1.length; _p++) {
2006
- var it_1 = onThisComponentSetCallBacks_1[_p];
2007
- (_c = (_b = it_1.obj).onInitRender) === null || _c === void 0 ? void 0 : _c.call(_b);
2008
- }
2009
- for (var _q = 0, onElementInitCallBacks_1 = onElementInitCallBacks; _q < onElementInitCallBacks_1.length; _q++) {
2010
- var it_2 = onElementInitCallBacks_1[_q];
2011
- (_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 }));
2012
- (_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);
2015
+ for (var _0 = 0, onThisComponentSetCallBacks_1 = onThisComponentSetCallBacks; _0 < onThisComponentSetCallBacks_1.length; _0++) {
2016
+ var it_1 = onThisComponentSetCallBacks_1[_0];
2017
+ (_p = (_o = it_1.obj) === null || _o === void 0 ? void 0 : _o.onInitRender) === null || _p === void 0 ? void 0 : _p.call(_o);
2018
+ }
2019
+ for (var _1 = 0, onElementInitCallBacks_1 = onElementInitCallBacks; _1 < onElementInitCallBacks_1.length; _1++) {
2020
+ var it_2 = onElementInitCallBacks_1[_1];
2021
+ if (((_r = (_q = it_2.targetElement) === null || _q === void 0 ? void 0 : _q.__render) === null || _r === void 0 ? void 0 : _r.element) && ((_t = (_s = it_2.targetElement) === null || _s === void 0 ? void 0 : _s.__render) === null || _t === void 0 ? void 0 : _t.component)) {
2022
+ var oninit = it_2.targetElement.__render.element.getAttribute(RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME); // dr-on-component-init
2023
+ var param = [];
2024
+ if (oninit) {
2025
+ var script = "".concat(it_2.targetElement.__render.renderScript, " return ").concat(oninit, " ");
2026
+ param = ScriptUtils.eval(script, Object.assign(obj, {
2027
+ __render: it_2.targetElement.__render
2028
+ }));
2029
+ if (!Array.isArray(param)) {
2030
+ param = [param];
2031
+ }
2032
+ }
2033
+ (_v = (_u = it_2.targetElement.__render.component).onInitRender) === null || _v === void 0 ? void 0 : _v.call.apply(_v, __spreadArray([_u], param, false));
2034
+ }
2035
+ (_w = config === null || config === void 0 ? void 0 : config.onElementInit) === null || _w === void 0 ? void 0 : _w.call(config, it_2.name, obj, this, it_2.targetElement);
2013
2036
  }
2014
- for (var _r = 0, onAttrInitCallBacks_1 = onAttrInitCallBacks; _r < onAttrInitCallBacks_1.length; _r++) {
2015
- var it_3 = onAttrInitCallBacks_1[_r];
2016
- (_l = config === null || config === void 0 ? void 0 : config.onAttrInit) === null || _l === void 0 ? void 0 : _l.call(config, it_3.attrName, it_3.attrValue, obj, this);
2037
+ // TODO: 이부분도 위에 targetElement 처럼 해야될까?
2038
+ for (var _2 = 0, onAttrInitCallBacks_1 = onAttrInitCallBacks; _2 < onAttrInitCallBacks_1.length; _2++) {
2039
+ var it_3 = onAttrInitCallBacks_1[_2];
2040
+ (_x = config === null || config === void 0 ? void 0 : config.onAttrInit) === null || _x === void 0 ? void 0 : _x.call(config, it_3.attrName, it_3.attrValue, obj, this);
2017
2041
  }
2018
2042
  // component destroy
2019
2043
  if (obj.__domrender_components) {
@@ -2408,7 +2432,7 @@ var RawSet = /** @class */ (function () {
2408
2432
  // const metaEnd = RawSet.metaEnd(id);
2409
2433
  // n.innerHTML = metaStart + style + (set.template ?? '') + metaEnd;
2410
2434
  // dr-on-create onCreateRender
2411
- var onCreate = element.getAttribute("".concat(EventManager.attrPrefix, "on-create"));
2435
+ var onCreate = element.getAttribute(RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
2412
2436
  var renderScript = '';
2413
2437
  var createParam = [];
2414
2438
  if (onCreate) {
@@ -2420,7 +2444,8 @@ var RawSet = /** @class */ (function () {
2420
2444
  }
2421
2445
  (_d = (_c = set.obj) === null || _c === void 0 ? void 0 : _c.onCreateRender) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArray([_c], createParam, false));
2422
2446
  // dr-on-component-init
2423
- var oninit = element.getAttribute("".concat(EventManager.attrPrefix, "on-component-init")); // dr-on-component-init
2447
+ // const oninit = element.getAttribute(`${EventManager.attrPrefix}on-component-init`); // dr-on-component-init
2448
+ var oninit = element.getAttribute(RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME); // dr-on-component-init
2424
2449
  if (oninit) {
2425
2450
  var script = "".concat(renderScript, " ").concat(oninit, " ");
2426
2451
  ScriptUtils.eval(script, obj);
@@ -2494,7 +2519,7 @@ var RawSet = /** @class */ (function () {
2494
2519
  scripts: EventManager.setBindProperty((_a = config.scripts) !== null && _a !== void 0 ? _a : {}, obj)
2495
2520
  // eslint-disable-next-line no-use-before-define
2496
2521
  });
2497
- var constructor = element.getAttribute("".concat(EventManager.attrPrefix, "constructor"));
2522
+ var constructor = element.getAttribute(RawSet.DR_ON_CONSTRUCTOR_ARGUMENTS_OPTIONNAME);
2498
2523
  var constructorParam = [];
2499
2524
  // dr-constructor
2500
2525
  if (constructor) {
@@ -2533,9 +2558,9 @@ var RawSet = /** @class */ (function () {
2533
2558
  });
2534
2559
  }
2535
2560
  // dr-on-create onCreateRender
2536
- var onCreate = element.getAttribute("".concat(EventManager.attrPrefix, "on-create"));
2561
+ var onCreate = element.getAttribute(RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
2537
2562
  this.__render = render;
2538
- var createParam = [i];
2563
+ var createParam = [];
2539
2564
  if (onCreate) {
2540
2565
  var script = "".concat(renderScript, " return ").concat(onCreate, " ");
2541
2566
  createParam = ScriptUtils.eval(script, Object.assign(obj, { __render: render }));
@@ -2546,8 +2571,8 @@ var RawSet = /** @class */ (function () {
2546
2571
  (_d = instance === null || instance === void 0 ? void 0 : instance.onCreateRender) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArray([instance], createParam, false));
2547
2572
  var applayTemplate = element.innerHTML;
2548
2573
  var innerHTMLThisRandom;
2549
- var componentName = (_e = element.getAttribute("".concat(EventManager.attrPrefix, "component-name"))) !== null && _e !== void 0 ? _e : 'component';
2550
- var innerHTMLName = (_f = element.getAttribute("".concat(EventManager.attrPrefix, "component-inner-html-name"))) !== null && _f !== void 0 ? _f : 'innerHTML';
2574
+ var componentName = (_e = element.getAttribute(RawSet.DR_COMPONENT_NAME_OPTIONNAME)) !== null && _e !== void 0 ? _e : 'component';
2575
+ var innerHTMLName = (_f = element.getAttribute(RawSet.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME)) !== null && _f !== void 0 ? _f : 'innerHTML';
2551
2576
  if (applayTemplate) {
2552
2577
  // if (rawSet.point.thisVariableName) {
2553
2578
  // 넘어온 innerHTML에 this가 있으면 해당안되게 우선 치환.
@@ -2558,7 +2583,8 @@ var RawSet = /** @class */ (function () {
2558
2583
  }
2559
2584
  applayTemplate = template.replace(RegExp("#".concat(innerHTMLName, "#"), 'g'), applayTemplate);
2560
2585
  // dr-on-component-init
2561
- var oninit = element.getAttribute("".concat(EventManager.attrPrefix, "on-component-init")); // dr-on-component-init
2586
+ // const oninit = element.getAttribute(`${EventManager.attrPrefix}on-component-init`); // dr-on-component-init
2587
+ var oninit = element.getAttribute(RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME); // dr-on-component-init
2562
2588
  if (oninit) {
2563
2589
  var script = "".concat(renderScript, " ").concat(oninit, " ");
2564
2590
  ScriptUtils.eval(script, Object.assign(obj, {
@@ -2628,7 +2654,6 @@ var RawSet = /** @class */ (function () {
2628
2654
  RawSet.DR_INNERHTML_NAME = 'dr-inner-html';
2629
2655
  RawSet.DR_INNERTEXT_NAME = 'dr-inner-text';
2630
2656
  RawSet.DR_DETECT_NAME = 'dr-detect';
2631
- // public static readonly DR_DETECT_ACTION_NAME = 'dr-detect-action';
2632
2657
  RawSet.DR_IT_OPTIONNAME = 'dr-it';
2633
2658
  RawSet.DR_VAR_OPTIONNAME = 'dr-var';
2634
2659
  RawSet.DR_AFTER_OPTIONNAME = 'dr-after';
@@ -2637,6 +2662,12 @@ var RawSet = /** @class */ (function () {
2637
2662
  RawSet.DR_COMPLETE_OPTIONNAME = 'dr-complete';
2638
2663
  RawSet.DR_STRIP_OPTIONNAME = 'dr-strip';
2639
2664
  RawSet.DR_DESTROY_OPTIONNAME = 'dr-destroy';
2665
+ RawSet.DR_COMPONENT_NAME_OPTIONNAME = 'dr-component-name';
2666
+ RawSet.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME = 'dr-component-inner-html-name';
2667
+ RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME = 'dr-on-create:arguments';
2668
+ RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME = 'dr-on-create:callback';
2669
+ RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME = 'dr-on-init:arguments';
2670
+ RawSet.DR_ON_CONSTRUCTOR_ARGUMENTS_OPTIONNAME = 'dr-on-constructor:arguments';
2640
2671
  RawSet.drAttrsOriginName = {
2641
2672
  dr: RawSet.DR,
2642
2673
  drIf: RawSet.DR_IF_NAME,
@@ -2713,14 +2744,16 @@ var DomRenderProxy = /** @class */ (function () {
2713
2744
  };
2714
2745
  DomRenderProxy.prototype.initRender = function (target) {
2715
2746
  var _this = this;
2716
- var _a, _b, _c, _d, _e, _f, _g;
2717
- var onCreate = (_b = (_a = target).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, "".concat(EventManager.attrPrefix, "on-create"));
2718
- var createParam;
2747
+ var _a, _b, _c, _d, _f, _g, _h, _j;
2748
+ var onCreate = (_b = (_a = target).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
2749
+ var createParam = [];
2719
2750
  if (onCreate) {
2720
2751
  createParam = ScriptUtils.evalReturn(onCreate, this._domRender_proxy);
2752
+ if (!Array.isArray(createParam)) {
2753
+ createParam = [createParam];
2754
+ }
2721
2755
  }
2722
- (_d = (_c = this._domRender_proxy) === null || _c === void 0 ? void 0 : _c.onCreateRender) === null || _d === void 0 ? void 0 : _d.call(_c, createParam);
2723
- var innerHTML = (_e = target.innerHTML) !== null && _e !== void 0 ? _e : '';
2756
+ (_d = (_c = this._domRender_proxy) === null || _c === void 0 ? void 0 : _c.onCreateRender) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArray([_c], createParam, false));
2724
2757
  this._targets.add(target);
2725
2758
  var rawSets = RawSet.checkPointCreates(target, this._domRender_proxy, this.config);
2726
2759
  // console.log('initRender -------rawSet', rawSets)
@@ -2738,13 +2771,21 @@ var DomRenderProxy = /** @class */ (function () {
2738
2771
  }
2739
2772
  });
2740
2773
  this.render(this.getRawSets());
2741
- var render = { target: target };
2742
- var creatorMetaData = {
2743
- creator: this._domRender_proxy,
2744
- rootCreator: this._domRender_proxy,
2745
- innerHTML: innerHTML
2746
- };
2747
- (_g = (_f = this._domRender_proxy) === null || _f === void 0 ? void 0 : _f.onInitRender) === null || _g === void 0 ? void 0 : _g.call(_f, { render: render, creatorMetaData: creatorMetaData });
2774
+ // const render = {target} as Render;
2775
+ // const creatorMetaData = {
2776
+ // creator: this._domRender_proxy,
2777
+ // rootCreator: this._domRender_proxy,
2778
+ // innerHTML
2779
+ // } as CreatorMetaData;
2780
+ (_g = (_f = target).getAttribute) === null || _g === void 0 ? void 0 : _g.call(_f, RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME);
2781
+ var initParam = [];
2782
+ if (onCreate) {
2783
+ initParam = ScriptUtils.evalReturn(onCreate, this._domRender_proxy);
2784
+ if (!Array.isArray(initParam)) {
2785
+ initParam = [initParam];
2786
+ }
2787
+ }
2788
+ (_j = (_h = this._domRender_proxy) === null || _h === void 0 ? void 0 : _h.onInitRender) === null || _j === void 0 ? void 0 : _j.call.apply(_j, __spreadArray([_h], initParam, false));
2748
2789
  };
2749
2790
  DomRenderProxy.prototype.getRawSets = function () {
2750
2791
  var set = new Set();
@@ -3185,7 +3226,13 @@ var LocationUtils = /** @class */ (function () {
3185
3226
  };
3186
3227
  LocationUtils.hashQueryParamsObject = function (window) {
3187
3228
  var _a;
3188
- return this.queryStringToObject((_a = window.location.hash.split('?').pop()) !== null && _a !== void 0 ? _a : '');
3229
+ var s = (_a = window.location.hash.split('?').pop()) !== null && _a !== void 0 ? _a : '';
3230
+ if (s.startsWith('#')) {
3231
+ return {};
3232
+ }
3233
+ else {
3234
+ return this.queryStringToObject(s);
3235
+ }
3189
3236
  };
3190
3237
  LocationUtils.pathQueryParams = function (window) {
3191
3238
  return this.queryStringToMap(window.location.search.substring(1));
@@ -3566,60 +3613,32 @@ var Appender = /** @class */ (function () {
3566
3613
  return Appender;
3567
3614
  }());
3568
3615
 
3569
- var CheckedValidator = /** @class */ (function (_super) {
3570
- __extends(CheckedValidator, _super);
3571
- function CheckedValidator(value, target, event, autoValid) {
3616
+ var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
3617
+ __extends(AllUnCheckedValidatorArray, _super);
3618
+ function AllUnCheckedValidatorArray(value, target, event, autoValid) {
3572
3619
  if (autoValid === void 0) { autoValid = true; }
3573
3620
  return _super.call(this, value, target, event, autoValid) || this;
3574
3621
  }
3575
- CheckedValidator.prototype.valid = function () {
3576
- var _a, _b;
3577
- return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
3578
- };
3579
- return CheckedValidator;
3580
- }(Validator));
3581
-
3582
- var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3583
- __extends(CountEqualsUnCheckedValidatorArray, _super);
3584
- function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3585
- if (autoValid === void 0) { autoValid = true; }
3586
- var _this = _super.call(this, value, target, event, autoValid) || this;
3587
- _this.count = count;
3588
- return _this;
3589
- }
3590
- CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3622
+ AllUnCheckedValidatorArray.prototype.valid = function () {
3591
3623
  var _a;
3592
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3624
+ return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
3593
3625
  };
3594
- return CountEqualsUnCheckedValidatorArray;
3626
+ return AllUnCheckedValidatorArray;
3595
3627
  }(ValidatorArray));
3596
3628
 
3597
- var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3598
- __extends(CountGreaterThanCheckedValidatorArray, _super);
3599
- function CountGreaterThanCheckedValidatorArray(count, value, target, event, autoValid) {
3629
+ var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3630
+ __extends(CountEqualsCheckedValidatorArray, _super);
3631
+ function CountEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3600
3632
  if (autoValid === void 0) { autoValid = true; }
3601
3633
  var _this = _super.call(this, value, target, event, autoValid) || this;
3602
3634
  _this.count = count;
3603
3635
  return _this;
3604
3636
  }
3605
- CountGreaterThanCheckedValidatorArray.prototype.valid = function () {
3606
- var _a;
3607
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > this.count;
3608
- };
3609
- return CountGreaterThanCheckedValidatorArray;
3610
- }(ValidatorArray));
3611
-
3612
- var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
3613
- __extends(AllUnCheckedValidatorArray, _super);
3614
- function AllUnCheckedValidatorArray(value, target, event, autoValid) {
3615
- if (autoValid === void 0) { autoValid = true; }
3616
- return _super.call(this, value, target, event, autoValid) || this;
3617
- }
3618
- AllUnCheckedValidatorArray.prototype.valid = function () {
3637
+ CountEqualsCheckedValidatorArray.prototype.valid = function () {
3619
3638
  var _a;
3620
- return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > 0);
3639
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length === this.count;
3621
3640
  };
3622
- return AllUnCheckedValidatorArray;
3641
+ return CountEqualsCheckedValidatorArray;
3623
3642
  }(ValidatorArray));
3624
3643
 
3625
3644
  var AllCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3635,34 +3654,19 @@ var AllCheckedValidatorArray = /** @class */ (function (_super) {
3635
3654
  return AllCheckedValidatorArray;
3636
3655
  }(ValidatorArray));
3637
3656
 
3638
- var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3639
- __extends(CountEqualsCheckedValidatorArray, _super);
3640
- function CountEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3641
- if (autoValid === void 0) { autoValid = true; }
3642
- var _this = _super.call(this, value, target, event, autoValid) || this;
3643
- _this.count = count;
3644
- return _this;
3645
- }
3646
- CountEqualsCheckedValidatorArray.prototype.valid = function () {
3647
- var _a;
3648
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length === this.count;
3649
- };
3650
- return CountEqualsCheckedValidatorArray;
3651
- }(ValidatorArray));
3652
-
3653
- var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3654
- __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3655
- function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3657
+ var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3658
+ __extends(CountEqualsUnCheckedValidatorArray, _super);
3659
+ function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3656
3660
  if (autoValid === void 0) { autoValid = true; }
3657
3661
  var _this = _super.call(this, value, target, event, autoValid) || this;
3658
3662
  _this.count = count;
3659
3663
  return _this;
3660
3664
  }
3661
- CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3665
+ CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3662
3666
  var _a;
3663
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3667
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3664
3668
  };
3665
- return CountGreaterThanEqualsCheckedValidatorArray;
3669
+ return CountEqualsUnCheckedValidatorArray;
3666
3670
  }(ValidatorArray));
3667
3671
 
3668
3672
  var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3680,6 +3684,19 @@ var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_su
3680
3684
  return CountGreaterThanEqualsUnCheckedValidatorArray;
3681
3685
  }(ValidatorArray));
3682
3686
 
3687
+ var CheckedValidator = /** @class */ (function (_super) {
3688
+ __extends(CheckedValidator, _super);
3689
+ function CheckedValidator(value, target, event, autoValid) {
3690
+ if (autoValid === void 0) { autoValid = true; }
3691
+ return _super.call(this, value, target, event, autoValid) || this;
3692
+ }
3693
+ CheckedValidator.prototype.valid = function () {
3694
+ var _a, _b;
3695
+ return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
3696
+ };
3697
+ return CheckedValidator;
3698
+ }(Validator));
3699
+
3683
3700
  var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3684
3701
  __extends(CountGreaterThanUnCheckedValidatorArray, _super);
3685
3702
  function CountGreaterThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
@@ -3695,34 +3712,34 @@ var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3695
3712
  return CountGreaterThanUnCheckedValidatorArray;
3696
3713
  }(ValidatorArray));
3697
3714
 
3698
- var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3699
- __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3700
- function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3715
+ var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3716
+ __extends(CountGreaterThanCheckedValidatorArray, _super);
3717
+ function CountGreaterThanCheckedValidatorArray(count, value, target, event, autoValid) {
3701
3718
  if (autoValid === void 0) { autoValid = true; }
3702
3719
  var _this = _super.call(this, value, target, event, autoValid) || this;
3703
3720
  _this.count = count;
3704
3721
  return _this;
3705
3722
  }
3706
- CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3723
+ CountGreaterThanCheckedValidatorArray.prototype.valid = function () {
3707
3724
  var _a;
3708
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
3725
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length > this.count;
3709
3726
  };
3710
- return CountLessThanEqualsCheckedValidatorArray;
3727
+ return CountGreaterThanCheckedValidatorArray;
3711
3728
  }(ValidatorArray));
3712
3729
 
3713
- var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
3714
- __extends(CountLessThanCheckedValidatorArray, _super);
3715
- function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
3730
+ var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3731
+ __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3732
+ function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3716
3733
  if (autoValid === void 0) { autoValid = true; }
3717
3734
  var _this = _super.call(this, value, target, event, autoValid) || this;
3718
3735
  _this.count = count;
3719
3736
  return _this;
3720
3737
  }
3721
- CountLessThanCheckedValidatorArray.prototype.valid = function () {
3738
+ CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3722
3739
  var _a;
3723
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length < this.count;
3740
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3724
3741
  };
3725
- return CountLessThanCheckedValidatorArray;
3742
+ return CountGreaterThanEqualsCheckedValidatorArray;
3726
3743
  }(ValidatorArray));
3727
3744
 
3728
3745
  var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3740,33 +3757,34 @@ var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super
3740
3757
  return CountLessThanEqualsUnCheckedValidatorArray;
3741
3758
  }(ValidatorArray));
3742
3759
 
3743
- var EmptyValidator = /** @class */ (function (_super) {
3744
- __extends(EmptyValidator, _super);
3745
- function EmptyValidator(value, target, event, autoValid) {
3760
+ var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3761
+ __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3762
+ function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3746
3763
  if (autoValid === void 0) { autoValid = true; }
3747
- return _super.call(this, value, target, event, autoValid) || this;
3764
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3765
+ _this.count = count;
3766
+ return _this;
3748
3767
  }
3749
- EmptyValidator.prototype.valid = function () {
3750
- var _a, _b;
3751
- var value = this.value;
3752
- return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
3768
+ CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3769
+ var _a;
3770
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
3753
3771
  };
3754
- return EmptyValidator;
3755
- }(Validator));
3772
+ return CountLessThanEqualsCheckedValidatorArray;
3773
+ }(ValidatorArray));
3756
3774
 
3757
- var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3758
- __extends(CountUnCheckedValidatorArray, _super);
3759
- function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
3775
+ var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
3776
+ __extends(CountLessThanCheckedValidatorArray, _super);
3777
+ function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
3760
3778
  if (autoValid === void 0) { autoValid = true; }
3761
3779
  var _this = _super.call(this, value, target, event, autoValid) || this;
3762
3780
  _this.count = count;
3763
3781
  return _this;
3764
3782
  }
3765
- CountUnCheckedValidatorArray.prototype.valid = function () {
3783
+ CountLessThanCheckedValidatorArray.prototype.valid = function () {
3766
3784
  var _a;
3767
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3785
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length < this.count;
3768
3786
  };
3769
- return CountUnCheckedValidatorArray;
3787
+ return CountLessThanCheckedValidatorArray;
3770
3788
  }(ValidatorArray));
3771
3789
 
3772
3790
  var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3784,46 +3802,35 @@ var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3784
3802
  return CountLessThanUnCheckedValidatorArray;
3785
3803
  }(ValidatorArray));
3786
3804
 
3787
- var FormValidator = /** @class */ (function (_super) {
3788
- __extends(FormValidator, _super);
3789
- function FormValidator(target, event, autoValid) {
3790
- if (autoValid === void 0) { autoValid = true; }
3791
- return _super.call(this, undefined, target, event, autoValid) || this;
3792
- }
3793
- FormValidator.prototype.validAction = function () {
3794
- return _super.prototype.childValidAction.call(this);
3795
- };
3796
- FormValidator.prototype.valid = function () {
3797
- return this.childValid();
3798
- };
3799
- FormValidator.prototype.reset = function () {
3800
- this.targetReset();
3801
- };
3802
- return FormValidator;
3803
- }(Validator));
3804
-
3805
- var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3806
- __extends(IncludeCheckedValidatorArray, _super);
3807
- function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3808
- if (allRequired === void 0) { allRequired = false; }
3805
+ var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3806
+ __extends(CountUnCheckedValidatorArray, _super);
3807
+ function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
3809
3808
  if (autoValid === void 0) { autoValid = true; }
3810
3809
  var _this = _super.call(this, value, target, event, autoValid) || this;
3811
- _this.include = include;
3812
- _this.allRequired = allRequired;
3810
+ _this.count = count;
3813
3811
  return _this;
3814
3812
  }
3815
- IncludeCheckedValidatorArray.prototype.valid = function () {
3816
- var _this = this;
3813
+ CountUnCheckedValidatorArray.prototype.valid = function () {
3817
3814
  var _a;
3818
- var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3819
- var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
3820
- return checkedValue.length > 0 &&
3821
- (!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3822
- (this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3815
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3823
3816
  };
3824
- return IncludeCheckedValidatorArray;
3817
+ return CountUnCheckedValidatorArray;
3825
3818
  }(ValidatorArray));
3826
3819
 
3820
+ var EmptyValidator = /** @class */ (function (_super) {
3821
+ __extends(EmptyValidator, _super);
3822
+ function EmptyValidator(value, target, event, autoValid) {
3823
+ if (autoValid === void 0) { autoValid = true; }
3824
+ return _super.call(this, value, target, event, autoValid) || this;
3825
+ }
3826
+ EmptyValidator.prototype.valid = function () {
3827
+ var _a, _b;
3828
+ var value = this.value;
3829
+ return value === undefined || value === null || ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) <= 0;
3830
+ };
3831
+ return EmptyValidator;
3832
+ }(Validator));
3833
+
3827
3834
  var MultipleValidator = /** @class */ (function (_super) {
3828
3835
  __extends(MultipleValidator, _super);
3829
3836
  function MultipleValidator(validators, value, target, event, autoValid) {
@@ -3875,19 +3882,66 @@ var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3875
3882
  return ExcludeCheckedValidatorArray;
3876
3883
  }(ValidatorArray));
3877
3884
 
3878
- var NotEmptyValidator = /** @class */ (function (_super) {
3879
- __extends(NotEmptyValidator, _super);
3880
- function NotEmptyValidator(value, target, event, autoValid) {
3885
+ var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3886
+ __extends(IncludeCheckedValidatorArray, _super);
3887
+ function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3888
+ if (allRequired === void 0) { allRequired = false; }
3881
3889
  if (autoValid === void 0) { autoValid = true; }
3882
- return _super.call(this, value, target, event, autoValid) || this;
3890
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3891
+ _this.include = include;
3892
+ _this.allRequired = allRequired;
3893
+ return _this;
3883
3894
  }
3884
- NotEmptyValidator.prototype.valid = function () {
3885
- var _a, _b;
3895
+ IncludeCheckedValidatorArray.prototype.valid = function () {
3896
+ var _this = this;
3897
+ var _a;
3898
+ var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3899
+ var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
3900
+ return checkedValue.length > 0 &&
3901
+ (!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3902
+ (this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3903
+ };
3904
+ return IncludeCheckedValidatorArray;
3905
+ }(ValidatorArray));
3906
+
3907
+ var FormValidator = /** @class */ (function (_super) {
3908
+ __extends(FormValidator, _super);
3909
+ function FormValidator(target, event, autoValid) {
3910
+ if (autoValid === void 0) { autoValid = true; }
3911
+ return _super.call(this, undefined, target, event, autoValid) || this;
3912
+ }
3913
+ FormValidator.prototype.validAction = function () {
3914
+ return _super.prototype.childValidAction.call(this);
3915
+ };
3916
+ FormValidator.prototype.valid = function () {
3917
+ return this.childValid();
3918
+ };
3919
+ FormValidator.prototype.reset = function () {
3920
+ this.targetReset();
3921
+ };
3922
+ return FormValidator;
3923
+ }(Validator));
3924
+
3925
+ var NotRegExpTestValidator = /** @class */ (function (_super) {
3926
+ __extends(NotRegExpTestValidator, _super);
3927
+ function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
3928
+ if (autoValid === void 0) { autoValid = true; }
3929
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3930
+ _this.regexp = DomRenderProxy.final(regexp);
3931
+ return _this;
3932
+ }
3933
+ NotRegExpTestValidator.prototype.valid = function () {
3934
+ var _a;
3886
3935
  var value = this.value;
3887
- // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3888
- return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3936
+ var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
3937
+ if (value) {
3938
+ return !regExp.test(value);
3939
+ }
3940
+ else {
3941
+ return true;
3942
+ }
3889
3943
  };
3890
- return NotEmptyValidator;
3944
+ return NotRegExpTestValidator;
3891
3945
  }(Validator));
3892
3946
 
3893
3947
  var PassValidator = /** @class */ (function (_super) {
@@ -3925,21 +3979,6 @@ var RegExpTestValidator = /** @class */ (function (_super) {
3925
3979
  return RegExpTestValidator;
3926
3980
  }(Validator));
3927
3981
 
3928
- var ValidMultipleValidator = /** @class */ (function (_super) {
3929
- __extends(ValidMultipleValidator, _super);
3930
- function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
3931
- if (autoValid === void 0) { autoValid = true; }
3932
- var _this = _super.call(this, validators, value, target, event, autoValid) || this;
3933
- _this.validMultipleCallback = validMultipleCallback;
3934
- _this.validators = validators;
3935
- return _this;
3936
- }
3937
- ValidMultipleValidator.prototype.valid = function () {
3938
- return this.validMultipleCallback(this.validators, this.value, this.getTarget(), this.getEvent());
3939
- };
3940
- return ValidMultipleValidator;
3941
- }(MultipleValidator));
3942
-
3943
3982
  var RequiredValidator = /** @class */ (function (_super) {
3944
3983
  __extends(RequiredValidator, _super);
3945
3984
  function RequiredValidator(value, target, event, autoValid) {
@@ -3967,19 +4006,35 @@ var UnCheckedValidator = /** @class */ (function (_super) {
3967
4006
  return UnCheckedValidator;
3968
4007
  }(Validator));
3969
4008
 
3970
- var ValidValidatorArray = /** @class */ (function (_super) {
3971
- __extends(ValidValidatorArray, _super);
3972
- function ValidValidatorArray(validCallBack, value, target, event, autoValid) {
4009
+ var NotEmptyValidator = /** @class */ (function (_super) {
4010
+ __extends(NotEmptyValidator, _super);
4011
+ function NotEmptyValidator(value, target, event, autoValid) {
3973
4012
  if (autoValid === void 0) { autoValid = true; }
3974
- var _this = _super.call(this, value, target, event, autoValid) || this;
3975
- _this.validCallBack = validCallBack;
4013
+ return _super.call(this, value, target, event, autoValid) || this;
4014
+ }
4015
+ NotEmptyValidator.prototype.valid = function () {
4016
+ var _a, _b;
4017
+ var value = this.value;
4018
+ // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
4019
+ return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
4020
+ };
4021
+ return NotEmptyValidator;
4022
+ }(Validator));
4023
+
4024
+ var ValidMultipleValidator = /** @class */ (function (_super) {
4025
+ __extends(ValidMultipleValidator, _super);
4026
+ function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
4027
+ if (autoValid === void 0) { autoValid = true; }
4028
+ var _this = _super.call(this, validators, value, target, event, autoValid) || this;
4029
+ _this.validMultipleCallback = validMultipleCallback;
4030
+ _this.validators = validators;
3976
4031
  return _this;
3977
4032
  }
3978
- ValidValidatorArray.prototype.valid = function () {
3979
- return this.validCallBack(this.value, this.getTarget(), this.getEvent());
4033
+ ValidMultipleValidator.prototype.valid = function () {
4034
+ return this.validMultipleCallback(this.validators, this.value, this.getTarget(), this.getEvent());
3980
4035
  };
3981
- return ValidValidatorArray;
3982
- }(ValidatorArray));
4036
+ return ValidMultipleValidator;
4037
+ }(MultipleValidator));
3983
4038
 
3984
4039
  var ValidValidator = /** @class */ (function (_super) {
3985
4040
  __extends(ValidValidator, _super);
@@ -3995,27 +4050,19 @@ var ValidValidator = /** @class */ (function (_super) {
3995
4050
  return ValidValidator;
3996
4051
  }(Validator));
3997
4052
 
3998
- var NotRegExpTestValidator = /** @class */ (function (_super) {
3999
- __extends(NotRegExpTestValidator, _super);
4000
- function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
4053
+ var ValidValidatorArray = /** @class */ (function (_super) {
4054
+ __extends(ValidValidatorArray, _super);
4055
+ function ValidValidatorArray(validCallBack, value, target, event, autoValid) {
4001
4056
  if (autoValid === void 0) { autoValid = true; }
4002
4057
  var _this = _super.call(this, value, target, event, autoValid) || this;
4003
- _this.regexp = DomRenderProxy.final(regexp);
4058
+ _this.validCallBack = validCallBack;
4004
4059
  return _this;
4005
4060
  }
4006
- NotRegExpTestValidator.prototype.valid = function () {
4007
- var _a;
4008
- var value = this.value;
4009
- var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
4010
- if (value) {
4011
- return !regExp.test(value);
4012
- }
4013
- else {
4014
- return true;
4015
- }
4061
+ ValidValidatorArray.prototype.valid = function () {
4062
+ return this.validCallBack(this.value, this.getTarget(), this.getEvent());
4016
4063
  };
4017
- return NotRegExpTestValidator;
4018
- }(Validator));
4064
+ return ValidValidatorArray;
4065
+ }(ValidatorArray));
4019
4066
 
4020
4067
  var ValueEqualsValidator = /** @class */ (function (_super) {
4021
4068
  __extends(ValueEqualsValidator, _super);
@@ -4187,7 +4234,8 @@ exports.NodeUtils = NodeUtils;
4187
4234
  exports.NonPassValidator = NonPassValidator;
4188
4235
  exports.NotEmptyValidator = NotEmptyValidator;
4189
4236
  exports.NotRegExpTestValidator = NotRegExpTestValidator;
4190
- exports.OperatorRender = OperatorRender;
4237
+ exports.OperatorExecuter = OperatorExecuter;
4238
+ exports.OperatorExecuterAttrRequire = OperatorExecuterAttrRequire;
4191
4239
  exports.PassValidator = PassValidator;
4192
4240
  exports.PathRouter = PathRouter;
4193
4241
  exports.RandomUtils = RandomUtils;