dom-render 1.0.97 → 1.0.98

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.
Files changed (46) hide show
  1. package/DomRender.d.ts +1 -1
  2. package/DomRender.js +3 -3
  3. package/DomRenderProxy.js +19 -14
  4. package/README.MD +39 -39
  5. package/components/ComponentSet.d.ts +1 -1
  6. package/configs/Config.d.ts +1 -1
  7. package/configs/TargetAttr.d.ts +1 -1
  8. package/configs/TargetElement.d.ts +1 -1
  9. package/css/stringify/compiler.d.ts +1 -1
  10. package/dist/bundle.js +408 -459
  11. package/events/EventManager.js +27 -27
  12. package/messenger/Messenger.d.ts +4 -4
  13. package/operators/Dr.js +2 -2
  14. package/operators/DrAppender.js +3 -5
  15. package/operators/DrFor.js +3 -5
  16. package/operators/DrForOf.js +3 -5
  17. package/operators/DrForm.js +12 -12
  18. package/operators/DrIf.js +3 -5
  19. package/operators/DrInnerHTML.js +2 -2
  20. package/operators/DrInnerText.js +2 -2
  21. package/operators/DrPre.js +2 -4
  22. package/operators/DrRepeat.js +3 -5
  23. package/operators/DrTargetAttr.js +2 -4
  24. package/operators/DrTargetElement.js +3 -5
  25. package/operators/DrThis.js +2 -2
  26. package/operators/DrThisProperty.js +4 -6
  27. package/operators/OperatorExecuter.d.ts +6 -6
  28. package/operators/OperatorExecuter.js +2 -2
  29. package/operators/OperatorExecuterAttrRequire.js +1 -1
  30. package/package.json +1 -1
  31. package/rawsets/AttrInitCallBack.d.ts +1 -1
  32. package/rawsets/Attrs.d.ts +1 -1
  33. package/rawsets/CreatorMetaData.d.ts +1 -1
  34. package/rawsets/ElementInitCallBack.d.ts +1 -1
  35. package/rawsets/RawSet.js +59 -58
  36. package/rawsets/Render.d.ts +1 -1
  37. package/routers/Router.d.ts +1 -1
  38. package/routers/Router.js +1 -1
  39. package/utils/dom/DomUtils.d.ts +1 -1
  40. package/utils/node/NodeUtils.d.ts +1 -1
  41. package/utils/script/ScriptUtils.js +2 -2
  42. package/validators/EmptyValidator.js +2 -2
  43. package/validators/NotEmptyValidator.js +2 -2
  44. package/validators/ValidMultipleValidator.d.ts +1 -1
  45. package/validators/Validator.d.ts +2 -2
  46. package/validators/ValidatorArray.d.ts +1 -1
package/DomRender.d.ts CHANGED
@@ -2,7 +2,7 @@ import { Config } from './configs/Config';
2
2
  import { ConstructorType } from './types/Types';
3
3
  import { RawSet } from './rawsets/RawSet';
