dom-render 1.0.44 → 1.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -199,6 +199,50 @@ var ScriptUtils = (function () {
199
199
  return ScriptUtils;
200
200
  }());
201
201
 
202
+ var DomUtils = (function () {
203
+ function DomUtils() {
204
+ }
205
+ DomUtils.selectorElements = function (selector, element) {
206
+ if (element === void 0) { element = document; }
207
+ return Array.prototype.slice.call(element.querySelectorAll(selector));
208
+ };
209
+ DomUtils.selectorNodes = function (selector, element) {
210
+ if (element === void 0) { element = document; }
211
+ return element.querySelectorAll(selector);
212
+ };
213
+ DomUtils.removeAttribute = function (result, attrs) {
214
+ attrs.forEach(function (it) {
215
+ result.removeAttribute(it);
216
+ });
217
+ };
218
+ DomUtils.setAttribute = function (result, attrs) {
219
+ attrs.forEach(function (it) {
220
+ result.setAttribute(it, '');
221
+ });
222
+ };
223
+ DomUtils.setAttributeAttr = function (result, attrs) {
224
+ attrs.forEach(function (it) {
225
+ result.setAttribute(it.name, it.value);
226
+ });
227
+ };
228
+ DomUtils.getAttributeToObject = function (input) {
229
+ var attribute = {};
230
+ input.getAttributeNames().forEach(function (ait) {
231
+ attribute[ait] = input.getAttribute(ait);
232
+ });
233
+ return attribute;
234
+ };
235
+ DomUtils.getStyleToObject = function (input) {
236
+ var style = {};
237
+ for (var i = 0; i < input.style.length; i++) {
238
+ var key = input.style[i];
239
+ style[key] = input.style[key];
240
+ }
241
+ return style;
242
+ };
243
+ return DomUtils;
244
+ }());
245
+
202
246
  var eventManager = new (function () {
203
247
  function class_1() {
204
248
  var _this = this;
@@ -206,8 +250,9 @@ var eventManager = new (function () {
206
250
  this.eventNames = [
207
251
  'click', 'mousedown', 'mouseup', 'dblclick', 'mouseover', 'mouseout', 'mousemove', 'mouseenter', 'mouseleave', 'contextmenu',
208
252
  'keyup', 'keydown', 'keypress',
209
- 'change', 'input', 'submit', 'resize'
253
+ 'change', 'input', 'submit', 'resize', 'focus', 'blur'
210
254
  ];
255
+ this.eventParam = this.attrPrefix + 'event';
211
256
  this.attrNames = [
212
257
  this.attrPrefix + 'value',
213
258
  this.attrPrefix + 'value-link',
@@ -215,17 +260,21 @@ var eventManager = new (function () {
215
260
  this.attrPrefix + 'style',
216
261
  this.attrPrefix + 'class',
217
262
  this.attrPrefix + 'window-event-popstate',
218
- this.attrPrefix + 'on-init'
263
+ this.attrPrefix + 'on-init',
264
+ this.eventParam
219
265
  ];
220
266
  this.eventNames.forEach(function (it) {
221
267
  _this.attrNames.push(_this.attrPrefix + 'event-' + it);
222
268
  });
223
269
  window.addEventListener('popstate', function (e) {
224
270
  document.querySelectorAll('[dr-window-event-popstate]').forEach(function (it) {
225
- var _a;
226
271
  var script = it.getAttribute('dr-window-event-popstate');
227
272
  if (script) {
228
- (_a = Function("\"use strict\"; const $target = this.$target; " + script + " ").bind(Object.assign({ $target: it }, it.obj))()) !== null && _a !== void 0 ? _a : {};
273
+ ScriptUtils.eval("const $target = this.__render.target; " + script + " ", Object.assign(it.obj, {
274
+ __render: Object.freeze({
275
+ target: it
276
+ })
277
+ }));
229
278
  }
230
279
  });
231
280
  });
@@ -244,8 +293,9 @@ var eventManager = new (function () {
244
293
  class_1.prototype.applyEvent = function (obj, childNodes, config) {
245
294
  var _this = this;
246
295
  this.eventNames.forEach(function (it) {
247
- _this.addDrEvent(obj, it, childNodes);
296
+ _this.addDrEvents(obj, it, childNodes);
248
297
  });
298
+ this.addDrEventPram(obj, this.eventParam, childNodes);
249
299
  this.procAttr(childNodes, this.attrPrefix + 'value', function (it, attribute) {
250
300
  var script = attribute;
251
301
  if (script) {
@@ -310,68 +360,134 @@ var eventManager = new (function () {
310
360
  }
311
361
  });
312
362
  this.procAttr(elements, this.attrPrefix + 'attr', function (it, attribute) {
313
- var _a;
314
363
  var script = attribute;
315
364
  if (script) {
316
365
  script = 'return ' + script;
317
366
  }
318
367
  if (_this.isUsingThisVar(script, varName) || varName === undefined) {
319
- var data = (_a = Function("\"use strict\"; const $target=this.$target; " + script + " ").bind(Object.assign({ $target: it }, obj))()) !== null && _a !== void 0 ? _a : {};
320
- for (var _i = 0, _b = Object.entries(data); _i < _b.length; _i++) {
321
- var _c = _b[_i], key = _c[0], value = _c[1];
368
+ var data = ScriptUtils.eval("const $target=this.__render.target; " + script + " ", Object.assign(obj, {
369
+ __render: Object.freeze({
370
+ target: it
371
+ })
372
+ }));
373
+ for (var _i = 0, _a = Object.entries(data); _i < _a.length; _i++) {
374
+ var _b = _a[_i], key = _b[0], value = _b[1];
322
375
  it.setAttribute(key, String(value));
323
376
  }
324
377
  }
325
378
  });
326
379
  this.procAttr(elements, this.attrPrefix + 'style', function (it, attribute) {
327
- var _a;
328
380
  var script = attribute;
329
381
  if (script) {
330
382
  script = 'return ' + script;
331
383
  }
332
384
  if (_this.isUsingThisVar(script, varName) || varName === undefined) {
333
- var data = (_a = Function("\"use strict\"; const $target = this.$target; " + script + " ").bind(Object.assign({ $target: it }, obj))()) !== null && _a !== void 0 ? _a : {};
334
- for (var _i = 0, _b = Object.entries(data); _i < _b.length; _i++) {
335
- var _c = _b[_i], key = _c[0], value = _c[1];
385
+ var data = ScriptUtils.eval("const $target = this.__render.target; " + script + " ", Object.assign(obj, {
386
+ __render: Object.freeze({
387
+ target: it
388
+ })
389
+ }));
390
+ if (typeof data === 'string') {
336
391
  if (it instanceof HTMLElement) {
337
- it.style[key] = String(value);
392
+ it.removeAttribute('style');
393
+ it.setAttribute('style', data);
394
+ }
395
+ }
396
+ else if (Array.isArray(data)) {
397
+ if (it instanceof HTMLElement) {
398
+ it.removeAttribute('style');
399
+ it.setAttribute('style', data.join(';'));
400
+ }
401
+ }
402
+ else {
403
+ for (var _i = 0, _a = Object.entries(data); _i < _a.length; _i++) {
404
+ var _b = _a[_i], key = _b[0], value = _b[1];
405
+ if (it instanceof HTMLElement) {
406
+ it.style[key] = String(value);
407
+ }
338
408
  }
339
409
  }
340
410
  }
341
411
  });
342
412
  this.procAttr(elements, this.attrPrefix + 'class', function (it, attribute) {
343
- var _a;
344
413
  var script = attribute;
345
414
  if (script) {
346
415
  script = 'return ' + script;
347
416
  }
348
417
  if (_this.isUsingThisVar(script, varName) || varName === undefined) {
349
- var data = (_a = Function("\"use strict\"; const $target = this.$target; " + script + " ").bind(Object.assign({ $target: it }, obj))()) !== null && _a !== void 0 ? _a : {};
350
- for (var _i = 0, _b = Object.entries(data); _i < _b.length; _i++) {
351
- var _c = _b[_i], key = _c[0], value = _c[1];
418
+ var data = ScriptUtils.eval("const $target = this.$target; " + script + " ", Object.assign(obj, {
419
+ __render: Object.freeze({
420
+ target: it
421
+ })
422
+ }));
423
+ if (typeof data === 'string') {
352
424
  if (it instanceof HTMLElement) {
353
- if (value) {
354
- it.classList.add(key);
355
- }
356
- else {
357
- it.classList.remove(key);
425
+ it.removeAttribute('class');
426
+ it.setAttribute('class', data);
427
+ }
428
+ }
429
+ else if (Array.isArray(data)) {
430
+ if (it instanceof HTMLElement) {
431
+ it.removeAttribute('class');
432
+ it.setAttribute('class', data.join(' '));
433
+ }
434
+ }
435
+ else {
436
+ for (var _i = 0, _a = Object.entries(data); _i < _a.length; _i++) {
437
+ var _b = _a[_i], key = _b[0], value = _b[1];
438
+ if (it instanceof HTMLElement) {
439
+ if (value) {
440
+ it.classList.add(key);
441
+ }
442
+ else {
443
+ it.classList.remove(key);
444
+ }
358
445
  }
359
446
  }
360
447
  }
361
448
  }
362
449
  });
363
450
  };
364
- class_1.prototype.addDrEvent = function (obj, eventName, elements) {
451
+ class_1.prototype.addDrEvents = function (obj, eventName, elements) {
365
452
  var attr = this.attrPrefix + 'event-' + eventName;
366
453
  this.procAttr(elements, attr, function (it, attribute) {
367
454
  var script = attribute;
368
455
  it.addEventListener(eventName, function (event) {
369
- var _a;
370
- var f = Function("\"use strict\"; const $target=event.target; const $event=event; " + script + " ");
371
- (_a = f.bind(Object.assign(obj))()) !== null && _a !== void 0 ? _a : {};
456
+ ScriptUtils.eval("const $event=this.__render.event; const $target=$event.target; " + script + " ", Object.assign(obj, {
457
+ __render: Object.freeze({
458
+ event: event
459
+ })
460
+ }));
372
461
  });
373
462
  });
374
463
  };
464
+ class_1.prototype.addDrEventPram = function (obj, attr, elements) {
465
+ this.procAttr(elements, attr, function (it, attribute, attributes) {
466
+ var bind = attributes[attr + ':bind'];
467
+ if (bind) {
468
+ var script_1 = attribute;
469
+ var params_1 = {};
470
+ var prefix_1 = attr + ':';
471
+ Object.entries(attributes).filter(function (_a) {
472
+ var k = _a[0]; _a[1];
473
+ return k.startsWith(prefix_1);
474
+ }).forEach(function (_a) {
475
+ var k = _a[0], v = _a[1];
476
+ params_1[k.slice(prefix_1.length)] = v;
477
+ });
478
+ bind.split(',').forEach(function (eventName) {
479
+ it.addEventListener(eventName.trim(), function (event) {
480
+ ScriptUtils.eval("const $params = this.__render.params; const $event=this.__render.event; const $target=$event.target; " + script_1 + " ", Object.assign(obj, {
481
+ __render: Object.freeze({
482
+ event: event,
483
+ params: params_1
484
+ })
485
+ }));
486
+ });
487
+ });
488
+ }
489
+ });
490
+ };
375
491
  class_1.prototype.procAttr = function (elements, attrName, callBack) {
376
492
  if (elements === void 0) { elements = new Set(); }
377
493
  var sets = new Set();
@@ -389,8 +505,9 @@ var eventManager = new (function () {
389
505
  });
390
506
  sets.forEach(function (it) {
391
507
  var attr = it.getAttribute(attrName);
508
+ var attrs = DomUtils.getAttributeToObject(it);
392
509
  if (attr) {
393
- callBack(it, attr);
510
+ callBack(it, attr, attrs);
394
511
  }
395
512
  });
396
513
  };
@@ -880,6 +997,7 @@ var RawSet = (function () {
880
997
  styles: styles,
881
998
  template: template,
882
999
  callBack: function (element, obj, rawSet) {
1000
+ var _a;
883
1001
  if (!obj.__domrender_components) {
884
1002
  obj.__domrender_components = {};
885
1003
  }
@@ -906,7 +1024,8 @@ var RawSet = (function () {
906
1024
  }));
907
1025
  }
908
1026
  var fag = document.createDocumentFragment();
909
- element.innerHTML = template;
1027
+ var innerHTML = ((_a = styles === null || styles === void 0 ? void 0 : styles.map(function (it) { return "<style>" + it + "</style>"; })) !== null && _a !== void 0 ? _a : []).join(' ') + (template !== null && template !== void 0 ? template : '');
1028
+ element.innerHTML = innerHTML;
910
1029
  fag.append(RawSet.drThisCreate(element, "this.__domrender_components." + componentKey, '', true, obj));
911
1030
  return fag;
912
1031
  }
@@ -940,6 +1059,7 @@ var Shield = (function () {
940
1059
  return Shield;
941
1060
  }());
942
1061
 
1062
+ var excludeGetSetPropertys = ['onBeforeReturnGet', 'onBeforeReturnSet', '__domrender_components', '__render', '_DomRender_isFinal', '_domRender_ref', '_rawSets', '_domRender_proxy', '_targets', '_DomRender_origin', '_DomRender_ref', '_DomRender_proxy'];
943
1063
  var DomRenderProxy = (function () {
944
1064
  function DomRenderProxy(_domRender_origin, target, config) {
945
1065
  this._domRender_origin = _domRender_origin;
@@ -1022,14 +1142,17 @@ var DomRenderProxy = (function () {
1022
1142
  }
1023
1143
  });
1024
1144
  };
1025
- DomRenderProxy.prototype.root = function (paths, value) {
1145
+ DomRenderProxy.prototype.root = function (paths, value, lastDoneExecute) {
1026
1146
  var _this = this;
1147
+ if (lastDoneExecute === void 0) { lastDoneExecute = true; }
1148
+ var fullPaths = [];
1027
1149
  if (this._domRender_ref.size > 0) {
1028
1150
  this._domRender_ref.forEach(function (it, key) {
1029
1151
  if ('_DomRender_isProxy' in key) {
1030
1152
  it.forEach(function (sit) {
1031
1153
  var _a;
1032
- (_a = key._DomRender_proxy) === null || _a === void 0 ? void 0 : _a.root(paths.concat(sit), value);
1154
+ var items = (_a = key._DomRender_proxy) === null || _a === void 0 ? void 0 : _a.root(paths.concat(sit), value, lastDoneExecute);
1155
+ fullPaths.push(items.join(','));
1033
1156
  });
1034
1157
  }
1035
1158
  });
@@ -1037,37 +1160,47 @@ var DomRenderProxy = (function () {
1037
1160
  else {
1038
1161
  var strings = paths.reverse();
1039
1162
  var fullPathStr_1 = strings.join('.');
1040
- var iterable = this._rawSets.get(fullPathStr_1);
1041
- var front = strings.slice(0, strings.length - 1).join('.');
1042
- var last = strings[strings.length - 1];
1043
- if (!isNaN(Number(last)) && Array.isArray(ScriptUtils.evalReturn('this.' + front, this._domRender_proxy))) {
1044
- var aIterable = this._rawSets.get(front);
1045
- if (aIterable) {
1046
- this.render(Array.from(aIterable));
1163
+ if (lastDoneExecute) {
1164
+ var iterable = this._rawSets.get(fullPathStr_1);
1165
+ var front = strings.slice(0, strings.length - 1).join('.');
1166
+ var last = strings[strings.length - 1];
1167
+ if (!isNaN(Number(last)) && Array.isArray(ScriptUtils.evalReturn('this.' + front, this._domRender_proxy))) {
1168
+ var aIterable = this._rawSets.get(front);
1169
+ if (aIterable) {
1170
+ this.render(Array.from(aIterable));
1171
+ }
1047
1172
  }
1048
- }
1049
- else if (iterable) {
1050
- this.render(Array.from(iterable));
1051
- }
1052
- this._targets.forEach(function (it) {
1053
- if (it.nodeType === Node.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node.ELEMENT_NODE) {
1054
- var targets = eventManager.findAttrElements(it, _this.config);
1055
- eventManager.changeVar(_this._domRender_proxy, targets, "this." + fullPathStr_1);
1173
+ else if (iterable) {
1174
+ this.render(Array.from(iterable));
1056
1175
  }
1057
- });
1176
+ this._targets.forEach(function (it) {
1177
+ if (it.nodeType === Node.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node.ELEMENT_NODE) {
1178
+ var targets = eventManager.findAttrElements(it, _this.config);
1179
+ eventManager.changeVar(_this._domRender_proxy, targets, "this." + fullPathStr_1);
1180
+ }
1181
+ });
1182
+ }
1183
+ fullPaths.push(fullPathStr_1);
1058
1184
  }
1185
+ return fullPaths;
1059
1186
  };
1060
1187
  DomRenderProxy.prototype.set = function (target, p, value, receiver) {
1188
+ var _a, _b, _c, _d;
1061
1189
  if (typeof p === 'string') {
1062
1190
  value = this.proxy(receiver, value, p);
1063
1191
  }
1064
1192
  target[p] = value;
1193
+ var fullPath;
1065
1194
  if (typeof p === 'string') {
1066
- this.root([p], value);
1195
+ fullPath = this.root([p], value);
1196
+ }
1197
+ if (('onBeforeReturnSet' in receiver) && typeof p === 'string' && !((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.proxyExcludeOnBeforeReturnSets) !== null && _b !== void 0 ? _b : []).concat(excludeGetSetPropertys).includes(p)) {
1198
+ (_d = (_c = receiver) === null || _c === void 0 ? void 0 : _c.onBeforeReturnSet) === null || _d === void 0 ? void 0 : _d.call(_c, p, value, fullPath);
1067
1199
  }
1068
1200
  return true;
1069
1201
  };
1070
1202
  DomRenderProxy.prototype.get = function (target, p, receiver) {
1203
+ var _a, _b, _c, _d;
1071
1204
  if (p === '_DomRender_origin') {
1072
1205
  return this._domRender_origin;
1073
1206
  }
@@ -1080,11 +1213,12 @@ var DomRenderProxy = (function () {
1080
1213
  else {
1081
1214
  var it_1 = target[p];
1082
1215
  if (it_1 && typeof it_1 === 'object' && ('_DomRender_isProxy' in it_1) && Object.prototype.toString.call(it_1._DomRender_origin) === '[object Date]') {
1083
- return it_1._DomRender_origin;
1216
+ it_1 = it_1._DomRender_origin;
1084
1217
  }
1085
- else {
1086
- return it_1;
1218
+ if (('onBeforeReturnGet' in receiver) && typeof p === 'string' && !((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.proxyExcludeOnBeforeReturnGets) !== null && _b !== void 0 ? _b : []).concat(excludeGetSetPropertys).includes(p)) {
1219
+ (_d = (_c = receiver) === null || _c === void 0 ? void 0 : _c.onBeforeReturnGet) === null || _d === void 0 ? void 0 : _d.call(_c, p, it_1, this.root([p], it_1, false));
1087
1220
  }
1221
+ return it_1;
1088
1222
  }
1089
1223
  };
1090
1224
  DomRenderProxy.prototype.has = function (target, p) {
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,12 +2,14 @@ import { Config } from '../Config';
2
2
  export declare const eventManager: {
3
3
  readonly attrPrefix: "dr-";
4
4
  readonly eventNames: string[];
5
+ readonly eventParam: string;
5
6
  readonly attrNames: string[];
6
7
  findAttrElements(fragment: DocumentFragment | Element, config?: Config | undefined): Set<Element>;
7
8
  applyEvent(obj: any, childNodes: Set<ChildNode> | Set<Element>, config?: Config | undefined): void;
8
9
  changeVar(obj: any, elements: Set<Element> | Set<ChildNode>, varName?: string | undefined): void;
9
- addDrEvent(obj: any, eventName: string, elements: Set<Element> | Set<ChildNode>): void;
10
- procAttr<T extends Element = Element>(elements: Set<Element> | Set<ChildNode> | undefined, attrName: string, callBack: (h: T, value: string) => void): void;
10
+ addDrEvents(obj: any, eventName: string, elements: Set<Element> | Set<ChildNode>): void;
11
+ addDrEventPram(obj: any, attr: string, elements: Set<ChildNode> | Set<Element>): void;
12
+ procAttr<T extends Element = Element>(elements: Set<Element> | Set<ChildNode> | undefined, attrName: string, callBack: (h: T, value: string, attributes: any) => void): void;
11
13
  getValue<T_1 = any>(obj: any, name: string, value?: any): T_1;
12
14
  setValue(obj: any, name: string, value?: any): void;
13
15
  isUsingThisVar(raws: string | null | undefined, varName: string | null | undefined): boolean;
@@ -0,0 +1,3 @@
1
+ export interface OnBeforeReturnGet {
2
+ onBeforeReturnGet(name: string, value: any, fullPath?: string[]): void;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface OnBeforeReturnSet {
2
+ onBeforeReturnSet(name: string, value: any, fullPath?: string[]): void;
3
+ }
@@ -1,3 +1,6 @@
1
1
  export interface ConstructorType<T> {
2
2
  new (...args: any[]): T;
3
3
  }
4
+ export declare class Shield {
5
+ [name: string]: any;
6
+ }
@@ -5,9 +5,9 @@ export declare type Attr = {
5
5
  export declare class DomUtils {
6
6
  static selectorElements(selector: string, element?: Element | Document): Element[];
7
7
  static selectorNodes(selector: string, element?: Element | Document): NodeListOf<Element>;
8
- static removeAttribute(result: HTMLElement, attrs: string[]): void;
9
- static setAttribute(result: HTMLElement, attrs: string[]): void;
10
- static setAttributeAttr(result: HTMLElement, attrs: Attr[]): void;
11
- static getAttributeToObject(input: HTMLElement): any;
8
+ static removeAttribute(result: Element, attrs: string[]): void;
9
+ static setAttribute(result: Element, attrs: string[]): void;
10
+ static setAttributeAttr(result: Element, attrs: Attr[]): void;
11
+ static getAttributeToObject(input: Element): any;
12
12
  static getStyleToObject(input: HTMLElement): any;
13
13
  }
@@ -2,12 +2,14 @@ import { Config } from '../Config';
2
2
  export declare const eventManager: {
3
3
  readonly attrPrefix: "dr-";
4
4
  readonly eventNames: string[];
5
+ readonly eventParam: string;
5
6
  readonly attrNames: string[];
6
7
  findAttrElements(fragment: DocumentFragment | Element, config?: Config | undefined): Set<Element>;
7
8
  applyEvent(obj: any, childNodes: Set<ChildNode> | Set<Element>, config?: Config | undefined): void;
8
9
  changeVar(obj: any, elements: Set<Element> | Set<ChildNode>, varName?: string | undefined): void;
9
- addDrEvent(obj: any, eventName: string, elements: Set<Element> | Set<ChildNode>): void;
10
- procAttr<T extends Element = Element>(elements: Set<Element> | Set<ChildNode> | undefined, attrName: string, callBack: (h: T, value: string) => void): void;
10
+ addDrEvents(obj: any, eventName: string, elements: Set<Element> | Set<ChildNode>): void;
11
+ addDrEventPram(obj: any, attr: string, elements: Set<ChildNode> | Set<Element>): void;
12
+ procAttr<T extends Element = Element>(elements: Set<Element> | Set<ChildNode> | undefined, attrName: string, callBack: (h: T, value: string, attributes: any) => void): void;
11
13
  getValue<T_1 = any>(obj: any, name: string, value?: any): T_1;
12
14
  setValue(obj: any, name: string, value?: any): void;
13
15
  isUsingThisVar(raws: string | null | undefined, varName: string | null | undefined): boolean;