dom-render 1.0.80 → 1.0.83

Sign up to get free protection for your applications and to get access to all the features.
package/DomRenderProxy.js CHANGED
@@ -182,6 +182,7 @@ var DomRenderProxy = /** @class */ (function () {
182
182
  }
183
183
  else {
184
184
  var strings = paths.reverse();
185
+ // array같은경우도 키값으로 접근하기때문에 특정 인덱스를 찾아서 그부분만 바꿔줄수 있다.
185
186
  var fullPathStr_1 = strings.map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('').slice(1);
186
187
  if (lastDoneExecute) {
187
188
  var iterable = this._rawSets.get(fullPathStr_1);
package/README.MD CHANGED
@@ -7,7 +7,7 @@ DOM-RENDER
7
7
 
8
8
  # 🚀 Quick start
9
9
  ```html
10
- <script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.78/dist/bundle.js"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.83/dist/bundle.js"></script>
11
11
  ```
12
12
  ```html
13
13
  <!DOCTYPE html>
@@ -18,7 +18,7 @@ DOM-RENDER
18
18
  </head>
19
19
  <body id="app">
20
20
  ${this.name}$
21
- <script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.74/dist/bundle.js"></script>
21
+ <script src="https://cdn.jsdelivr.net/npm/dom-render@1.0.83/dist/bundle.js"></script>
22
22
  <script>
23
23
  let data = {
24
24
  name: 'my name is dom-render'
@@ -119,6 +119,45 @@ const data = DomRender.run(new Data(), document.querySelector('#app')!);
119
119
  ```
120
120
  </details>
121
121
 
122
+ <details>
123
+ <summary>dr-appender<strong>🔻(click)</strong></summary>
124
+
125
+ ```html
126
+ <h3>appender</h3>
127
+ <ul>
128
+ <li dr-appender="this.appender">
129
+ ${#it#}$
130
+ </li>
131
+ </ul>
132
+ <button dr-event-click="this.append()">appending</button>
133
+ <button dr-event-click="this.modifyAppender(0)">idx 0 modify</button>
134
+ <button dr-event-click="this.clearAppend()">appender clear</button>
135
+ ```
136
+
137
+ ```typescript
138
+ class Data {
139
+ appender = new Appender();
140
+
141
+ constructor() {
142
+ this.appender.push('init' + RandomUtils.uuid(), 'init' + RandomUtils.uuid());
143
+ }
144
+
145
+ append() {
146
+ this.appender.push(RandomUtils.uuid(), RandomUtils.uuid());
147
+ }
148
+
149
+ clearAppend() {
150
+ this.appender.clear()
151
+ }
152
+
153
+ modifyAppender(idx: number) {
154
+ this.appender[idx][0] = RandomUtils.uuid();
155
+ }
156
+ }
157
+
158
+ ```
159
+ </details>
160
+
122
161
  <details>
123
162
  <summary>dr-repeat<strong>🔻(click)</strong></summary>
124
163
 
@@ -465,6 +504,17 @@ for (let data of new Range(100,55, 10)) {
465
504
  const rangeArray = new Range(100,55, 10).toArray();
466
505
  ```
467
506
  </details>
507
+ <details>
508
+ <summary>Appender<strong>🔻(click)</strong></summary>
509
+
510
+ ```javascript
511
+ const appender = new Appender<number>([1, 2]);
512
+ appender.push(3, 4)
513
+ for (const data of appender) {
514
+ console.log('----appender item--->', data);
515
+ }
516
+ ```
517
+ </details>
468
518
 
469
519
  ## Detect Get, Set
470
520
  <details>
package/RawSet.d.ts CHANGED
@@ -145,5 +145,7 @@ export declare class RawSet {
145
145
  static isExporesion(data: string | null): boolean;
146
146
  static exporesionGrouops(data: string | null): RegExpExecArray[];
147
147
  static styleTransformLocal(styleBody: string | string[], id: string, styleTagWrap?: boolean, locale?: boolean): string;
148
+ static metaStart(id: string): string;
149
+ static metaEnd(id: string): string;
148
150
  static destroy(obj: any | undefined, parameter: any[], config: Config, destroyOptions?: (DestroyOptionType | string)[]): void;
149
151
  }
package/RawSet.js CHANGED
@@ -118,7 +118,7 @@ var RawSet = /** @class */ (function () {
118
118
  // console.log('usingTriggerVariable----------->', usingTriggerVariables)
119
119
  return usingTriggerVariables;
120
120
  };
121
- // 중요 render
121
+ // 중요 render 처리 부분
122
122
  RawSet.prototype.render = function (obj, config) {
123
123
  var _this = this;
124
124
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -234,6 +234,40 @@ var RawSet = /** @class */ (function () {
234
234
  }
235
235
  for (var _q = 0, onElementInitCallBacks_1 = onElementInitCallBacks; _q < onElementInitCallBacks_1.length; _q++) {
236
236
  var it_2 = onElementInitCallBacks_1[_q];
237
+ // 중요 style isolation 나중에 :scope로 대체 가능할듯.
238
+ Array.from(window.document.styleSheets).filter(function (it) { return it.ownerNode && it.ownerNode instanceof Element && it.ownerNode.getAttribute('id') && !it.ownerNode.getAttribute('completed'); }).forEach(function (it) {
239
+ var _a;
240
+ var styleElement = it.ownerNode;
241
+ var id = (_a = styleElement.getAttribute('id')) === null || _a === void 0 ? void 0 : _a.split('-')[0];
242
+ if (id) {
243
+ // console.log('------->', id)
244
+ var start_1 = "#".concat(id, "-start");
245
+ var end_1 = "#".concat(id, "-end");
246
+ Array.from(it.cssRules).filter(function (it) { return it.constructor.name === 'CSSStyleRule'; }).forEach(function (it) {
247
+ var rule = it;
248
+ // rule.selectorText = `${start} ~ *:not(${start} ~ ${end} ~ *) ${rule.selectorText}`;
249
+ // rule.selectorText = `${start} ~ *:not(${start} ~ ${end} ~ ${rule.selectorText})`;
250
+ // console.log('-----', rule, rule.selectorText)
251
+ if (!rule.selectorText.startsWith(':root')) {
252
+ // rule.selectorText = `${start} ~ ${rule.selectorText}:not(${start} ~ ${end} ~ *)`;
253
+ // rule.selectorText = `${start} ~ ${rule.selectorText}:not(${start} ~ ${end} ~ *)`;
254
+ var selectorText = ":is(".concat(start_1, " ~ *:not(").concat(start_1, " ~ ").concat(end_1, " ~ *))");
255
+ if (rule.selectorText.startsWith('.')) {
256
+ rule.selectorText = "".concat(selectorText).concat(rule.selectorText, ", ").concat(selectorText, " ").concat(rule.selectorText);
257
+ // rule.selectorText = `${start} ~ *:not(${start} ~ ${end} ~ *)${rule.selectorText}`;
258
+ }
259
+ else {
260
+ var divText = "".concat(start_1, " ~ ").concat(rule.selectorText, ":not(").concat(start_1, " ~ ").concat(end_1, " ~ *)");
261
+ rule.selectorText = "".concat(selectorText, " ").concat(rule.selectorText, ", ").concat(divText);
262
+ // rule.selectorText = `${selectorText} ${rule.selectorText}`;
263
+ // rule.selectorText = `${rule.selectorText} ~ ${start} ~ *:not(${start} ~ ${end} ~ *)`;
264
+ }
265
+ }
266
+ // console.log(rule.selectorText);
267
+ });
268
+ }
269
+ it.ownerNode.setAttribute('completed', 'true');
270
+ });
237
271
  (_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 }));
238
272
  (_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);
239
273
  }
@@ -530,7 +564,10 @@ var RawSet = /** @class */ (function () {
530
564
  var n = element.cloneNode(true);
531
565
  if (set) {
532
566
  var id = RandomUtils_1.RandomUtils.getRandomString(20);
533
- n.innerHTML = RawSet.styleTransformLocal((_a = set.styles) !== null && _a !== void 0 ? _a : [], id, true, set.styleLocale) + ((_b = set.template) !== null && _b !== void 0 ? _b : '');
567
+ var style = RawSet.styleTransformLocal((_a = set.styles) !== null && _a !== void 0 ? _a : [], id, true, set.styleLocale);
568
+ var metaStart = RawSet.metaStart(id);
569
+ var metaEnd = RawSet.metaEnd(id);
570
+ n.innerHTML = metaStart + style + ((_b = set.template) !== null && _b !== void 0 ? _b : '') + metaEnd;
534
571
  // dr-on-create onCreateRender
535
572
  var onCreate = element.getAttribute("".concat(EventManager_1.EventManager.attrPrefix, "on-create"));
536
573
  var renderScript = '';
@@ -685,8 +722,10 @@ var RawSet = /** @class */ (function () {
685
722
  __render: render
686
723
  }));
687
724
  }
688
- var innerHTML = RawSet.styleTransformLocal(styles, componentKey, true, styleLocale) + (applayTemplate !== null && applayTemplate !== void 0 ? applayTemplate : '');
689
- element.innerHTML = innerHTML;
725
+ var style = RawSet.styleTransformLocal(styles, componentKey, true, styleLocale);
726
+ var metaStart = RawSet.metaStart(componentKey);
727
+ var metaEnd = RawSet.metaEnd(componentKey);
728
+ element.innerHTML = metaStart + style + (applayTemplate !== null && applayTemplate !== void 0 ? applayTemplate : '') + metaEnd;
690
729
  // console.log('------>', element.innerHTML, obj)
691
730
  var data = RawSet.drThisCreate(element, "this.__domrender_components.".concat(componentKey), '', true, obj, config);
692
731
  // 넘어온 innerHTML에 this가 있는걸 다시 복호화해서 제대로 작동하도록한다.
@@ -712,6 +751,7 @@ var RawSet = /** @class */ (function () {
712
751
  var reg = /(?:[$#]\{(?:(([$#]\{)??[^$#]?[^{]*?)\}[$#]))/g;
713
752
  return StringUtils_1.StringUtils.regexExec(reg, data !== null && data !== void 0 ? data : '');
714
753
  };
754
+ // 중요 스타일 적용 부분
715
755
  RawSet.styleTransformLocal = function (styleBody, id, styleTagWrap, locale) {
716
756
  if (styleTagWrap === void 0) { styleTagWrap = true; }
717
757
  if (locale === void 0) { locale = false; }
@@ -733,10 +773,16 @@ var RawSet = /** @class */ (function () {
733
773
  });
734
774
  }
735
775
  if (styleTagWrap) {
736
- styleBody = "<style id='".concat(id, "' domstyle>").concat(styleBody, "</style>");
776
+ styleBody = "<style id='".concat(id, "-style' domstyle>").concat(styleBody, "</style>");
737
777
  }
738
778
  return styleBody;
739
779
  };
780
+ RawSet.metaStart = function (id) {
781
+ return "<meta id='".concat(id, "-start' />");
782
+ };
783
+ RawSet.metaEnd = function (id) {
784
+ return "<meta id='".concat(id, "-end' />");
785
+ };
740
786
  RawSet.destroy = function (obj, parameter, config, destroyOptions) {
741
787
  var _a;
742
788
  if (destroyOptions === void 0) { destroyOptions = []; }
package/dist/bundle.js CHANGED
@@ -1213,7 +1213,7 @@ var Validator = /** @class */ (function () {
1213
1213
  target.value = this._value;
1214
1214
  }
1215
1215
  catch (e) {
1216
- console.log('set value function is blocked ');
1216
+ console.error('set value function is blocked ');
1217
1217
  }
1218
1218
  }
1219
1219
  if (this.getAutoValidAction()) {
@@ -1755,6 +1755,7 @@ var DrTargetElement = /** @class */ (function (_super) {
1755
1755
  targetElement: targetElement,
1756
1756
  creatorMetaData: targetElement.__creatorMetaData
1757
1757
  });
1758
+ // console.log(document.body.innerHTML);
1758
1759
  (_e = targetElement === null || targetElement === void 0 ? void 0 : targetElement.complete) === null || _e === void 0 ? void 0 : _e.call(targetElement, this.elementSource.element, this.source.obj, this.rawSet);
1759
1760
  }
1760
1761
  return exports.ExecuteState.EXECUTE;
@@ -1875,7 +1876,7 @@ var RawSet = /** @class */ (function () {
1875
1876
  // console.log('usingTriggerVariable----------->', usingTriggerVariables)
1876
1877
  return usingTriggerVariables;
1877
1878
  };
1878
- // 중요 render
1879
+ // 중요 render 처리 부분
1879
1880
  RawSet.prototype.render = function (obj, config) {
1880
1881
  var _this = this;
1881
1882
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -1991,6 +1992,40 @@ var RawSet = /** @class */ (function () {
1991
1992
  }
1992
1993
  for (var _q = 0, onElementInitCallBacks_1 = onElementInitCallBacks; _q < onElementInitCallBacks_1.length; _q++) {
1993
1994
  var it_2 = onElementInitCallBacks_1[_q];
1995
+ // 중요 style isolation 나중에 :scope로 대체 가능할듯.
1996
+ Array.from(window.document.styleSheets).filter(function (it) { return it.ownerNode && it.ownerNode instanceof Element && it.ownerNode.getAttribute('id') && !it.ownerNode.getAttribute('completed'); }).forEach(function (it) {
1997
+ var _a;
1998
+ var styleElement = it.ownerNode;
1999
+ var id = (_a = styleElement.getAttribute('id')) === null || _a === void 0 ? void 0 : _a.split('-')[0];
2000
+ if (id) {
2001
+ // console.log('------->', id)
2002
+ var start_1 = "#".concat(id, "-start");
2003
+ var end_1 = "#".concat(id, "-end");
2004
+ Array.from(it.cssRules).filter(function (it) { return it.constructor.name === 'CSSStyleRule'; }).forEach(function (it) {
2005
+ var rule = it;
2006
+ // rule.selectorText = `${start} ~ *:not(${start} ~ ${end} ~ *) ${rule.selectorText}`;
2007
+ // rule.selectorText = `${start} ~ *:not(${start} ~ ${end} ~ ${rule.selectorText})`;
2008
+ // console.log('-----', rule, rule.selectorText)
2009
+ if (!rule.selectorText.startsWith(':root')) {
2010
+ // rule.selectorText = `${start} ~ ${rule.selectorText}:not(${start} ~ ${end} ~ *)`;
2011
+ // rule.selectorText = `${start} ~ ${rule.selectorText}:not(${start} ~ ${end} ~ *)`;
2012
+ var selectorText = ":is(".concat(start_1, " ~ *:not(").concat(start_1, " ~ ").concat(end_1, " ~ *))");
2013
+ if (rule.selectorText.startsWith('.')) {
2014
+ rule.selectorText = "".concat(selectorText).concat(rule.selectorText, ", ").concat(selectorText, " ").concat(rule.selectorText);
2015
+ // rule.selectorText = `${start} ~ *:not(${start} ~ ${end} ~ *)${rule.selectorText}`;
2016
+ }
2017
+ else {
2018
+ var divText = "".concat(start_1, " ~ ").concat(rule.selectorText, ":not(").concat(start_1, " ~ ").concat(end_1, " ~ *)");
2019
+ rule.selectorText = "".concat(selectorText, " ").concat(rule.selectorText, ", ").concat(divText);
2020
+ // rule.selectorText = `${selectorText} ${rule.selectorText}`;
2021
+ // rule.selectorText = `${rule.selectorText} ~ ${start} ~ *:not(${start} ~ ${end} ~ *)`;
2022
+ }
2023
+ }
2024
+ // console.log(rule.selectorText);
2025
+ });
2026
+ }
2027
+ it.ownerNode.setAttribute('completed', 'true');
2028
+ });
1994
2029
  (_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 }));
1995
2030
  (_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);
1996
2031
  }
@@ -2287,7 +2322,10 @@ var RawSet = /** @class */ (function () {
2287
2322
  var n = element.cloneNode(true);
2288
2323
  if (set) {
2289
2324
  var id = RandomUtils.getRandomString(20);
2290
- n.innerHTML = RawSet.styleTransformLocal((_a = set.styles) !== null && _a !== void 0 ? _a : [], id, true, set.styleLocale) + ((_b = set.template) !== null && _b !== void 0 ? _b : '');
2325
+ var style = RawSet.styleTransformLocal((_a = set.styles) !== null && _a !== void 0 ? _a : [], id, true, set.styleLocale);
2326
+ var metaStart = RawSet.metaStart(id);
2327
+ var metaEnd = RawSet.metaEnd(id);
2328
+ n.innerHTML = metaStart + style + ((_b = set.template) !== null && _b !== void 0 ? _b : '') + metaEnd;
2291
2329
  // dr-on-create onCreateRender
2292
2330
  var onCreate = element.getAttribute("".concat(EventManager.attrPrefix, "on-create"));
2293
2331
  var renderScript = '';
@@ -2442,8 +2480,10 @@ var RawSet = /** @class */ (function () {
2442
2480
  __render: render
2443
2481
  }));
2444
2482
  }
2445
- var innerHTML = RawSet.styleTransformLocal(styles, componentKey, true, styleLocale) + (applayTemplate !== null && applayTemplate !== void 0 ? applayTemplate : '');
2446
- element.innerHTML = innerHTML;
2483
+ var style = RawSet.styleTransformLocal(styles, componentKey, true, styleLocale);
2484
+ var metaStart = RawSet.metaStart(componentKey);
2485
+ var metaEnd = RawSet.metaEnd(componentKey);
2486
+ element.innerHTML = metaStart + style + (applayTemplate !== null && applayTemplate !== void 0 ? applayTemplate : '') + metaEnd;
2447
2487
  // console.log('------>', element.innerHTML, obj)
2448
2488
  var data = RawSet.drThisCreate(element, "this.__domrender_components.".concat(componentKey), '', true, obj, config);
2449
2489
  // 넘어온 innerHTML에 this가 있는걸 다시 복호화해서 제대로 작동하도록한다.
@@ -2469,6 +2509,7 @@ var RawSet = /** @class */ (function () {
2469
2509
  var reg = /(?:[$#]\{(?:(([$#]\{)??[^$#]?[^{]*?)\}[$#]))/g;
2470
2510
  return StringUtils.regexExec(reg, data !== null && data !== void 0 ? data : '');
2471
2511
  };
2512
+ // 중요 스타일 적용 부분
2472
2513
  RawSet.styleTransformLocal = function (styleBody, id, styleTagWrap, locale) {
2473
2514
  if (styleTagWrap === void 0) { styleTagWrap = true; }
2474
2515
  if (locale === void 0) { locale = false; }
@@ -2490,10 +2531,16 @@ var RawSet = /** @class */ (function () {
2490
2531
  });
2491
2532
  }
2492
2533
  if (styleTagWrap) {
2493
- styleBody = "<style id='".concat(id, "' domstyle>").concat(styleBody, "</style>");
2534
+ styleBody = "<style id='".concat(id, "-style' domstyle>").concat(styleBody, "</style>");
2494
2535
  }
2495
2536
  return styleBody;
2496
2537
  };
2538
+ RawSet.metaStart = function (id) {
2539
+ return "<meta id='".concat(id, "-start' />");
2540
+ };
2541
+ RawSet.metaEnd = function (id) {
2542
+ return "<meta id='".concat(id, "-end' />");
2543
+ };
2497
2544
  RawSet.destroy = function (obj, parameter, config, destroyOptions) {
2498
2545
  var _a;
2499
2546
  if (destroyOptions === void 0) { destroyOptions = []; }
@@ -2732,6 +2779,7 @@ var DomRenderProxy = /** @class */ (function () {
2732
2779
  }
2733
2780
  else {
2734
2781
  var strings = paths.reverse();
2782
+ // array같은경우도 키값으로 접근하기때문에 특정 인덱스를 찾아서 그부분만 바꿔줄수 있다.
2735
2783
  var fullPathStr_1 = strings.map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('').slice(1);
2736
2784
  if (lastDoneExecute) {
2737
2785
  var iterable = this._rawSets.get(fullPathStr_1);
@@ -3257,7 +3305,7 @@ var Messenger = /** @class */ (function () {
3257
3305
  this.config.window.addEventListener(Messenger.EVENT_PUBLISH_KEY, function (e) {
3258
3306
  var _a, _b;
3259
3307
  var detail = e.detail;
3260
- console.log('--->', detail);
3308
+ // console.log('--->', detail)
3261
3309
  var rtns = [];
3262
3310
  (_a = _this.getChannels(detail.key)) === null || _a === void 0 ? void 0 : _a.forEach(function (it) {
3263
3311
  try {
@@ -3274,7 +3322,7 @@ var Messenger = /** @class */ (function () {
3274
3322
  });
3275
3323
  this.config.window.addEventListener(Messenger.EVENT_SUBSCRIBE_KEY, function (e) {
3276
3324
  var detail = e.detail;
3277
- console.log('--->', detail);
3325
+ // console.log('--->', detail)
3278
3326
  var channel = _this.createChannel(detail.obj, detail.key);
3279
3327
  detail.init(channel, channel.subscribe(detail.subscribe));
3280
3328
  });
@@ -3300,7 +3348,7 @@ var Messenger = /** @class */ (function () {
3300
3348
  if (obj) {
3301
3349
  this.channels.forEach(function (it) {
3302
3350
  if (it.obj === obj) {
3303
- console.log('dddddddddddd', obj);
3351
+ // console.log('dddddddddddd', obj)
3304
3352
  _this.deleteChannel(it);
3305
3353
  }
3306
3354
  });
@@ -3398,11 +3446,35 @@ var RenderManager = /** @class */ (function () {
3398
3446
  }());
3399
3447
 
3400
3448
  var Appender = /** @class */ (function () {
3401
- // [keys: string]: any;
3402
- function Appender() {
3449
+ function Appender(defaultDatas) {
3403
3450
  this.length = 0;
3451
+ if (defaultDatas) {
3452
+ this.push.apply(this, defaultDatas);
3453
+ }
3404
3454
  // (this.childs as any).isAppender = true;
3405
3455
  }
3456
+ Appender.prototype[Symbol.iterator] = function () {
3457
+ var items = this.getAll();
3458
+ var idx = 0;
3459
+ return {
3460
+ next: function (value) {
3461
+ var r = { value: undefined, done: true };
3462
+ if (items.length > idx) {
3463
+ r = { value: items[idx], done: false };
3464
+ }
3465
+ idx++;
3466
+ return r;
3467
+ }
3468
+ };
3469
+ };
3470
+ Appender.prototype.getAll = function () {
3471
+ return this.getAlls().flat();
3472
+ };
3473
+ Appender.prototype.getAlls = function () {
3474
+ var _this = this;
3475
+ var map = Array.from({ length: this.length }).filter(function (it, idx) { return _this[idx]; }).map(function (it, idx) { return _this[idx]; });
3476
+ return map;
3477
+ };
3406
3478
  Appender.prototype.push = function () {
3407
3479
  var items = [];
3408
3480
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -3439,6 +3511,19 @@ var AllCheckedValidatorArray = /** @class */ (function (_super) {
3439
3511
  return AllCheckedValidatorArray;
3440
3512
  }(ValidatorArray));
3441
3513
 
3514
+ var CheckedValidator = /** @class */ (function (_super) {
3515
+ __extends(CheckedValidator, _super);
3516
+ function CheckedValidator(value, target, event, autoValid) {
3517
+ if (autoValid === void 0) { autoValid = true; }
3518
+ return _super.call(this, value, target, event, autoValid) || this;
3519
+ }
3520
+ CheckedValidator.prototype.valid = function () {
3521
+ var _a, _b;
3522
+ return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
3523
+ };
3524
+ return CheckedValidator;
3525
+ }(Validator));
3526
+
3442
3527
  var AllUnCheckedValidatorArray = /** @class */ (function (_super) {
3443
3528
  __extends(AllUnCheckedValidatorArray, _super);
3444
3529
  function AllUnCheckedValidatorArray(value, target, event, autoValid) {
@@ -3467,18 +3552,20 @@ var CountEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3467
3552
  return CountEqualsCheckedValidatorArray;
3468
3553
  }(ValidatorArray));
3469
3554
 
3470
- var CheckedValidator = /** @class */ (function (_super) {
3471
- __extends(CheckedValidator, _super);
3472
- function CheckedValidator(value, target, event, autoValid) {
3555
+ var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3556
+ __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3557
+ function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3473
3558
  if (autoValid === void 0) { autoValid = true; }
3474
- return _super.call(this, value, target, event, autoValid) || this;
3559
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3560
+ _this.count = count;
3561
+ return _this;
3475
3562
  }
3476
- CheckedValidator.prototype.valid = function () {
3477
- var _a, _b;
3478
- return (_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false;
3563
+ CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3564
+ var _a;
3565
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3479
3566
  };
3480
- return CheckedValidator;
3481
- }(Validator));
3567
+ return CountGreaterThanEqualsCheckedValidatorArray;
3568
+ }(ValidatorArray));
3482
3569
 
3483
3570
  var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3484
3571
  __extends(CountGreaterThanCheckedValidatorArray, _super);
@@ -3495,34 +3582,34 @@ var CountGreaterThanCheckedValidatorArray = /** @class */ (function (_super) {
3495
3582
  return CountGreaterThanCheckedValidatorArray;
3496
3583
  }(ValidatorArray));
3497
3584
 
3498
- var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3499
- __extends(CountEqualsUnCheckedValidatorArray, _super);
3500
- function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3585
+ var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3586
+ __extends(CountGreaterThanUnCheckedValidatorArray, _super);
3587
+ function CountGreaterThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3501
3588
  if (autoValid === void 0) { autoValid = true; }
3502
3589
  var _this = _super.call(this, value, target, event, autoValid) || this;
3503
3590
  _this.count = count;
3504
3591
  return _this;
3505
3592
  }
3506
- CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3593
+ CountGreaterThanUnCheckedValidatorArray.prototype.valid = function () {
3507
3594
  var _a;
3508
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3595
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > this.count;
3509
3596
  };
3510
- return CountEqualsUnCheckedValidatorArray;
3597
+ return CountGreaterThanUnCheckedValidatorArray;
3511
3598
  }(ValidatorArray));
3512
3599
 
3513
- var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3514
- __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3515
- function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3600
+ var CountEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
3601
+ __extends(CountEqualsUnCheckedValidatorArray, _super);
3602
+ function CountEqualsUnCheckedValidatorArray(count, value, target, event, autoValid) {
3516
3603
  if (autoValid === void 0) { autoValid = true; }
3517
3604
  var _this = _super.call(this, value, target, event, autoValid) || this;
3518
3605
  _this.count = count;
3519
3606
  return _this;
3520
3607
  }
3521
- CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3608
+ CountEqualsUnCheckedValidatorArray.prototype.valid = function () {
3522
3609
  var _a;
3523
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
3610
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length === this.count;
3524
3611
  };
3525
- return CountLessThanEqualsCheckedValidatorArray;
3612
+ return CountEqualsUnCheckedValidatorArray;
3526
3613
  }(ValidatorArray));
3527
3614
 
3528
3615
  var CountGreaterThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3555,19 +3642,19 @@ var CountLessThanCheckedValidatorArray = /** @class */ (function (_super) {
3555
3642
  return CountLessThanCheckedValidatorArray;
3556
3643
  }(ValidatorArray));
3557
3644
 
3558
- var CountGreaterThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3559
- __extends(CountGreaterThanEqualsCheckedValidatorArray, _super);
3560
- function CountGreaterThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3645
+ var CountLessThanEqualsCheckedValidatorArray = /** @class */ (function (_super) {
3646
+ __extends(CountLessThanEqualsCheckedValidatorArray, _super);
3647
+ function CountLessThanEqualsCheckedValidatorArray(count, value, target, event, autoValid) {
3561
3648
  if (autoValid === void 0) { autoValid = true; }
3562
3649
  var _this = _super.call(this, value, target, event, autoValid) || this;
3563
3650
  _this.count = count;
3564
3651
  return _this;
3565
3652
  }
3566
- CountGreaterThanEqualsCheckedValidatorArray.prototype.valid = function () {
3653
+ CountLessThanEqualsCheckedValidatorArray.prototype.valid = function () {
3567
3654
  var _a;
3568
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length >= this.count;
3655
+ return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return it.checked; }).length <= this.count;
3569
3656
  };
3570
- return CountGreaterThanEqualsCheckedValidatorArray;
3657
+ return CountLessThanEqualsCheckedValidatorArray;
3571
3658
  }(ValidatorArray));
3572
3659
 
3573
3660
  var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super) {
@@ -3585,21 +3672,6 @@ var CountLessThanEqualsUnCheckedValidatorArray = /** @class */ (function (_super
3585
3672
  return CountLessThanEqualsUnCheckedValidatorArray;
3586
3673
  }(ValidatorArray));
3587
3674
 
3588
- var CountGreaterThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3589
- __extends(CountGreaterThanUnCheckedValidatorArray, _super);
3590
- function CountGreaterThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
3591
- if (autoValid === void 0) { autoValid = true; }
3592
- var _this = _super.call(this, value, target, event, autoValid) || this;
3593
- _this.count = count;
3594
- return _this;
3595
- }
3596
- CountGreaterThanUnCheckedValidatorArray.prototype.valid = function () {
3597
- var _a;
3598
- return ((_a = this.value) !== null && _a !== void 0 ? _a : []).filter(function (it) { return !it.checked; }).length > this.count;
3599
- };
3600
- return CountGreaterThanUnCheckedValidatorArray;
3601
- }(ValidatorArray));
3602
-
3603
3675
  var CountLessThanUnCheckedValidatorArray = /** @class */ (function (_super) {
3604
3676
  __extends(CountLessThanUnCheckedValidatorArray, _super);
3605
3677
  function CountLessThanUnCheckedValidatorArray(count, value, target, event, autoValid) {
@@ -3644,6 +3716,46 @@ var EmptyValidator = /** @class */ (function (_super) {
3644
3716
  return EmptyValidator;
3645
3717
  }(Validator));
3646
3718
 
3719
+ var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3720
+ __extends(ExcludeCheckedValidatorArray, _super);
3721
+ function ExcludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3722
+ if (allRequired === void 0) { allRequired = false; }
3723
+ if (autoValid === void 0) { autoValid = true; }
3724
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3725
+ _this.include = include;
3726
+ _this.allRequired = allRequired;
3727
+ return _this;
3728
+ }
3729
+ ExcludeCheckedValidatorArray.prototype.valid = function () {
3730
+ var _this = this;
3731
+ var _a;
3732
+ var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3733
+ var unCheckedValue = valus.filter(function (it) { return !it.checked; }).map(function (it) { return it.value; });
3734
+ return unCheckedValue.length > 0 &&
3735
+ (!(unCheckedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3736
+ (this.allRequired ? unCheckedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3737
+ };
3738
+ return ExcludeCheckedValidatorArray;
3739
+ }(ValidatorArray));
3740
+
3741
+ var FormValidator = /** @class */ (function (_super) {
3742
+ __extends(FormValidator, _super);
3743
+ function FormValidator(target, event, autoValid) {
3744
+ if (autoValid === void 0) { autoValid = true; }
3745
+ return _super.call(this, undefined, target, event, autoValid) || this;
3746
+ }
3747
+ FormValidator.prototype.validAction = function () {
3748
+ return _super.prototype.childValidAction.call(this);
3749
+ };
3750
+ FormValidator.prototype.valid = function () {
3751
+ return this.childValid();
3752
+ };
3753
+ FormValidator.prototype.reset = function () {
3754
+ this.targetReset();
3755
+ };
3756
+ return FormValidator;
3757
+ }(Validator));
3758
+
3647
3759
  var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3648
3760
  __extends(IncludeCheckedValidatorArray, _super);
3649
3761
  function IncludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
@@ -3666,21 +3778,6 @@ var IncludeCheckedValidatorArray = /** @class */ (function (_super) {
3666
3778
  return IncludeCheckedValidatorArray;
3667
3779
  }(ValidatorArray));
3668
3780
 
3669
- var NotEmptyValidator = /** @class */ (function (_super) {
3670
- __extends(NotEmptyValidator, _super);
3671
- function NotEmptyValidator(value, target, event, autoValid) {
3672
- if (autoValid === void 0) { autoValid = true; }
3673
- return _super.call(this, value, target, event, autoValid) || this;
3674
- }
3675
- NotEmptyValidator.prototype.valid = function () {
3676
- var _a, _b;
3677
- var value = this.value;
3678
- // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3679
- return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3680
- };
3681
- return NotEmptyValidator;
3682
- }(Validator));
3683
-
3684
3781
  var MultipleValidator = /** @class */ (function (_super) {
3685
3782
  __extends(MultipleValidator, _super);
3686
3783
  function MultipleValidator(validators, value, target, event, autoValid) {
@@ -3710,56 +3807,19 @@ var MultipleValidator = /** @class */ (function (_super) {
3710
3807
  return MultipleValidator;
3711
3808
  }(Validator));
3712
3809
 
3713
- var FormValidator = /** @class */ (function (_super) {
3714
- __extends(FormValidator, _super);
3715
- function FormValidator(target, event, autoValid) {
3716
- if (autoValid === void 0) { autoValid = true; }
3717
- return _super.call(this, undefined, target, event, autoValid) || this;
3718
- }
3719
- FormValidator.prototype.validAction = function () {
3720
- return _super.prototype.childValidAction.call(this);
3721
- };
3722
- FormValidator.prototype.valid = function () {
3723
- return this.childValid();
3724
- };
3725
- FormValidator.prototype.reset = function () {
3726
- this.targetReset();
3727
- };
3728
- return FormValidator;
3729
- }(Validator));
3730
-
3731
- var ExcludeCheckedValidatorArray = /** @class */ (function (_super) {
3732
- __extends(ExcludeCheckedValidatorArray, _super);
3733
- function ExcludeCheckedValidatorArray(include, allRequired, value, target, event, autoValid) {
3734
- if (allRequired === void 0) { allRequired = false; }
3735
- if (autoValid === void 0) { autoValid = true; }
3736
- var _this = _super.call(this, value, target, event, autoValid) || this;
3737
- _this.include = include;
3738
- _this.allRequired = allRequired;
3739
- return _this;
3740
- }
3741
- ExcludeCheckedValidatorArray.prototype.valid = function () {
3742
- var _this = this;
3743
- var _a;
3744
- var valus = (_a = this.value) !== null && _a !== void 0 ? _a : [];
3745
- var unCheckedValue = valus.filter(function (it) { return !it.checked; }).map(function (it) { return it.value; });
3746
- return unCheckedValue.length > 0 &&
3747
- (!(unCheckedValue.filter(function (it) { return !_this.include.includes(it); }).length > 0)) &&
3748
- (this.allRequired ? unCheckedValue.filter(function (it) { return _this.include.includes(it); }).length === this.include.length : true);
3749
- };
3750
- return ExcludeCheckedValidatorArray;
3751
- }(ValidatorArray));
3752
-
3753
- var PassValidator = /** @class */ (function (_super) {
3754
- __extends(PassValidator, _super);
3755
- function PassValidator(value, target, event, autoValid) {
3810
+ var NotEmptyValidator = /** @class */ (function (_super) {
3811
+ __extends(NotEmptyValidator, _super);
3812
+ function NotEmptyValidator(value, target, event, autoValid) {
3756
3813
  if (autoValid === void 0) { autoValid = true; }
3757
3814
  return _super.call(this, value, target, event, autoValid) || this;
3758
3815
  }
3759
- PassValidator.prototype.valid = function () {
3760
- return true;
3816
+ NotEmptyValidator.prototype.valid = function () {
3817
+ var _a, _b;
3818
+ var value = this.value;
3819
+ // console.log('NotEmptyValidator', value, value !== undefined && value !== null && ((value as any)?.length ?? 0) > 0)
3820
+ return value !== undefined && value !== null && ((_b = (_a = value) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0;
3761
3821
  };
3762
- return PassValidator;
3822
+ return NotEmptyValidator;
3763
3823
  }(Validator));
3764
3824
 
3765
3825
  var NotRegExpTestValidator = /** @class */ (function (_super) {
@@ -3784,34 +3844,31 @@ var NotRegExpTestValidator = /** @class */ (function (_super) {
3784
3844
  return NotRegExpTestValidator;
3785
3845
  }(Validator));
3786
3846
 
3787
- var ValidValidator = /** @class */ (function (_super) {
3788
- __extends(ValidValidator, _super);
3789
- function ValidValidator(validCallBack, value, target, event, autoValid) {
3847
+ var PassValidator = /** @class */ (function (_super) {
3848
+ __extends(PassValidator, _super);
3849
+ function PassValidator(value, target, event, autoValid) {
3790
3850
  if (autoValid === void 0) { autoValid = true; }
3791
- var _this = _super.call(this, value, target, event, autoValid) || this;
3792
- _this.validCallBack = validCallBack;
3793
- return _this;
3851
+ return _super.call(this, value, target, event, autoValid) || this;
3794
3852
  }
3795
- ValidValidator.prototype.valid = function (value, target, event) {
3796
- return this.validCallBack(value, target, event);
3853
+ PassValidator.prototype.valid = function () {
3854
+ return true;
3797
3855
  };
3798
- return ValidValidator;
3856
+ return PassValidator;
3799
3857
  }(Validator));
3800
3858
 
3801
- var ValidMultipleValidator = /** @class */ (function (_super) {
3802
- __extends(ValidMultipleValidator, _super);
3803
- function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
3859
+ var RequiredValidator = /** @class */ (function (_super) {
3860
+ __extends(RequiredValidator, _super);
3861
+ function RequiredValidator(value, target, event, autoValid) {
3804
3862
  if (autoValid === void 0) { autoValid = true; }
3805
- var _this = _super.call(this, validators, value, target, event, autoValid) || this;
3806
- _this.validMultipleCallback = validMultipleCallback;
3807
- _this.validators = validators;
3808
- return _this;
3863
+ return _super.call(this, value, target, event, autoValid) || this;
3809
3864
  }
3810
- ValidMultipleValidator.prototype.valid = function () {
3811
- return this.validMultipleCallback(this.validators, this.value, this.getTarget(), this.getEvent());
3865
+ RequiredValidator.prototype.valid = function () {
3866
+ var value = this.value;
3867
+ // console.log('required', value, value !== undefined && value !== null)
3868
+ return value !== undefined && value !== null;
3812
3869
  };
3813
- return ValidMultipleValidator;
3814
- }(MultipleValidator));
3870
+ return RequiredValidator;
3871
+ }(Validator));
3815
3872
 
3816
3873
  var RegExpTestValidator = /** @class */ (function (_super) {
3817
3874
  __extends(RegExpTestValidator, _super);
@@ -3836,32 +3893,31 @@ var RegExpTestValidator = /** @class */ (function (_super) {
3836
3893
  return RegExpTestValidator;
3837
3894
  }(Validator));
3838
3895
 
3839
- var RequiredValidator = /** @class */ (function (_super) {
3840
- __extends(RequiredValidator, _super);
3841
- function RequiredValidator(value, target, event, autoValid) {
3896
+ var UnCheckedValidator = /** @class */ (function (_super) {
3897
+ __extends(UnCheckedValidator, _super);
3898
+ function UnCheckedValidator(value, target, event, autoValid) {
3842
3899
  if (autoValid === void 0) { autoValid = true; }
3843
3900
  return _super.call(this, value, target, event, autoValid) || this;
3844
3901
  }
3845
- RequiredValidator.prototype.valid = function () {
3846
- var value = this.value;
3847
- // console.log('required', value, value !== undefined && value !== null)
3848
- return value !== undefined && value !== null;
3902
+ UnCheckedValidator.prototype.valid = function () {
3903
+ var _a, _b;
3904
+ return !((_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false);
3849
3905
  };
3850
- return RequiredValidator;
3906
+ return UnCheckedValidator;
3851
3907
  }(Validator));
3852
3908
 
3853
- var ValueNotEqualsValidator = /** @class */ (function (_super) {
3854
- __extends(ValueNotEqualsValidator, _super);
3855
- function ValueNotEqualsValidator(equalsValue, value, target, event, autoValid) {
3909
+ var ValidValidator = /** @class */ (function (_super) {
3910
+ __extends(ValidValidator, _super);
3911
+ function ValidValidator(validCallBack, value, target, event, autoValid) {
3856
3912
  if (autoValid === void 0) { autoValid = true; }
3857
3913
  var _this = _super.call(this, value, target, event, autoValid) || this;
3858
- _this.equalsValue = equalsValue;
3914
+ _this.validCallBack = validCallBack;
3859
3915
  return _this;
3860
3916
  }
3861
- ValueNotEqualsValidator.prototype.valid = function () {
3862
- return this.value !== this.equalsValue;
3917
+ ValidValidator.prototype.valid = function (value, target, event) {
3918
+ return this.validCallBack(value, target, event);
3863
3919
  };
3864
- return ValueNotEqualsValidator;
3920
+ return ValidValidator;
3865
3921
  }(Validator));
3866
3922
 
3867
3923
  var ValidValidatorArray = /** @class */ (function (_super) {
@@ -3878,6 +3934,21 @@ var ValidValidatorArray = /** @class */ (function (_super) {
3878
3934
  return ValidValidatorArray;
3879
3935
  }(ValidatorArray));
3880
3936
 
3937
+ var ValidMultipleValidator = /** @class */ (function (_super) {
3938
+ __extends(ValidMultipleValidator, _super);
3939
+ function ValidMultipleValidator(validMultipleCallback, validators, value, target, event, autoValid) {
3940
+ if (autoValid === void 0) { autoValid = true; }
3941
+ var _this = _super.call(this, validators, value, target, event, autoValid) || this;
3942
+ _this.validMultipleCallback = validMultipleCallback;
3943
+ _this.validators = validators;
3944
+ return _this;
3945
+ }
3946
+ ValidMultipleValidator.prototype.valid = function () {
3947
+ return this.validMultipleCallback(this.validators, this.value, this.getTarget(), this.getEvent());
3948
+ };
3949
+ return ValidMultipleValidator;
3950
+ }(MultipleValidator));
3951
+
3881
3952
  var ValueEqualsValidator = /** @class */ (function (_super) {
3882
3953
  __extends(ValueEqualsValidator, _super);
3883
3954
  function ValueEqualsValidator(equalsValue, value, target, event, autoValid) {
@@ -3892,17 +3963,18 @@ var ValueEqualsValidator = /** @class */ (function (_super) {
3892
3963
  return ValueEqualsValidator;
3893
3964
  }(Validator));
3894
3965
 
3895
- var UnCheckedValidator = /** @class */ (function (_super) {
3896
- __extends(UnCheckedValidator, _super);
3897
- function UnCheckedValidator(value, target, event, autoValid) {
3966
+ var ValueNotEqualsValidator = /** @class */ (function (_super) {
3967
+ __extends(ValueNotEqualsValidator, _super);
3968
+ function ValueNotEqualsValidator(equalsValue, value, target, event, autoValid) {
3898
3969
  if (autoValid === void 0) { autoValid = true; }
3899
- return _super.call(this, value, target, event, autoValid) || this;
3970
+ var _this = _super.call(this, value, target, event, autoValid) || this;
3971
+ _this.equalsValue = equalsValue;
3972
+ return _this;
3900
3973
  }
3901
- UnCheckedValidator.prototype.valid = function () {
3902
- var _a, _b;
3903
- return !((_b = (_a = this.getTarget()) === null || _a === void 0 ? void 0 : _a.checked) !== null && _b !== void 0 ? _b : false);
3974
+ ValueNotEqualsValidator.prototype.valid = function () {
3975
+ return this.value !== this.equalsValue;
3904
3976
  };
3905
- return UnCheckedValidator;
3977
+ return ValueNotEqualsValidator;
3906
3978
  }(Validator));
3907
3979
 
3908
3980
  var ClipBoardUtils = /** @class */ (function () {
@@ -3927,6 +3999,30 @@ var ClipBoardUtils = /** @class */ (function () {
3927
3999
  return ClipBoardUtils;
3928
4000
  }());
3929
4001
 
4002
+ var NodeUtils = /** @class */ (function () {
4003
+ function NodeUtils() {
4004
+ }
4005
+ // https://stackoverflow.com/questions/3955229/remove-all-child-elements-of-a-dom-node-in-javascript
4006
+ NodeUtils.removeAllChildNode = function (node) {
4007
+ while (node === null || node === void 0 ? void 0 : node.firstChild) {
4008
+ node.firstChild.remove();
4009
+ }
4010
+ };
4011
+ NodeUtils.appendChild = function (parentNode, childNode) {
4012
+ return parentNode.appendChild(childNode);
4013
+ };
4014
+ NodeUtils.replaceNode = function (targetNode, newNode) {
4015
+ var _a;
4016
+ // console.log('repalceNode', targetNode, newNode, targetNode.parentNode)
4017
+ return (_a = targetNode.parentNode) === null || _a === void 0 ? void 0 : _a.replaceChild(newNode, targetNode);
4018
+ };
4019
+ NodeUtils.addNode = function (targetNode, newNode) {
4020
+ var _a;
4021
+ return (_a = targetNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, targetNode.nextSibling);
4022
+ };
4023
+ return NodeUtils;
4024
+ }());
4025
+
3930
4026
  var StorageUtils = /** @class */ (function () {
3931
4027
  function StorageUtils() {
3932
4028
  }
@@ -3972,30 +4068,6 @@ var StorageUtils = /** @class */ (function () {
3972
4068
  return StorageUtils;
3973
4069
  }());
3974
4070
 
3975
- var NodeUtils = /** @class */ (function () {
3976
- function NodeUtils() {
3977
- }
3978
- // https://stackoverflow.com/questions/3955229/remove-all-child-elements-of-a-dom-node-in-javascript
3979
- NodeUtils.removeAllChildNode = function (node) {
3980
- while (node === null || node === void 0 ? void 0 : node.firstChild) {
3981
- node.firstChild.remove();
3982
- }
3983
- };
3984
- NodeUtils.appendChild = function (parentNode, childNode) {
3985
- return parentNode.appendChild(childNode);
3986
- };
3987
- NodeUtils.replaceNode = function (targetNode, newNode) {
3988
- var _a;
3989
- // console.log('repalceNode', targetNode, newNode, targetNode.parentNode)
3990
- return (_a = targetNode.parentNode) === null || _a === void 0 ? void 0 : _a.replaceChild(newNode, targetNode);
3991
- };
3992
- NodeUtils.addNode = function (targetNode, newNode) {
3993
- var _a;
3994
- return (_a = targetNode.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(newNode, targetNode.nextSibling);
3995
- };
3996
- return NodeUtils;
3997
- }());
3998
-
3999
4071
  exports.AllCheckedValidatorArray = AllCheckedValidatorArray;
4000
4072
  exports.AllUnCheckedValidatorArray = AllUnCheckedValidatorArray;
4001
4073
  exports.Appender = Appender;
@@ -127,7 +127,7 @@ var Messenger = /** @class */ (function () {
127
127
  this.config.window.addEventListener(Messenger.EVENT_PUBLISH_KEY, function (e) {
128
128
  var _a, _b;
129
129
  var detail = e.detail;
130
- console.log('--->', detail);
130
+ // console.log('--->', detail)
131
131
  var rtns = [];
132
132
  (_a = _this.getChannels(detail.key)) === null || _a === void 0 ? void 0 : _a.forEach(function (it) {
133
133
  try {
@@ -144,7 +144,7 @@ var Messenger = /** @class */ (function () {
144
144
  });
145
145
  this.config.window.addEventListener(Messenger.EVENT_SUBSCRIBE_KEY, function (e) {
146
146
  var detail = e.detail;
147
- console.log('--->', detail);
147
+ // console.log('--->', detail)
148
148
  var channel = _this.createChannel(detail.obj, detail.key);
149
149
  detail.init(channel, channel.subscribe(detail.subscribe));
150
150
  });
@@ -170,7 +170,7 @@ var Messenger = /** @class */ (function () {
170
170
  if (obj) {
171
171
  this.channels.forEach(function (it) {
172
172
  if (it.obj === obj) {
173
- console.log('dddddddddddd', obj);
173
+ // console.log('dddddddddddd', obj)
174
174
  _this.deleteChannel(it);
175
175
  }
176
176
  });
@@ -1,7 +1,10 @@
1
- export declare class Appender {
2
- [key: number]: any[] | undefined;
1
+ export declare class Appender<T = any> implements Iterable<T> {
2
+ [key: number]: T[] | undefined;
3
3
  length: number;
4
- constructor();
5
- push(...items: any[]): void;
4
+ constructor(defaultDatas?: T[]);
5
+ [Symbol.iterator](): Iterator<T>;
6
+ getAll(): T[];
7
+ getAlls(): T[][];
8
+ push(...items: T[]): void;
6
9
  clear(): void;
7
10
  }
@@ -2,11 +2,35 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Appender = void 0;
4
4
  var Appender = /** @class */ (function () {
5
- // [keys: string]: any;
6
- function Appender() {
5
+ function Appender(defaultDatas) {
7
6
  this.length = 0;
7
+ if (defaultDatas) {
8
+ this.push.apply(this, defaultDatas);
9
+ }
8
10
  // (this.childs as any).isAppender = true;
9
11
  }
12
+ Appender.prototype[Symbol.iterator] = function () {
13
+ var items = this.getAll();
14
+ var idx = 0;
15
+ return {
16
+ next: function (value) {
17
+ var r = { value: undefined, done: true };
18
+ if (items.length > idx) {
19
+ r = { value: items[idx], done: false };
20
+ }
21
+ idx++;
22
+ return r;
23
+ }
24
+ };
25
+ };
26
+ Appender.prototype.getAll = function () {
27
+ return this.getAlls().flat();
28
+ };
29
+ Appender.prototype.getAlls = function () {
30
+ var _this = this;
31
+ var map = Array.from({ length: this.length }).filter(function (it, idx) { return _this[idx]; }).map(function (it, idx) { return _this[idx]; });
32
+ return map;
33
+ };
10
34
  Appender.prototype.push = function () {
11
35
  var items = [];
12
36
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -80,6 +80,7 @@ var DrTargetElement = /** @class */ (function (_super) {
80
80
  targetElement: targetElement,
81
81
  creatorMetaData: targetElement.__creatorMetaData
82
82
  });
83
+ // console.log(document.body.innerHTML);
83
84
  (_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);
84
85
  }
85
86
  return OperatorRender_1.ExecuteState.EXECUTE;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dom-render",
3
- "version": "1.0.80",
3
+ "version": "1.0.83",
4
4
  "main": "DomRender.js",
5
5
  "license": "MIT",
6
6
  "description": "dom-render",
@@ -93,7 +93,7 @@ var Validator = /** @class */ (function () {
93
93
  target.value = this._value;
94
94
  }
95
95
  catch (e) {
96
- console.log('set value function is blocked ');
96
+ console.error('set value function is blocked ');
97
97
  }
98
98
  }
99
99
  if (this.getAutoValidAction()) {