4
4
  export declare class DomRender {
5
- static run<T extends object>(obj: T, target?: Node | null, oConfig?: Config): T;
5
+ static run<T extends object>(obj: T, target?: Node | null, oConfig?: Omit<Config, 'window'>): T;
6
6
  static createComponent(param: {
7
7
  type: ConstructorType<any> | any;
8
8
  tagName?: string;
package/DomRender.js CHANGED
@@ -20,7 +20,7 @@ var DomRender = /** @class */ (function () {
20
20
  function DomRender() {
21
21
  }
22
22
  DomRender.run = function (obj, target, oConfig) {
23
- var _a, _b, _c;
23
+ var _a, _b, _c, _d;
24
24
  var robj = obj;
25
25
  if ('_DomRender_isProxy' in obj) {
26
26
  if (target) {
@@ -48,8 +48,8 @@ var DomRender = /** @class */ (function () {
48
48
  config.router = (_c = config.router) !== null && _c !== void 0 ? _c : new HashRouter_1.HashRouter(robj, config.window);
49
49
  }
50
50
  else { // default
51
- // config.routerType = 'hash';
52
- // config.router = config.router ?? new HashRouter(robj, config.window);
51
+ config.routerType = 'hash';
52
+ config.router = (_d = config.router) !== null && _d !== void 0 ? _d : new HashRouter_1.HashRouter(robj, config.window);
53
53
  }
54
54
  domRender.run(robj);
55
55
  return robj;
package/DomRenderProxy.js CHANGED
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
14
14
  function verb(n) { return function (v) { return step([n, v]); }; }
15
15
  function step(op) {
16
16
  if (f) throw new TypeError("Generator is already executing.");
17
- while (_) try {
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
18
  if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
19
  if (y = 0, t) op = [op[0] & 2, t.value];
20
20
  switch (op[0]) {
@@ -76,9 +76,9 @@ var DomRenderProxy = /** @class */ (function () {
76
76
  };
77
77
  DomRenderProxy.prototype.run = function (objProxy) {
78
78
  var _this = this;
79
- var _a, _b;
79
+ var _a;
80
80
  this._domRender_proxy = objProxy;
81
- (_b = (_a = objProxy) === null || _a === void 0 ? void 0 : _a.onProxyDomRender) === null || _b === void 0 ? void 0 : _b.call(_a, this.config);
81
+ (_a = objProxy === null || objProxy === void 0 ? void 0 : objProxy.onProxyDomRender) === null || _a === void 0 ? void 0 : _a.call(objProxy, this.config);
82
82
  var obj = objProxy._DomRender_origin;
83
83
  if (obj) {
84
84
  Object.keys(obj).forEach(function (it) {
@@ -104,7 +104,10 @@ var DomRenderProxy = /** @class */ (function () {
104
104
  };
105
105
  DomRenderProxy.prototype.initRender = function (target) {
106
106
  var _this = this;
107
- var _a, _b, _c, _d, _e;
107
+ var _a, _b, _c, _d;
108
+ if (target instanceof Element) {
109
+ target.innerHTML = target.innerHTML.replace(/@this@/g, 'this');
110
+ }
108
111
  var onCreate = (_b = (_a = target).getAttribute) === null || _b === void 0 ? void 0 : _b.call(_a, RawSet_1.RawSet.DR_ON_CREATE_ARGUMENTS_OPTIONNAME);
109
112
  var createParam = [];
110
113
  if (onCreate) {
@@ -114,7 +117,7 @@ var DomRenderProxy = /** @class */ (function () {
114
117
  }
115
118
  }
116
119
  (_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));
117
- var innerHTML = (_e = target.innerHTML) !== null && _e !== void 0 ? _e : '';
120
+ // const innerHTML = (target as any).innerHTML ?? '';
118
121
  this._targets.add(target);
119
122
  var rawSets = RawSet_1.RawSet.checkPointCreates(target, this._domRender_proxy, this.config);
120
123
  // console.log('initRender -------rawSet', rawSets)
@@ -193,11 +196,11 @@ var DomRenderProxy = /** @class */ (function () {
193
196
  new Map(JSON.parse(targetAttrMap)).forEach(function (v, k) {
194
197
  var _a;
195
198
  // it?.data.onChangeAttrRender(k, null, v);
196
- var isUsing = EventManager_1.EventManager.isUsingThisVar(v, "this." + fullPathStr);
199
+ var isUsing = EventManager_1.EventManager.isUsingThisVar(v, "this.".concat(fullPathStr));
197
200
  if (isUsing) {
198
201
  var render = it_1.fragment.render;
199
202
  // console.log('render-->', (it.fragment as any).render)
200
- var script = render.renderScript + " return " + v + " ";
203
+ var script = "".concat(render.renderScript, " return ").concat(v, " ");
201
204
  var cval = ScriptUtils_1.ScriptUtils.eval(script, Object.assign((_a = _this._domRender_proxy) !== null && _a !== void 0 ? _a : {}, { __render: render }));
202
205
  it_1.data.onChangeAttrRender(k, cval);
203
206
  }
@@ -269,7 +272,7 @@ var DomRenderProxy = /** @class */ (function () {
269
272
  // const firstPathStr = paths.slice(1).reverse().join('.');
270
273
  var strings = paths.reverse();
271
274
  // array같은경우도 키값으로 접근하기때문에 특정 인덱스를 찾아서 그부분만 바꿔줄수 있다.
272
- var fullPathStr_1 = strings.map(function (it) { return isNaN(Number(it)) ? '.' + it : "[" + it + "]"; }).join('').slice(1);
275
+ var fullPathStr_1 = strings.map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('').slice(1);
273
276
  // console.log('-------fullPathStr', fullPathStr, lastDoneExecute);
274
277
  if (lastDoneExecute) {
275
278
  // const firstData = ScriptUtils.evalReturn('this.' + firstPathStr, this._domRender_proxy);
@@ -278,7 +281,7 @@ var DomRenderProxy = /** @class */ (function () {
278
281
  // }
279
282
  var iterable_1 = this._rawSets.get(fullPathStr_1);
280
283
  // array check
281
- var front_1 = strings.slice(0, strings.length - 1).map(function (it) { return isNaN(Number(it)) ? '.' + it : "[" + it + "]"; }).join('');
284
+ var front_1 = strings.slice(0, strings.length - 1).map(function (it) { return isNaN(Number(it)) ? '.' + it : "[".concat(it, "]"); }).join('');
282
285
  var last_1 = strings[strings.length - 1];
283
286
  var data_1 = ScriptUtils_1.ScriptUtils.evalReturn('this' + front_1, this._domRender_proxy);
284
287
  // console.log('-------!!!!!', fullPathStr, iterable, data, front, last);
@@ -333,12 +336,14 @@ var DomRenderProxy = /** @class */ (function () {
333
336
  return _this.render(Array.from(iterable_1), fullPathStr_1);
334
337
  }
335
338
  }).then(function (it) {
339
+ console.log('target1------->,', it);
336
340
  _this._targets.forEach(function (it) {
341
+ console.log('target2------->,', it);
337
342
  // return;
338
343
  if (it.nodeType === Node.DOCUMENT_FRAGMENT_NODE || it.nodeType === Node.ELEMENT_NODE) {
339
344
  var targets = EventManager_1.eventManager.findAttrElements(it, _this.config);
340
345
  // console.log('------>', targets);
341
- EventManager_1.eventManager.changeVar(_this._domRender_proxy, targets, "this." + fullPathStr_1, _this.config);
346
+ EventManager_1.eventManager.changeVar(_this._domRender_proxy, targets, "this.".concat(fullPathStr_1), _this.config);
342
347
  }
343
348
  });
344
349
  });
@@ -348,7 +353,7 @@ var DomRenderProxy = /** @class */ (function () {
348
353
  return fullPaths;
349
354
  };
350
355
  DomRenderProxy.prototype.set = function (target, p, value, receiver) {
351
- var _a, _b, _c;
356
+ var _a, _b;
352
357
  // console.log('set-->', p, value, target, receiver);
353
358
  if (typeof p === 'string' && p !== '__domrender_components' && excludeGetSetPropertys.includes(p)) {
354
359
  target[p] = value;
@@ -370,12 +375,12 @@ var DomRenderProxy = /** @class */ (function () {
370
375
  }
371
376
  // console.log('full path:', fullPath);
372
377
  if (('onBeforeReturnSet' in receiver) && typeof p === 'string' && !((_a = this.config.proxyExcludeOnBeforeReturnSets) !== null && _a !== void 0 ? _a : []).concat(excludeGetSetPropertys).includes(p)) {
373
- (_c = (_b = receiver) === null || _b === void 0 ? void 0 : _b.onBeforeReturnSet) === null || _c === void 0 ? void 0 : _c.call(_b, p, value, fullPath);
378
+ (_b = receiver === null || receiver === void 0 ? void 0 : receiver.onBeforeReturnSet) === null || _b === void 0 ? void 0 : _b.call(receiver, p, value, fullPath);
374
379
  }
375
380
  return true;
376
381
  };
377
382
  DomRenderProxy.prototype.get = function (target, p, receiver) {
378
- var _a, _b, _c;
383
+ var _a, _b;
379
384
  // console.log('get-->', target, p, receiver);
380
385
  if (p === '_DomRender_origin') {
381
386
  return this._domRender_origin;
@@ -406,7 +411,7 @@ var DomRenderProxy = /** @class */ (function () {
406
411
  it_2 = it_2._DomRender_origin;
407
412
  }
408
413
  if (('onBeforeReturnGet' in receiver) && typeof p === 'string' && !((_a = this.config.proxyExcludeOnBeforeReturnGets) !== null && _a !== void 0 ? _a : []).concat(excludeGetSetPropertys).includes(p)) {
409
- (_c = (_b = receiver) === null || _b === void 0 ? void 0 : _b.onBeforeReturnGet) === null || _c === void 0 ? void 0 : _c.call(_b, p, it_2, this.root([p], it_2, false));
414
+ (_b = receiver === null || receiver === void 0 ? void 0 : receiver.onBeforeReturnGet) === null || _b === void 0 ? void 0 : _b.call(receiver, p, it_2, this.root([p], it_2, false));
410
415
  }
411
416
  return it_2;
412
417
  }
package/README.MD CHANGED
@@ -125,13 +125,13 @@ const data = DomRender.run(new Data(), document.querySelector('#app')!);
125
125
  ```html
126
126
  <h3>appender</h3>
127
127
  <ul>
128
- <li dr-appender="this.appender">
128
+ <li dr-appender="@this@.appender">
129
129
  ${#it#}$
130
130
  </li>
131
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>
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
135
  ```
136
136
 
137
137
  ```typescript
@@ -187,12 +187,12 @@ class Data {
187
187
  * ref: element
188
188
  * variable: $event, $target
189
189
  ```html
190
- click: <button dr-event-click="this.name = 'name' + new Date()">click</button> <br>
191
- change: <input type="text" dr-event-change="this.name = $target.value"> <br>
192
- input: <input type="text" dr-event-input="this.name = $target.value"> <br>
193
- keyup: <input type="text" dr-event-keyup="this.name = $target.value"> <br>
190
+ click: <button dr-event-click="@this@.name = 'name' + new Date()">click</button> <br>
191
+ change: <input type="text" dr-event-change="@this@.name = $target.value"> <br>
192
+ input: <input type="text" dr-event-input="@this@.name = $target.value"> <br>
193
+ keyup: <input type="text" dr-event-keyup="@this@.name = $target.value"> <br>
194
194
  ...
195
- keydown: <input type="text" dr-event-keydown="this.name = $target.value"><br>
195
+ keydown: <input type="text" dr-event-keydown="@this@.name = $target.value"><br>
196
196
  submit: <form dr-event-submit="console.log($event); $event.preventDefault();"><input type="text"> <button type="submit">submit</button></form><br>
197
197
  ```
198
198
  </details>
@@ -204,7 +204,7 @@ submit: <form dr-event-submit="console.log($event); $event.preventDefault();"><i
204
204
  * variable: $target
205
205
 
206
206
  ```html
207
- window-event-popstate: <input type="text" dr-window-event-popstate="alert(this.name)"><br>
207
+ window-event-popstate: <input type="text" dr-window-event-popstate="alert(@this@.name)"><br>
208
208
  ```
209
209
  </details>
210
210
 
@@ -236,8 +236,8 @@ class data {
236
236
  }
237
237
  ```
238
238
  ```html
239
- <div dr-this="this.dictionary">
240
- ${this.name}$
239
+ <div dr-this="@this@.dictionary">
240
+ ${@this@.name}$
241
241
  </div>
242
242
  ```
243
243
  </details>
@@ -258,7 +258,7 @@ class data {
258
258
  }
259
259
  ```
260
260
  ```html
261
- <home dr-this-property="this.dictionary" dr-on-init:arguments="[2,#this#]">
261
+ <home dr-this-property="@this@.dictionary" dr-on-init:arguments="[2,#this#]">
262
262
  ${this}$
263
263
  </home>
264
264
  ```
@@ -274,8 +274,8 @@ class data {
274
274
  * Value and variable values are referencing each other. It affects each other when changing. (Immediate reflection event: input)
275
275
 
276
276
  ```html
277
- dr-value: <input type="text" dr-value="this.office.name"> <br>
278
- dr-value-link: <input type="text" dr-value-link="this.office.addr.street"> <br>
277
+ dr-value: <input type="text" dr-value="@this@.office.name"> <br>
278
+ dr-value-link: <input type="text" dr-value-link="@this@.office.addr.street"> <br>
279
279
  ```
280
280
  </details>
281
281
 
@@ -284,7 +284,7 @@ dr-value-link: <input type="text" dr-value-link="this.office.addr.street"> <br>
284
284
  <summary>dr-attr<strong>🔻(click)</strong></summary>
285
285
 
286
286
  ```html
287
- <textarea dr-attr="{rows: this.age/2, cols: this.age}"></textarea>
287
+ <textarea dr-attr="{rows: @this@.age/2, cols: @this@.age}"></textarea>
288
288
  <div dr-attr="{wow: '123', good: 123444}"></div>
289
289
  <div dr-attr="['wow=123', 'good=123444']"></div>
290
290
  <div dr-attr="'wow=123, good=123444'"></div>
@@ -295,8 +295,8 @@ dr-value-link: <input type="text" dr-value-link="this.office.addr.street"> <br>
295
295
  <summary>dr-class<strong>🔻(click)</strong></summary>
296
296
 
297
297
  ```html
298
- <div dr-class="{big: this.age > 50, red: this.age > 50}"></div>
299
- <div dr-class="'big yellow ' + (this.age > 50 ? 'old' : 'young')"></div>
298
+ <div dr-class="{big: @this@.age > 50, red: @this@.age > 50}"></div>
299
+ <div dr-class="'big yellow ' + (@this@.age > 50 ? 'old' : 'young')"></div>
300
300
  <div dr-class="['small', 'yellow']"></div>
301
301
  ```
302
302
  </details>
@@ -305,10 +305,10 @@ dr-value-link: <input type="text" dr-value-link="this.office.addr.street"> <br>
305
305
  <summary>dr-style<strong>🔻(click)</strong></summary>
306
306
 
307
307
  ```html
308
- <div dr-style="{fontSize: this.age + 'px'}"> style </div>
308
+ <div dr-style="{fontSize: @this@.age + 'px'}"> style </div>
309
309
  <div dr-style="{'font-size': '20px'}"> style</div>
310
- <div dr-style="'font-size: ' + this.age +'px; margin: ' + this.age + 'px'"> style </div>
311
- <div dr-style="['font-size: ' + this.age +'px', 'margin: ' + this.age + 'px']"> style </div>
310
+ <div dr-style="'font-size: ' + @this@.age +'px; margin: ' + @this@.age + 'px'"> style </div>
311
+ <div dr-style="['font-size: ' + @this@.age +'px', 'margin: ' + @this@.age + 'px']"> style </div>
312
312
  ```
313
313
  </details>
314
314
 
@@ -332,8 +332,8 @@ dr-value-link: <input type="text" dr-value-link="this.office.addr.street"> <br>
332
332
  <summary>dr-complete<strong>🔻(click)</strong></summary>
333
333
 
334
334
  ```html
335
- <select dr-value-link="this.currentContry" dr-event-change="this.contryChange($event)">
336
- <option dr-for-of="this.languages" dr-value="#it#.key" dr-complete="this.currentContry='defaultValue'">${#it#.title}$</option>
335
+ <select dr-value-link="@this@.currentContry" dr-event-change="@this@.contryChange($event)">
336
+ <option dr-for-of="@this@.languages" dr-value="#it#.key" dr-complete="@this@.currentContry='defaultValue'">${#it#.title}$</option>
337
337
  </select>
338
338
  ```
339
339
  </details>
@@ -348,7 +348,7 @@ dr-value-link: <input type="text" dr-value-link="this.office.addr.street"> <br>
348
348
 
349
349
  ```html
350
350
  <body id="app">
351
- <form dr-form="this.form" dr-event-submit="this.submit(); $event.preventDefault();">
351
+ <form dr-form="@this@.form" dr-event-submit="@this@.submit(); $event.preventDefault();">
352
352
  name: <input name="name">
353
353
  age: <input name="age">
354
354
  <button type="submit">submit</button>
@@ -373,7 +373,7 @@ dr-value-link: <input type="text" dr-value-link="this.office.addr.street"> <br>
373
373
 
374
374
  ```html
375
375
  <body id="app">
376
- <form dr-form="this.form" dr-event-submit="this.submit(); $event.preventDefault();">
376
+ <form dr-form="@this@.form" dr-event-submit="@this@.submit(); $event.preventDefault();">
377
377
  name: <input name="name">
378
378
  age: <input name="age">
379
379
  <button type="submit">submit</button>
@@ -457,7 +457,7 @@ const data = DomRender.run(new Data(), document.querySelector('#app')!, config);
457
457
  ```html
458
458
  <header>
459
459
  <h1>examples header</h1>
460
- <h2>${this.name}$</h2>
460
+ <h2>${@this@.name}$</h2>
461
461
  <div>
462
462
  <div><button dr-event-click="$router.go('/')">main</button></div>
463
463
  <div>
@@ -476,7 +476,7 @@ const data = DomRender.run(new Data(), document.querySelector('#app')!, config);
476
476
  <page-second dr-if="$router.testRegexp('/second/wow$')">wow</page-second>
477
477
  <page-detail url='/detail/{id:[0-9]+}' dr-if="$router.test($attribute.url)" dr-on-create:callback="$component.routerData($router.getRouteData($attribute.url))" ></page-detail>
478
478
  <div>
479
- <button dr-event-click="this.plusCount()">${this.count}$ count pluse++</button>
479
+ <button dr-event-click="@this@.plusCount()">${@this@.count}$ count pluse++</button>
480
480
  </div>
481
481
  </main>
482
482
  <hr>
@@ -677,29 +677,29 @@ const data = config.scripts.concat('head', 'tail')
677
677
  - [examples](./examples/component_script_attr) lazy load (html, css)
678
678
  ```html
679
679
  <body id="app">
680
- ${this.name}$
680
+ ${@this@.name}$
681
681
  <h1>component</h1>
682
682
  <profile dr-on-create:callback="$component.name='jhone'; $component.age=55;"><b>${#component#.details}$</b></profile>
683
683
  <profile dr-on-create:callback="$component.name='cal'; $component.age=56;"><b>detail-2</b></profile>
684
684
  <profile dr-on-create:callback="$component.name='rose'; $component.age=57;">
685
685
  <profile dr-on-create:callback="$component.name='rose-sub'; $component.age=156;">
686
- <b>${this.name}$</b>
686
+ <b>${@this@.name}$</b>
687
687
  </profile>
688
688
  </profile>
689
689
  <h3>component data link and detect</h3>
690
- <Profile dr-if="this.toggle" dr-detect="$component.age = this.age" dr-on-create:callback="$component.name='papa'; $component.age=58;">
691
- <b>${this.name}$</b>
690
+ <Profile dr-if="@this@.toggle" dr-detect="$component.age = @this@.age" dr-on-create:callback="$component.name='papa'; $component.age=58;">
691
+ <b>${@this@.name}$</b>
692
692
  </Profile>
693
- <Profile dr-if="this.toggle" dr-detect="$component.age = this.age" dr-on-constructor:arguments="[1,2]">
694
- <b>${this.name}$</b>
693
+ <Profile dr-if="@this@.toggle" dr-detect="$component.age = @this@.age" dr-on-constructor:arguments="[1,2]">
694
+ <b>${@this@.name}$</b>
695
695
  </Profile>
696
696
 
697
- <button dr-event-click="this.name = new Date().toString();">change name</button>
698
- <button dr-event-click="this.age = Date.now();">change age</button>
699
- <button dr-event-click="this.toggle = !this.toggle;">change toggle</button>
697
+ <button dr-event-click="@this@.name = new Date().toString();">change name</button>
698
+ <button dr-event-click="@this@.age = Date.now();">change age</button>
699
+ <button dr-event-click="@this@.toggle = !@this@.toggle;">change toggle</button>
700
700
 
701
701
  <j1>component constructor, on-create, dr-on-create:callback</j1>
702
- <home dr-constructor="[this.name, this.age, 'home welcom']" dr-on-create-arguments="{type: 'onCreate', data: 'datadata'}" dr-on-create:callback="$component.onInit('data')"></home>
702
+ <home dr-constructor="[@this@.name, @this@.age, 'home welcom']" dr-on-create-arguments="{type: 'onCreate', data: 'datadata'}" dr-on-create:callback="$component.onInit('data')"></home>
703
703
 
704
704
 
705
705
 
@@ -709,7 +709,7 @@ ${this.name}$
709
709
  </div>
710
710
 
711
711
  <h1>attr</h1>
712
- <button link="this.link">
712
+ <button link="@this@.link">
713
713
  link attribute
714
714
  </button>
715
715
  <h1>attrCallBack</h1>
@@ -758,7 +758,7 @@ using component
758
758
  ```html
759
759
  <my-element dr-on-create:callback="$component.say();"></my-element>
760
760
 
761
- <home value="${this.name}$" wow="${this.color}$">
761
+ <home value="${@this@.name}$" wow="${@this@.color}$">
762
762
  ${#component#.homeName}$
763
763
  <home value="${#component#.homeName}$" wow="${#component#.homeColor}$" dr-component-name="sub_component" dr-component-inner-html-name="innerHTML">
764
764
  ${#sub_component#.homeName}$
@@ -1,4 +1,4 @@
1
- export declare type ComponentSetConfig = {
1
+ export type ComponentSetConfig = {
2
2
  objPath?: string | null;
3
3
  };
4
4
  export declare class ComponentSet {
@@ -6,7 +6,7 @@ import { TargetElement } from './TargetElement';
6
6
  import { TargetAttr } from './TargetAttr';
7
7
  import { Attrs } from '../rawsets/Attrs';
8
8
  import { OperatorAround } from '../operators/OperatorExecuter';
9
- export declare type Config = {
9
+ export type Config = {
10
10
  window: Window;
11
11
  targetElements?: TargetElement[];
12
12
  targetAttrs?: TargetAttr[];
@@ -1,5 +1,5 @@
1
1
  import { RawSet } from '../rawsets/RawSet';
2
- export declare type TargetAttr = {
2
+ export type TargetAttr = {
3
3
  name: string;
4
4
  callBack: (target: Element, attrValue: string, obj: any, rawSet: RawSet) => DocumentFragment;
5
5
  complete?: (target: Element, attrValue: string, obj: any, rawSet: RawSet) => void;
@@ -3,7 +3,7 @@ import { Config } from './Config';
3
3
  import { Attrs } from '../rawsets/Attrs';
4
4
  import { CreatorMetaData } from '../rawsets/CreatorMetaData';
5
5
  import { Render } from '../rawsets/Render';
6
- export declare type TargetElement = {
6
+ export type TargetElement = {
7
7
  name: string;
8
8
  template?: string;
9
9
  styles?: string[];
@@ -6,7 +6,7 @@ export = Compiler;
6
6
  * @return {Type}
7
7
  * @api public
8
8
  */
9
- declare function Compiler(opts: any): any;
9
+ declare function Compiler(opts: any): Type;
10
10
  declare class Compiler {
11
11
  /**
12
12
  * Initialize a compiler.