dom-render 1.0.87 → 1.0.90

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/DomRender.d.ts +1 -1
  2. package/DomRender.js +1 -1
  3. package/DomRenderProxy.d.ts +1 -1
  4. package/DomRenderProxy.js +34 -13
  5. package/README.MD +56 -19
  6. package/components/ComponentSet.d.ts +1 -1
  7. package/configs/Config.d.ts +1 -1
  8. package/configs/TargetAttr.d.ts +1 -1
  9. package/configs/TargetElement.d.ts +4 -1
  10. package/dist/bundle.js +306 -267
  11. package/events/EventManager.js +0 -1
  12. package/lifecycle/OnDestroyRender.d.ts +1 -1
  13. package/lifecycle/OnInitRender.d.ts +1 -5
  14. package/operators/Dr.js +1 -1
  15. package/operators/DrAppender.js +1 -1
  16. package/operators/DrFor.js +1 -1
  17. package/operators/DrForOf.js +1 -1
  18. package/operators/DrForm.js +5 -5
  19. package/operators/DrIf.js +1 -1
  20. package/operators/DrInnerHTML.js +1 -1
  21. package/operators/DrInnerText.js +1 -1
  22. package/operators/DrRepeat.js +1 -1
  23. package/operators/DrTargetAttr.js +1 -1
  24. package/operators/DrTargetElement.js +1 -1
  25. package/operators/DrThis.js +5 -2
  26. package/operators/OperatorRender.d.ts +5 -1
  27. package/package.json +6 -2
  28. package/rawsets/AttrInitCallBack.d.ts +5 -0
  29. package/rawsets/AttrInitCallBack.js +2 -0
  30. package/rawsets/Attrs.d.ts +21 -0
  31. package/rawsets/Attrs.js +2 -0
  32. package/rawsets/CreatorMetaData.d.ts +18 -0
  33. package/rawsets/CreatorMetaData.js +2 -0
  34. package/rawsets/DestroyOptionType.d.ts +4 -0
  35. package/rawsets/DestroyOptionType.js +8 -0
  36. package/rawsets/ElementInitCallBack.d.ts +8 -0
  37. package/rawsets/ElementInitCallBack.js +2 -0
  38. package/{RawSet.d.ts → rawsets/RawSet.d.ts} +13 -72
  39. package/{RawSet.js → rawsets/RawSet.js} +74 -66
  40. package/rawsets/RawSetType.d.ts +7 -0
  41. package/rawsets/RawSetType.js +11 -0
  42. package/rawsets/Render.d.ts +17 -0
  43. package/rawsets/Render.js +2 -0
  44. package/utils/location/LocationUtils.js +7 -1
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';
@@ -1094,6 +1093,8 @@ var DrThis = /** @class */ (function (_super) {
1094
1093
  var _b, _c, _d, _e, _f;
1095
1094
  if (this.elementSource.attrs.drThis) {
1096
1095
  var r = ScriptUtils.evalReturn(this.elementSource.attrs.drThis, this.source.obj);
1096
+ // const isStrip = ScriptUtils.eval(`if (${this.elementSource.attrs.drStripOption ?? 'false'}) { return true; } else { return false; }`, this.source.obj);
1097
+ // console.log('isStrip', isStrip)
1097
1098
  if (r) {
1098
1099
  if (r instanceof ComponentSet) {
1099
1100
  if (this.rawSet.data) {
@@ -1101,7 +1102,8 @@ var DrThis = /** @class */ (function (_super) {
1101
1102
  RawSet.destroy(this.rawSet.data.obj, [], this.source.config, destroyOptions);
1102
1103
  }
1103
1104
  this.rawSet.data = r;
1104
- this.returnContainer.fag.append(RawSet.drThisCreate(this.rawSet, this.elementSource.element, "".concat(this.elementSource.attrs.drThis, ".obj"), (_d = this.elementSource.attrs.drVarOption) !== null && _d !== void 0 ? _d : '', this.elementSource.attrs.drStripOption, this.source.obj, this.source.config, r));
1105
+ 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);
1106
+ this.returnContainer.fag.append(componentBody);
1105
1107
  this.afterCallBack.onThisComponentSetCallBacks.push(r);
1106
1108
  }
1107
1109
  else {
@@ -1462,7 +1464,7 @@ var DrForm = /** @class */ (function (_super) {
1462
1464
  RawSet.drFormOtherMoveAttr(this.elementSource.element, 'name', 'temp-name', this.source.config);
1463
1465
  var data = ScriptUtils.evalReturn("".concat(this.elementSource.attrs.drForm), this.source.obj);
1464
1466
  var childs = Array.from(this.elementSource.element.querySelectorAll('[name]'));
1465
- var fromName = ScriptUtils.evalReturn((_b = this.elementSource.element.getAttribute('dr-form:name')) !== null && _b !== void 0 ? _b : '', this.source.obj);
1467
+ var fromName = ScriptUtils.evalReturn((_b = this.elementSource.element.getAttribute("".concat(RawSet.DR_FORM_NAME, ":name"))) !== null && _b !== void 0 ? _b : '', this.source.obj);
1466
1468
  var thisName = fromName !== null && fromName !== void 0 ? fromName : this.elementSource.element.getAttribute('name');
1467
1469
  // console.log('dr-form:name', thisName, element.getAttribute('dr-form:name'), obj, element);
1468
1470
  // // 자기자신이 Input 대상일때
@@ -1476,10 +1478,10 @@ var DrForm = /** @class */ (function (_super) {
1476
1478
  }
1477
1479
  childs.forEach(function (it) {
1478
1480
  var _a, _b, _c, _d, _e;
1479
- var eventName = (_a = it.getAttribute('dr-form:event')) !== null && _a !== void 0 ? _a : 'change';
1480
- var validatorName = it.getAttribute('dr-form:validator');
1481
+ var eventName = (_a = it.getAttribute("".concat(RawSet.DR_FORM_NAME, ":event"))) !== null && _a !== void 0 ? _a : 'change';
1482
+ var validatorName = it.getAttribute("".concat(RawSet.DR_FORM_NAME, ":validator"));
1481
1483
  var attrEventName = EventManager.attrPrefix + 'event-' + eventName;
1482
- 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');
1484
+ 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');
1483
1485
  if (varpath != null) {
1484
1486
  if (validatorName) {
1485
1487
  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, {
@@ -1805,6 +1807,7 @@ exports.DestroyOptionType = void 0;
1805
1807
  DestroyOptionType["NO_DESTROY"] = "NO_DESTROY";
1806
1808
  DestroyOptionType["NO_MESSENGER_DESTROY"] = "NO_MESSENGER_DESTROY";
1807
1809
  })(exports.DestroyOptionType || (exports.DestroyOptionType = {}));
1810
+
1808
1811
  exports.RawSetType = void 0;
1809
1812
  (function (RawSetType) {
1810
1813
  RawSetType["TEXT"] = "TEXT";
@@ -1813,6 +1816,7 @@ exports.RawSetType = void 0;
1813
1816
  RawSetType["TARGET_ATTR"] = "TARGET_ATTR";
1814
1817
  RawSetType["UNKOWN"] = "UNKOWN";
1815
1818
  })(exports.RawSetType || (exports.RawSetType = {}));
1819
+
1816
1820
  var RawSet = /** @class */ (function () {
1817
1821
  function RawSet(uuid, type, point, fragment, detect, data) {
1818
1822
  this.uuid = uuid;
@@ -1846,7 +1850,6 @@ var RawSet = /** @class */ (function () {
1846
1850
  var targetScripts_1 = targetAttrNames.map(function (it) { return element_1.getAttribute(it); }).filter(function (it) { return it; });
1847
1851
  var targetAttrMap = element_1.getAttribute(EventManager.normalAttrMapAttrName);
1848
1852
  if (targetAttrMap) {
1849
- // console.log('----->', targetAttr);
1850
1853
  new Map(JSON.parse(targetAttrMap)).forEach(function (v, k) {
1851
1854
  targetScripts_1.push(v);
1852
1855
  });
@@ -1985,28 +1988,39 @@ var RawSet = /** @class */ (function () {
1985
1988
  drAttrs.forEach(function (it) {
1986
1989
  if (it.drCompleteOption) {
1987
1990
  // genNode.childNodes
1988
- ScriptUtils.eval("\n const ".concat(EventManager.FAG_VARNAME, " = this.__render.fag;\n const ").concat(EventManager.SCRIPTS_VARNAME, " = this.__render.scripts;\n const ").concat(EventManager.RAWSET_VARNAME, " = this.__render.rawset;\n ").concat(it.drCompleteOption, "\n "), Object.assign(obj, {
1989
- __render: Object.freeze({
1990
- rawset: _this,
1991
- fag: genNode,
1992
- scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
1993
- })
1994
- }));
1991
+ var render = Object.freeze({
1992
+ rawset: _this,
1993
+ fag: genNode,
1994
+ scripts: EventManager.setBindProperty(config === null || config === void 0 ? void 0 : config.scripts, obj)
1995
+ });
1996
+ ScriptUtils.eval("\n const ".concat(EventManager.FAG_VARNAME, " = this.__render.fag;\n const ").concat(EventManager.SCRIPTS_VARNAME, " = this.__render.scripts;\n const ").concat(EventManager.RAWSET_VARNAME, " = this.__render.rawset;\n ").concat(it.drCompleteOption), Object.assign(obj, { __render: render }));
1995
1997
  }
1996
1998
  });
1997
1999
  // 중요 style isolation 나중에 :scope로 대체 가능할듯.
1998
2000
  RawSet.generateStyleSheetsLocal();
1999
- // console.log('-22222-')
2000
- // alert(1);
2001
2001
  for (var _p = 0, onThisComponentSetCallBacks_1 = onThisComponentSetCallBacks; _p < onThisComponentSetCallBacks_1.length; _p++) {
2002
2002
  var it_1 = onThisComponentSetCallBacks_1[_p];
2003
- (_c = (_b = it_1.obj).onInitRender) === null || _c === void 0 ? void 0 : _c.call(_b);
2003
+ (_c = (_b = it_1.obj) === null || _b === void 0 ? void 0 : _b.onInitRender) === null || _c === void 0 ? void 0 : _c.call(_b);
2004
2004
  }
2005
2005
  for (var _q = 0, onElementInitCallBacks_1 = onElementInitCallBacks; _q < onElementInitCallBacks_1.length; _q++) {
2006
2006
  var it_2 = onElementInitCallBacks_1[_q];
2007
- (_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 }));
2007
+ if (((_e = (_d = it_2.targetElement) === null || _d === void 0 ? void 0 : _d.__render) === null || _e === void 0 ? void 0 : _e.element) && ((_g = (_f = it_2.targetElement) === null || _f === void 0 ? void 0 : _f.__render) === null || _g === void 0 ? void 0 : _g.component)) {
2008
+ var oninit = it_2.targetElement.__render.element.getAttribute(RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME); // dr-on-component-init
2009
+ var param = [];
2010
+ if (oninit) {
2011
+ var script = "".concat(it_2.targetElement.__render.renderScript, " return ").concat(oninit, " ");
2012
+ param = ScriptUtils.eval(script, Object.assign(obj, {
2013
+ __render: it_2.targetElement.__render
2014
+ }));
2015
+ if (!Array.isArray(param)) {
2016
+ param = [param];
2017
+ }
2018
+ }
2019
+ (_j = (_h = it_2.targetElement.__render.component).onInitRender) === null || _j === void 0 ? void 0 : _j.call.apply(_j, __spreadArray([_h], param, false));
2020
+ }
2008
2021
  (_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);
2009
2022
  }
2023
+ // TODO: 이부분도 위에 targetElement 처럼 해야될까?
2010
2024
  for (var _r = 0, onAttrInitCallBacks_1 = onAttrInitCallBacks; _r < onAttrInitCallBacks_1.length; _r++) {
2011
2025
  var it_3 = onAttrInitCallBacks_1[_r];
2012
2026
  (_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);
@@ -2260,7 +2274,7 @@ var RawSet = /** @class */ (function () {
2260
2274
  end.setAttribute('id', "".concat(id, "-end"));
2261
2275
  return {
2262
2276
  start: start,
2263
- end: end,
2277
+ end: end
2264
2278
  };
2265
2279
  }
2266
2280
  else if (type === exports.RawSetType.STYLE_TEXT) {
@@ -2404,7 +2418,7 @@ var RawSet = /** @class */ (function () {
2404
2418
  // const metaEnd = RawSet.metaEnd(id);
2405
2419
  // n.innerHTML = metaStart + style + (set.template ?? '') + metaEnd;
2406
2420
  // dr-on-create onCreateRender
2407
- var onCreate = element.getAttribute("".concat(EventManager.attrPrefix, "on-create"));
2421
+ var onCreate = element.getAttribute(RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
2408
2422
  var renderScript = '';
2409
2423
  var createParam = [];
2410
2424
  if (onCreate) {
@@ -2416,7 +2430,8 @@ var RawSet = /** @class */ (function () {
2416
2430
  }
2417
2431
  (_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));
2418
2432
  // dr-on-component-init
2419
- var oninit = element.getAttribute("".concat(EventManager.attrPrefix, "on-component-init")); // dr-on-component-init
2433
+ // const oninit = element.getAttribute(`${EventManager.attrPrefix}on-component-init`); // dr-on-component-init
2434
+ var oninit = element.getAttribute(RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME); // dr-on-component-init
2420
2435
  if (oninit) {
2421
2436
  var script = "".concat(renderScript, " ").concat(oninit, " ");
2422
2437
  ScriptUtils.eval(script, obj);
@@ -2490,7 +2505,7 @@ var RawSet = /** @class */ (function () {
2490
2505
  scripts: EventManager.setBindProperty((_a = config.scripts) !== null && _a !== void 0 ? _a : {}, obj)
2491
2506
  // eslint-disable-next-line no-use-before-define
2492
2507
  });
2493
- var constructor = element.getAttribute("".concat(EventManager.attrPrefix, "constructor"));
2508
+ var constructor = element.getAttribute(RawSet.DR_ON_CONSTRUCTOR_ARGUMENTS_OPTIONNAME);
2494
2509
  var constructorParam = [];
2495
2510
  // dr-constructor
2496
2511
  if (constructor) {
@@ -2510,6 +2525,8 @@ var RawSet = /** @class */ (function () {
2510
2525
  i.componentKey = componentKey;
2511
2526
  i.rawSet = rawSet;
2512
2527
  i.attribute = attribute;
2528
+ i.router = config.router;
2529
+ i.scripts = render.scripts;
2513
2530
  i.drAttrs = attrs;
2514
2531
  i.innerHTML = element.innerHTML;
2515
2532
  i.rootCreator = new Proxy(obj, new DomRenderFinalProxy());
@@ -2527,9 +2544,9 @@ var RawSet = /** @class */ (function () {
2527
2544
  });
2528
2545
  }
2529
2546
  // dr-on-create onCreateRender
2530
- var onCreate = element.getAttribute("".concat(EventManager.attrPrefix, "on-create"));
2547
+ var onCreate = element.getAttribute(RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
2531
2548
  this.__render = render;
2532
- var createParam = [i];
2549
+ var createParam = [];
2533
2550
  if (onCreate) {
2534
2551
  var script = "".concat(renderScript, " return ").concat(onCreate, " ");
2535
2552
  createParam = ScriptUtils.eval(script, Object.assign(obj, { __render: render }));
@@ -2540,8 +2557,8 @@ var RawSet = /** @class */ (function () {
2540
2557
  (_d = instance === null || instance === void 0 ? void 0 : instance.onCreateRender) === null || _d === void 0 ? void 0 : _d.call.apply(_d, __spreadArray([instance], createParam, false));
2541
2558
  var applayTemplate = element.innerHTML;
2542
2559
  var innerHTMLThisRandom;
2543
- var componentName = (_e = element.getAttribute("".concat(EventManager.attrPrefix, "component-name"))) !== null && _e !== void 0 ? _e : 'component';
2544
- var innerHTMLName = (_f = element.getAttribute("".concat(EventManager.attrPrefix, "component-inner-html-name"))) !== null && _f !== void 0 ? _f : 'innerHTML';
2560
+ var componentName = (_e = element.getAttribute(RawSet.DR_COMPONENT_NAME_OPTIONNAME)) !== null && _e !== void 0 ? _e : 'component';
2561
+ var innerHTMLName = (_f = element.getAttribute(RawSet.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME)) !== null && _f !== void 0 ? _f : 'innerHTML';
2545
2562
  if (applayTemplate) {
2546
2563
  // if (rawSet.point.thisVariableName) {
2547
2564
  // 넘어온 innerHTML에 this가 있으면 해당안되게 우선 치환.
@@ -2552,7 +2569,8 @@ var RawSet = /** @class */ (function () {
2552
2569
  }
2553
2570
  applayTemplate = template.replace(RegExp("#".concat(innerHTMLName, "#"), 'g'), applayTemplate);
2554
2571
  // dr-on-component-init
2555
- var oninit = element.getAttribute("".concat(EventManager.attrPrefix, "on-component-init")); // dr-on-component-init
2572
+ // const oninit = element.getAttribute(`${EventManager.attrPrefix}on-component-init`); // dr-on-component-init
2573
+ var oninit = element.getAttribute(RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME); // dr-on-component-init
2556
2574
  if (oninit) {
2557
2575
  var script = "".concat(renderScript, " ").concat(oninit, " ");
2558
2576
  ScriptUtils.eval(script, Object.assign(obj, {
@@ -2622,7 +2640,6 @@ var RawSet = /** @class */ (function () {
2622
2640
  RawSet.DR_INNERHTML_NAME = 'dr-inner-html';
2623
2641
  RawSet.DR_INNERTEXT_NAME = 'dr-inner-text';
2624
2642
  RawSet.DR_DETECT_NAME = 'dr-detect';
2625
- // public static readonly DR_DETECT_ACTION_NAME = 'dr-detect-action';
2626
2643
  RawSet.DR_IT_OPTIONNAME = 'dr-it';
2627
2644
  RawSet.DR_VAR_OPTIONNAME = 'dr-var';
2628
2645
  RawSet.DR_AFTER_OPTIONNAME = 'dr-after';
@@ -2631,6 +2648,12 @@ var RawSet = /** @class */ (function () {
2631
2648
  RawSet.DR_COMPLETE_OPTIONNAME = 'dr-complete';
2632
2649
  RawSet.DR_STRIP_OPTIONNAME = 'dr-strip';
2633
2650
  RawSet.DR_DESTROY_OPTIONNAME = 'dr-destroy';
2651
+ RawSet.DR_COMPONENT_NAME_OPTIONNAME = 'dr-component-name';
2652
+ RawSet.DR_COMPONENT_INNER_HTML_NAME_OPTIONNAME = 'dr-component-inner-html-name';
2653
+ RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME = 'dr-on-create:arguments';
2654
+ RawSet.DR_ON_CREATED_CALLBACK_OPTIONNAME = 'dr-on-create:callback';
2655
+ RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME = 'dr-on-init:arguments';
2656
+ RawSet.DR_ON_CONSTRUCTOR_ARGUMENTS_OPTIONNAME = 'dr-on-constructor:arguments';
2634
2657
  RawSet.drAttrsOriginName = {
2635
2658
  dr: RawSet.DR,
2636
2659
  drIf: RawSet.DR_IF_NAME,
@@ -2707,14 +2730,16 @@ var DomRenderProxy = /** @class */ (function () {
2707
2730
  };
2708
2731
  DomRenderProxy.prototype.initRender = function (target) {
2709
2732
  var _this = this;
2710
- var _a, _b, _c, _d, _e, _f, _g;
2711
- var onCreate = (_b = (_a = target).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, "".concat(EventManager.attrPrefix, "on-create"));
2712
- var createParam;
2733
+ var _a, _b, _c, _d, _f, _g, _h, _j;
2734
+ var onCreate = (_b = (_a = target).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
2735
+ var createParam = [];
2713
2736
  if (onCreate) {
2714
2737
  createParam = ScriptUtils.evalReturn(onCreate, this._domRender_proxy);
2738
+ if (!Array.isArray(createParam)) {
2739
+ createParam = [createParam];
2740
+ }
2715
2741
  }
2716
- (_d = (_c = this._domRender_proxy) === null || _c === void 0 ? void 0 : _c.onCreateRender) === null || _d === void 0 ? void 0 : _d.call(_c, createParam);
2717
- var innerHTML = (_e = target.innerHTML) !== null && _e !== void 0 ? _e : '';
2742
+ (_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));
2718
2743
  this._targets.add(target);
2719
2744
  var rawSets = RawSet.checkPointCreates(target, this._domRender_proxy, this.config);
2720
2745
  // console.log('initRender -------rawSet', rawSets)
@@ -2732,13 +2757,21 @@ var DomRenderProxy = /** @class */ (function () {
2732
2757
  }
2733
2758
  });
2734
2759
  this.render(this.getRawSets());
2735
- var render = { target: target };
2736
- var creatorMetaData = {
2737
- creator: this._domRender_proxy,
2738
- rootCreator: this._domRender_proxy,
2739
- innerHTML: innerHTML
2740
- };
2741
- (_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 });
2760
+ // const render = {target} as Render;
2761
+ // const creatorMetaData = {
2762
+ // creator: this._domRender_proxy,
2763
+ // rootCreator: this._domRender_proxy,
2764
+ // innerHTML
2765
+ // } as CreatorMetaData;
2766
+ (_g = (_f = target).getAttribute) === null || _g === void 0 ? void 0 : _g.call(_f, RawSet.DR_ON_INIT_ARGUMENTS_OPTIONNAME);
2767
+ var initParam = [];
2768
+ if (onCreate) {
2769
+ initParam = ScriptUtils.evalReturn(onCreate, this._domRender_proxy);
2770
+ if (!Array.isArray(initParam)) {
2771
+ initParam = [initParam];
2772
+ }
2773
+ }
2774
+ (_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));
2742
2775
  };
2743
2776
  DomRenderProxy.prototype.getRawSets = function () {
2744
2777
  var set = new Set();
@@ -3179,7 +3212,13 @@ var LocationUtils = /** @class */ (function () {
3179
3212
  };
3180
3213
  LocationUtils.hashQueryParamsObject = function (window) {
3181
3214
  var _a;
3182
- return this.queryStringToObject((_a = window.location.hash.split('?').pop()) !== null && _a !== void 0 ? _a : '');
3215
+ var s = (_a = window.location.hash.split('?').pop()) !== null && _a !== void 0 ? _a : '';
3216
+ if (s.startsWith('#')) {
3217
+ return {};
3218
+ }
3219
+ else {
3220
+ return this.queryStringToObject(s);
3221
+ }
3183
3222
  };
3184
3223
  LocationUtils.pathQueryParams = function (window) {
3185
3224
  return this.queryStringToMap(window.location.search.substring(1));
@@ -3492,21 +3531,6 @@ var DomRender = /** @class */ (function () {
3492
3531
  return DomRender;
3493
3532
  }());
3494
3533
 
3495
- var RenderManager = /** @class */ (function () {
3496
- function RenderManager() {
3497
- }
3498
- RenderManager.render = function (obj, target) {
3499
- if (target === void 0) { target = Object.keys(obj); }
3500
- var domRenderProxy = obj._DomRender_proxy;
3501
- if (domRenderProxy) {
3502
- target.forEach(function (it) {
3503
- domRenderProxy.root([it], obj[it]);
3504
- });
3505
- }
3506
- };
3507
- return RenderManager;
3508
- }());
3509
-
3510
3534
  var Appender = /** @class */ (function () {
3511
3535
  function Appender(defaultDatas) {
3512
3536
  this.length = 0;
@@ -3560,6 +3584,47 @@ var Appender = /** @class */ (function () {
3560
3584
  return Appender;
3561
3585
  }());
3562
3586
 
3587
+ var RenderManager = /** @class */ (function () {
3588
+ function RenderManager() {
3589
+ }
3590
+ RenderManager.render = function (obj, target) {
3591
+ if (target === void 0) { target = Object.keys(obj); }
3592
+ var domRenderProxy = obj._DomRender_proxy;
3593
+ if (domRenderProxy) {
3594
+ target.forEach(function (it) {
3595
+ domRenderProxy.root([it], obj[it]);
3596
+ });
3597
+ }
3598
+ };
3599
+ return RenderManager;
3600
+ }());
3601
+
3602
+ var CheckedValidator = /** @class */ (function (_super) {
3603
+ __extends(CheckedValidator, _super);
3604
+ function CheckedValidator(value, target, event, autoValid) {
3605
+ if (autoValid === void 0) { autoValid = true; }
3606
+ return _super.call(this, value, target, event, autoValid) || this;
3607
+ }
3608
+ CheckedValidator.prototype.valid = function () {
3609
+ var _a, _b;
3610
+ return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
3611
+ };
3612
+ return CheckedValidator;
3613
+ }(Validator));
3614
+
3615
+ var AllCheckedValidatorArray = /** @class */ (function (_super) {
3616
+ __extends(AllCheckedValidatorArray, _super);
3617
+ function AllCheckedValidatorArray(value, target, event, autoValid) {
3618
+ if (autoValid === void 0) { autoValid = true; }
3619
+ return _super.call(this, value, target, event, autoValid) || this;
3620
+ }
3621
+ AllCheckedValidatorArray.prototype.valid = function () {
3622
+ var _a;
3623
+ return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > 0);
3624
+ };
3625
+ return AllCheckedValidatorArray;
3626
+ }(ValidatorArray));
3627
+
3563
3628
  var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
3564
3629
  __extends(AllUnCheckedValidatorArray, _super);
3565
3630
  function AllUnCheckedValidatorArray(value, target, event, autoValid) {
@@ -3573,6 +3638,21 @@ var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
3573
3638
  return AllUnCheckedValidatorArray;
3574
3639
  }(ValidatorArray));
3575
3640
 
3641
+ var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3642
+ __extends(CountEqualsUnCheckedValidatorArray, _super);
3643
+ function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3644
+ if (autoValid === void 0) { autoValid = true; }
3645
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3646
+ _this.count = count;
3647
+ return _this;
3648
+ }
3649
+ CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3650
+ var _a;
3651
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3652
+ };
3653
+ return CountEqualsUnCheckedValidatorArray;
3654
+ }(ValidatorArray));
3655
+
3576
3656
  var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3577
3657
  __extends(CountGreaterThanCheckedValidatorArray, _super);
3578
3658
  function CountGreaterThanCheckedValidatorArray(count, value, target, event, autoValid) {
@@ -3588,19 +3668,6 @@ var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3588
3668
  return CountGreaterThanCheckedValidatorArray;
3589
3669
  }(ValidatorArray));
3590
3670
 
3591
- var CheckedValidator = /** @class */ (function (_super) {
3592
- __extends(CheckedValidator, _super);
3593
- function CheckedValidator(value, target, event, autoValid) {
3594
- if (autoValid === void 0) { autoValid = true; }
3595
- return _super.call(this, value, target, event, autoValid) || this;
3596
- }
3597
- CheckedValidator.prototype.valid = function () {
3598
- var _a, _b;
3599
- return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
3600
- };
3601
- return CheckedValidator;
3602
- }(Validator));
3603
-
3604
3671
  var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3605
3672
  __extends(CountEqualsCheckedValidatorArray, _super);
3606
3673
  function CountEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
@@ -3616,47 +3683,34 @@ var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3616
3683
  return CountEqualsCheckedValidatorArray;
3617
3684
  }(ValidatorArray));
3618
3685
 
3619
- var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3620
- __extends(CountEqualsUnCheckedValidatorArray, _super);
3621
- function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3686
+ var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3687
+ __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3688
+ function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3622
3689
  if (autoValid === void 0) { autoValid = true; }
3623
3690
  var _this = _super.call(this, value, target, event, autoValid) || this;
3624
3691
  _this.count = count;
3625
3692
  return _this;
3626
3693
  }
3627
- CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3628
- var _a;
3629
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3630
- };
3631
- return CountEqualsUnCheckedValidatorArray;
3632
- }(ValidatorArray));
3633
-
3634
- var AllCheckedValidatorArray = /** @class */ (function (_super) {
3635
- __extends(AllCheckedValidatorArray, _super);
3636
- function AllCheckedValidatorArray(value, target, event, autoValid) {
3637
- if (autoValid === void 0) { autoValid = true; }
3638
- return _super.call(this, value, target, event, autoValid) || this;
3639
- }
3640
- AllCheckedValidatorArray.prototype.valid = function () {
3694
+ CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3641
3695
  var _a;
3642
- return !(((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > 0);
3696
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
3643
3697
  };
3644
- return AllCheckedValidatorArray;
3698
+ return CountLessThanEqualsCheckedValidatorArray;
3645
3699
  }(ValidatorArray));
3646
3700
 
3647
- var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
3648
- __extends(CountLessThanCheckedValidatorArray, _super);
3649
- function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
3701
+ var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3702
+ __extends(CountGreaterThanEqualsUnCheckedValidatorArray, _super);
3703
+ function CountGreaterThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3650
3704
  if (autoValid === void 0) { autoValid = true; }
3651
3705
  var _this = _super.call(this, value, target, event, autoValid) || this;
3652
3706
  _this.count = count;
3653
3707
  return _this;
3654
3708
  }
3655
- CountLessThanCheckedValidatorArray.prototype.valid = function () {
3709
+ CountGreaterThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3656
3710
  var _a;
3657
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length < this.count;
3711
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3658
3712
  };
3659
- return CountLessThanCheckedValidatorArray;
3713
+ return CountGreaterThanEqualsUnCheckedValidatorArray;
3660
3714
  }(ValidatorArray));
3661
3715
 
3662
3716
  var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3674,86 +3728,79 @@ var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3674
3728
  return CountGreaterThanUnCheckedValidatorArray;
3675
3729
  }(ValidatorArray));
3676
3730
 
3677
- var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3678
- __extends(CountGreaterThanEqualsUnCheckedValidatorArray, _super);
3679
- function CountGreaterThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3731
+ var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
3732
+ __extends(CountLessThanCheckedValidatorArray, _super);
3733
+ function CountLessThanCheckedValidatorArray(count, value, target, event, autoValid) {
3680
3734
  if (autoValid === void 0) { autoValid = true; }
3681
3735
  var _this = _super.call(this, value, target, event, autoValid) || this;
3682
3736
  _this.count = count;
3683
3737
  return _this;
3684
3738
  }
3685
- CountGreaterThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3739
+ CountLessThanCheckedValidatorArray.prototype.valid = function () {
3686
3740
  var _a;
3687
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3741
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length < this.count;
3688
3742
  };
3689
- return CountGreaterThanEqualsUnCheckedValidatorArray;
3743
+ return CountLessThanCheckedValidatorArray;
3690
3744
  }(ValidatorArray));
3691
3745
 
3692
- var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3693
- __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3694
- function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3746
+ var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3747
+ __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
3748
+ function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3695
3749
  if (autoValid === void 0) { autoValid = true; }
3696
3750
  var _this = _super.call(this, value, target, event, autoValid) || this;
3697
3751
  _this.count = count;
3698
3752
  return _this;
3699
3753
  }
3700
- CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3754
+ CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3701
3755
  var _a;
3702
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
3756
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length <= this.count;
3703
3757
  };
3704
- return CountLessThanEqualsCheckedValidatorArray;
3758
+ return CountLessThanEqualsUnCheckedValidatorArray;
3705
3759
  }(ValidatorArray));
3706
3760
 
3707
- var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3708
- __extends(CountUnCheckedValidatorArray, _super);
3709
- function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
3761
+ var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3762
+ __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3763
+ function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3710
3764
  if (autoValid === void 0) { autoValid = true; }
3711
3765
  var _this = _super.call(this, value, target, event, autoValid) || this;
3712
3766
  _this.count = count;
3713
3767
  return _this;
3714
3768
  }
3715
- CountUnCheckedValidatorArray.prototype.valid = function () {
3769
+ CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3716
3770
  var _a;
3717
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3771
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3718
3772
  };
3719
- return CountUnCheckedValidatorArray;
3773
+ return CountGreaterThanEqualsCheckedValidatorArray;
3720
3774
  }(ValidatorArray));
3721
3775
 
3722
- var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3723
- __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3724
- function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3776
+ var CountUnCheckedValidatorArray = /** @class */ (function (_super) {
3777
+ __extends(CountUnCheckedValidatorArray, _super);
3778
+ function CountUnCheckedValidatorArray(count, value, target, event, autoValid) {
3725
3779
  if (autoValid === void 0) { autoValid = true; }
3726
3780
  var _this = _super.call(this, value, target, event, autoValid) || this;
3727
3781
  _this.count = count;
3728
3782
  return _this;
3729
3783
  }
3730
- CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3784
+ CountUnCheckedValidatorArray.prototype.valid = function () {
3731
3785
  var _a;
3732
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3786
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length >= this.count;
3733
3787
  };
3734
- return CountGreaterThanEqualsCheckedValidatorArray;
3788
+ return CountUnCheckedValidatorArray;
3735
3789
  }(ValidatorArray));
3736
3790
 
3737
- var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3738
- __extends(IncludeCheckedValidatorArray, _super);
3739
- function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3740
- if (allRequired === void 0) { allRequired = false; }
3791
+ var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3792
+ __extends(CountLessThanUnCheckedValidatorArray, _super);
3793
+ function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3741
3794
  if (autoValid === void 0) { autoValid = true; }
3742
3795
  var _this = _super.call(this, value, target, event, autoValid) || this;
3743
- _this.include = include;
3744
- _this.allRequired = allRequired;
3796
+ _this.count = count;
3745
3797
  return _this;
3746
3798
  }
3747
- IncludeCheckedValidatorArray.prototype.valid = function () {
3748
- var _this = this;
3799
+ CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
3749
3800
  var _a;
3750
- var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3751
- var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
3752
- return checkedValue.length > 0 &&
3753
- (!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3754
- (this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3801
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
3755
3802
  };
3756
- return IncludeCheckedValidatorArray;
3803
+ return CountLessThanUnCheckedValidatorArray;
3757
3804
  }(ValidatorArray));
3758
3805
 
3759
3806
  var FormValidator = /** @class */ (function (_super) {
@@ -3774,21 +3821,6 @@ var FormValidator = /** @class */ (function (_super) {
3774
3821
  return FormValidator;
3775
3822
  }(Validator));
3776
3823
 
3777
- var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3778
- __extends(CountLessThanUnCheckedValidatorArray, _super);
3779
- function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3780
- if (autoValid === void 0) { autoValid = true; }
3781
- var _this = _super.call(this, value, target, event, autoValid) || this;
3782
- _this.count = count;
3783
- return _this;
3784
- }
3785
- CountLessThanUnCheckedValidatorArray.prototype.valid = function () {
3786
- var _a;
3787
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length < this.count;
3788
- };
3789
- return CountLessThanUnCheckedValidatorArray;
3790
- }(ValidatorArray));
3791
-
3792
3824
  var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3793
3825
  __extends(ExcludeCheckedValidatorArray, _super);
3794
3826
  function ExcludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
@@ -3811,21 +3843,6 @@ var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3811
3843
  return ExcludeCheckedValidatorArray;
3812
3844
  }(ValidatorArray));
3813
3845
 
3814
- var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3815
- __extends(CountLessThanEqualsUnCheckedValidatorArray, _super);
3816
- function CountLessThanEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3817
- if (autoValid === void 0) { autoValid = true; }
3818
- var _this = _super.call(this, value, target, event, autoValid) || this;
3819
- _this.count = count;
3820
- return _this;
3821
- }
3822
- CountLessThanEqualsUnCheckedValidatorArray.prototype.valid = function () {
3823
- var _a;
3824
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length <= this.count;
3825
- };
3826
- return CountLessThanEqualsUnCheckedValidatorArray;
3827
- }(ValidatorArray));
3828
-
3829
3846
  var EmptyValidator = /** @class */ (function (_super) {
3830
3847
  __extends(EmptyValidator, _super);
3831
3848
  function EmptyValidator(value, target, event, autoValid) {
@@ -3840,20 +3857,27 @@ var EmptyValidator = /** @class */ (function (_super) {
3840
3857
  return EmptyValidator;
3841
3858
  }(Validator));
3842
3859
 
3843
- var NotEmptyValidator = /** @class */ (function (_super) {
3844
- __extends(NotEmptyValidator, _super);
3845
- function NotEmptyValidator(value, target, event, autoValid) {
3860
+ var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3861
+ __extends(IncludeCheckedValidatorArray, _super);
3862
+ function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3863
+ if (allRequired === void 0) { allRequired = false; }
3846
3864
  if (autoValid === void 0) { autoValid = true; }
3847
- return _super.call(this, value, target, event, autoValid) || this;
3865
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3866
+ _this.include = include;
3867
+ _this.allRequired = allRequired;
3868
+ return _this;
3848
3869
  }
3849
- NotEmptyValidator.prototype.valid = function () {
3850
- var _a, _b;
3851
- var value = this.value;
3852
- // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3853
- return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3870
+ IncludeCheckedValidatorArray.prototype.valid = function () {
3871
+ var _this = this;
3872
+ var _a;
3873
+ var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3874
+ var checkedValue = valus.filter(function (it) { return it.checked; }).map(function (it) { return it.value; });
3875
+ return checkedValue.length > 0 &&
3876
+ (!(checkedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3877
+ (this.allRequired ? checkedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3854
3878
  };
3855
- return NotEmptyValidator;
3856
- }(Validator));
3879
+ return IncludeCheckedValidatorArray;
3880
+ }(ValidatorArray));
3857
3881
 
3858
3882
  var MultipleValidator = /** @class */ (function (_super) {
3859
3883
  __extends(MultipleValidator, _super);
@@ -3884,32 +3908,6 @@ var MultipleValidator = /** @class */ (function (_super) {
3884
3908
  return MultipleValidator;
3885
3909
  }(Validator));
3886
3910
 
3887
- var PassValidator = /** @class */ (function (_super) {
3888
- __extends(PassValidator, _super);
3889
- function PassValidator(value, target, event, autoValid) {
3890
- if (autoValid === void 0) { autoValid = true; }
3891
- return _super.call(this, value, target, event, autoValid) || this;
3892
- }
3893
- PassValidator.prototype.valid = function () {
3894
- return true;
3895
- };
3896
- return PassValidator;
3897
- }(Validator));
3898
-
3899
- var RequiredValidator = /** @class */ (function (_super) {
3900
- __extends(RequiredValidator, _super);
3901
- function RequiredValidator(value, target, event, autoValid) {
3902
- if (autoValid === void 0) { autoValid = true; }
3903
- return _super.call(this, value, target, event, autoValid) || this;
3904
- }
3905
- RequiredValidator.prototype.valid = function () {
3906
- var value = this.value;
3907
- // console.log('required', value, value !== undefined && value !== null)
3908
- return value !== undefined && value !== null;
3909
- };
3910
- return RequiredValidator;
3911
- }(Validator));
3912
-
3913
3911
  var NotRegExpTestValidator = /** @class */ (function (_super) {
3914
3912
  __extends(NotRegExpTestValidator, _super);
3915
3913
  function NotRegExpTestValidator(regexp, value, target, event, autoValid) {
@@ -3945,6 +3943,70 @@ var UnCheckedValidator = /** @class */ (function (_super) {
3945
3943
  return UnCheckedValidator;
3946
3944
  }(Validator));
3947
3945
 
3946
+ var NotEmptyValidator = /** @class */ (function (_super) {
3947
+ __extends(NotEmptyValidator, _super);
3948
+ function NotEmptyValidator(value, target, event, autoValid) {
3949
+ if (autoValid === void 0) { autoValid = true; }
3950
+ return _super.call(this, value, target, event, autoValid) || this;
3951
+ }
3952
+ NotEmptyValidator.prototype.valid = function () {
3953
+ var _a, _b;
3954
+ var value = this.value;
3955
+ // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3956
+ return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3957
+ };
3958
+ return NotEmptyValidator;
3959
+ }(Validator));
3960
+
3961
+ var RegExpTestValidator = /** @class */ (function (_super) {
3962
+ __extends(RegExpTestValidator, _super);
3963
+ function RegExpTestValidator(regexp, value, target, event, autoValid) {
3964
+ if (autoValid === void 0) { autoValid = true; }
3965
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3966
+ _this.regexp = DomRenderProxy.final(regexp);
3967
+ return _this;
3968
+ }
3969
+ RegExpTestValidator.prototype.valid = function () {
3970
+ var _a;
3971
+ var value = this.value;
3972
+ var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
3973
+ // console.log('regexp-->', value, this.regexp, regExp.test(value))
3974
+ if (value) {
3975
+ return regExp.test(value);
3976
+ }
3977
+ else {
3978
+ return false;
3979
+ }
3980
+ };
3981
+ return RegExpTestValidator;
3982
+ }(Validator));
3983
+
3984
+ var PassValidator = /** @class */ (function (_super) {
3985
+ __extends(PassValidator, _super);
3986
+ function PassValidator(value, target, event, autoValid) {
3987
+ if (autoValid === void 0) { autoValid = true; }
3988
+ return _super.call(this, value, target, event, autoValid) || this;
3989
+ }
3990
+ PassValidator.prototype.valid = function () {
3991
+ return true;
3992
+ };
3993
+ return PassValidator;
3994
+ }(Validator));
3995
+
3996
+ var RequiredValidator = /** @class */ (function (_super) {
3997
+ __extends(RequiredValidator, _super);
3998
+ function RequiredValidator(value, target, event, autoValid) {
3999
+ if (autoValid === void 0) { autoValid = true; }
4000
+ return _super.call(this, value, target, event, autoValid) || this;
4001
+ }
4002
+ RequiredValidator.prototype.valid = function () {
4003
+ var value = this.value;
4004
+ // console.log('required', value, value !== undefined && value !== null)
4005
+ return value !== undefined && value !== null;
4006
+ };
4007
+ return RequiredValidator;
4008
+ }(Validator));
4009
+
3948
4010
  var ValidMultipleValidator = /** @class */ (function (_super) {
3949
4011
  __extends(ValidMultipleValidator, _super);
3950
4012
  function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
@@ -3974,29 +4036,6 @@ var ValidValidator = /** @class */ (function (_super) {
3974
4036
  return ValidValidator;
3975
4037
  }(Validator));
3976
4038
 
3977
- var RegExpTestValidator = /** @class */ (function (_super) {
3978
- __extends(RegExpTestValidator, _super);
3979
- function RegExpTestValidator(regexp, value, target, event, autoValid) {
3980
- if (autoValid === void 0) { autoValid = true; }
3981
- var _this = _super.call(this, value, target, event, autoValid) || this;
3982
- _this.regexp = DomRenderProxy.final(regexp);
3983
- return _this;
3984
- }
3985
- RegExpTestValidator.prototype.valid = function () {
3986
- var _a;
3987
- var value = this.value;
3988
- var regExp = (_a = this.regexp._DomRender_origin) !== null && _a !== void 0 ? _a : this.regexp;
3989
- // console.log('regexp-->', value, this.regexp, regExp.test(value))
3990
- if (value) {
3991
- return regExp.test(value);
3992
- }
3993
- else {
3994
- return false;
3995
- }
3996
- };
3997
- return RegExpTestValidator;
3998
- }(Validator));
3999
-
4000
4039
  var ValidValidatorArray = /** @class */ (function (_super) {
4001
4040
  __extends(ValidValidatorArray, _super);
4002
4041
  function ValidValidatorArray(validCallBack, value, target, event, autoValid) {
@@ -4039,6 +4078,51 @@ var ValueEqualsValidator = /** @class */ (function (_super) {
4039
4078
  return ValueEqualsValidator;
4040
4079
  }(Validator));
4041
4080
 
4081
+ var StorageUtils = /** @class */ (function () {
4082
+ function StorageUtils() {
4083
+ }
4084
+ StorageUtils.setLocalStorageItem = function (k, v, window) {
4085
+ if (typeof v === 'object') {
4086
+ v = JSON.stringify(v);
4087
+ }
4088
+ window.localStorage.setItem(k, v);
4089
+ };
4090
+ StorageUtils.getLocalStorageItem = function (k, window) {
4091
+ return window.localStorage.getItem(k);
4092
+ };
4093
+ StorageUtils.cutLocalStorageItem = function (k, window) {
4094
+ var data = StorageUtils.getLocalStorageItem(k, window);
4095
+ StorageUtils.removeLocalStorageItem(k, window);
4096
+ return data;
4097
+ };
4098
+ StorageUtils.removeLocalStorageItem = function (k, window) {
4099
+ return window.localStorage.removeItem(k);
4100
+ };
4101
+ StorageUtils.getLocalStorageJsonItem = function (k, window) {
4102
+ var item = window.localStorage.getItem(k);
4103
+ if (item) {
4104
+ try {
4105
+ return JSON.parse(item);
4106
+ }
4107
+ catch (e) {
4108
+ return undefined;
4109
+ }
4110
+ }
4111
+ else {
4112
+ return undefined;
4113
+ }
4114
+ };
4115
+ StorageUtils.cutLocalStorageJsonItem = function (k, window) {
4116
+ var item = StorageUtils.getLocalStorageJsonItem(k, window);
4117
+ StorageUtils.removeLocalStorageItem(k, window);
4118
+ return item;
4119
+ };
4120
+ StorageUtils.clearLocalStorage = function (window) {
4121
+ window.localStorage.clear();
4122
+ };
4123
+ return StorageUtils;
4124
+ }());
4125
+
4042
4126
  var ClipBoardUtils = /** @class */ (function () {
4043
4127
  function ClipBoardUtils() {
4044
4128
  }
@@ -4085,51 +4169,6 @@ var NodeUtils = /** @class */ (function () {
4085
4169
  return NodeUtils;
4086
4170
  }());
4087
4171
 
4088
- var StorageUtils = /** @class */ (function () {
4089
- function StorageUtils() {
4090
- }
4091
- StorageUtils.setLocalStorageItem = function (k, v, window) {
4092
- if (typeof v === 'object') {
4093
- v = JSON.stringify(v);
4094
- }
4095
- window.localStorage.setItem(k, v);
4096
- };
4097
- StorageUtils.getLocalStorageItem = function (k, window) {
4098
- return window.localStorage.getItem(k);
4099
- };
4100
- StorageUtils.cutLocalStorageItem = function (k, window) {
4101
- var data = StorageUtils.getLocalStorageItem(k, window);
4102
- StorageUtils.removeLocalStorageItem(k, window);
4103
- return data;
4104
- };
4105
- StorageUtils.removeLocalStorageItem = function (k, window) {
4106
- return window.localStorage.removeItem(k);
4107
- };
4108
- StorageUtils.getLocalStorageJsonItem = function (k, window) {
4109
- var item = window.localStorage.getItem(k);
4110
- if (item) {
4111
- try {
4112
- return JSON.parse(item);
4113
- }
4114
- catch (e) {
4115
- return undefined;
4116
- }
4117
- }
4118
- else {
4119
- return undefined;
4120
- }
4121
- };
4122
- StorageUtils.cutLocalStorageJsonItem = function (k, window) {
4123
- var item = StorageUtils.getLocalStorageJsonItem(k, window);
4124
- StorageUtils.removeLocalStorageItem(k, window);
4125
- return item;
4126
- };
4127
- StorageUtils.clearLocalStorage = function (window) {
4128
- window.localStorage.clear();
4129
- };
4130
- return StorageUtils;
4131
- }());
4132
-
4133
4172
  exports.AllCheckedValidatorArray = AllCheckedValidatorArray;
4134
4173
  exports.AllUnCheckedValidatorArray = AllUnCheckedValidatorArray;
4135
4174
  exports.Appender = Appender;